Can you show us your WSDL?

 

There’s no way to specify style=”wrapped” in a WSDL document. The only valid style parameters are “rpc” and “document”. (You can specify style=”wrapped” in a WSDD, though.)

 

In a wrapped/literal WSDL definition, you must define the wrapper element in the <types> section. The name of this wrapper element must be the same as your operation name. The element must be defined as a complex type, which is has a sequence group containing your four parameters.

 

e.g.,

 

<wsdl:types>

  <xs:schema targetNamespace=”foo”>

    <xs:element name=MethodName type=”tns:MethodType/>

    <xs:complexType name=”tns:MethodType”>

       <xs:sequence>

         <xs:element name=”Param1” type=”xs:string”/>

         <xs:element name=”Param2” type=”xs:string”/>

         <xs:element name=”Param3” type=”xs:string”/>

         <xs:element name=”Param4” type=”xs:string”/>

       </xs:sequence>

    </xs:complexType>

  </xs:schema>

</wsdl:types>

 

Your message definition must contain only one body part, and that part must reference your wrapper element:

 

<wsdl:message name=”MethodRequest”>

   <wsdl:part name=”parameters” element=”tns”MethodName”/>

</wsdl:message>

 

Anne


From: Sathya Sankar [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 02, 2004 2:51 PM
To: [EMAIL PROTECTED]
Subject: Wrapped/Literal on 1.2Beta3

 

I've been using Axis 1.1 for a while and recently needed to work with attachments. I thought of moving to the 1.2 version since it has better support for those.

 

Here is my scenario... I'm using Axis (generated classes & its libraries) to talk to another server using Wrapped/Literal. The WSDL that I use to generate my stubs uses style="wrapped". But the Stub that gets generated, has a        

oper.setStyle(org.apache.axis.enum.Style.DOCUMENT);.

 

When I use this stub to talk to the server, the request that goes out is not wrapped. The parameters are getting passed directly in the SOAP body instead of getting wrapped.

 

 

I tried to manually edit the Stub to change the style to Style.WRAPPED. It then tries to send the message properly wrapped but the namespace gets sent as "".

 

<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:Body>

  </METHOD_NAME>
</soapenv:Body>
</soapenv:Envelope>

In both scenarios, the server responds back with a Port not found. This was working on Axis1.1 and I'm not sure if I have to do anything different while generating the stubs for 1.2.

 

I would really appreciate any information/suggesions on this...

 

Thanks!

 

 


Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

Reply via email to