axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ripcord <>
Subject Set http cookie for generated web service
Date Tue, 19 Aug 2008 15:44:54 GMT

Hi all,

I have a question about AXIS and security handling. I need to set a cookie
in the request header, and I'm not sure how to do this. I have created a Web
Service, and automatically generated the WSDL file from this. The WSDL file
uses SOAP binding with the 'document' style. I then use an ANT all of the
WSDLtoJava class to generate the required java files. 

All examples I've seen on the web generate a Service and ServiceLocator. The
Service actually extends javax.xml.rpc.Stub, and the examples show that the
header can be set using the following code:
MyServiceLocator locator = new MyServiceLocator();
MyService serivce = locator.getMyService();
    "JSESSIONID=" + sessionID);

However, I do not get a ServiceLocator generated, and the Service class I
get extends from '' - therefore the cast above won't work.
The class '' does not seem to support setting a request

The code i'm trying is using the request context as follows:

        ss = new MyService(wsdlURL, new QName(nameSpaceURI, localPart));
        servicePort = ss.getMyServicePort();

        java.util.Map<String, Object> requestContext =

But this is not setting the cookie.
Would anyone have any idea on how to set a cookie in the header using this
service? Or do I definitley have to use the SOAP rpc binding?

View this message in context:
Sent from the Axis - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message