Hi,

I sent this before the weekend and since no one answered it, I will
try to rephrase my question:

Has anyone created a doc/literal webservice with 1 messagepart in the
request soap:header and
0 messageparts in the request soap:body? I would be very thankful for
an example WSDL.

Regards,
Kristian

On 7/8/05, Kristian Andersen <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am using Axis 1.2.1 to deploy a webservice. (Doc/lit)
> I have written a WSDL and I am using WSDL2Java to generate code for
> both server and client side.
> 
> All of my methods have a common soap:header message, but not all
> methods have a message in soap:body and these are causing problems.
> The XML that is beeing sent is looking OK as far as I can tell, but the client
> is getting the following error:
> 
> RemoteException: org.xml.sax.SAXException: Found instance data for
> {http://my.namespace.com}Header in the soap:body instead of the
> soap:header.
> 
> Methods with a non-empty soap:body is working fine.
> 
> Hopefully someone can tell me what I am doing wrong.
> 
> Regards,
> Kristian
> 
> 
> Unfortunatly, I am not able to attach the actual WSDL, but I here are
> the relevant
> parts of it which describes the methods with empty soap:body.
> 
> ------8<----------
> 
> <wsdl:message name="MethodRequest">
> <wsdl:part name="Header" element="namespace:Header"/>
> </wsdl:message>
> 
> <wsdl:message name="MethodResponse">
> <wsdl:part name="MethodResponse" element="namespace:MethodResponse"/>
> </wsdl:message>
> 
> <wsdl:message name="MethodFault">
> <wsdl:part name="MethodFault" element="namespace:MethodFault""/>
> </wsdl:message>
> 
> ------8<----------
> 
> <wsdl:operation name="Method">
> <wsdl:input name="MethodRequest" message="tns:MethodRequest"/>
> <wsdl:output name="MethodResponse" message="tns:MethodResponse"/>
> <wsdl:fault name="MethodFault" message="tns:MethodFault"/>
> </wsdl:operation>
> 
> ------8<----------
> 
> <wsdl:operation name="Method">
> <wsdlsoap:operation style="document" soapAction="Method"/>
> <wsdl:input>
> <wsdlsoap:header part="Header" use="literal"/>
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="MethodFault">
> <wsdlsoap:fault name="MethodFault" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> 
> ------------------------------------------------------------
> And the XML beeing sent:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> <soapenv:Header>
> <namespace:Header xmlns:namespace="http://my.namespace.com";>
> <!--Header goes her, it is looking OK-->
> </namespace:Header>
> </soapenv:Header>
> <soapenv:Body>
> <Method xmlns=""/>
> </soapenv:Body>
> </soapenv:Envelope>
> 
> 
> 
> --
> mvh
> Kristian Andersen
> [EMAIL PROTECTED]
> 


-- 
mvh
Kristian Andersen
[EMAIL PROTECTED]

Reply via email to