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/18 20:36:35 UTC

[Axis 1.3] inHeader parameter question

Hello,

I have a question about inHeader parameter question in Axis. I've
configurated for my methods header parameter:

        <operation name="logoff" qname="operNS:logoff"
xmlns:operNS="urn:nsite"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"<http://www.w3.org/2001/XMLSchema>
soapAction="" >
          <parameter qname="sessionHeader"  type="tns:SessionHeader"
xmlns:tns="urn:nsite" inHeader="true"/>
        </operation>

        <operation name="queryEO" qname="operNS:queryEO"
xmlns:operNS="urn:nsite" returnQName="queryEOReturn"
returnType="rtns:ArrayOfEnterpriseObject" xmlns:rtns="urn:nsite"
returnItemType="tns2:EnterpriseObject" xmlns:tns2="urn:nsite" soapAction=""
>
          <parameter qname="qlExpression" type="tns:string" xmlns:tns="
http://www.w3.org/2001/XMLSchema"/ <http://www.w3.org/2001/XMLSchema>>
          <parameter qname="Definition_ID" type="tns:long" xmlns:tns="
http://www.w3.org/2001/XMLSchema"/ <http://www.w3.org/2001/XMLSchema>>
          <parameter qname="sessionHeader"  type="tns:SessionHeader"
xmlns:tns="urn:nsite" inHeader="true"/>
        </operation>

As you can see I have in both methods sessionHeader inHeader parameter. But
I have several issues:

1) In wsdl files these parameters presents as elements sessionHeader,
sessionHeader1. So on the client side I need pass both parameters to
headers:

            binding.setHeader(locator.getServiceName().getNamespaceURI(),
"sessionHeader", new SessionHeader(sessionHeaderObject));
            binding.setHeader(locator.getServiceName().getNamespaceURI(),
"sessionHeader1", new SessionHeader(sessionHeaderObject));

So I have duplication, but I want to use both of this methods just pass only
one parameter:

            binding.setHeader(locator.getServiceName().getNamespaceURI(),
"sessionHeader", new SessionHeader(sessionHeaderObject));

Is it possible to setup wsdd file or any other changes to use both methods
with the same header parameter sessionHeader?

2) And the next issue happends when I trying to generate stubs to my
web-service, for example using Axis I generated stubs and I have declaration
of the method logoff:

//java code
void logoff(String sessionId);
// how it declare in wsdd
        <operation name="logoff" qname="operNS:logoff"
xmlns:operNS="urn:nsite"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"<http://www.w3.org/2001/XMLSchema>
soapAction="" >
          <parameter qname="sessionHeader"  type="tns:SessionHeader"
xmlns:tns="urn:nsite" inHeader="true"/>
        </operation>

But for .NET it methods has another declaration:
void logoff();

Is it possible in Axis to configurate that inHeader parameters won't shows
in the method prototype?

-- 
Thanks for any your help,
Yura.