You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Yura Tkachenko <yu...@gmail.com> on 2006/07/10 16:13:09 UTC

Singleton Header parameter for several WS methods

Hi, I'm using Axis 1.3 for my web service. My web service has authorization
methods and when login method executed it's returns sessionId, which user
should pass to SOAP header for every method. So I created complex type
SessionHeader and pass this parameter to several methods. Here example of
this description from server-config.wsdd file:
        <operation name="logoff" qname="operNS:logoff"
xmlns:operNS="urn:nsite" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soapAction="" >
          <parameter name="sessionHeader"  type="tns:SessionHeader"
xmlns:tns="urn:nsite" inHeader="true"/>
        </operation>

.................
        <operation name="describeUser" qname="operNS:describeUser"
xmlns:operNS="urn:mycompany" returnQName="describeUserReturn"
returnType="rtns:UserStructure" xmlns:rtns="urn:nsite" soapAction="" >
          <parameter name="patternUser" type="tns:UserStructure"
xmlns:tns="urn:mycompany"/>
          <parameter name="sessionHeader"  type="tns:SessionHeader"
xmlns:tns="urn:mycompany" inHeader="true"/>
        </operation>

As you can see I'm trying to use the same SessionHeader for both logoff and
describeUser methods.  But when I've tried to generate some stubs to my
client, I saw that it was generated two classes:
SessionHeader
SessionHeader1

SessionHeader - using as argument for logoff method
SessionHeader1 - using as argument for describeUser method.

What should I correct in the wsdd file to use this parameter as singleton
for several methods?


-- 
Thanks in advance,
Yura.