Hi,

 

Try out with xsd:hexBinary instead of xsd:string.

 

 

Regards,

Subir Sasikumar

 


From: Samuel, Johnson [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 04, 2006 4:10 AM
To: axis-user@ws.apache.org
Subject: 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>


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

Reply via email to