axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Flo Hum" <>
Subject session management - soap header error
Date Tue, 06 Nov 2007 20:57:58 GMT
First I'm a total noob to all of this architecture, so I apologize for
my ignorance up front. Apache2, Tomcat 5.0, Axis2 v1.3, SOAP, web
communication protocols in general (even the Jbuilder IDE I have to
use) is new for me, so it's been a struggle every step of the way.
I've been able to create a web service and test with client code okay.
But when I tried to introduce the session management options, my test
client code fails. I was following an article I found as my guide.
Hopefully you can help, I must be missing something.

Here are the steps I've done to try to add the session management:

**  Made change in services.xml to include soapsession. (tried
transportsession as well - but with the same resulting error)
<service name="foo" scope="soapsession"> </service>

**  included method init(), destroy() and a method for getting
ServiceContext in service class.

**  in the test Client code I added
for the org.apache.axis2.client.Options  and
for the org.apache.axis2.rpc.client.RPCServiceClient

**  when i run the test client I get
org.apache.axis2.AxisFault: The server failed to process the
WS-Addressing header: wsa:Action [Reason]: A header representing a
Message Addressing Property is not valid and the message cannot be

**  so it seems as though the client code is not generating a proper
message.  I really don't know much about how the header should look
though, and how to alter it anyway since it is being generated for me.

**  here is the soap header I can view using TCP/IP monitor

<?xml version="1.0" encoding=""?>
        <doLogin xmlns=""> <arg0
        <arg1 xmlns="">testPassword</arg1>

**  here is the client code used:

    serviceClient = new RPCServiceClient();
    Options options = serviceClient.getOptions();
    options.setManageSession(true);//for session management
    EndpointReference targetEPR = new
    QName opLogin = new QName("", "doLogin");
    String strUsername = "testUsername";
    String strPswd = "testPassword";
    Object[] opLoginArgs = new Object[] { strUsername, strPswd };
    Class[] returnTypes = new Class[] { String.class };
    Object[] response =
serviceClient.invokeBlocking(opLogin,opLoginArgs, returnTypes);
    Object result = (Object)response[0];
    String str = result.toString();
    System.out.println("runTestUpdate Login: " + str);
    // just for some info
    MessageContext msgCtx = MessageContext.getCurrentMessageContext();
    if(msgCtx != null){
    System.out.println("msgCtx.getServiceGroupContextId() :  " +

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

View raw message