Dear axis2/Java community my Java Client calls an axis2 service. The server runs in scope="soapsession" returning a ServicegroupId up on a initial call to init() & login().
I can launch several Java Clients, which reach in a 1 to 1 correspondence each his own instance of a service; call it "a SpezplaService object". If I start 3 Java Clients, I can observer 3 that init() is called 3 times, and each time a different new service context is generated. The initial call returns the ServiceGroupId in its reply header, all different. On consecutive calls to the server, each client has in the addressing header its own session specific ServiceGroupId Using this ServiceGroupId keeps client sessions appart, and yes, each thread reaches its unique instance of a web service object. Below the header used to login(), which calls init() and then login() on the server Request-Header A: from a axis2 Java Client; it calls init() followed by login() (as indicated by action="urn:login" POST /axis2/services/SpezplaService HTTP/1.1 Content-Type: application/soap+xml; charset=UTF-8; action="urn:login" User-Agent: Axis2 Host: alpha1:9090 Transfer-Encoding: chunked 65f <?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Header> <wsa:To>http://localhost:9090/axis2/services/SpezplaService</wsa:To> <wsa:MessageID>urn:uuid:9EA640E011C9B711EC1235380730631</wsa:MessageID> <wsa:Action>urn:login</wsa:Action> </soapenv:Header> each consecutive header used to reach always the proper related service object for urn:fktmap looks like Request-Header B: from an axis2 Java Client; format of consecutive request-headers after the initial request to axis2 service took place POST /axis2/services/SpezplaService HTTP/1.1 Content-Type: application/soap+xml; charset=UTF-8; action="urn:fktmap" Cookie: JSESSIONID=77A13E81754C5F8BEA52D5A6255BE384 User-Agent: Axis2 Host: alpha1:9090 Transfer-Encoding: chunked 51f <?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Header> <wsa:To>http://localhost:9090/axis2/services/SpezplaService</wsa:To> <axis2:ServiceGroupId xmlns:axis2="http://ws.apache.org/namespaces/axis2" wsa:IsReferenceParameter="true">urn:uuid:888FAE4966CD02171F1235377217671</axis2:ServiceGroupId> <wsa:MessageID>urn:uuid:9EA640E011C9B711EC1235380742946</wsa:MessageID> <wsa:Action>urn:fktmap</wsa:Action> </soapenv:Header> please note the insertion and existence of a ServiceGroupId .... urn:uuid:..... used to reach the proper instance of a service object. NOW! I have developed a VB.net client based on WCF (Windows Communication Foundation) I have managed to receive the ServiceGroupId header from the axis2/Java server extract it and insert it with each consecutive next call through a request / response inspector, triggered by a behaviour attribute. The initial sent login request headers reaching the axis2/Java server is Request-Header C: from a VB.net / WCF Client; this is initial header calling init() & login() POST http://alpha1:8080/axis2/services/SpezplaService HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Host: alpha1:9091 Content-Length: 1766 Expect: 100-continue Proxy-Connection: Keep-Alive <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> <s:Header> <a:Action s:mustUnderstand="1">urn:login</a:Action> <a:MessageID>urn:uuid:3012cd1e-af6c-40d2-a5cc-eceffce61f46</a:MessageID> <a:To s:mustUnderstand="1">http://alpha1:8080/axis2/services/SpezplaService</a:To> </s:Header> The reply returns the ServiceGroupId which is then sniffed in to each consecutive request header such as Request-Header D: from VB.net / WCF client; this is the format of each consecutive request header calling fktmap() & logout() to terminate session POST http://alpha1:8080/axis2/services/SpezplaService HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Host: alpha1:8080 Content-Length: 1239 Expect: 100-continue <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> <s:Header> <a:Action s:mustUnderstand="1">urn:fktmap</a:Action> <a:MessageID>urn:uuid:0d8ef5a4-eb53-43dd-a2aa-d1e3b83a7edd</a:MessageID> <axis2:ServiceGroupId a:IsReferenceParameter="true" xmlns:axis2="http://ws.apache.org/namespaces/axis2">urn:uuid:888FAE4966CD02171F1235381314775</axis2:ServiceGroupId> <a:To s:mustUnderstand="1">http://alpha1:8080/axis2/services/SpezplaService</a:To> </s:Header> Now comes my problem: while I can use as many Java Client and have each one reaching its own service object instance the VB.net client fails doing so. When my second VB.net client sends request-header C; I can observe in the log that the destroy() function was called on a previous established service object instance. This destroys my previous established session. So VB.net client 1 fails after starting VB.net client 2. Starting VB.net client 3 makes VB.net client 2 failing, and so on. However I can perfectly run and start in any sequence 3 Java Clients and only one 1 VB.net client. They reach all theire unique instances of service objects and throuhg this objects they reach WSIT Beans and behind that, they reach each theire own OpenVMS legacy server process. I tried to concentrate on absolute equal protocol exchanges, but I am still unable as I dont know it, how to fix a few maybe important differences as show in the 2 header groups above. Observation 1 / Question: 1 The content type of request-header A shows action="urn:login" while request-header C for the same function does not show this urn:login. Why?, How can I insert this in a WCF client? Observation 2: a Java Client sends with each consecutive request-header a Cookie: JSESSIONID=77A13E81754C5F8BEA52D5A6255BE384 while a VB.net Clients does not send this JSESSIONID. Question 2: What impact has the absence of this Cookie to an axis2 server in scope="soapsession"? Observation 3: "User Agent: Axis2" is sent with each call from a Java Client while it is not sent by a VB.net client. Question 3: How can I add "user agent: axis2" in a WCF environment with a generated stub / controller? What is its reason of beeing? Does it have an inpact or cause my problem? Observation 4 / Question 4: Request-Header C shows Expect: 100-continue Proxy-Connection: Keep-Alive which is not sent by a Java Client; What impact do I have to expect? Observation 5 / Question 5: In VB.net clients each header has a set of s:mustUnderstand="1" for header C and D from the VB.net clients which I am unable to set to "0" because there is only a getter() but no setter() for this flag, manipulating message headers in WCF. Does this have an impact to my problem seen? Over all: what do I miss in my VB.net headers that each initial call of a VB.net WCF client calls destroy() on the the service instance object of the previous started VB.net client? This is actually causing my problem. But why not with axis2 Java Clients? 1000 thanks for any hint Josef.Stadelmann @axa-winterthur.ch
