aspose file tools
The moose likes Web Services and the fly likes JAX-WS versus Axis2, WSDL Implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-WS versus Axis2, WSDL Implementation" Watch "JAX-WS versus Axis2, WSDL Implementation" New topic

JAX-WS versus Axis2, WSDL Implementation

Shiv Vishwakarma

Joined: May 29, 2007
Posts: 24


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,

Vishwakarma, Shiv
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 471
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

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.
I agree. Here's the link:
subject: JAX-WS versus Axis2, WSDL Implementation