axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.che...@ascentialsoftware.com
Subject RE: Axis and soap header strange behavior
Date Tue, 31 Dec 2002 21:48:36 GMT
Ok, forget about problem 1, I am the one adding the header back in every
response (I kind of miss-read my code ....).
After fixing that, problem 1 and 2 are now gone, although I suspect that
problem 2 is still an issue. I need to do more testing around that, but
repeating the header for each time it has been received is kind of weird, I
think. What happen if one of my operation is some kind of re-login where a
new session id is sent back? Next request will have two headers, one with
the old session id and one with the new one??

Thomas 

-----Original Message-----
From: thomas.cherel@ascentialsoftware.com
[mailto:thomas.cherel@ascentialsoftware.com] 
Sent: Monday, December 30, 2002 4:16 PM
To: axis-dev@xml.apache.org; axis-user@xml.apache.org
Subject: Axis and soap header strange behavior



I am trying to understand how SOAP headers are handled by Axis. I admit that
I can find the answer to my question by looking into the source code, but in
the case someone as a quick answer, I will appreciate.

The sequence of operation call to my web service is the following:

1) Login operation. No SOAP header in the request, my web service
implementation is adding a SOAP header in the response (a session id). The
WSDL contains the following declaration under the wsdl:output element of the
login operation. <wsdlsoap:header use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://jobcontrol.dmi.ascentialsoftware.com/"
message="intf:sessionHeader" part="SessionID" /> 

2) OperationXXX. The request must contain the SOAP header that was returned
by the Login operation. My web service implementation is NOT adding any
header to the response (no need to send the session id on each subsequent
operation response, only the client must send it). The WSDL contains the
following declaration under the wsdl:input element of the operationXXX
operation:
<wsdlsoap:header use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://jobcontrol.dmi.ascentialsoftware.com/"
message="intf:sessionHeader" part="SessionID" /> 

My server is using Axis 1.0, and I am using Axis 1.1 beta for the client (to
avoid the requirement of the servlet.jar as well as taking advantage of the
latest SOAP header support). The login operation is working fine, I get my
SOAP header back. But then I am experiencing two problems:

1) For every call to OperationXXX, the SOAP header sent by the client in the
request is also in the response while my web service implementation code is
not explicitly doing something like that (my code is just checking the
presence of the header in the request and uses its value to retrieve session
information. This is only on the login operation that I explicitly add a
SOAP header to the response). Is Axis automatically sending back the SOAP
headers that it receives? I am not using/setting the SOAP actor or SOAP
mustUnderstand attributes. I checked the SOAP1.1 spec and, in any cases, the
header is not supposed to be sent back automatically, is it?

2) If the client is calling multiple time OperationXXX, the SOAP header is
duplicated as many time as OperationXXX has been called. It might be related
to problem 1: 

First OperationXXX request:

      <soapenv:Header>  
         <ns1:SessionID
xmlns:ns1="http://jobcontrol.dmi.ascentialsoftware.com/">     
            <ID xsi:type="xsd:string">4F60DEC3C6ED7B6FB14E1806F5E8BA69</ID>

         </ns1:SessionID> 
      </soapenv:Header> 

Second OperationXXX request:

     <soapenv:Header>  
         <ns1:SessionID
xmlns:ns1="http://jobcontrol.dmi.ascentialsoftware.com/">     
            <ID xsi:type="xsd:string">4F60DEC3C6ED7B6FB14E1806F5E8BA69</ID>

         </ns1:SessionID>  
         <ns1:SessionID
xmlns:ns1="http://jobcontrol.dmi.ascentialsoftware.com/">     
            <ID xsi:type="xsd:string">4F60DEC3C6ED7B6FB14E1806F5E8BA69</ID>

         </ns1:SessionID> 
      </soapenv:Header> 
 
And so on ... By the way, for each of those requests, the response contains
the header only one time.

Any ideas if it is something that I am missing or a potential Axis bug?

Thanks in advance for any help.

Thomas 

Mime
View raw message