wsimport generate a client with cookies

Posted by dierre on Stack Overflow See other posts from Stack Overflow or by dierre
Published on 2012-11-13T14:01:36Z Indexed on 2012/12/06 17:05 UTC
Read the original article Hit count: 291

Filed under:
|
|
|

I'm generating a client for a SOAP 1.2 service using wsimport from the jaxws-maven-plugin in maven with the following execution:

<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.2</version>
<executions>
    <execution>
        <goals>
            <goal>wsimport</goal>
        </goals>
        <configuration>
            <sourceDestDir>${project.basedir}/src/main/java</sourceDestDir>
            <wsdlUrls>
                <wsdlUrl>${webservice.url}</wsdlUrl>
            </wsdlUrls>
            <extension>true</extension>
        </configuration>
    </execution>

The first time the client call the proxy, the load balancer generate a cookie and sends it back. The client should send it back so the load balancer knows where (which server) is dedicated to a specific client (the idea is that the first time the client get a server and the cookie identifies the server, then the load balancer sends the client to the same server for every call)

Now, is there a way to tell to the plugin to enable automatically the cookie handling?

© Stack Overflow or respective owner

Related posts about java

Related posts about jax-ws