• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAX-WS versus Axis2, WSDL Implementation  RSS feed

Shiv Vishwakarma
Posts: 24
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I recently started working on webservices and i am facing few problems,

but firstly i want to understand what is the difference between implementation of web service client using jax-ws and axis2.

The problem that I am facing is, I have to implement an integration with a third party with our application, and third party have shared their WSDL file with us.
I initially tried to generate the stubs using axis2 and after setting the required parameters and on calling the service the service it is giving 401 error: unauthorized.
after contacting third party team, i was told that I have to use NTLM and they shared us the credentials as well....

code from implementation is below:
WSStub stub = new WSStub();
SoapOp soapOp0 = new SoapOp();


HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();


List authSchemes = new ArrayList();

final ServiceClient client = stub._getServiceClient();
Options options = client.getOptions();
options.setProperty(HTTPConstants.AUTHENTICATE, auth);
options.setProperty(HTTPConstants.CHUNKED, "false");

response = payWSStub.soapOp(soapOp0);

above code is still giving the same error: 401 unauthorized, and as per third party I have not used NTLM to pass the credentials, which i assume I have done it correctly
When I looked at their implementation of WSDL, they have used JAX-WS for generating stubs.

Please help and tell me does it makes a difference if I use to generate stubs using AXIS2 instead of JAX-WS.

any help would be greatly appreciated.

many thanks,

H Paul
Ranch Hand
Posts: 491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a JDBC provider concept, you have many provider or implementation from DB2, ORACLE, MYSQL.
JAX-WS is a specification, you many provider or implementation from JAX-WS RI called Metro, Apache CXF, AXIS2 etc..
The question now is which implementation has all the features mentioned in the JAX-WS spec.

For better explanation , a must read link http://www.coderanch.com/how-to/java/WebServicesFaq

If you choose AXIS2, then GOOGLE or see AXIS2 doc how to a code sample how to pass NTLM authentication to your web service provider.
or if you choose any other implementation Metro, Apache CXF, then do the same.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!