Thanks for replying. Yes, I read that article. That is why I am stumped as to 
why my service doesn't response with the correct headers when the client calls 
it the first time with the correct WS-Addressing headers. Do I have to build 
the WS-Addressing headers by hand or should Axis2 build them for me 
automatically? 

When you deploy a service in SOAP session and when a client tries to access the 
service in the first time, Axis2 will generate serviceGroupId and send that to 
the client as a reference parameter in wsa:ReplyTo, as shown below:

<wsa:ReplyTo>
   <wsa:Address>
      http://www.w3.org/2005/08/addressing/anonymous
   </wsa:Address>
   <wsa:ReferenceParameters>
      <axis2:ServiceGroupId xmlns:axis2=
         "http://ws.apache.org/namespaces/axis2";>
            urn:uuid:65E9C56F702A398A8B11513011677354
      </axis2:ServiceGroupId>
   </wsa:ReferenceParameters>
</wsa:ReplyTo>
If the client wants to live in the same session, he has to copy that reference 
parameter and send it back to the server when he invokes the service the second 
time. As long as a client sends the valid serviceGroupId, he can use the same 
session, and the service can maintain the session-related data. Unlike a 
request session, a SOAP session has a default timeout period, so if the client 
does not touch the service for 30 seconds, the session will expire, and if the 
client sends the old serviceGroupId, he will get an AxisFault too.

  ----- Original Message ----- 
  From: Brian De Pradine 
  To: axis-user@ws.apache.org 
  Sent: Wednesday, January 17, 2007 7:52 AM
  Subject: Re: [Axis2] Session Management and WS-Addressing



  Hello, 

  You may find the following link useful, [1] 

  [1]  http://www.developer.com/java/web/article.php/3620661 

  Cheers

  Brian DePradine
  Web Services Development
  IBM Hursley
  External  +44 (0) 1962 816319         Internal 246319

  If you can't find the time to do it right the first time, where will you find 
the time to do it again?


  "Tim, Jane and Chelsea Johnson" <[EMAIL PROTECTED]> wrote on 17/01/2007 
00:54:12:

  > I am running the latest version of axis2 - 1.1.1. I am trying to use 
session 
  > management via WS-Addressing.
  > In soapmonitor I can see the WS-Addressing headers going out on the request 
  > to the server. But my service's response doesn't have any of the 
  > WS-Addressing headers (specifically the groupID header). Addressing is 
  > enabled globally via the entry in Axis2.xml. In service.xml I set scope for 
  > the service to be "soapsession".
  > 
  > This is what the client is sending. Is there something I need to add or 
  > change to get the service to re-act with WS-Addressing headers.
  > 
  > <?xml version='1.0' encoding='utf-8'?>
  > <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
  > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
  >   <soapenv:Header>
  >     <wsa:To>http://localhost:8080/axis2/services/AiMessageServices</wsa:To>
  >     <wsa:ReplyTo>
  >       <wsa:Address>http://www.w3.
  > org/2005/08/addressing/anonymous</wsa:Address>
  >     </wsa:ReplyTo>
  >     <wsa:MessageID>urn:uuid:F18B205BFF468A597911689950656872</wsa:MessageID>
  >     <wsa:Action>urn:login</wsa:Action>
  >   </soapenv:Header>
  >   <soapenv:Body>
  >     <Reqx>
  >       <HID>124</HID>
  >       <CID>2567</CID>
  >       <ReqNo>SJPC120.y</ReqNo>
  >       <CRYR>2003</CRYR>
  >     </Reqx>
  >   </soapenv:Body>
  > </soapenv:Envelope> 
  > 
  > 
  > 
  > ---------------------------------------------------------------------
  > To unsubscribe, e-mail: [EMAIL PROTECTED]
  > For additional commands, e-mail: [EMAIL PROTECTED]
  > 

Reply via email to