Hi,
I was wondering if anyone in this group can help me? I have been trying to post this message to axis-user since last two days but it just doesn't get posted there. I have sent an email to '[EMAIL PROTECTED]' but haven't received any response. Is that server overloaded?
Thanks for your help.
Naresh Bhatia
-----Original Message-----
From: Naresh Bhatia
Sent: Wednesday, October 16, 2002 11:03 AM
To: '[EMAIL PROTECTED]'
Subject: SOAP header from .NET not being read by Axis
I am having a problem with a SOAP header generated by .NET not being read by Axis at all.
The Axis client generates this header by creating it manually and sending it using call.addHeader(). The generated header looks like this and is easily read by the Axis server:
<soapenv:Header>
<ns1:Credentials xmlns:ns1="http://user.common.oss.org">
<ns1:username>JOHNDOE</ns1:username>
<ns1:password>JOHNDOE</ns1:password>
</ns1:Credentials>
</soapenv:Header>
.NET client generates the header that looks like this. The .NET code to generate the header was produced automatically by reading the WSDL. Note that username and password elements have no qualifiers, but have types explicitly defined:
<soap:Header>
<q1:Credentials id="id1" xmlns:q1="http://user.common.oss.org">
<username xsi:type="xsd:string">JOHNDOE</username>
<password xsi:type="xsd:string">JOHNDOE</password>
</q1:Credentials>
</soap:Header>
The WSDL used to generate .NET code is shown below. Could the problem be with my WSDL? Relevant portions are shown below:
<schema targetNamespace="http://user.common.oss.org" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="Credentials">
<sequence>
<element name="username" type="xsd:string"/>
<element name="password" type="xsd:string"/>
</sequence>
</complexType>
</schema>
<wsdl:message name="authentication">
<wsdl:part name="credentials" type="user:Credentials"/>
</wsdl:message>
<wsdl:operation name="start">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="startRequest">
<wsdlsoap:header message="intf:authentication" part="credentials" wsdl:required="true"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.oss.org/oss" use="encoded"/>
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.oss.org/oss" use="encoded"/>
</wsdl:input>
<wsdl:output name="startResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.oss.org/oss" use="encoded"/>
</wsdl:output>
</wsdl:operation>
Naresh Bhatia