Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Finally, this is what I did.</p> <p>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.</p> <p>I created an small library to make this process easier, but the procedure idea is:</p> <ol> <li>Generate the JAX-WS client with RAD</li> <li>Create a class that implements the service interface generated by RAD</li> <li>For each interface method:</li> <li>3.1 Inject the interface method's parameters to the JAXB object</li> <li>3.2 Pass this object to the <code>WebServiceTemplate</code> (Spring object) web service call.</li> <li>3.3 Cast the call response to the JAXB method response object</li> <li>3.4 Return the inner value of the response object</li> </ol> <p>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.</p> <p>For NTLM authentication set <code>NTCredentials</code> to the <code>WebServiceTemplate</code> sender.</p> <p><strong>Axis2 1.7</strong> will have support for NTLMv2 with updated version of the HttpClient 4.2.X, but there is no release date yet.</p> <p>See:</p> <ul> <li><code>WebServiceTemplate</code> WS call</li> </ul> <p><a href="http://static.springsource.org/spring-ws/sites/2.0/apidocs/org/springframework/ws/client/core/WebServiceTemplate.html#marshalSendAndReceive%28java.lang.Object%29" rel="nofollow">http://static.springsource.org/spring-ws/sites/2.0/apidocs/org/springframework/ws/client/core/WebServiceTemplate.html#marshalSendAndReceive%28java.lang.Object%29</a></p> <ul> <li><code>WebServiceTemplate</code> sender</li> </ul> <p><a href="http://static.springsource.org/spring-ws/sites/2.0/apidocs/org/springframework/ws/client/support/WebServiceAccessor.html#getMessageSenders%28%29" rel="nofollow">http://static.springsource.org/spring-ws/sites/2.0/apidocs/org/springframework/ws/client/support/WebServiceAccessor.html#getMessageSenders%28%29</a></p> <ul> <li><code>NTCredentials</code></li> </ul> <p><a href="http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/auth/NTCredentials.html" rel="nofollow">http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/auth/NTCredentials.html</a></p> <hr> <p><strong>Update</strong>: I tested Axis 1.7 and the NTLM auth works well.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload