I want to consume .Net WS from IBM WebSphere.
I created a WS-client with JAX-WS IBM implementation that consumes a .Net WS on IIS. The client is on SUSE and the auth
Finally, this is what I did.
I create the JAXB objects with the RAD plugin to create a JAX-WS client. I use the generated DTOs as the messages that I pass to the Spring WS library. Spring WS 2.1 comes with Http Client 4.2 that brings NTLMv2 support.
I created an small library to make this process easier, but the procedure idea is:
WebServiceTemplate
(Spring object) web service call.So, what you finally do is reuse the object generation for a JAX-WS client to wrap the service method's parameters into the object that Spring WS needs to make the call.
For NTLM authentication set NTCredentials
to the WebServiceTemplate
sender.
Axis2 1.7 will have support for NTLMv2 with updated version of the HttpClient 4.2.X, but there is no release date yet.
See:
WebServiceTemplate
WS callhttp://static.springsource.org/spring-ws/sites/2.0/apidocs/org/springframework/ws/client/core/WebServiceTemplate.html#marshalSendAndReceive%28java.lang.Object%29
WebServiceTemplate
senderhttp://static.springsource.org/spring-ws/sites/2.0/apidocs/org/springframework/ws/client/support/WebServiceAccessor.html#getMessageSenders%28%29
NTCredentials
http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/auth/NTCredentials.html
Update: I tested Axis 1.7 and the NTLM auth works well.