logo       

Axis and soap header strange behavior: msg#00612

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 




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe