On Fri, Jun 10, 2011 at 12:00 AM, Mahesh kumar <mmahesh...@gmail.com> wrote:
> Hi,
> I'm new to axis2 webservice. Can anyone provide me example for soapsession.

[1] is a good references about session management. I don't have sample
to point out but these are the extra step required for soapsession.

Server side -
 (1) add 'soapsession' in service.xml

      <service name="SimpleService" scope="soapsession">

(2) engage 'addressing' module in service.xml.

      <module ref="addressing"/>


Client side -

(1) Set following properties to the option object.

  options.setManageSession(true);
  sender.engageModule("addressing");

> A .net application is going to consume my service. In this case which
> session type is appropriate. Transport session or soap session. Sorry for my
> ignorance

You should derive correct session according to your application domain
requirements, both approach work well.
If you plan to use .net in client side  Transport session  can be easy
to implement. In case of soap session .Net client should pass
WS-Addressing headers and ServiceGroupId header.

 <axis2:ServiceGroupId
xmlns:axis2="http://ws.apache.org/namespaces/axis2";
wsa:IsReferenceParameter="true">urn:uuid:597FEA67B73FE7C9D31307981894730</axis2:ServiceGroupId>

You can find value of ServiceGroupId  in your first response  from
server side under ReferenceParameters header and need to pass same
value with consecutive calls in order to maintain soap session.

<wsa:ReferenceParameters>
                  <axis2:ServiceGroupId
xmlns:axis2="http://ws.apache.org/namespaces/axis2";>urn:uuid:597FEA67B73FE7C9D31307981894730</axis2:ServiceGroupId>
  </wsa:ReferenceParameters>

The best approach is write a Axis2 client and trace messages using
TCPMon , then you know what you need to pass from .Net client.


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


Thanks !

-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to