What JDeveloper version are you using?
The error that you are getting (401) has nothing to do with your Java code. It seems that either the username or password that you are using to connect to your SOA server is wrong.
Your Java code is correct.
Please check the server status, it's an issue with server.
I m using Jdev version 220.127.116.11.0.I have developed 2 BPEL process of one with BPEL2.0 and one with BPEL1.1.And deploying to the same server.
So server status is also fine.