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 "Samuel, Johnson" <Jo...@sabre.com> on 2006/03/03 23:09:18 UTC
WSDL - stubs generation
Hi,
I am trying to create WSDL for a service that accepts request as
attachment (XML content). I used wsdl2java to generate the stubs.
I have two issues
1). When request/response attachment part is set as string the stubs
generated throws error while reading the response back.
2). Apart from using "xsd:string" is there a means I can pass my xml
object mapping in attachment. How to define that in my wsdl:message.
Below is the wsdl I created for the service.
Any suggestion/help is much appreciated. Thanks in advance
rgds,
----------- WSDL -------------------
<wsdl:message name="MyServiceRequest">
<wsdl:part name="reqheader" element="eb:MessageHeader"/>
<wsdl:part name="reqheader2" element="wsse:Security"/>
<wsdl:part name="reqbody" type="xsd:string"/>
<wsdl:part name="reqpart" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="MyServiceResponse">
<wsdl:part name="resheader" element="eb:MessageHeader"/>
<wsdl:part name="resheader2" element="wsse:Security"/>
<wsdl:part name="resbody" type="xsd:string"/>
<wsdl:part name="respart" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="MyServicePortType">
<wsdl:operation name="MyServiceRQ">
<wsdl:input message="tns:MyServiceRequest"/>
<wsdl:output message="tns:MyServiceResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyServiceSoapBinding" type="tns:MyServicePortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="MyServiceRQ">
<soap:operation soapAction="" style="document"/>
<wsdl:input>
<soap:header message="tns:MyServiceRequest"
part="reqheader" use="literal"/>
<soap:header message="tns:MyServiceRequest"
part="reqheader2" use="literal"/>
<mime:multipartRelated>
<mime:part>
<soap:body part="reqbody" use="literal"/>
</mime:part>
<mime:part>
<mime:content part="reqpart"
type="text/plain"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>
<wsdl:output>
<soap:header message="tns:MyServiceResponse"
part="resheader" use="literal"/>
<soap:header message="tns:MyServiceResponse"
part="resheader2" use="literal"/>
<mime:multipartRelated>
<mime:part>
<soap:body part="resbody" use="literal"/>
</mime:part>
<mime:part>
<mime:content part="respart"
type="text/plain"/>
</mime:part>
</mime:multipartRelated>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port binding="tns:MyServiceSoapBinding"
name="MyServiceSOAPPort">
<soap:address location="http://127.0.0.1:8100/webservice"/>
</wsdl:port>
</wsdl:service>