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 david <da...@davidwbrown.name> on 2007/07/19 22:45:16 UTC

rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET client generated WSDL (rpc-encoded). I want to convert this WSDL to either: rpc-literal or document-literal such that I can run Axis2 wsdl2java and generate an Axis2 service. Currently, this service is running as Axis1.4 and I would appreciate very much any and all ideas and suggestions as to how to migrate to Axis2. I know the Axis2 wsdl2java does not support rpc-encoded. I read Ann Manes blog about converting wsdls but I am not sure if this can be extended to rpc-encoded. I am secretly hoping Ann Manes will reply but any and all rants and raves welcomed. I can reply with the target wsdl in question. Please advise, David.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by alpatino2 <pa...@gmail.com>.
Thanks for the help, I see the necessity to use axis1, now what do you think
is the best way to invoke this rpc/encoded service, I want to write a higher
level service in axis2 using document/literal style, and inside of this
service  invoke to the rpc service, but I think I need to mix axis1 and
axis2 libraries,  I know I could decouple service invokation using a ESB,
but I cannot afford to use this.

Client--->Axis2 (Doc Literal)Service --> rpc/encoded
__________________________ |--> doc/literal
__________________________ |--> ????

Thanks again


Use Axis 1.4 instead.

Anne

On 7/30/07, Philipp Leitner <ph...@gmx.at> wrote:
> AFAIK Axis 2 does not support RPC/encoded at all since it is  not WS-I
> compliant.
>
> /philipp
>
> alpatino2 schrieb:
> > Hi!
> >
> > I have a slightly different requirement: I received wsdl's from a
> service
> > provider that implements the TR-069 spec, this spec define the use of
> > rpc/encoded style. I need to invoke this service but I am not able to
> > generate the client, I tried to generate the client for the sample
> > stockAvailableNotification.wsdl extracted from the Building Web Services
> > with Java book, but I get the following error:
> >

-- 
View this message in context: http://www.nabble.com/rpc-encoded-vs-rpc-literal-vs-document-literal-migrate-Axis1.4-wsdl-%28rpc-encoded%29-to-Axis2-doc-lit-tf4113634.html#a11865674
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by Anne Thomas Manes <at...@gmail.com>.
Use Axis 1.4 instead.

Anne

On 7/30/07, Philipp Leitner <ph...@gmx.at> wrote:
> AFAIK Axis 2 does not support RPC/encoded at all since it is  not WS-I
> compliant.
>
> /philipp
>
> alpatino2 schrieb:
> > Hi!
> >
> > I have a slightly different requirement: I received wsdl's from a service
> > provider that implements the TR-069 spec, this spec define the use of
> > rpc/encoded style. I need to invoke this service but I am not able to
> > generate the client, I tried to generate the client for the sample
> > stockAvailableNotification.wsdl extracted from the Building Web Services
> > with Java book, but I get the following error:
> >
> >
> >
> > Exception in thread "main"
> > org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
> >         at
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:140)
> >         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> >         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> > Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
> > Parser SAX Error: org.xml.sax.SAXException: Fatal Error:
> > URI=file:///home/albertop/axis2/wsdl-rpc/examples/src/ch6/ex2/stockAvailableNotification.wsdl
> > Line=24: The prefix "wsdl" for attribute "wsdl:arrayType" associated with an
> > element type "attribute" is not bound.
> >         at
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:300)
> >         at
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:97)
> >         ... 2 more
> > Caused by: org.xml.sax.SAXException: Fatal Error:
> > URI=file:///home/albertop/axis2/wsdl-rpc/examples/src/ch6/ex2/stockAvailableNotification.wsdl
> > Line=24: The prefix "wsdl" for attribute "wsdl:arrayType" associated with an
> > element type "attribute" is not bound.
> >
> > The wsdl from the book is:
> >
> > <?xml version="1.0" ?>
> > <definitions name="StockAvailableNotification"
> >         targetNamespace=
> >            "http://www.skatestown.com/services/StockAvailableNotification"
> >          xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
> >          xmlns:reg="http://www.skatestown.com/ns/registrationRequest"
> >          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> >          xmlns="http://schemas.xmlsoap.org/wsdl/">
> >
> >    <!-- Type definitions from the registration schema-->
> >    <types>
> >       <xsd:schema
> > targetNamespace="http://www.skatestown.com/ns/registrationRequest"
> >          xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
> >          xmlns="http://www.skatestown.com/schemas/ns/registrationRequest">
> >
> >          <xsd:complexType name="registrationRequest">
> >             <xsd:sequence>
> >                <xsd:element name="items">
> >                   <xsd:complexType name="ArrayOfItem">
> >                      <complexContent>
> >                         <restriction base="soapenc:Array">
> >                            <attribute ref="soapenc:arrayType"
> >                                wsdl:arrayType="xsd:string[]"/>
> >                         </restriction>
> >                      </complexContent>
> >                   </complexType>
> >                </xsd:element>
> >
> >                <xsd:element name="address" type="xsd:uriReference"/>
> >
> >                <xsd:element name="transport"
> >                             default="http://schemas.xmlsoap.org/soap/smtp"
> > minOccurs="0">
> >                   <xsd:simpleType>
> >                      <xsd:restriction base="xsd:uriReference">
> >                         <xsd:enumeration
> > value="http://schemas.xmlsoap.org/soap/http"/>
> >                         <xsd:enumeration
> > value="http://schemas.xmlsoap.org/soap/smtp"/>
> >                      </xsd:restriction>
> >                   </xsd:simpleType>
> >                </xsd:element>
> >
> >                <xsd:element name="clientArg" type="xsd:string"
> > minOccurs="0"/>
> >             </xsd:sequence>
> >          </xsd:complexType>
> >
> >          <xsd:simpleType name="correlationID">
> >             <xsd:restriction base="xsd:string">
> >             <!-- some appropriate restriction -->
> >             </xsd:restriction>
> >          </xsd:simpleType>
> >       </xsd:schema>
> >    </types>
> >
> >    <!-- Message definitions -->
> >    <message name="StockAvailableRegistrationRequest">
> >       <part name="registration" element="reg:registrationRequest"/>
> >       <part name="expiration" type="xsd:timeInstant"/>
> >    </message>
> >
> >    <message name="StockAvailableRegistrationResponse">
> >       <part name="correlationID" type="reg:correlationID"/>
> >    </message>
> >
> >    <message name="StockAvailableRegistrationError">
> >       <part name="errorString" type="xsd:string"/>
> >    </message>
> >
> >    <message name="StockAvailableExpirationError">
> >       <part name="errorString" type="xsd:string"/>
> >    </message>
> >
> >    <message name="StockAvailableNotification">
> >       <part name="timeStamp" type="xsd:timeInstant"/>
> >       <part name="correlationID" type="reg:correlationID"/>
> >       <part name="items" type="reg:items"/>
> >       <part name="clientArg" type="xsd:string"/>
> >    </message>
> >
> >    <message name="StockAvailableExpirationNotification">
> >       <part name="timeStamp" type="xsd:timeInstant"/>
> >       <part name="correlationID" type="reg:correlationID"/>
> >       <part name="items" type="reg:ArrayOfItem"/>
> >       <part name="clientArg" type="xsd:string"/>
> >    </message>
> >
> >    <message name="StockAvailableCancellation">
> >       <part name="correlationID" type="reg:correlationID"/>
> >    </message>
> >
> >    <!-- Port type definitions -->
> >    <portType name="StockAvailableNotificationPortType">
> >       <!--Registration Operation -->
> >       <operation name="registration">
> >          <input message="StockAvailableRegistrationRequest"/>
> >          <output message="StockAvailableRegistrationResponse"/>
> >          <fault message="StockAvailableRegistrationError"
> >             name="StockAvailableNotificationErrorMessage"/>
> >          <fault message="StockAvailableExpirationError"
> >             name="StockAvailableExpirationError"/>
> >       </operation>
> >
> >       <!--Notification Operation -->
> >       <operation name="notification">
> >          <output message="StockAvailableNotification"/>
> >       </operation>
> >
> >       <!--Expiration Notification Operation -->
> >       <operation name="expirationNotification">
> >          <output message="StockAvailableExpirationNotification"/>
> >       </operation>
> >
> >       <!--Cancellation Operation -->
> >       <operation name="cancellation">
> >          <input message=" StockAvailableCancellation"/>
> >       </operation>
> >    </portType>
> >
> >    <!-- Binding definitions -->
> >    <binding name="StockAvailableNotificationSOAPBinding"
> >       type="StockAvailableNotificationPortType">
> >       <soap:binding style="rpc"
> >                transport="http://schemas.xmlsoap.org/soap/http"/>
> >
> >       <documentation>Note: the requestor must invoke the registration
> > operation first.
> >       </documentation>
> >
> >       <operation name="registration">
> >          <soap:operation
> >             soapAction=
> >
> > "http://www.skatesTown.com/StockAvailableNotification/registration">
> >          <input>
> >             <soap:header message="StockAvailableRegistrationRequest"
> >                   part="expiration" use="encoded"
> >
> > namespace="http://www.skatestown.com/ns/registrationRequest"
> >
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >                <soap:headerfault message="StockAvailableExpirationError"
> >                   part="errorString" use="encoded"
> >
> > namespace="http://www.skatestown.com/ns/registrationRequest"
> >
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >             </soap:header>
> >             <soap:body parts="registration" use="literal" style="document"/>
> >          </input>
> >          <output>
> >             <soap:body use="encoded"
> >                 namespace="http://www.skatestown.com/ns/registrationRequest"
> >                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </output>
> >          <fault name="StockAvailableNotificationErrorMessage">
> >             <soap:fault name="StockAvailableNotificationErrorMessage"
> >                 namespace="http://www.skatestown.com/ns/registrationRequest"
> >                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </fault>
> >       </operation>
> >
> >       <operation name="notification">
> >          <output>
> >             <soap:body use="encoded"
> >                 namespace="http://www.skatestown.com/ns/registrationRequest"
> >                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </output>
> >       </operation>
> >
> >       <operation name="cancellation">
> >          <soap:operation
> >             soapAction=
> >
> > "http://www.skatesTown.com/StockAvailableNotification/cancellation">
> >          <input>
> >             <soap:body use="encoded"
> >                 namespace="http://www.skatestown.com/ns/registrationRequest"
> >                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </input>
> >       </operation>
> >    </binding>
> >
> >    <!-- Service definition -->
> >    <service name="StockAvailableNotificationService">
> >       <port name="StockAvailableNotificationPort" binding="
> >             StockAvailableNotificationSOAPBinding ">
> >          <soap:address
> > location="http://www.skatestown.com/axis/services/StockNotification"/>
> >       </port>
> >    </service>
> >
> > </definitions>
> >
> >
> > Thanks!!
> >
> >
> > You will have to update the .NET client to use the new WSDL.
> > .NET has an easy-to-use utility call wsdl.exe that generates client
> > stubs for you.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by Philipp Leitner <ph...@gmx.at>.
AFAIK Axis 2 does not support RPC/encoded at all since it is  not WS-I 
compliant.

/philipp

alpatino2 schrieb:
> Hi!
> 
> I have a slightly different requirement: I received wsdl's from a service
> provider that implements the TR-069 spec, this spec define the use of
> rpc/encoded style. I need to invoke this service but I am not able to
> generate the client, I tried to generate the client for the sample
> stockAvailableNotification.wsdl extracted from the Building Web Services
> with Java book, but I get the following error:
> 
> 
> 
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:140)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
> Parser SAX Error: org.xml.sax.SAXException: Fatal Error:
> URI=file:///home/albertop/axis2/wsdl-rpc/examples/src/ch6/ex2/stockAvailableNotification.wsdl
> Line=24: The prefix "wsdl" for attribute "wsdl:arrayType" associated with an
> element type "attribute" is not bound.
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:300)
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:97)
>         ... 2 more
> Caused by: org.xml.sax.SAXException: Fatal Error:
> URI=file:///home/albertop/axis2/wsdl-rpc/examples/src/ch6/ex2/stockAvailableNotification.wsdl
> Line=24: The prefix "wsdl" for attribute "wsdl:arrayType" associated with an
> element type "attribute" is not bound.
> 
> The wsdl from the book is:
> 
> <?xml version="1.0" ?>
> <definitions name="StockAvailableNotification"
>         targetNamespace=
>            "http://www.skatestown.com/services/StockAvailableNotification"
>          xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
>          xmlns:reg="http://www.skatestown.com/ns/registrationRequest"
>          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>          xmlns="http://schemas.xmlsoap.org/wsdl/">
> 
>    <!-- Type definitions from the registration schema-->
>    <types>
>       <xsd:schema
> targetNamespace="http://www.skatestown.com/ns/registrationRequest"
>          xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
>          xmlns="http://www.skatestown.com/schemas/ns/registrationRequest">
> 
>          <xsd:complexType name="registrationRequest">
>             <xsd:sequence>
>                <xsd:element name="items">
>                   <xsd:complexType name="ArrayOfItem">
>                      <complexContent>
>                         <restriction base="soapenc:Array">
>                            <attribute ref="soapenc:arrayType"
>                                wsdl:arrayType="xsd:string[]"/>
>                         </restriction>
>                      </complexContent>
>                   </complexType>
>                </xsd:element>
> 
>                <xsd:element name="address" type="xsd:uriReference"/>
> 
>                <xsd:element name="transport" 
>                             default="http://schemas.xmlsoap.org/soap/smtp"
> minOccurs="0">
>                   <xsd:simpleType>
>                      <xsd:restriction base="xsd:uriReference">
>                         <xsd:enumeration
> value="http://schemas.xmlsoap.org/soap/http"/>
>                         <xsd:enumeration
> value="http://schemas.xmlsoap.org/soap/smtp"/>
>                      </xsd:restriction>
>                   </xsd:simpleType>
>                </xsd:element>
> 
>                <xsd:element name="clientArg" type="xsd:string"
> minOccurs="0"/>
>             </xsd:sequence>
>          </xsd:complexType>
> 
>          <xsd:simpleType name="correlationID">
>             <xsd:restriction base="xsd:string">
>             <!-- some appropriate restriction -->
>             </xsd:restriction>
>          </xsd:simpleType>
>       </xsd:schema>
>    </types>
> 
>    <!-- Message definitions -->
>    <message name="StockAvailableRegistrationRequest">
>       <part name="registration" element="reg:registrationRequest"/>
>       <part name="expiration" type="xsd:timeInstant"/>
>    </message>
> 
>    <message name="StockAvailableRegistrationResponse">
>       <part name="correlationID" type="reg:correlationID"/>
>    </message>
> 
>    <message name="StockAvailableRegistrationError">
>       <part name="errorString" type="xsd:string"/>
>    </message>
> 
>    <message name="StockAvailableExpirationError">
>       <part name="errorString" type="xsd:string"/>
>    </message>
> 
>    <message name="StockAvailableNotification">
>       <part name="timeStamp" type="xsd:timeInstant"/>
>       <part name="correlationID" type="reg:correlationID"/>
>       <part name="items" type="reg:items"/>
>       <part name="clientArg" type="xsd:string"/>
>    </message>
> 
>    <message name="StockAvailableExpirationNotification">
>       <part name="timeStamp" type="xsd:timeInstant"/>
>       <part name="correlationID" type="reg:correlationID"/>
>       <part name="items" type="reg:ArrayOfItem"/>
>       <part name="clientArg" type="xsd:string"/>
>    </message>
> 
>    <message name="StockAvailableCancellation">
>       <part name="correlationID" type="reg:correlationID"/>
>    </message>
> 
>    <!-- Port type definitions -->
>    <portType name="StockAvailableNotificationPortType">
>       <!--Registration Operation -->
>       <operation name="registration">
>          <input message="StockAvailableRegistrationRequest"/>
>          <output message="StockAvailableRegistrationResponse"/>
>          <fault message="StockAvailableRegistrationError"
>             name="StockAvailableNotificationErrorMessage"/>
>          <fault message="StockAvailableExpirationError"
>             name="StockAvailableExpirationError"/>
>       </operation>
> 
>       <!--Notification Operation -->
>       <operation name="notification">
>          <output message="StockAvailableNotification"/>
>       </operation>
> 
>       <!--Expiration Notification Operation -->
>       <operation name="expirationNotification">
>          <output message="StockAvailableExpirationNotification"/>
>       </operation>
> 
>       <!--Cancellation Operation -->
>       <operation name="cancellation">
>          <input message=" StockAvailableCancellation"/>
>       </operation>
>    </portType>
> 
>    <!-- Binding definitions -->
>    <binding name="StockAvailableNotificationSOAPBinding" 
>       type="StockAvailableNotificationPortType">
>       <soap:binding style="rpc"
>                transport="http://schemas.xmlsoap.org/soap/http"/>
> 
>       <documentation>Note: the requestor must invoke the registration
> operation first.
>       </documentation>
> 
>       <operation name="registration">
>          <soap:operation 
>             soapAction=
>               
> "http://www.skatesTown.com/StockAvailableNotification/registration">
>          <input>
>             <soap:header message="StockAvailableRegistrationRequest"
>                   part="expiration" use="encoded"
>                  
> namespace="http://www.skatestown.com/ns/registrationRequest"
>                  
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>                <soap:headerfault message="StockAvailableExpirationError" 
>                   part="errorString" use="encoded"
>                  
> namespace="http://www.skatestown.com/ns/registrationRequest"
>                  
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>             </soap:header>
>             <soap:body parts="registration" use="literal" style="document"/>
>          </input>
>          <output>
>             <soap:body use="encoded"
>                 namespace="http://www.skatestown.com/ns/registrationRequest"
>                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>          </output>
>          <fault name="StockAvailableNotificationErrorMessage">
>             <soap:fault name="StockAvailableNotificationErrorMessage"
>                 namespace="http://www.skatestown.com/ns/registrationRequest"
>                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>          </fault>
>       </operation>
> 
>       <operation name="notification">
>          <output>
>             <soap:body use="encoded"
>                 namespace="http://www.skatestown.com/ns/registrationRequest"
>                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>          </output>
>       </operation>
> 
>       <operation name="cancellation">
>          <soap:operation 
>             soapAction=
>               
> "http://www.skatesTown.com/StockAvailableNotification/cancellation">
>          <input>
>             <soap:body use="encoded"
>                 namespace="http://www.skatestown.com/ns/registrationRequest"
>                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>          </input>
>       </operation>
>    </binding>
> 
>    <!-- Service definition -->
>    <service name="StockAvailableNotificationService">
>       <port name="StockAvailableNotificationPort" binding="
>             StockAvailableNotificationSOAPBinding ">
>          <soap:address
> location="http://www.skatestown.com/axis/services/StockNotification"/>
>       </port>
>    </service>
> 
> </definitions>
> 
> 
> Thanks!!
> 
> 
> You will have to update the .NET client to use the new WSDL.
> .NET has an easy-to-use utility call wsdl.exe that generates client
> stubs for you.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by alpatino2 <pa...@gmail.com>.
Hi!

I have a slightly different requirement: I received wsdl's from a service
provider that implements the TR-069 spec, this spec define the use of
rpc/encoded style. I need to invoke this service but I am not able to
generate the client, I tried to generate the client for the sample
stockAvailableNotification.wsdl extracted from the Building Web Services
with Java book, but I get the following error:



Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:140)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
Parser SAX Error: org.xml.sax.SAXException: Fatal Error:
URI=file:///home/albertop/axis2/wsdl-rpc/examples/src/ch6/ex2/stockAvailableNotification.wsdl
Line=24: The prefix "wsdl" for attribute "wsdl:arrayType" associated with an
element type "attribute" is not bound.
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:300)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:97)
        ... 2 more
Caused by: org.xml.sax.SAXException: Fatal Error:
URI=file:///home/albertop/axis2/wsdl-rpc/examples/src/ch6/ex2/stockAvailableNotification.wsdl
Line=24: The prefix "wsdl" for attribute "wsdl:arrayType" associated with an
element type "attribute" is not bound.

The wsdl from the book is:

<?xml version="1.0" ?>
<definitions name="StockAvailableNotification"
        targetNamespace=
           "http://www.skatestown.com/services/StockAvailableNotification"
         xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
         xmlns:reg="http://www.skatestown.com/ns/registrationRequest"
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
         xmlns="http://schemas.xmlsoap.org/wsdl/">

   <!-- Type definitions from the registration schema-->
   <types>
      <xsd:schema
targetNamespace="http://www.skatestown.com/ns/registrationRequest"
         xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
         xmlns="http://www.skatestown.com/schemas/ns/registrationRequest">

         <xsd:complexType name="registrationRequest">
            <xsd:sequence>
               <xsd:element name="items">
                  <xsd:complexType name="ArrayOfItem">
                     <complexContent>
                        <restriction base="soapenc:Array">
                           <attribute ref="soapenc:arrayType"
                               wsdl:arrayType="xsd:string[]"/>
                        </restriction>
                     </complexContent>
                  </complexType>
               </xsd:element>

               <xsd:element name="address" type="xsd:uriReference"/>

               <xsd:element name="transport" 
                            default="http://schemas.xmlsoap.org/soap/smtp"
minOccurs="0">
                  <xsd:simpleType>
                     <xsd:restriction base="xsd:uriReference">
                        <xsd:enumeration
value="http://schemas.xmlsoap.org/soap/http"/>
                        <xsd:enumeration
value="http://schemas.xmlsoap.org/soap/smtp"/>
                     </xsd:restriction>
                  </xsd:simpleType>
               </xsd:element>

               <xsd:element name="clientArg" type="xsd:string"
minOccurs="0"/>
            </xsd:sequence>
         </xsd:complexType>

         <xsd:simpleType name="correlationID">
            <xsd:restriction base="xsd:string">
            <!-- some appropriate restriction -->
            </xsd:restriction>
         </xsd:simpleType>
      </xsd:schema>
   </types>

   <!-- Message definitions -->
   <message name="StockAvailableRegistrationRequest">
      <part name="registration" element="reg:registrationRequest"/>
      <part name="expiration" type="xsd:timeInstant"/>
   </message>

   <message name="StockAvailableRegistrationResponse">
      <part name="correlationID" type="reg:correlationID"/>
   </message>

   <message name="StockAvailableRegistrationError">
      <part name="errorString" type="xsd:string"/>
   </message>

   <message name="StockAvailableExpirationError">
      <part name="errorString" type="xsd:string"/>
   </message>

   <message name="StockAvailableNotification">
      <part name="timeStamp" type="xsd:timeInstant"/>
      <part name="correlationID" type="reg:correlationID"/>
      <part name="items" type="reg:items"/>
      <part name="clientArg" type="xsd:string"/>
   </message>

   <message name="StockAvailableExpirationNotification">
      <part name="timeStamp" type="xsd:timeInstant"/>
      <part name="correlationID" type="reg:correlationID"/>
      <part name="items" type="reg:ArrayOfItem"/>
      <part name="clientArg" type="xsd:string"/>
   </message>

   <message name="StockAvailableCancellation">
      <part name="correlationID" type="reg:correlationID"/>
   </message>

   <!-- Port type definitions -->
   <portType name="StockAvailableNotificationPortType">
      <!--Registration Operation -->
      <operation name="registration">
         <input message="StockAvailableRegistrationRequest"/>
         <output message="StockAvailableRegistrationResponse"/>
         <fault message="StockAvailableRegistrationError"
            name="StockAvailableNotificationErrorMessage"/>
         <fault message="StockAvailableExpirationError"
            name="StockAvailableExpirationError"/>
      </operation>

      <!--Notification Operation -->
      <operation name="notification">
         <output message="StockAvailableNotification"/>
      </operation>

      <!--Expiration Notification Operation -->
      <operation name="expirationNotification">
         <output message="StockAvailableExpirationNotification"/>
      </operation>

      <!--Cancellation Operation -->
      <operation name="cancellation">
         <input message=" StockAvailableCancellation"/>
      </operation>
   </portType>

   <!-- Binding definitions -->
   <binding name="StockAvailableNotificationSOAPBinding" 
      type="StockAvailableNotificationPortType">
      <soap:binding style="rpc"
               transport="http://schemas.xmlsoap.org/soap/http"/>

      <documentation>Note: the requestor must invoke the registration
operation first.
      </documentation>

      <operation name="registration">
         <soap:operation 
            soapAction=
              
"http://www.skatesTown.com/StockAvailableNotification/registration">
         <input>
            <soap:header message="StockAvailableRegistrationRequest"
                  part="expiration" use="encoded"
                 
namespace="http://www.skatestown.com/ns/registrationRequest"
                 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
               <soap:headerfault message="StockAvailableExpirationError" 
                  part="errorString" use="encoded"
                 
namespace="http://www.skatestown.com/ns/registrationRequest"
                 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </soap:header>
            <soap:body parts="registration" use="literal" style="document"/>
         </input>
         <output>
            <soap:body use="encoded"
                namespace="http://www.skatestown.com/ns/registrationRequest"
                encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
         <fault name="StockAvailableNotificationErrorMessage">
            <soap:fault name="StockAvailableNotificationErrorMessage"
                namespace="http://www.skatestown.com/ns/registrationRequest"
                encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </fault>
      </operation>

      <operation name="notification">
         <output>
            <soap:body use="encoded"
                namespace="http://www.skatestown.com/ns/registrationRequest"
                encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
      </operation>

      <operation name="cancellation">
         <soap:operation 
            soapAction=
              
"http://www.skatesTown.com/StockAvailableNotification/cancellation">
         <input>
            <soap:body use="encoded"
                namespace="http://www.skatestown.com/ns/registrationRequest"
                encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </input>
      </operation>
   </binding>

   <!-- Service definition -->
   <service name="StockAvailableNotificationService">
      <port name="StockAvailableNotificationPort" binding="
            StockAvailableNotificationSOAPBinding ">
         <soap:address
location="http://www.skatestown.com/axis/services/StockNotification"/>
      </port>
   </service>

</definitions>


Thanks!!


You will have to update the .NET client to use the new WSDL.
.NET has an easy-to-use utility call wsdl.exe that generates client
stubs for you.

-- 
View this message in context: http://www.nabble.com/rpc-encoded-vs-rpc-literal-vs-document-literal-migrate-Axis1.4-wsdl-%28rpc-encoded%29-to-Axis2-doc-lit-tf4113634.html#a11856779
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by Anne Thomas Manes <at...@gmail.com>.
You will have to update the .NET client to use the new WSDL.
.NET has an easy-to-use utility call wsdl.exe that generates client
stubs for you.

Anne

On 7/23/07, david <da...@davidwbrown.name> wrote:
> Hello Ann, thanks for the WSDL editor recommendations. I have only one more question about the WSDL you graciously repaired after my bungled attempt to translate the document. Your WSDL generated perfect (dot).java and now I have the service deployed via Axis2 webapp running under Tomcat. The question is: could a .NET client using the <OLD> WSDL use the migrated WSDLs service? I don't have Visual Studio and I am not sure if I am a .NET programmer otherwise I would try to create a client to test the hypothesis. Please advise, David.
>
> Anne Thomas Manes wrote ..
> > Commerical products:
> > xmlspy: http://www.altova.com/products/xmlspy/graphical_wsdl_editor.html
> > <oxygen/>: http://www.oxygenxml.com/wsdl_editor.html
> > Stylus Studio: http://www.stylusstudio.com/webservices/wsdl_editor.html
> >
> > I can also send you Cape Clear's free SOA Editor tool (no longer
> > available from Cape Clear, but I have permission to distribute it.)
> >
> > Anne
> >
> > On 7/21/07, david <da...@davidwbrown.name> wrote:
> > > Hello Anne, currently I am using the Eclipse plugin XML/WSDL editor.
> > There are so many XML and WSDL editors out there it is bewildering. Please
> > reply with an editor albeit commercial, free or criminal and I will get
> > to work on the problems cited by you and Chris. Please advise, David.
> > >
> > > Anne Thomas Manes wrote ..
> > > > Actually, you made a lot more mistakes than the ones Chris cited. You
> > > > had numerous namespace issues; you didn't name the getversion and
> > > > getversionResponse types; you didn't follow the convention of giving
> > > > your input elements the same name as your operation; you didn't change
> > > > your message parts properly; you didn't remove the namespace
> > > > attributes from the <soap:body> definitions; etc. You might want to
> > > > get yourself a WSDL editor with a validation option to help you in
> > the
> > > > future.
> > > >
> > > > Here's a revised WSDL that validates:
> > > >
> > > > <wsdl:definitions  xmlns:tns="http://service.myremote.my"
> > > >        xmlns:type="http://service.myremote.my/type"
> > > >        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > > >        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > >        xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > >        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > > >        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > >        xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> > > >        targetNamespace="http://service.myremote.my">
> > > >  <wsdl:types>
> > > >    <xs:schema targetNamespace='http://service.myremote.my/type'
> > > >      elementFormDefault='qualified'>
> > > >
> > > >  <xs:element name='Transact' type='type:Transact'/>
> > > >  <xs:complexType name='Transact'>
> > > >        <xs:sequence>
> > > >                <xs:element name='userid' type='xs:string'/>
> > > >                <xs:element name='password' type='xs:string'/>
> > > >                <xs:element name='paramstr' type='xs:string'/>
> > > >        </xs:sequence>
> > > >  </xs:complexType>
> > > >  <xs:element name='TransactResponse' type='type:TransactResponse' />
> > > >  <xs:complexType name='TransactResponse'>
> > > >        <xs:sequence>
> > > >                <xs:element name='Result' type='xs:string'/>
> > > >                <xs:element name='paramstr' type='xs:string'/>
> > > >        </xs:sequence>
> > > >  </xs:complexType>
> > > >  <xs:element name='getversion' type='type:getversion'/>
> > > >  <xs:complexType name='getversion'>
> > > >        <xs:sequence>
> > > >        </xs:sequence>
> > > >  </xs:complexType>
> > > >  <xs:element name='getversionResponse' type='type:getversionResponse'/>
> > > >  <xs:complexType name='getversionResponse'>
> > > >        <xs:sequence>
> > > >                <xs:element name='Result' type='xs:string'/>
> > > >        </xs:sequence>
> > > >  </xs:complexType>
> > > >    </xs:schema>
> > > >  </wsdl:types>
> > > >  <wsdl:message name='TransactRequest'>
> > > >    <wsdl:part name='parameters' element='type:Transact'/>
> > > >  </wsdl:message>
> > > >  <wsdl:message name='TransactResponse'>
> > > >    <wsdl:part name='parameters' element='type:TransactResponse'/>
> > > >  </wsdl:message>
> > > >  <wsdl:message name='getversionRequest'>
> > > >    <wsdl:part name='parameters' element='type:getversion'/>
> > > >  </wsdl:message>
> > > >  <wsdl:message name='getversionResponse'>
> > > >    <wsdl:part name='parameters' element='type:getversionResponse'/>
> > > >  </wsdl:message>
> > > >  <wsdl:portType name='MyRemoteSoapPort'>
> > > >    <wsdl:operation name='Transact'>
> > > >      <wsdl:input message='tns:TransactRequest' />
> > > >      <wsdl:output message='tns:TransactResponse' />
> > > >    </wsdl:operation>
> > > >    <wsdl:operation name='getversion'>
> > > >      <wsdl:input message='tns:getversionRequest' />
> > > >      <wsdl:output message='tns:getversionResponse' />
> > > >    </wsdl:operation>
> > > >  </wsdl:portType>
> > > >  <wsdl:binding name='MyRemoteSoapBinding' type='tns:MyRemoteSoapPort'
> > >
> > > >    <soap:binding style='document'
> > > > transport='http://schemas.xmlsoap.org/soap/http' />
> > > >    <wsdl:operation name='Transact' >
> > > >      <soap:operation
> > > > soapAction='http://service.myremote.my/action/MyRemote.Transact' />
> > > >      <wsdl:input>
> > > >        <soap:body use='literal' />
> > > >      </wsdl:input>
> > > >      <wsdl:output>
> > > >        <soap:body use='literal' />
> > > >      </wsdl:output>
> > > >    </wsdl:operation>
> > > >    <wsdl:operation name='getversion' >
> > > >      <soap:operation
> > > > soapAction='http://service.myremote.my/action/MyRemote.getversion'
> > />
> > > >      <wsdl:input>
> > > >        <soap:body use='literal'/>
> > > >      </wsdl:input>
> > > >      <wsdl:output>
> > > >        <soap:body use='literal'/>
> > > >      </wsdl:output>
> > > >    </wsdl:operation>
> > > >  </wsdl:binding>
> > > >  <wsdl:service name='MyRemote' >
> > > >    <wsdl:port name='MyRemoteSoapPort' binding='tns:MyRemoteSoapBinding'
> > > > >
> > > >      <soap:address
> > > > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> > > >    </wsdl:port>
> > > >  </wsdl:service>
> > > > </wsdl:definitions>
> > > >
> > > > On 7/20/07, Ebert, Chris <ch...@hp.com> wrote:
> > > > > Two things:
> > > > > 1) You've mixed single and double quotes around the name of your
> > first
> > > > > type.
> > > > > 2) The type definitions should go inside the <schema> </schema> tags.
> > > > >
> > > > > Chris
> > > > >
> > > > > -----Original Message-----
> > > > > From: david [mailto:david@davidwbrown.name]
> > > > > Sent: Friday, July 20, 2007 15:54
> > > > > To: axis-user@ws.apache.org
> > > > > Subject: Re: rpc-encoded vs rpc-literal vs document-literal migrate
> > > > > Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit
> > > > >
> > > > > Hello Ann, thanks for the speedy reply. I see you working another
> > user
> > > > > who is also trying to migrate an Axis1.4 WS to Axis2. I have an Axis1.4
> > > > > WS that is running OK as hinted at in my previous communication to
> > the
> > > > > ML. I hand-converted the .wsdl with great tedium as you predicted.
> > > > > Notwithstanding the WSDL2JAVA tool (Eclipse/Axis plugin) bails before
> > > > > processing the .wsdl with the following error condition:
> > > > >
> > > > > Specified WSDL is invalid!
> > > > >
> > > > > I have included both WSDLs: the original source WSDL running under
> > > > > Asix1.4. And, the hand-edited WSDL that errors-out under the WSDL2JAVA
> > > > > tool. Thanks in advance and please advise, David.
> > > > >
> > > > >
> > > > > ************************************ SOURCE WSDL
> > > > > ***********************************************
> > > > >
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <wsdl:definitions targetNamespace="http://tempuri.org/MYRemote/wsdl/"
> > > > > xmlns:apachesoap="http://xml.apache.org/xml-soap"
> > > > > xmlns:impl="http://tempuri.org/MyRemote/wsdl/"
> > > > > xmlns:intf="http://tempuri.org/MyRemote/wsdl/"
> > > > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > > > > <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006
> > > > > (06:55:48 PDT)-->
> > > > >
> > > > >    <wsdl:message name="getversionRequest">
> > > > >
> > > > >    </wsdl:message>
> > > > >
> > > > >    <wsdl:message name="getversionResponse">
> > > > >
> > > > >       <wsdl:part name="Result" type="xsd:string"/>
> > > > >
> > > > >    </wsdl:message>
> > > > >
> > > > >    <wsdl:message name="TransactRequest">
> > > > >
> > > > >       <wsdl:part name="userid" type="xsd:string"/>
> > > > >
> > > > >       <wsdl:part name="password" type="xsd:string"/>
> > > > >
> > > > >       <wsdl:part name="paramstr" type="xsd:string"/>
> > > > >
> > > > >    </wsdl:message>
> > > > >
> > > > >    <wsdl:message name="TransactResponse">
> > > > >
> > > > >       <wsdl:part name="Result" type="xsd:string"/>
> > > > >
> > > > >    </wsdl:message>
> > > > >
> > > > >    <wsdl:portType name="MyRemoteSoapPort">
> > > > >
> > > > >       <wsdl:operation name="Transact" parameterOrder="userid password
> > > > > paramstr">
> > > > >
> > > > >          <wsdl:input message="impl:TransactRequest"
> > > > > name="TransactRequest"/>
> > > > >
> > > > >          <wsdl:output message="impl:TransactResponse"
> > > > > name="TransactResponse"/>
> > > > >
> > > > >       </wsdl:operation>
> > > > >
> > > > >       <wsdl:operation name="getversion">
> > > > >
> > > > >          <wsdl:input message="impl:getversionRequest"
> > > > > name="getversionRequest"/>
> > > > >
> > > > >          <wsdl:output message="impl:getversionResponse"
> > > > > name="getversionResponse"/>
> > > > >
> > > > >       </wsdl:operation>
> > > > >
> > > > >    </wsdl:portType>
> > > > >
> > > > >    <wsdl:binding name="MyRemoteSoapPortSoapBinding"
> > > > > type="impl:MyRemoteSoapPort">
> > > > >
> > > > >       <wsdlsoap:binding style="rpc"
> > > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > > >
> > > > >       <wsdl:operation name="Transact">
> > > > >
> > > > >          <wsdlsoap:operation
> > > > > soapAction="http://tempuri.org/MyRemote/action/MyRemote.Transact"/>
> > > > >
> > > > >          <wsdl:input name="TransactRequest">
> > > > >
> > > > >             <wsdlsoap:body
> > > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> > > > >
> > > > >          </wsdl:input>
> > > > >
> > > > >          <wsdl:output name="TransactResponse">
> > > > >
> > > > >             <wsdlsoap:body
> > > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> > > > >
> > > > >          </wsdl:output>
> > > > >
> > > > >       </wsdl:operation>
> > > > >
> > > > >       <wsdl:operation name="getversion">
> > > > >
> > > > >          <wsdlsoap:operation
> > > > > soapAction="http://tempuri.org/MyRemote/action/MyRemote.getversion"/>
> > > > >
> > > > >          <wsdl:input name="getversionRequest">
> > > > >
> > > > >             <wsdlsoap:body
> > > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> > > > >
> > > > >          </wsdl:input>
> > > > >
> > > > >          <wsdl:output name="getversionResponse">
> > > > >
> > > > >             <wsdlsoap:body
> > > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> > > > >
> > > > >          </wsdl:output>
> > > > >
> > > > >       </wsdl:operation>
> > > > >
> > > > >    </wsdl:binding>
> > > > >
> > > > >    <wsdl:service name="MyRemote">
> > > > >
> > > > >       <wsdl:port binding="impl:MyRemoteSoapPortSoapBinding"
> > > > > name="MyRemoteSoapPort">
> > > > >
> > > > >          <wsdlsoap:address
> > > > > location="http://tech-pc06:8080/axis/services/MyRemoteSoapPort"/>
> > > > >
> > > > >       </wsdl:port>
> > > > >
> > > > >    </wsdl:service>
> > > > >
> > > > > </wsdl:definitions>
> > > > >
> > > > >
> > > > > ****************************************** hand-edited
> > > > > **********************************************
> > > > > <wsdl:definitions  xmlns:axis2="http://service.myremote.my"
> > > > >         xmlns:ns0="http://userid.myremote.my/xsd"
> > > > >         xmlns:ns1="http://password.myremote.my/xsd"
> > > > >         xmlns:ns2="http://paramstr.myremote.my/xsd"
> > > > >         xmlns:ns3="http://Result.myremote.my/xsd"
> > > > >         xmlns:ns4="http://paramstr.myremote.my/xsd"
> > > > >         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > > > >         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > >         xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > > >         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > > > >         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > >         xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> > > > >         targetNamespace="http://service.myremote.my/type">
> > > > >   <wsdl:types>
> > > > >     <xs:schema targetNamespace='http://service.myremote.my/type'
> > > > >       xmlns='http://www.w3.org/2001/XMLSchema'
> > > > >       xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
> > > > >       elementFormDefault='qualified'>
> > > > >     </xs:schema>
> > > > >   </wsdl:types>
> > > > >   <xs:element name='MyRemote.Transact' type='ns:MyRemote.Transact'/>
> > > > >   <xs:complexType name="MyRemote.Transact'>
> > > > >         <xs:sequence>
> > > > >                 <xs:element name='userid' type='xs:string'/>
> > > > >                 <xs:element name='password' type='xs:string'/>
> > > > >                 <xs:element name='paramstr' type='xs:string'/>
> > > > >         </xs:sequence>
> > > > >   </xs:complexType>
> > > > >   <xs:element name='MyRemote.TransactResponse'
> > > > > type='ns1:MyRemote.TransactResponse' />
> > > > >   <xs:complexType name='MyRemote.TransactResponse'>
> > > > >         <xs:sequence>
> > > > >                 <xs:element name='Result' type='xs:string'/>
> > > > >                 <xs:element name='paramstr' type='xs:string'/>
> > > > >         </xs:sequence>
> > > > >   </xs:complexType>
> > > > >   <xs:element name='MyRemote.getversion'
> > > > > type='ns2:MyRemote.getversion'/>
> > > > >   <xs:complexType>
> > > > >         <xs:sequence>
> > > > >         </xs:sequence>
> > > > >   </xs:complexType>
> > > > >   <xs:element name='MyRemote.getversionResponse'
> > > > > type='ns3:MyRemote.getversionResponse'/>
> > > > >   <xs:complexType>
> > > > >         <xs:sequence>
> > > > >                 <xsd:element name='Result' type='xs:string'/>
> > > > >         </xs:sequence>
> > > > >   </xs:complexType>
> > > > >   <wsdl:message name='MyRemote.Transact'>
> > > > >     <wsdl:part name='userid' element='ns0:MyRemote.Transact'/>
> > > > >     <wsdl:part name='password' element='ns1:MyRemote.Transact'/>
> > > > >     <wsdl:part name='paramstr' element='ns2:MyRemote.Transact'/>
> > > > >   </wsdl:message>
> > > > >   <wsdl:message name='MyRemote.TransactResponse'>
> > > > >     <wsdl:part name='Result' type='ns3:MyRemote.TransactResponse'/>
> > > > >     <wsdl:part name='paramstr' type='ns4:MyRemote.TransactResponse'/>
> > > > >   </wsdl:message>
> > > > >   <wsdl:message name='MyRemote.getversion'>
> > > > >   </wsdl:message>
> > > > >   <wsdl:message name='MyRemote.getversionResponse'>
> > > > >     <wsdl:part name='Result' type='ns3:MyRemote.getversionResponse'/>
> > > > >   </wsdl:message>
> > > > >   <wsdl:portType name='MyRemoteSoapPort'>
> > > > >     <wsdl:operation name='Transact' parameterOrder='userid password
> > > > > paramstr'>
> > > > >       <wsdl:input message='MyRemote.Transact' />
> > > > >       <wsdl:output message='wsdlns:MyRemote.TransactResponse' />
> > > > >     </wsdl:operation>
> > > > >     <wsdl:operation name='getversion' parameterOrder=''>
> > > > >       <wsdl:input message='wsdlns:MyRemote.getversion' />
> > > > >       <wsdl:output message='wsdlns:MyRemote.getversionResponse' />
> > > > >     </wsdl:operation>
> > > > >   </wsdl:portType>
> > > > >   <wsdl:binding name='MyRemoteSoapBinding'
> > > > > type='wsdlns:MyRemoteSoapPort' >
> > > > >     <stk:binding/>
> > > > >     <soap:binding style='document'
> > > > > transport='http://schemas.xmlsoap.org/soap/http' />
> > > > >     <wsdl:operation name='Transact' >
> > > > >       <soap:operation
> > > > > soapAction='http://service.myremote.my/action/MyRemote.Transact'
> > />
> > > > >       <wsdl:input>
> > > > >         <soap:body use='literal'
> > > > > namespace='http://service.myremote.my/message/' />
> > > > >       </wsdl:input>
> > > > >       <wsdl:output>
> > > > >         <soap:body use='literal'
> > > > > namespace='http://service.myremote.my/message/'/>
> > > > >       </wsdl:output>
> > > > >     </wsdl:operation>
> > > > >     <wsdl:operation name='getversion' >
> > > > >       <soap:operation
> > > > > soapAction='http://service.myremote.my/action/MyRemote.getversion'
> > />
> > > > >       <wsdl:input>
> > > > >         <soap:body use='literal'/>
> > > > >       </wsdl:input>
> > > > >       <wsdl:output>
> > > > >         <soap:body use='literal'/>
> > > > >       </wsdl:output>
> > > > >     </wsdl:operation>
> > > > >   </wsdl:binding>
> > > > >   <wsdl:service name='MyRemote' >
> > > > >     <wsdl:port name='MyRemoteSoapPort'
> > > > > binding='wsdlns:MyRemoteSoapBinding' >
> > > > >       <soap:address
> > > > > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> > > > >     </wsdl:port>
> > > > >   </wsdl:service>
> > > > > </wsdl:definitions>
> > > > >
> > > > >
> > > > >
> > > > > Anne Thomas Manes wrote ..
> > > > > > David,
> > > > > >
> > > > > > I just Googled looking for an automated converter utility, but
> > no
> > > > > > luck. I think you'll have to do the conversions by hand. As a general
> > > > > > rule, I strongly recommend that you convert your WSDL to wrapped
> > > > > > document/literal.
> > > > > >
> > > > > > Here are the basic rules:
> > > > > >
> > > > > > 1 - Convert your input and output parameters to explicitly defined
> > > > > > schema elements. The name of an input element should be the same
> > as
> > > > > > the operation name. The name of an output element should be a
> > > > > > concatenation of the operation name and "Response". For example,
> > for
> > > > > > an operation called myOperation, with the following message
> > > > > > descriptions:
> > > > > >
> > > > > >         <w:message name="myOperationRequest">
> > > > > >            <w:part name="param1" type="x:string"/>
> > > > > >            <w:part name="param2" type="x:int"/>
> > > > > >         </w:message>
> > > > > >
> > > > > >         <w:message name="myOperationResponse"
> > > > > >            <w:part name="return" type="x:string"/>
> > > > > >         </w:message>
> > > > > >
> > > > > > Write the following schema definition:
> > > > > >
> > > > > >         <x:element name="myOperation" type="tns:myOperation"/>
> > > > > >         <x:complexType name="myOperation">
> > > > > >            <x:sequence>
> > > > > >                <x:element name="param1" type="x:string"/>
> > > > > >                <x:element name="param2" type="x:int"/>
> > > > > >            </x:sequence>
> > > > > >          <x:complexType>
> > > > > >
> > > > > >         <x:element name="myOperationResponse"
> > > > > type="tns:myOperationResponse"/>
> > > > > >         <x:complexType name="myOperationResponse">
> > > > > >            <x:sequence>
> > > > > >                <x:element name="return" type="x:string"/>
> > > > > >            </x:sequence>
> > > > > >          <x:complexType>
> > > > > >
> > > > > > And change the message definitions to:
> > > > > >
> > > > > >         <w:message name="myOperationRequest">
> > > > > >            <w:part name="parameters" element="tns:myOperation"/>
> > > > > >         </w:message>
> > > > > >
> > > > > >         <w:message name="myOperationResponse"
> > > > > >            <w:part name="parameters"
> > > > > element="tns:myOperationResponse"/>
> > > > > >         </w:message>
> > > > > >
> > > > > > 2. Make the following changes to the <w:binding> definitions:
> > > > > >
> > > > > > Wherever it says style="rpc", change it to style="document". (This
> > > > > > could be in the <soap:binding> or the <soap:operation> definitions.
> > > > > >
> > > > > > Wherever it says use="encoded", change it to use="literal". (This
> > will
> > > > >
> > > > > > be in all <soap:body>, <soap:header>, <soap:fault>, and
> > > > > > <soap:headerfault> definitions.). Likewise, in all these definitions,
> > > > > > remove all encodingStyle and namespace attributes.
> > > > > >
> > > > > > e.g., the <soap:body> definition should look like this:
> > > > > >
> > > > > >          <soap:body use="literal"/>
> > > > > >
> > > > > > That's it. Tedious, but relatively straightforward.
> > > > > >
> > > > > > Anne
> > > > > >
> > > > > >
> > > > > > On 7/19/07, david <da...@davidwbrown.name> wrote:
> > > > > > > Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET
> > > > > > > client
> > > > > > generated WSDL (rpc-encoded). I want to convert this WSDL to either:
> > > > > > rpc-literal or document-literal such that I can run Axis2 wsdl2java
> > > > > > and generate an
> > > > > > Axis2 service. Currently, this service is running as Axis1.4 and
> > I
> > > > > > would appreciate very much any and all ideas and suggestions as
> > to
> > > > how
> > > > >
> > > > > > to migrate to Axis2. I know the Axis2 wsdl2java does not support
> > > > > > rpc-encoded. I read Ann Manes blog about converting wsdls but I
> > am
> > > > not
> > > > >
> > > > > > sure if this can be extended to rpc-encoded. I am secretly hoping
> > Ann
> > > > > > Manes will reply but any and all rants and raves welcomed. I can
> > reply
> > > > >
> > > > > > with the target wsdl in question. Please advise, David.
> > > > > > >
> > > > > > > --------------------------------------------------------------------
> > > > > > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by david <da...@davidwbrown.name>.
Hello Anne, I do not know how to thank you. First, I must thank you for the reply with the completely validated WSDL. This has made my day and I will have to use your efforts as a go-by for future changes in the WSDL file. And, your contribution will be an indispensible reference on: what-not-to-do in migrating rpc-encoded to doc/lit. And, thanks very much for the WSDL editor recommendations. As a consequence of your replies I realized how foolish I have been when I discovered the Eclipse WTP plugin has a very fine WSDL editor that validates WSDL files. I certainly mean to investigate the WSDL editors you have recommended below. In the future to prevent you from doing all my work for me I would really appreciate a good reference or book review on Java related Web Services and/or WSDL file syntax. Thanks again and please advise, David.

Anne Thomas Manes wrote ..
> Commerical products:
> xmlspy: http://www.altova.com/products/xmlspy/graphical_wsdl_editor.html
> <oxygen/>: http://www.oxygenxml.com/wsdl_editor.html
> Stylus Studio: http://www.stylusstudio.com/webservices/wsdl_editor.html
> 
> I can also send you Cape Clear's free SOA Editor tool (no longer
> available from Cape Clear, but I have permission to distribute it.)
> 
> Anne
> 
> On 7/21/07, david <da...@davidwbrown.name> wrote:
> > Hello Anne, currently I am using the Eclipse plugin XML/WSDL editor.
> There are so many XML and WSDL editors out there it is bewildering. Please
> reply with an editor albeit commercial, free or criminal and I will get
> to work on the problems cited by you and Chris. Please advise, David.
> >
> > Anne Thomas Manes wrote ..
> > > Actually, you made a lot more mistakes than the ones Chris cited. You
> > > had numerous namespace issues; you didn't name the getversion and
> > > getversionResponse types; you didn't follow the convention of giving
> > > your input elements the same name as your operation; you didn't change
> > > your message parts properly; you didn't remove the namespace
> > > attributes from the <soap:body> definitions; etc. You might want to
> > > get yourself a WSDL editor with a validation option to help you in
> the
> > > future.
> > >
> > > Here's a revised WSDL that validates:
> > >
> > > <wsdl:definitions  xmlns:tns="http://service.myremote.my"
> > >        xmlns:type="http://service.myremote.my/type"
> > >        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > >        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >        xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > >        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > >        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >        xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> > >        targetNamespace="http://service.myremote.my">
> > >  <wsdl:types>
> > >    <xs:schema targetNamespace='http://service.myremote.my/type'
> > >      elementFormDefault='qualified'>
> > >
> > >  <xs:element name='Transact' type='type:Transact'/>
> > >  <xs:complexType name='Transact'>
> > >        <xs:sequence>
> > >                <xs:element name='userid' type='xs:string'/>
> > >                <xs:element name='password' type='xs:string'/>
> > >                <xs:element name='paramstr' type='xs:string'/>
> > >        </xs:sequence>
> > >  </xs:complexType>
> > >  <xs:element name='TransactResponse' type='type:TransactResponse' />
> > >  <xs:complexType name='TransactResponse'>
> > >        <xs:sequence>
> > >                <xs:element name='Result' type='xs:string'/>
> > >                <xs:element name='paramstr' type='xs:string'/>
> > >        </xs:sequence>
> > >  </xs:complexType>
> > >  <xs:element name='getversion' type='type:getversion'/>
> > >  <xs:complexType name='getversion'>
> > >        <xs:sequence>
> > >        </xs:sequence>
> > >  </xs:complexType>
> > >  <xs:element name='getversionResponse' type='type:getversionResponse'/>
> > >  <xs:complexType name='getversionResponse'>
> > >        <xs:sequence>
> > >                <xs:element name='Result' type='xs:string'/>
> > >        </xs:sequence>
> > >  </xs:complexType>
> > >    </xs:schema>
> > >  </wsdl:types>
> > >  <wsdl:message name='TransactRequest'>
> > >    <wsdl:part name='parameters' element='type:Transact'/>
> > >  </wsdl:message>
> > >  <wsdl:message name='TransactResponse'>
> > >    <wsdl:part name='parameters' element='type:TransactResponse'/>
> > >  </wsdl:message>
> > >  <wsdl:message name='getversionRequest'>
> > >    <wsdl:part name='parameters' element='type:getversion'/>
> > >  </wsdl:message>
> > >  <wsdl:message name='getversionResponse'>
> > >    <wsdl:part name='parameters' element='type:getversionResponse'/>
> > >  </wsdl:message>
> > >  <wsdl:portType name='MyRemoteSoapPort'>
> > >    <wsdl:operation name='Transact'>
> > >      <wsdl:input message='tns:TransactRequest' />
> > >      <wsdl:output message='tns:TransactResponse' />
> > >    </wsdl:operation>
> > >    <wsdl:operation name='getversion'>
> > >      <wsdl:input message='tns:getversionRequest' />
> > >      <wsdl:output message='tns:getversionResponse' />
> > >    </wsdl:operation>
> > >  </wsdl:portType>
> > >  <wsdl:binding name='MyRemoteSoapBinding' type='tns:MyRemoteSoapPort'
> >
> > >    <soap:binding style='document'
> > > transport='http://schemas.xmlsoap.org/soap/http' />
> > >    <wsdl:operation name='Transact' >
> > >      <soap:operation
> > > soapAction='http://service.myremote.my/action/MyRemote.Transact' />
> > >      <wsdl:input>
> > >        <soap:body use='literal' />
> > >      </wsdl:input>
> > >      <wsdl:output>
> > >        <soap:body use='literal' />
> > >      </wsdl:output>
> > >    </wsdl:operation>
> > >    <wsdl:operation name='getversion' >
> > >      <soap:operation
> > > soapAction='http://service.myremote.my/action/MyRemote.getversion'
> />
> > >      <wsdl:input>
> > >        <soap:body use='literal'/>
> > >      </wsdl:input>
> > >      <wsdl:output>
> > >        <soap:body use='literal'/>
> > >      </wsdl:output>
> > >    </wsdl:operation>
> > >  </wsdl:binding>
> > >  <wsdl:service name='MyRemote' >
> > >    <wsdl:port name='MyRemoteSoapPort' binding='tns:MyRemoteSoapBinding'
> > > >
> > >      <soap:address
> > > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> > >    </wsdl:port>
> > >  </wsdl:service>
> > > </wsdl:definitions>
> > >
> > > On 7/20/07, Ebert, Chris <ch...@hp.com> wrote:
> > > > Two things:
> > > > 1) You've mixed single and double quotes around the name of your
> first
> > > > type.
> > > > 2) The type definitions should go inside the <schema> </schema> tags.
> > > >
> > > > Chris
> > > >
> > > > -----Original Message-----
> > > > From: david [mailto:david@davidwbrown.name]
> > > > Sent: Friday, July 20, 2007 15:54
> > > > To: axis-user@ws.apache.org
> > > > Subject: Re: rpc-encoded vs rpc-literal vs document-literal migrate
> > > > Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit
> > > >
> > > > Hello Ann, thanks for the speedy reply. I see you working another
> user
> > > > who is also trying to migrate an Axis1.4 WS to Axis2. I have an Axis1.4
> > > > WS that is running OK as hinted at in my previous communication to
> the
> > > > ML. I hand-converted the .wsdl with great tedium as you predicted.
> > > > Notwithstanding the WSDL2JAVA tool (Eclipse/Axis plugin) bails before
> > > > processing the .wsdl with the following error condition:
> > > >
> > > > Specified WSDL is invalid!
> > > >
> > > > I have included both WSDLs: the original source WSDL running under
> > > > Asix1.4. And, the hand-edited WSDL that errors-out under the WSDL2JAVA
> > > > tool. Thanks in advance and please advise, David.
> > > >
> > > >
> > > > ************************************ SOURCE WSDL
> > > > ***********************************************
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <wsdl:definitions targetNamespace="http://tempuri.org/MYRemote/wsdl/"
> > > > xmlns:apachesoap="http://xml.apache.org/xml-soap"
> > > > xmlns:impl="http://tempuri.org/MyRemote/wsdl/"
> > > > xmlns:intf="http://tempuri.org/MyRemote/wsdl/"
> > > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > > > <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006
> > > > (06:55:48 PDT)-->
> > > >
> > > >    <wsdl:message name="getversionRequest">
> > > >
> > > >    </wsdl:message>
> > > >
> > > >    <wsdl:message name="getversionResponse">
> > > >
> > > >       <wsdl:part name="Result" type="xsd:string"/>
> > > >
> > > >    </wsdl:message>
> > > >
> > > >    <wsdl:message name="TransactRequest">
> > > >
> > > >       <wsdl:part name="userid" type="xsd:string"/>
> > > >
> > > >       <wsdl:part name="password" type="xsd:string"/>
> > > >
> > > >       <wsdl:part name="paramstr" type="xsd:string"/>
> > > >
> > > >    </wsdl:message>
> > > >
> > > >    <wsdl:message name="TransactResponse">
> > > >
> > > >       <wsdl:part name="Result" type="xsd:string"/>
> > > >
> > > >    </wsdl:message>
> > > >
> > > >    <wsdl:portType name="MyRemoteSoapPort">
> > > >
> > > >       <wsdl:operation name="Transact" parameterOrder="userid password
> > > > paramstr">
> > > >
> > > >          <wsdl:input message="impl:TransactRequest"
> > > > name="TransactRequest"/>
> > > >
> > > >          <wsdl:output message="impl:TransactResponse"
> > > > name="TransactResponse"/>
> > > >
> > > >       </wsdl:operation>
> > > >
> > > >       <wsdl:operation name="getversion">
> > > >
> > > >          <wsdl:input message="impl:getversionRequest"
> > > > name="getversionRequest"/>
> > > >
> > > >          <wsdl:output message="impl:getversionResponse"
> > > > name="getversionResponse"/>
> > > >
> > > >       </wsdl:operation>
> > > >
> > > >    </wsdl:portType>
> > > >
> > > >    <wsdl:binding name="MyRemoteSoapPortSoapBinding"
> > > > type="impl:MyRemoteSoapPort">
> > > >
> > > >       <wsdlsoap:binding style="rpc"
> > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > >
> > > >       <wsdl:operation name="Transact">
> > > >
> > > >          <wsdlsoap:operation
> > > > soapAction="http://tempuri.org/MyRemote/action/MyRemote.Transact"/>
> > > >
> > > >          <wsdl:input name="TransactRequest">
> > > >
> > > >             <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> > > >
> > > >          </wsdl:input>
> > > >
> > > >          <wsdl:output name="TransactResponse">
> > > >
> > > >             <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> > > >
> > > >          </wsdl:output>
> > > >
> > > >       </wsdl:operation>
> > > >
> > > >       <wsdl:operation name="getversion">
> > > >
> > > >          <wsdlsoap:operation
> > > > soapAction="http://tempuri.org/MyRemote/action/MyRemote.getversion"/>
> > > >
> > > >          <wsdl:input name="getversionRequest">
> > > >
> > > >             <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> > > >
> > > >          </wsdl:input>
> > > >
> > > >          <wsdl:output name="getversionResponse">
> > > >
> > > >             <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> > > >
> > > >          </wsdl:output>
> > > >
> > > >       </wsdl:operation>
> > > >
> > > >    </wsdl:binding>
> > > >
> > > >    <wsdl:service name="MyRemote">
> > > >
> > > >       <wsdl:port binding="impl:MyRemoteSoapPortSoapBinding"
> > > > name="MyRemoteSoapPort">
> > > >
> > > >          <wsdlsoap:address
> > > > location="http://tech-pc06:8080/axis/services/MyRemoteSoapPort"/>
> > > >
> > > >       </wsdl:port>
> > > >
> > > >    </wsdl:service>
> > > >
> > > > </wsdl:definitions>
> > > >
> > > >
> > > > ****************************************** hand-edited
> > > > **********************************************
> > > > <wsdl:definitions  xmlns:axis2="http://service.myremote.my"
> > > >         xmlns:ns0="http://userid.myremote.my/xsd"
> > > >         xmlns:ns1="http://password.myremote.my/xsd"
> > > >         xmlns:ns2="http://paramstr.myremote.my/xsd"
> > > >         xmlns:ns3="http://Result.myremote.my/xsd"
> > > >         xmlns:ns4="http://paramstr.myremote.my/xsd"
> > > >         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > > >         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > >         xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > >         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > > >         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > >         xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> > > >         targetNamespace="http://service.myremote.my/type">
> > > >   <wsdl:types>
> > > >     <xs:schema targetNamespace='http://service.myremote.my/type'
> > > >       xmlns='http://www.w3.org/2001/XMLSchema'
> > > >       xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
> > > >       elementFormDefault='qualified'>
> > > >     </xs:schema>
> > > >   </wsdl:types>
> > > >   <xs:element name='MyRemote.Transact' type='ns:MyRemote.Transact'/>
> > > >   <xs:complexType name="MyRemote.Transact'>
> > > >         <xs:sequence>
> > > >                 <xs:element name='userid' type='xs:string'/>
> > > >                 <xs:element name='password' type='xs:string'/>
> > > >                 <xs:element name='paramstr' type='xs:string'/>
> > > >         </xs:sequence>
> > > >   </xs:complexType>
> > > >   <xs:element name='MyRemote.TransactResponse'
> > > > type='ns1:MyRemote.TransactResponse' />
> > > >   <xs:complexType name='MyRemote.TransactResponse'>
> > > >         <xs:sequence>
> > > >                 <xs:element name='Result' type='xs:string'/>
> > > >                 <xs:element name='paramstr' type='xs:string'/>
> > > >         </xs:sequence>
> > > >   </xs:complexType>
> > > >   <xs:element name='MyRemote.getversion'
> > > > type='ns2:MyRemote.getversion'/>
> > > >   <xs:complexType>
> > > >         <xs:sequence>
> > > >         </xs:sequence>
> > > >   </xs:complexType>
> > > >   <xs:element name='MyRemote.getversionResponse'
> > > > type='ns3:MyRemote.getversionResponse'/>
> > > >   <xs:complexType>
> > > >         <xs:sequence>
> > > >                 <xsd:element name='Result' type='xs:string'/>
> > > >         </xs:sequence>
> > > >   </xs:complexType>
> > > >   <wsdl:message name='MyRemote.Transact'>
> > > >     <wsdl:part name='userid' element='ns0:MyRemote.Transact'/>
> > > >     <wsdl:part name='password' element='ns1:MyRemote.Transact'/>
> > > >     <wsdl:part name='paramstr' element='ns2:MyRemote.Transact'/>
> > > >   </wsdl:message>
> > > >   <wsdl:message name='MyRemote.TransactResponse'>
> > > >     <wsdl:part name='Result' type='ns3:MyRemote.TransactResponse'/>
> > > >     <wsdl:part name='paramstr' type='ns4:MyRemote.TransactResponse'/>
> > > >   </wsdl:message>
> > > >   <wsdl:message name='MyRemote.getversion'>
> > > >   </wsdl:message>
> > > >   <wsdl:message name='MyRemote.getversionResponse'>
> > > >     <wsdl:part name='Result' type='ns3:MyRemote.getversionResponse'/>
> > > >   </wsdl:message>
> > > >   <wsdl:portType name='MyRemoteSoapPort'>
> > > >     <wsdl:operation name='Transact' parameterOrder='userid password
> > > > paramstr'>
> > > >       <wsdl:input message='MyRemote.Transact' />
> > > >       <wsdl:output message='wsdlns:MyRemote.TransactResponse' />
> > > >     </wsdl:operation>
> > > >     <wsdl:operation name='getversion' parameterOrder=''>
> > > >       <wsdl:input message='wsdlns:MyRemote.getversion' />
> > > >       <wsdl:output message='wsdlns:MyRemote.getversionResponse' />
> > > >     </wsdl:operation>
> > > >   </wsdl:portType>
> > > >   <wsdl:binding name='MyRemoteSoapBinding'
> > > > type='wsdlns:MyRemoteSoapPort' >
> > > >     <stk:binding/>
> > > >     <soap:binding style='document'
> > > > transport='http://schemas.xmlsoap.org/soap/http' />
> > > >     <wsdl:operation name='Transact' >
> > > >       <soap:operation
> > > > soapAction='http://service.myremote.my/action/MyRemote.Transact'
> />
> > > >       <wsdl:input>
> > > >         <soap:body use='literal'
> > > > namespace='http://service.myremote.my/message/' />
> > > >       </wsdl:input>
> > > >       <wsdl:output>
> > > >         <soap:body use='literal'
> > > > namespace='http://service.myremote.my/message/'/>
> > > >       </wsdl:output>
> > > >     </wsdl:operation>
> > > >     <wsdl:operation name='getversion' >
> > > >       <soap:operation
> > > > soapAction='http://service.myremote.my/action/MyRemote.getversion'
> />
> > > >       <wsdl:input>
> > > >         <soap:body use='literal'/>
> > > >       </wsdl:input>
> > > >       <wsdl:output>
> > > >         <soap:body use='literal'/>
> > > >       </wsdl:output>
> > > >     </wsdl:operation>
> > > >   </wsdl:binding>
> > > >   <wsdl:service name='MyRemote' >
> > > >     <wsdl:port name='MyRemoteSoapPort'
> > > > binding='wsdlns:MyRemoteSoapBinding' >
> > > >       <soap:address
> > > > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> > > >     </wsdl:port>
> > > >   </wsdl:service>
> > > > </wsdl:definitions>
> > > >
> > > >
> > > >
> > > > Anne Thomas Manes wrote ..
> > > > > David,
> > > > >
> > > > > I just Googled looking for an automated converter utility, but
> no
> > > > > luck. I think you'll have to do the conversions by hand. As a general
> > > > > rule, I strongly recommend that you convert your WSDL to wrapped
> > > > > document/literal.
> > > > >
> > > > > Here are the basic rules:
> > > > >
> > > > > 1 - Convert your input and output parameters to explicitly defined
> > > > > schema elements. The name of an input element should be the same
> as
> > > > > the operation name. The name of an output element should be a
> > > > > concatenation of the operation name and "Response". For example,
> for
> > > > > an operation called myOperation, with the following message
> > > > > descriptions:
> > > > >
> > > > >         <w:message name="myOperationRequest">
> > > > >            <w:part name="param1" type="x:string"/>
> > > > >            <w:part name="param2" type="x:int"/>
> > > > >         </w:message>
> > > > >
> > > > >         <w:message name="myOperationResponse"
> > > > >            <w:part name="return" type="x:string"/>
> > > > >         </w:message>
> > > > >
> > > > > Write the following schema definition:
> > > > >
> > > > >         <x:element name="myOperation" type="tns:myOperation"/>
> > > > >         <x:complexType name="myOperation">
> > > > >            <x:sequence>
> > > > >                <x:element name="param1" type="x:string"/>
> > > > >                <x:element name="param2" type="x:int"/>
> > > > >            </x:sequence>
> > > > >          <x:complexType>
> > > > >
> > > > >         <x:element name="myOperationResponse"
> > > > type="tns:myOperationResponse"/>
> > > > >         <x:complexType name="myOperationResponse">
> > > > >            <x:sequence>
> > > > >                <x:element name="return" type="x:string"/>
> > > > >            </x:sequence>
> > > > >          <x:complexType>
> > > > >
> > > > > And change the message definitions to:
> > > > >
> > > > >         <w:message name="myOperationRequest">
> > > > >            <w:part name="parameters" element="tns:myOperation"/>
> > > > >         </w:message>
> > > > >
> > > > >         <w:message name="myOperationResponse"
> > > > >            <w:part name="parameters"
> > > > element="tns:myOperationResponse"/>
> > > > >         </w:message>
> > > > >
> > > > > 2. Make the following changes to the <w:binding> definitions:
> > > > >
> > > > > Wherever it says style="rpc", change it to style="document". (This
> > > > > could be in the <soap:binding> or the <soap:operation> definitions.
> > > > >
> > > > > Wherever it says use="encoded", change it to use="literal". (This
> will
> > > >
> > > > > be in all <soap:body>, <soap:header>, <soap:fault>, and
> > > > > <soap:headerfault> definitions.). Likewise, in all these definitions,
> > > > > remove all encodingStyle and namespace attributes.
> > > > >
> > > > > e.g., the <soap:body> definition should look like this:
> > > > >
> > > > >          <soap:body use="literal"/>
> > > > >
> > > > > That's it. Tedious, but relatively straightforward.
> > > > >
> > > > > Anne
> > > > >
> > > > >
> > > > > On 7/19/07, david <da...@davidwbrown.name> wrote:
> > > > > > Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET
> > > > > > client
> > > > > generated WSDL (rpc-encoded). I want to convert this WSDL to either:
> > > > > rpc-literal or document-literal such that I can run Axis2 wsdl2java
> > > > > and generate an
> > > > > Axis2 service. Currently, this service is running as Axis1.4 and
> I
> > > > > would appreciate very much any and all ideas and suggestions as
> to
> > > how
> > > >
> > > > > to migrate to Axis2. I know the Axis2 wsdl2java does not support
> > > > > rpc-encoded. I read Ann Manes blog about converting wsdls but I
> am
> > > not
> > > >
> > > > > sure if this can be extended to rpc-encoded. I am secretly hoping
> Ann
> > > > > Manes will reply but any and all rants and raves welcomed. I can
> reply
> > > >
> > > > > with the target wsdl in question. Please advise, David.
> > > > > >
> > > > > > --------------------------------------------------------------------
> > > > > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by david <da...@davidwbrown.name>.
Hello Ann, thanks for the WSDL editor recommendations. I have only one more question about the WSDL you graciously repaired after my bungled attempt to translate the document. Your WSDL generated perfect (dot).java and now I have the service deployed via Axis2 webapp running under Tomcat. The question is: could a .NET client using the <OLD> WSDL use the migrated WSDLs service? I don't have Visual Studio and I am not sure if I am a .NET programmer otherwise I would try to create a client to test the hypothesis. Please advise, David.

Anne Thomas Manes wrote ..
> Commerical products:
> xmlspy: http://www.altova.com/products/xmlspy/graphical_wsdl_editor.html
> <oxygen/>: http://www.oxygenxml.com/wsdl_editor.html
> Stylus Studio: http://www.stylusstudio.com/webservices/wsdl_editor.html
> 
> I can also send you Cape Clear's free SOA Editor tool (no longer
> available from Cape Clear, but I have permission to distribute it.)
> 
> Anne
> 
> On 7/21/07, david <da...@davidwbrown.name> wrote:
> > Hello Anne, currently I am using the Eclipse plugin XML/WSDL editor.
> There are so many XML and WSDL editors out there it is bewildering. Please
> reply with an editor albeit commercial, free or criminal and I will get
> to work on the problems cited by you and Chris. Please advise, David.
> >
> > Anne Thomas Manes wrote ..
> > > Actually, you made a lot more mistakes than the ones Chris cited. You
> > > had numerous namespace issues; you didn't name the getversion and
> > > getversionResponse types; you didn't follow the convention of giving
> > > your input elements the same name as your operation; you didn't change
> > > your message parts properly; you didn't remove the namespace
> > > attributes from the <soap:body> definitions; etc. You might want to
> > > get yourself a WSDL editor with a validation option to help you in
> the
> > > future.
> > >
> > > Here's a revised WSDL that validates:
> > >
> > > <wsdl:definitions  xmlns:tns="http://service.myremote.my"
> > >        xmlns:type="http://service.myremote.my/type"
> > >        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > >        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >        xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > >        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > >        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >        xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> > >        targetNamespace="http://service.myremote.my">
> > >  <wsdl:types>
> > >    <xs:schema targetNamespace='http://service.myremote.my/type'
> > >      elementFormDefault='qualified'>
> > >
> > >  <xs:element name='Transact' type='type:Transact'/>
> > >  <xs:complexType name='Transact'>
> > >        <xs:sequence>
> > >                <xs:element name='userid' type='xs:string'/>
> > >                <xs:element name='password' type='xs:string'/>
> > >                <xs:element name='paramstr' type='xs:string'/>
> > >        </xs:sequence>
> > >  </xs:complexType>
> > >  <xs:element name='TransactResponse' type='type:TransactResponse' />
> > >  <xs:complexType name='TransactResponse'>
> > >        <xs:sequence>
> > >                <xs:element name='Result' type='xs:string'/>
> > >                <xs:element name='paramstr' type='xs:string'/>
> > >        </xs:sequence>
> > >  </xs:complexType>
> > >  <xs:element name='getversion' type='type:getversion'/>
> > >  <xs:complexType name='getversion'>
> > >        <xs:sequence>
> > >        </xs:sequence>
> > >  </xs:complexType>
> > >  <xs:element name='getversionResponse' type='type:getversionResponse'/>
> > >  <xs:complexType name='getversionResponse'>
> > >        <xs:sequence>
> > >                <xs:element name='Result' type='xs:string'/>
> > >        </xs:sequence>
> > >  </xs:complexType>
> > >    </xs:schema>
> > >  </wsdl:types>
> > >  <wsdl:message name='TransactRequest'>
> > >    <wsdl:part name='parameters' element='type:Transact'/>
> > >  </wsdl:message>
> > >  <wsdl:message name='TransactResponse'>
> > >    <wsdl:part name='parameters' element='type:TransactResponse'/>
> > >  </wsdl:message>
> > >  <wsdl:message name='getversionRequest'>
> > >    <wsdl:part name='parameters' element='type:getversion'/>
> > >  </wsdl:message>
> > >  <wsdl:message name='getversionResponse'>
> > >    <wsdl:part name='parameters' element='type:getversionResponse'/>
> > >  </wsdl:message>
> > >  <wsdl:portType name='MyRemoteSoapPort'>
> > >    <wsdl:operation name='Transact'>
> > >      <wsdl:input message='tns:TransactRequest' />
> > >      <wsdl:output message='tns:TransactResponse' />
> > >    </wsdl:operation>
> > >    <wsdl:operation name='getversion'>
> > >      <wsdl:input message='tns:getversionRequest' />
> > >      <wsdl:output message='tns:getversionResponse' />
> > >    </wsdl:operation>
> > >  </wsdl:portType>
> > >  <wsdl:binding name='MyRemoteSoapBinding' type='tns:MyRemoteSoapPort'
> >
> > >    <soap:binding style='document'
> > > transport='http://schemas.xmlsoap.org/soap/http' />
> > >    <wsdl:operation name='Transact' >
> > >      <soap:operation
> > > soapAction='http://service.myremote.my/action/MyRemote.Transact' />
> > >      <wsdl:input>
> > >        <soap:body use='literal' />
> > >      </wsdl:input>
> > >      <wsdl:output>
> > >        <soap:body use='literal' />
> > >      </wsdl:output>
> > >    </wsdl:operation>
> > >    <wsdl:operation name='getversion' >
> > >      <soap:operation
> > > soapAction='http://service.myremote.my/action/MyRemote.getversion'
> />
> > >      <wsdl:input>
> > >        <soap:body use='literal'/>
> > >      </wsdl:input>
> > >      <wsdl:output>
> > >        <soap:body use='literal'/>
> > >      </wsdl:output>
> > >    </wsdl:operation>
> > >  </wsdl:binding>
> > >  <wsdl:service name='MyRemote' >
> > >    <wsdl:port name='MyRemoteSoapPort' binding='tns:MyRemoteSoapBinding'
> > > >
> > >      <soap:address
> > > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> > >    </wsdl:port>
> > >  </wsdl:service>
> > > </wsdl:definitions>
> > >
> > > On 7/20/07, Ebert, Chris <ch...@hp.com> wrote:
> > > > Two things:
> > > > 1) You've mixed single and double quotes around the name of your
> first
> > > > type.
> > > > 2) The type definitions should go inside the <schema> </schema> tags.
> > > >
> > > > Chris
> > > >
> > > > -----Original Message-----
> > > > From: david [mailto:david@davidwbrown.name]
> > > > Sent: Friday, July 20, 2007 15:54
> > > > To: axis-user@ws.apache.org
> > > > Subject: Re: rpc-encoded vs rpc-literal vs document-literal migrate
> > > > Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit
> > > >
> > > > Hello Ann, thanks for the speedy reply. I see you working another
> user
> > > > who is also trying to migrate an Axis1.4 WS to Axis2. I have an Axis1.4
> > > > WS that is running OK as hinted at in my previous communication to
> the
> > > > ML. I hand-converted the .wsdl with great tedium as you predicted.
> > > > Notwithstanding the WSDL2JAVA tool (Eclipse/Axis plugin) bails before
> > > > processing the .wsdl with the following error condition:
> > > >
> > > > Specified WSDL is invalid!
> > > >
> > > > I have included both WSDLs: the original source WSDL running under
> > > > Asix1.4. And, the hand-edited WSDL that errors-out under the WSDL2JAVA
> > > > tool. Thanks in advance and please advise, David.
> > > >
> > > >
> > > > ************************************ SOURCE WSDL
> > > > ***********************************************
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <wsdl:definitions targetNamespace="http://tempuri.org/MYRemote/wsdl/"
> > > > xmlns:apachesoap="http://xml.apache.org/xml-soap"
> > > > xmlns:impl="http://tempuri.org/MyRemote/wsdl/"
> > > > xmlns:intf="http://tempuri.org/MyRemote/wsdl/"
> > > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > > > <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006
> > > > (06:55:48 PDT)-->
> > > >
> > > >    <wsdl:message name="getversionRequest">
> > > >
> > > >    </wsdl:message>
> > > >
> > > >    <wsdl:message name="getversionResponse">
> > > >
> > > >       <wsdl:part name="Result" type="xsd:string"/>
> > > >
> > > >    </wsdl:message>
> > > >
> > > >    <wsdl:message name="TransactRequest">
> > > >
> > > >       <wsdl:part name="userid" type="xsd:string"/>
> > > >
> > > >       <wsdl:part name="password" type="xsd:string"/>
> > > >
> > > >       <wsdl:part name="paramstr" type="xsd:string"/>
> > > >
> > > >    </wsdl:message>
> > > >
> > > >    <wsdl:message name="TransactResponse">
> > > >
> > > >       <wsdl:part name="Result" type="xsd:string"/>
> > > >
> > > >    </wsdl:message>
> > > >
> > > >    <wsdl:portType name="MyRemoteSoapPort">
> > > >
> > > >       <wsdl:operation name="Transact" parameterOrder="userid password
> > > > paramstr">
> > > >
> > > >          <wsdl:input message="impl:TransactRequest"
> > > > name="TransactRequest"/>
> > > >
> > > >          <wsdl:output message="impl:TransactResponse"
> > > > name="TransactResponse"/>
> > > >
> > > >       </wsdl:operation>
> > > >
> > > >       <wsdl:operation name="getversion">
> > > >
> > > >          <wsdl:input message="impl:getversionRequest"
> > > > name="getversionRequest"/>
> > > >
> > > >          <wsdl:output message="impl:getversionResponse"
> > > > name="getversionResponse"/>
> > > >
> > > >       </wsdl:operation>
> > > >
> > > >    </wsdl:portType>
> > > >
> > > >    <wsdl:binding name="MyRemoteSoapPortSoapBinding"
> > > > type="impl:MyRemoteSoapPort">
> > > >
> > > >       <wsdlsoap:binding style="rpc"
> > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > >
> > > >       <wsdl:operation name="Transact">
> > > >
> > > >          <wsdlsoap:operation
> > > > soapAction="http://tempuri.org/MyRemote/action/MyRemote.Transact"/>
> > > >
> > > >          <wsdl:input name="TransactRequest">
> > > >
> > > >             <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> > > >
> > > >          </wsdl:input>
> > > >
> > > >          <wsdl:output name="TransactResponse">
> > > >
> > > >             <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> > > >
> > > >          </wsdl:output>
> > > >
> > > >       </wsdl:operation>
> > > >
> > > >       <wsdl:operation name="getversion">
> > > >
> > > >          <wsdlsoap:operation
> > > > soapAction="http://tempuri.org/MyRemote/action/MyRemote.getversion"/>
> > > >
> > > >          <wsdl:input name="getversionRequest">
> > > >
> > > >             <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> > > >
> > > >          </wsdl:input>
> > > >
> > > >          <wsdl:output name="getversionResponse">
> > > >
> > > >             <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> > > >
> > > >          </wsdl:output>
> > > >
> > > >       </wsdl:operation>
> > > >
> > > >    </wsdl:binding>
> > > >
> > > >    <wsdl:service name="MyRemote">
> > > >
> > > >       <wsdl:port binding="impl:MyRemoteSoapPortSoapBinding"
> > > > name="MyRemoteSoapPort">
> > > >
> > > >          <wsdlsoap:address
> > > > location="http://tech-pc06:8080/axis/services/MyRemoteSoapPort"/>
> > > >
> > > >       </wsdl:port>
> > > >
> > > >    </wsdl:service>
> > > >
> > > > </wsdl:definitions>
> > > >
> > > >
> > > > ****************************************** hand-edited
> > > > **********************************************
> > > > <wsdl:definitions  xmlns:axis2="http://service.myremote.my"
> > > >         xmlns:ns0="http://userid.myremote.my/xsd"
> > > >         xmlns:ns1="http://password.myremote.my/xsd"
> > > >         xmlns:ns2="http://paramstr.myremote.my/xsd"
> > > >         xmlns:ns3="http://Result.myremote.my/xsd"
> > > >         xmlns:ns4="http://paramstr.myremote.my/xsd"
> > > >         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > > >         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > >         xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > >         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > > >         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > >         xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> > > >         targetNamespace="http://service.myremote.my/type">
> > > >   <wsdl:types>
> > > >     <xs:schema targetNamespace='http://service.myremote.my/type'
> > > >       xmlns='http://www.w3.org/2001/XMLSchema'
> > > >       xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
> > > >       elementFormDefault='qualified'>
> > > >     </xs:schema>
> > > >   </wsdl:types>
> > > >   <xs:element name='MyRemote.Transact' type='ns:MyRemote.Transact'/>
> > > >   <xs:complexType name="MyRemote.Transact'>
> > > >         <xs:sequence>
> > > >                 <xs:element name='userid' type='xs:string'/>
> > > >                 <xs:element name='password' type='xs:string'/>
> > > >                 <xs:element name='paramstr' type='xs:string'/>
> > > >         </xs:sequence>
> > > >   </xs:complexType>
> > > >   <xs:element name='MyRemote.TransactResponse'
> > > > type='ns1:MyRemote.TransactResponse' />
> > > >   <xs:complexType name='MyRemote.TransactResponse'>
> > > >         <xs:sequence>
> > > >                 <xs:element name='Result' type='xs:string'/>
> > > >                 <xs:element name='paramstr' type='xs:string'/>
> > > >         </xs:sequence>
> > > >   </xs:complexType>
> > > >   <xs:element name='MyRemote.getversion'
> > > > type='ns2:MyRemote.getversion'/>
> > > >   <xs:complexType>
> > > >         <xs:sequence>
> > > >         </xs:sequence>
> > > >   </xs:complexType>
> > > >   <xs:element name='MyRemote.getversionResponse'
> > > > type='ns3:MyRemote.getversionResponse'/>
> > > >   <xs:complexType>
> > > >         <xs:sequence>
> > > >                 <xsd:element name='Result' type='xs:string'/>
> > > >         </xs:sequence>
> > > >   </xs:complexType>
> > > >   <wsdl:message name='MyRemote.Transact'>
> > > >     <wsdl:part name='userid' element='ns0:MyRemote.Transact'/>
> > > >     <wsdl:part name='password' element='ns1:MyRemote.Transact'/>
> > > >     <wsdl:part name='paramstr' element='ns2:MyRemote.Transact'/>
> > > >   </wsdl:message>
> > > >   <wsdl:message name='MyRemote.TransactResponse'>
> > > >     <wsdl:part name='Result' type='ns3:MyRemote.TransactResponse'/>
> > > >     <wsdl:part name='paramstr' type='ns4:MyRemote.TransactResponse'/>
> > > >   </wsdl:message>
> > > >   <wsdl:message name='MyRemote.getversion'>
> > > >   </wsdl:message>
> > > >   <wsdl:message name='MyRemote.getversionResponse'>
> > > >     <wsdl:part name='Result' type='ns3:MyRemote.getversionResponse'/>
> > > >   </wsdl:message>
> > > >   <wsdl:portType name='MyRemoteSoapPort'>
> > > >     <wsdl:operation name='Transact' parameterOrder='userid password
> > > > paramstr'>
> > > >       <wsdl:input message='MyRemote.Transact' />
> > > >       <wsdl:output message='wsdlns:MyRemote.TransactResponse' />
> > > >     </wsdl:operation>
> > > >     <wsdl:operation name='getversion' parameterOrder=''>
> > > >       <wsdl:input message='wsdlns:MyRemote.getversion' />
> > > >       <wsdl:output message='wsdlns:MyRemote.getversionResponse' />
> > > >     </wsdl:operation>
> > > >   </wsdl:portType>
> > > >   <wsdl:binding name='MyRemoteSoapBinding'
> > > > type='wsdlns:MyRemoteSoapPort' >
> > > >     <stk:binding/>
> > > >     <soap:binding style='document'
> > > > transport='http://schemas.xmlsoap.org/soap/http' />
> > > >     <wsdl:operation name='Transact' >
> > > >       <soap:operation
> > > > soapAction='http://service.myremote.my/action/MyRemote.Transact'
> />
> > > >       <wsdl:input>
> > > >         <soap:body use='literal'
> > > > namespace='http://service.myremote.my/message/' />
> > > >       </wsdl:input>
> > > >       <wsdl:output>
> > > >         <soap:body use='literal'
> > > > namespace='http://service.myremote.my/message/'/>
> > > >       </wsdl:output>
> > > >     </wsdl:operation>
> > > >     <wsdl:operation name='getversion' >
> > > >       <soap:operation
> > > > soapAction='http://service.myremote.my/action/MyRemote.getversion'
> />
> > > >       <wsdl:input>
> > > >         <soap:body use='literal'/>
> > > >       </wsdl:input>
> > > >       <wsdl:output>
> > > >         <soap:body use='literal'/>
> > > >       </wsdl:output>
> > > >     </wsdl:operation>
> > > >   </wsdl:binding>
> > > >   <wsdl:service name='MyRemote' >
> > > >     <wsdl:port name='MyRemoteSoapPort'
> > > > binding='wsdlns:MyRemoteSoapBinding' >
> > > >       <soap:address
> > > > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> > > >     </wsdl:port>
> > > >   </wsdl:service>
> > > > </wsdl:definitions>
> > > >
> > > >
> > > >
> > > > Anne Thomas Manes wrote ..
> > > > > David,
> > > > >
> > > > > I just Googled looking for an automated converter utility, but
> no
> > > > > luck. I think you'll have to do the conversions by hand. As a general
> > > > > rule, I strongly recommend that you convert your WSDL to wrapped
> > > > > document/literal.
> > > > >
> > > > > Here are the basic rules:
> > > > >
> > > > > 1 - Convert your input and output parameters to explicitly defined
> > > > > schema elements. The name of an input element should be the same
> as
> > > > > the operation name. The name of an output element should be a
> > > > > concatenation of the operation name and "Response". For example,
> for
> > > > > an operation called myOperation, with the following message
> > > > > descriptions:
> > > > >
> > > > >         <w:message name="myOperationRequest">
> > > > >            <w:part name="param1" type="x:string"/>
> > > > >            <w:part name="param2" type="x:int"/>
> > > > >         </w:message>
> > > > >
> > > > >         <w:message name="myOperationResponse"
> > > > >            <w:part name="return" type="x:string"/>
> > > > >         </w:message>
> > > > >
> > > > > Write the following schema definition:
> > > > >
> > > > >         <x:element name="myOperation" type="tns:myOperation"/>
> > > > >         <x:complexType name="myOperation">
> > > > >            <x:sequence>
> > > > >                <x:element name="param1" type="x:string"/>
> > > > >                <x:element name="param2" type="x:int"/>
> > > > >            </x:sequence>
> > > > >          <x:complexType>
> > > > >
> > > > >         <x:element name="myOperationResponse"
> > > > type="tns:myOperationResponse"/>
> > > > >         <x:complexType name="myOperationResponse">
> > > > >            <x:sequence>
> > > > >                <x:element name="return" type="x:string"/>
> > > > >            </x:sequence>
> > > > >          <x:complexType>
> > > > >
> > > > > And change the message definitions to:
> > > > >
> > > > >         <w:message name="myOperationRequest">
> > > > >            <w:part name="parameters" element="tns:myOperation"/>
> > > > >         </w:message>
> > > > >
> > > > >         <w:message name="myOperationResponse"
> > > > >            <w:part name="parameters"
> > > > element="tns:myOperationResponse"/>
> > > > >         </w:message>
> > > > >
> > > > > 2. Make the following changes to the <w:binding> definitions:
> > > > >
> > > > > Wherever it says style="rpc", change it to style="document". (This
> > > > > could be in the <soap:binding> or the <soap:operation> definitions.
> > > > >
> > > > > Wherever it says use="encoded", change it to use="literal". (This
> will
> > > >
> > > > > be in all <soap:body>, <soap:header>, <soap:fault>, and
> > > > > <soap:headerfault> definitions.). Likewise, in all these definitions,
> > > > > remove all encodingStyle and namespace attributes.
> > > > >
> > > > > e.g., the <soap:body> definition should look like this:
> > > > >
> > > > >          <soap:body use="literal"/>
> > > > >
> > > > > That's it. Tedious, but relatively straightforward.
> > > > >
> > > > > Anne
> > > > >
> > > > >
> > > > > On 7/19/07, david <da...@davidwbrown.name> wrote:
> > > > > > Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET
> > > > > > client
> > > > > generated WSDL (rpc-encoded). I want to convert this WSDL to either:
> > > > > rpc-literal or document-literal such that I can run Axis2 wsdl2java
> > > > > and generate an
> > > > > Axis2 service. Currently, this service is running as Axis1.4 and
> I
> > > > > would appreciate very much any and all ideas and suggestions as
> to
> > > how
> > > >
> > > > > to migrate to Axis2. I know the Axis2 wsdl2java does not support
> > > > > rpc-encoded. I read Ann Manes blog about converting wsdls but I
> am
> > > not
> > > >
> > > > > sure if this can be extended to rpc-encoded. I am secretly hoping
> Ann
> > > > > Manes will reply but any and all rants and raves welcomed. I can
> reply
> > > >
> > > > > with the target wsdl in question. Please advise, David.
> > > > > >
> > > > > > --------------------------------------------------------------------
> > > > > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by Anne Thomas Manes <at...@gmail.com>.
Commerical products:
xmlspy: http://www.altova.com/products/xmlspy/graphical_wsdl_editor.html
<oxygen/>: http://www.oxygenxml.com/wsdl_editor.html
Stylus Studio: http://www.stylusstudio.com/webservices/wsdl_editor.html

I can also send you Cape Clear's free SOA Editor tool (no longer
available from Cape Clear, but I have permission to distribute it.)

Anne

On 7/21/07, david <da...@davidwbrown.name> wrote:
> Hello Anne, currently I am using the Eclipse plugin XML/WSDL editor. There are so many XML and WSDL editors out there it is bewildering. Please reply with an editor albeit commercial, free or criminal and I will get to work on the problems cited by you and Chris. Please advise, David.
>
> Anne Thomas Manes wrote ..
> > Actually, you made a lot more mistakes than the ones Chris cited. You
> > had numerous namespace issues; you didn't name the getversion and
> > getversionResponse types; you didn't follow the convention of giving
> > your input elements the same name as your operation; you didn't change
> > your message parts properly; you didn't remove the namespace
> > attributes from the <soap:body> definitions; etc. You might want to
> > get yourself a WSDL editor with a validation option to help you in the
> > future.
> >
> > Here's a revised WSDL that validates:
> >
> > <wsdl:definitions  xmlns:tns="http://service.myremote.my"
> >        xmlns:type="http://service.myremote.my/type"
> >        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >        xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> >        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >        xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> >        targetNamespace="http://service.myremote.my">
> >  <wsdl:types>
> >    <xs:schema targetNamespace='http://service.myremote.my/type'
> >      elementFormDefault='qualified'>
> >
> >  <xs:element name='Transact' type='type:Transact'/>
> >  <xs:complexType name='Transact'>
> >        <xs:sequence>
> >                <xs:element name='userid' type='xs:string'/>
> >                <xs:element name='password' type='xs:string'/>
> >                <xs:element name='paramstr' type='xs:string'/>
> >        </xs:sequence>
> >  </xs:complexType>
> >  <xs:element name='TransactResponse' type='type:TransactResponse' />
> >  <xs:complexType name='TransactResponse'>
> >        <xs:sequence>
> >                <xs:element name='Result' type='xs:string'/>
> >                <xs:element name='paramstr' type='xs:string'/>
> >        </xs:sequence>
> >  </xs:complexType>
> >  <xs:element name='getversion' type='type:getversion'/>
> >  <xs:complexType name='getversion'>
> >        <xs:sequence>
> >        </xs:sequence>
> >  </xs:complexType>
> >  <xs:element name='getversionResponse' type='type:getversionResponse'/>
> >  <xs:complexType name='getversionResponse'>
> >        <xs:sequence>
> >                <xs:element name='Result' type='xs:string'/>
> >        </xs:sequence>
> >  </xs:complexType>
> >    </xs:schema>
> >  </wsdl:types>
> >  <wsdl:message name='TransactRequest'>
> >    <wsdl:part name='parameters' element='type:Transact'/>
> >  </wsdl:message>
> >  <wsdl:message name='TransactResponse'>
> >    <wsdl:part name='parameters' element='type:TransactResponse'/>
> >  </wsdl:message>
> >  <wsdl:message name='getversionRequest'>
> >    <wsdl:part name='parameters' element='type:getversion'/>
> >  </wsdl:message>
> >  <wsdl:message name='getversionResponse'>
> >    <wsdl:part name='parameters' element='type:getversionResponse'/>
> >  </wsdl:message>
> >  <wsdl:portType name='MyRemoteSoapPort'>
> >    <wsdl:operation name='Transact'>
> >      <wsdl:input message='tns:TransactRequest' />
> >      <wsdl:output message='tns:TransactResponse' />
> >    </wsdl:operation>
> >    <wsdl:operation name='getversion'>
> >      <wsdl:input message='tns:getversionRequest' />
> >      <wsdl:output message='tns:getversionResponse' />
> >    </wsdl:operation>
> >  </wsdl:portType>
> >  <wsdl:binding name='MyRemoteSoapBinding' type='tns:MyRemoteSoapPort' >
> >    <soap:binding style='document'
> > transport='http://schemas.xmlsoap.org/soap/http' />
> >    <wsdl:operation name='Transact' >
> >      <soap:operation
> > soapAction='http://service.myremote.my/action/MyRemote.Transact' />
> >      <wsdl:input>
> >        <soap:body use='literal' />
> >      </wsdl:input>
> >      <wsdl:output>
> >        <soap:body use='literal' />
> >      </wsdl:output>
> >    </wsdl:operation>
> >    <wsdl:operation name='getversion' >
> >      <soap:operation
> > soapAction='http://service.myremote.my/action/MyRemote.getversion' />
> >      <wsdl:input>
> >        <soap:body use='literal'/>
> >      </wsdl:input>
> >      <wsdl:output>
> >        <soap:body use='literal'/>
> >      </wsdl:output>
> >    </wsdl:operation>
> >  </wsdl:binding>
> >  <wsdl:service name='MyRemote' >
> >    <wsdl:port name='MyRemoteSoapPort' binding='tns:MyRemoteSoapBinding'
> > >
> >      <soap:address
> > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> >    </wsdl:port>
> >  </wsdl:service>
> > </wsdl:definitions>
> >
> > On 7/20/07, Ebert, Chris <ch...@hp.com> wrote:
> > > Two things:
> > > 1) You've mixed single and double quotes around the name of your first
> > > type.
> > > 2) The type definitions should go inside the <schema> </schema> tags.
> > >
> > > Chris
> > >
> > > -----Original Message-----
> > > From: david [mailto:david@davidwbrown.name]
> > > Sent: Friday, July 20, 2007 15:54
> > > To: axis-user@ws.apache.org
> > > Subject: Re: rpc-encoded vs rpc-literal vs document-literal migrate
> > > Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit
> > >
> > > Hello Ann, thanks for the speedy reply. I see you working another user
> > > who is also trying to migrate an Axis1.4 WS to Axis2. I have an Axis1.4
> > > WS that is running OK as hinted at in my previous communication to the
> > > ML. I hand-converted the .wsdl with great tedium as you predicted.
> > > Notwithstanding the WSDL2JAVA tool (Eclipse/Axis plugin) bails before
> > > processing the .wsdl with the following error condition:
> > >
> > > Specified WSDL is invalid!
> > >
> > > I have included both WSDLs: the original source WSDL running under
> > > Asix1.4. And, the hand-edited WSDL that errors-out under the WSDL2JAVA
> > > tool. Thanks in advance and please advise, David.
> > >
> > >
> > > ************************************ SOURCE WSDL
> > > ***********************************************
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <wsdl:definitions targetNamespace="http://tempuri.org/MYRemote/wsdl/"
> > > xmlns:apachesoap="http://xml.apache.org/xml-soap"
> > > xmlns:impl="http://tempuri.org/MyRemote/wsdl/"
> > > xmlns:intf="http://tempuri.org/MyRemote/wsdl/"
> > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > > <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006
> > > (06:55:48 PDT)-->
> > >
> > >    <wsdl:message name="getversionRequest">
> > >
> > >    </wsdl:message>
> > >
> > >    <wsdl:message name="getversionResponse">
> > >
> > >       <wsdl:part name="Result" type="xsd:string"/>
> > >
> > >    </wsdl:message>
> > >
> > >    <wsdl:message name="TransactRequest">
> > >
> > >       <wsdl:part name="userid" type="xsd:string"/>
> > >
> > >       <wsdl:part name="password" type="xsd:string"/>
> > >
> > >       <wsdl:part name="paramstr" type="xsd:string"/>
> > >
> > >    </wsdl:message>
> > >
> > >    <wsdl:message name="TransactResponse">
> > >
> > >       <wsdl:part name="Result" type="xsd:string"/>
> > >
> > >    </wsdl:message>
> > >
> > >    <wsdl:portType name="MyRemoteSoapPort">
> > >
> > >       <wsdl:operation name="Transact" parameterOrder="userid password
> > > paramstr">
> > >
> > >          <wsdl:input message="impl:TransactRequest"
> > > name="TransactRequest"/>
> > >
> > >          <wsdl:output message="impl:TransactResponse"
> > > name="TransactResponse"/>
> > >
> > >       </wsdl:operation>
> > >
> > >       <wsdl:operation name="getversion">
> > >
> > >          <wsdl:input message="impl:getversionRequest"
> > > name="getversionRequest"/>
> > >
> > >          <wsdl:output message="impl:getversionResponse"
> > > name="getversionResponse"/>
> > >
> > >       </wsdl:operation>
> > >
> > >    </wsdl:portType>
> > >
> > >    <wsdl:binding name="MyRemoteSoapPortSoapBinding"
> > > type="impl:MyRemoteSoapPort">
> > >
> > >       <wsdlsoap:binding style="rpc"
> > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > >
> > >       <wsdl:operation name="Transact">
> > >
> > >          <wsdlsoap:operation
> > > soapAction="http://tempuri.org/MyRemote/action/MyRemote.Transact"/>
> > >
> > >          <wsdl:input name="TransactRequest">
> > >
> > >             <wsdlsoap:body
> > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> > >
> > >          </wsdl:input>
> > >
> > >          <wsdl:output name="TransactResponse">
> > >
> > >             <wsdlsoap:body
> > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> > >
> > >          </wsdl:output>
> > >
> > >       </wsdl:operation>
> > >
> > >       <wsdl:operation name="getversion">
> > >
> > >          <wsdlsoap:operation
> > > soapAction="http://tempuri.org/MyRemote/action/MyRemote.getversion"/>
> > >
> > >          <wsdl:input name="getversionRequest">
> > >
> > >             <wsdlsoap:body
> > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> > >
> > >          </wsdl:input>
> > >
> > >          <wsdl:output name="getversionResponse">
> > >
> > >             <wsdlsoap:body
> > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> > >
> > >          </wsdl:output>
> > >
> > >       </wsdl:operation>
> > >
> > >    </wsdl:binding>
> > >
> > >    <wsdl:service name="MyRemote">
> > >
> > >       <wsdl:port binding="impl:MyRemoteSoapPortSoapBinding"
> > > name="MyRemoteSoapPort">
> > >
> > >          <wsdlsoap:address
> > > location="http://tech-pc06:8080/axis/services/MyRemoteSoapPort"/>
> > >
> > >       </wsdl:port>
> > >
> > >    </wsdl:service>
> > >
> > > </wsdl:definitions>
> > >
> > >
> > > ****************************************** hand-edited
> > > **********************************************
> > > <wsdl:definitions  xmlns:axis2="http://service.myremote.my"
> > >         xmlns:ns0="http://userid.myremote.my/xsd"
> > >         xmlns:ns1="http://password.myremote.my/xsd"
> > >         xmlns:ns2="http://paramstr.myremote.my/xsd"
> > >         xmlns:ns3="http://Result.myremote.my/xsd"
> > >         xmlns:ns4="http://paramstr.myremote.my/xsd"
> > >         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > >         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >         xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > >         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > >         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >         xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> > >         targetNamespace="http://service.myremote.my/type">
> > >   <wsdl:types>
> > >     <xs:schema targetNamespace='http://service.myremote.my/type'
> > >       xmlns='http://www.w3.org/2001/XMLSchema'
> > >       xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
> > >       elementFormDefault='qualified'>
> > >     </xs:schema>
> > >   </wsdl:types>
> > >   <xs:element name='MyRemote.Transact' type='ns:MyRemote.Transact'/>
> > >   <xs:complexType name="MyRemote.Transact'>
> > >         <xs:sequence>
> > >                 <xs:element name='userid' type='xs:string'/>
> > >                 <xs:element name='password' type='xs:string'/>
> > >                 <xs:element name='paramstr' type='xs:string'/>
> > >         </xs:sequence>
> > >   </xs:complexType>
> > >   <xs:element name='MyRemote.TransactResponse'
> > > type='ns1:MyRemote.TransactResponse' />
> > >   <xs:complexType name='MyRemote.TransactResponse'>
> > >         <xs:sequence>
> > >                 <xs:element name='Result' type='xs:string'/>
> > >                 <xs:element name='paramstr' type='xs:string'/>
> > >         </xs:sequence>
> > >   </xs:complexType>
> > >   <xs:element name='MyRemote.getversion'
> > > type='ns2:MyRemote.getversion'/>
> > >   <xs:complexType>
> > >         <xs:sequence>
> > >         </xs:sequence>
> > >   </xs:complexType>
> > >   <xs:element name='MyRemote.getversionResponse'
> > > type='ns3:MyRemote.getversionResponse'/>
> > >   <xs:complexType>
> > >         <xs:sequence>
> > >                 <xsd:element name='Result' type='xs:string'/>
> > >         </xs:sequence>
> > >   </xs:complexType>
> > >   <wsdl:message name='MyRemote.Transact'>
> > >     <wsdl:part name='userid' element='ns0:MyRemote.Transact'/>
> > >     <wsdl:part name='password' element='ns1:MyRemote.Transact'/>
> > >     <wsdl:part name='paramstr' element='ns2:MyRemote.Transact'/>
> > >   </wsdl:message>
> > >   <wsdl:message name='MyRemote.TransactResponse'>
> > >     <wsdl:part name='Result' type='ns3:MyRemote.TransactResponse'/>
> > >     <wsdl:part name='paramstr' type='ns4:MyRemote.TransactResponse'/>
> > >   </wsdl:message>
> > >   <wsdl:message name='MyRemote.getversion'>
> > >   </wsdl:message>
> > >   <wsdl:message name='MyRemote.getversionResponse'>
> > >     <wsdl:part name='Result' type='ns3:MyRemote.getversionResponse'/>
> > >   </wsdl:message>
> > >   <wsdl:portType name='MyRemoteSoapPort'>
> > >     <wsdl:operation name='Transact' parameterOrder='userid password
> > > paramstr'>
> > >       <wsdl:input message='MyRemote.Transact' />
> > >       <wsdl:output message='wsdlns:MyRemote.TransactResponse' />
> > >     </wsdl:operation>
> > >     <wsdl:operation name='getversion' parameterOrder=''>
> > >       <wsdl:input message='wsdlns:MyRemote.getversion' />
> > >       <wsdl:output message='wsdlns:MyRemote.getversionResponse' />
> > >     </wsdl:operation>
> > >   </wsdl:portType>
> > >   <wsdl:binding name='MyRemoteSoapBinding'
> > > type='wsdlns:MyRemoteSoapPort' >
> > >     <stk:binding/>
> > >     <soap:binding style='document'
> > > transport='http://schemas.xmlsoap.org/soap/http' />
> > >     <wsdl:operation name='Transact' >
> > >       <soap:operation
> > > soapAction='http://service.myremote.my/action/MyRemote.Transact' />
> > >       <wsdl:input>
> > >         <soap:body use='literal'
> > > namespace='http://service.myremote.my/message/' />
> > >       </wsdl:input>
> > >       <wsdl:output>
> > >         <soap:body use='literal'
> > > namespace='http://service.myremote.my/message/'/>
> > >       </wsdl:output>
> > >     </wsdl:operation>
> > >     <wsdl:operation name='getversion' >
> > >       <soap:operation
> > > soapAction='http://service.myremote.my/action/MyRemote.getversion' />
> > >       <wsdl:input>
> > >         <soap:body use='literal'/>
> > >       </wsdl:input>
> > >       <wsdl:output>
> > >         <soap:body use='literal'/>
> > >       </wsdl:output>
> > >     </wsdl:operation>
> > >   </wsdl:binding>
> > >   <wsdl:service name='MyRemote' >
> > >     <wsdl:port name='MyRemoteSoapPort'
> > > binding='wsdlns:MyRemoteSoapBinding' >
> > >       <soap:address
> > > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> > >     </wsdl:port>
> > >   </wsdl:service>
> > > </wsdl:definitions>
> > >
> > >
> > >
> > > Anne Thomas Manes wrote ..
> > > > David,
> > > >
> > > > I just Googled looking for an automated converter utility, but no
> > > > luck. I think you'll have to do the conversions by hand. As a general
> > > > rule, I strongly recommend that you convert your WSDL to wrapped
> > > > document/literal.
> > > >
> > > > Here are the basic rules:
> > > >
> > > > 1 - Convert your input and output parameters to explicitly defined
> > > > schema elements. The name of an input element should be the same as
> > > > the operation name. The name of an output element should be a
> > > > concatenation of the operation name and "Response". For example, for
> > > > an operation called myOperation, with the following message
> > > > descriptions:
> > > >
> > > >         <w:message name="myOperationRequest">
> > > >            <w:part name="param1" type="x:string"/>
> > > >            <w:part name="param2" type="x:int"/>
> > > >         </w:message>
> > > >
> > > >         <w:message name="myOperationResponse"
> > > >            <w:part name="return" type="x:string"/>
> > > >         </w:message>
> > > >
> > > > Write the following schema definition:
> > > >
> > > >         <x:element name="myOperation" type="tns:myOperation"/>
> > > >         <x:complexType name="myOperation">
> > > >            <x:sequence>
> > > >                <x:element name="param1" type="x:string"/>
> > > >                <x:element name="param2" type="x:int"/>
> > > >            </x:sequence>
> > > >          <x:complexType>
> > > >
> > > >         <x:element name="myOperationResponse"
> > > type="tns:myOperationResponse"/>
> > > >         <x:complexType name="myOperationResponse">
> > > >            <x:sequence>
> > > >                <x:element name="return" type="x:string"/>
> > > >            </x:sequence>
> > > >          <x:complexType>
> > > >
> > > > And change the message definitions to:
> > > >
> > > >         <w:message name="myOperationRequest">
> > > >            <w:part name="parameters" element="tns:myOperation"/>
> > > >         </w:message>
> > > >
> > > >         <w:message name="myOperationResponse"
> > > >            <w:part name="parameters"
> > > element="tns:myOperationResponse"/>
> > > >         </w:message>
> > > >
> > > > 2. Make the following changes to the <w:binding> definitions:
> > > >
> > > > Wherever it says style="rpc", change it to style="document". (This
> > > > could be in the <soap:binding> or the <soap:operation> definitions.
> > > >
> > > > Wherever it says use="encoded", change it to use="literal". (This will
> > >
> > > > be in all <soap:body>, <soap:header>, <soap:fault>, and
> > > > <soap:headerfault> definitions.). Likewise, in all these definitions,
> > > > remove all encodingStyle and namespace attributes.
> > > >
> > > > e.g., the <soap:body> definition should look like this:
> > > >
> > > >          <soap:body use="literal"/>
> > > >
> > > > That's it. Tedious, but relatively straightforward.
> > > >
> > > > Anne
> > > >
> > > >
> > > > On 7/19/07, david <da...@davidwbrown.name> wrote:
> > > > > Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET
> > > > > client
> > > > generated WSDL (rpc-encoded). I want to convert this WSDL to either:
> > > > rpc-literal or document-literal such that I can run Axis2 wsdl2java
> > > > and generate an
> > > > Axis2 service. Currently, this service is running as Axis1.4 and I
> > > > would appreciate very much any and all ideas and suggestions as to
> > how
> > >
> > > > to migrate to Axis2. I know the Axis2 wsdl2java does not support
> > > > rpc-encoded. I read Ann Manes blog about converting wsdls but I am
> > not
> > >
> > > > sure if this can be extended to rpc-encoded. I am secretly hoping Ann
> > > > Manes will reply but any and all rants and raves welcomed. I can reply
> > >
> > > > with the target wsdl in question. Please advise, David.
> > > > >
> > > > > --------------------------------------------------------------------
> > > > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by david <da...@davidwbrown.name>.
Hello Anne, currently I am using the Eclipse plugin XML/WSDL editor. There are so many XML and WSDL editors out there it is bewildering. Please reply with an editor albeit commercial, free or criminal and I will get to work on the problems cited by you and Chris. Please advise, David.

Anne Thomas Manes wrote ..
> Actually, you made a lot more mistakes than the ones Chris cited. You
> had numerous namespace issues; you didn't name the getversion and
> getversionResponse types; you didn't follow the convention of giving
> your input elements the same name as your operation; you didn't change
> your message parts properly; you didn't remove the namespace
> attributes from the <soap:body> definitions; etc. You might want to
> get yourself a WSDL editor with a validation option to help you in the
> future.
> 
> Here's a revised WSDL that validates:
> 
> <wsdl:definitions  xmlns:tns="http://service.myremote.my"
>        xmlns:type="http://service.myremote.my/type"
>        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>        xmlns:xs="http://www.w3.org/2001/XMLSchema"
>        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>        xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>        targetNamespace="http://service.myremote.my">
>  <wsdl:types>
>    <xs:schema targetNamespace='http://service.myremote.my/type'
>      elementFormDefault='qualified'>
> 
>  <xs:element name='Transact' type='type:Transact'/>
>  <xs:complexType name='Transact'>
>        <xs:sequence>
>                <xs:element name='userid' type='xs:string'/>
>                <xs:element name='password' type='xs:string'/>
>                <xs:element name='paramstr' type='xs:string'/>
>        </xs:sequence>
>  </xs:complexType>
>  <xs:element name='TransactResponse' type='type:TransactResponse' />
>  <xs:complexType name='TransactResponse'>
>        <xs:sequence>
>                <xs:element name='Result' type='xs:string'/>
>                <xs:element name='paramstr' type='xs:string'/>
>        </xs:sequence>
>  </xs:complexType>
>  <xs:element name='getversion' type='type:getversion'/>
>  <xs:complexType name='getversion'>
>        <xs:sequence>
>        </xs:sequence>
>  </xs:complexType>
>  <xs:element name='getversionResponse' type='type:getversionResponse'/>
>  <xs:complexType name='getversionResponse'>
>        <xs:sequence>
>                <xs:element name='Result' type='xs:string'/>
>        </xs:sequence>
>  </xs:complexType>
>    </xs:schema>
>  </wsdl:types>
>  <wsdl:message name='TransactRequest'>
>    <wsdl:part name='parameters' element='type:Transact'/>
>  </wsdl:message>
>  <wsdl:message name='TransactResponse'>
>    <wsdl:part name='parameters' element='type:TransactResponse'/>
>  </wsdl:message>
>  <wsdl:message name='getversionRequest'>
>    <wsdl:part name='parameters' element='type:getversion'/>
>  </wsdl:message>
>  <wsdl:message name='getversionResponse'>
>    <wsdl:part name='parameters' element='type:getversionResponse'/>
>  </wsdl:message>
>  <wsdl:portType name='MyRemoteSoapPort'>
>    <wsdl:operation name='Transact'>
>      <wsdl:input message='tns:TransactRequest' />
>      <wsdl:output message='tns:TransactResponse' />
>    </wsdl:operation>
>    <wsdl:operation name='getversion'>
>      <wsdl:input message='tns:getversionRequest' />
>      <wsdl:output message='tns:getversionResponse' />
>    </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:binding name='MyRemoteSoapBinding' type='tns:MyRemoteSoapPort' >
>    <soap:binding style='document'
> transport='http://schemas.xmlsoap.org/soap/http' />
>    <wsdl:operation name='Transact' >
>      <soap:operation
> soapAction='http://service.myremote.my/action/MyRemote.Transact' />
>      <wsdl:input>
>        <soap:body use='literal' />
>      </wsdl:input>
>      <wsdl:output>
>        <soap:body use='literal' />
>      </wsdl:output>
>    </wsdl:operation>
>    <wsdl:operation name='getversion' >
>      <soap:operation
> soapAction='http://service.myremote.my/action/MyRemote.getversion' />
>      <wsdl:input>
>        <soap:body use='literal'/>
>      </wsdl:input>
>      <wsdl:output>
>        <soap:body use='literal'/>
>      </wsdl:output>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:service name='MyRemote' >
>    <wsdl:port name='MyRemoteSoapPort' binding='tns:MyRemoteSoapBinding'
> >
>      <soap:address
> location='http://localhost:8080/axis/services/MyRemote.wsdl' />
>    </wsdl:port>
>  </wsdl:service>
> </wsdl:definitions>
> 
> On 7/20/07, Ebert, Chris <ch...@hp.com> wrote:
> > Two things:
> > 1) You've mixed single and double quotes around the name of your first
> > type.
> > 2) The type definitions should go inside the <schema> </schema> tags.
> >
> > Chris
> >
> > -----Original Message-----
> > From: david [mailto:david@davidwbrown.name]
> > Sent: Friday, July 20, 2007 15:54
> > To: axis-user@ws.apache.org
> > Subject: Re: rpc-encoded vs rpc-literal vs document-literal migrate
> > Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit
> >
> > Hello Ann, thanks for the speedy reply. I see you working another user
> > who is also trying to migrate an Axis1.4 WS to Axis2. I have an Axis1.4
> > WS that is running OK as hinted at in my previous communication to the
> > ML. I hand-converted the .wsdl with great tedium as you predicted.
> > Notwithstanding the WSDL2JAVA tool (Eclipse/Axis plugin) bails before
> > processing the .wsdl with the following error condition:
> >
> > Specified WSDL is invalid!
> >
> > I have included both WSDLs: the original source WSDL running under
> > Asix1.4. And, the hand-edited WSDL that errors-out under the WSDL2JAVA
> > tool. Thanks in advance and please advise, David.
> >
> >
> > ************************************ SOURCE WSDL
> > ***********************************************
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions targetNamespace="http://tempuri.org/MYRemote/wsdl/"
> > xmlns:apachesoap="http://xml.apache.org/xml-soap"
> > xmlns:impl="http://tempuri.org/MyRemote/wsdl/"
> > xmlns:intf="http://tempuri.org/MyRemote/wsdl/"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006
> > (06:55:48 PDT)-->
> >
> >    <wsdl:message name="getversionRequest">
> >
> >    </wsdl:message>
> >
> >    <wsdl:message name="getversionResponse">
> >
> >       <wsdl:part name="Result" type="xsd:string"/>
> >
> >    </wsdl:message>
> >
> >    <wsdl:message name="TransactRequest">
> >
> >       <wsdl:part name="userid" type="xsd:string"/>
> >
> >       <wsdl:part name="password" type="xsd:string"/>
> >
> >       <wsdl:part name="paramstr" type="xsd:string"/>
> >
> >    </wsdl:message>
> >
> >    <wsdl:message name="TransactResponse">
> >
> >       <wsdl:part name="Result" type="xsd:string"/>
> >
> >    </wsdl:message>
> >
> >    <wsdl:portType name="MyRemoteSoapPort">
> >
> >       <wsdl:operation name="Transact" parameterOrder="userid password
> > paramstr">
> >
> >          <wsdl:input message="impl:TransactRequest"
> > name="TransactRequest"/>
> >
> >          <wsdl:output message="impl:TransactResponse"
> > name="TransactResponse"/>
> >
> >       </wsdl:operation>
> >
> >       <wsdl:operation name="getversion">
> >
> >          <wsdl:input message="impl:getversionRequest"
> > name="getversionRequest"/>
> >
> >          <wsdl:output message="impl:getversionResponse"
> > name="getversionResponse"/>
> >
> >       </wsdl:operation>
> >
> >    </wsdl:portType>
> >
> >    <wsdl:binding name="MyRemoteSoapPortSoapBinding"
> > type="impl:MyRemoteSoapPort">
> >
> >       <wsdlsoap:binding style="rpc"
> > transport="http://schemas.xmlsoap.org/soap/http"/>
> >
> >       <wsdl:operation name="Transact">
> >
> >          <wsdlsoap:operation
> > soapAction="http://tempuri.org/MyRemote/action/MyRemote.Transact"/>
> >
> >          <wsdl:input name="TransactRequest">
> >
> >             <wsdlsoap:body
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> >
> >          </wsdl:input>
> >
> >          <wsdl:output name="TransactResponse">
> >
> >             <wsdlsoap:body
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> >
> >          </wsdl:output>
> >
> >       </wsdl:operation>
> >
> >       <wsdl:operation name="getversion">
> >
> >          <wsdlsoap:operation
> > soapAction="http://tempuri.org/MyRemote/action/MyRemote.getversion"/>
> >
> >          <wsdl:input name="getversionRequest">
> >
> >             <wsdlsoap:body
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
> >
> >          </wsdl:input>
> >
> >          <wsdl:output name="getversionResponse">
> >
> >             <wsdlsoap:body
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
> >
> >          </wsdl:output>
> >
> >       </wsdl:operation>
> >
> >    </wsdl:binding>
> >
> >    <wsdl:service name="MyRemote">
> >
> >       <wsdl:port binding="impl:MyRemoteSoapPortSoapBinding"
> > name="MyRemoteSoapPort">
> >
> >          <wsdlsoap:address
> > location="http://tech-pc06:8080/axis/services/MyRemoteSoapPort"/>
> >
> >       </wsdl:port>
> >
> >    </wsdl:service>
> >
> > </wsdl:definitions>
> >
> >
> > ****************************************** hand-edited
> > **********************************************
> > <wsdl:definitions  xmlns:axis2="http://service.myremote.my"
> >         xmlns:ns0="http://userid.myremote.my/xsd"
> >         xmlns:ns1="http://password.myremote.my/xsd"
> >         xmlns:ns2="http://paramstr.myremote.my/xsd"
> >         xmlns:ns3="http://Result.myremote.my/xsd"
> >         xmlns:ns4="http://paramstr.myremote.my/xsd"
> >         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >         xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> >         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >         xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> >         targetNamespace="http://service.myremote.my/type">
> >   <wsdl:types>
> >     <xs:schema targetNamespace='http://service.myremote.my/type'
> >       xmlns='http://www.w3.org/2001/XMLSchema'
> >       xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
> >       elementFormDefault='qualified'>
> >     </xs:schema>
> >   </wsdl:types>
> >   <xs:element name='MyRemote.Transact' type='ns:MyRemote.Transact'/>
> >   <xs:complexType name="MyRemote.Transact'>
> >         <xs:sequence>
> >                 <xs:element name='userid' type='xs:string'/>
> >                 <xs:element name='password' type='xs:string'/>
> >                 <xs:element name='paramstr' type='xs:string'/>
> >         </xs:sequence>
> >   </xs:complexType>
> >   <xs:element name='MyRemote.TransactResponse'
> > type='ns1:MyRemote.TransactResponse' />
> >   <xs:complexType name='MyRemote.TransactResponse'>
> >         <xs:sequence>
> >                 <xs:element name='Result' type='xs:string'/>
> >                 <xs:element name='paramstr' type='xs:string'/>
> >         </xs:sequence>
> >   </xs:complexType>
> >   <xs:element name='MyRemote.getversion'
> > type='ns2:MyRemote.getversion'/>
> >   <xs:complexType>
> >         <xs:sequence>
> >         </xs:sequence>
> >   </xs:complexType>
> >   <xs:element name='MyRemote.getversionResponse'
> > type='ns3:MyRemote.getversionResponse'/>
> >   <xs:complexType>
> >         <xs:sequence>
> >                 <xsd:element name='Result' type='xs:string'/>
> >         </xs:sequence>
> >   </xs:complexType>
> >   <wsdl:message name='MyRemote.Transact'>
> >     <wsdl:part name='userid' element='ns0:MyRemote.Transact'/>
> >     <wsdl:part name='password' element='ns1:MyRemote.Transact'/>
> >     <wsdl:part name='paramstr' element='ns2:MyRemote.Transact'/>
> >   </wsdl:message>
> >   <wsdl:message name='MyRemote.TransactResponse'>
> >     <wsdl:part name='Result' type='ns3:MyRemote.TransactResponse'/>
> >     <wsdl:part name='paramstr' type='ns4:MyRemote.TransactResponse'/>
> >   </wsdl:message>
> >   <wsdl:message name='MyRemote.getversion'>
> >   </wsdl:message>
> >   <wsdl:message name='MyRemote.getversionResponse'>
> >     <wsdl:part name='Result' type='ns3:MyRemote.getversionResponse'/>
> >   </wsdl:message>
> >   <wsdl:portType name='MyRemoteSoapPort'>
> >     <wsdl:operation name='Transact' parameterOrder='userid password
> > paramstr'>
> >       <wsdl:input message='MyRemote.Transact' />
> >       <wsdl:output message='wsdlns:MyRemote.TransactResponse' />
> >     </wsdl:operation>
> >     <wsdl:operation name='getversion' parameterOrder=''>
> >       <wsdl:input message='wsdlns:MyRemote.getversion' />
> >       <wsdl:output message='wsdlns:MyRemote.getversionResponse' />
> >     </wsdl:operation>
> >   </wsdl:portType>
> >   <wsdl:binding name='MyRemoteSoapBinding'
> > type='wsdlns:MyRemoteSoapPort' >
> >     <stk:binding/>
> >     <soap:binding style='document'
> > transport='http://schemas.xmlsoap.org/soap/http' />
> >     <wsdl:operation name='Transact' >
> >       <soap:operation
> > soapAction='http://service.myremote.my/action/MyRemote.Transact' />
> >       <wsdl:input>
> >         <soap:body use='literal'
> > namespace='http://service.myremote.my/message/' />
> >       </wsdl:input>
> >       <wsdl:output>
> >         <soap:body use='literal'
> > namespace='http://service.myremote.my/message/'/>
> >       </wsdl:output>
> >     </wsdl:operation>
> >     <wsdl:operation name='getversion' >
> >       <soap:operation
> > soapAction='http://service.myremote.my/action/MyRemote.getversion' />
> >       <wsdl:input>
> >         <soap:body use='literal'/>
> >       </wsdl:input>
> >       <wsdl:output>
> >         <soap:body use='literal'/>
> >       </wsdl:output>
> >     </wsdl:operation>
> >   </wsdl:binding>
> >   <wsdl:service name='MyRemote' >
> >     <wsdl:port name='MyRemoteSoapPort'
> > binding='wsdlns:MyRemoteSoapBinding' >
> >       <soap:address
> > location='http://localhost:8080/axis/services/MyRemote.wsdl' />
> >     </wsdl:port>
> >   </wsdl:service>
> > </wsdl:definitions>
> >
> >
> >
> > Anne Thomas Manes wrote ..
> > > David,
> > >
> > > I just Googled looking for an automated converter utility, but no
> > > luck. I think you'll have to do the conversions by hand. As a general
> > > rule, I strongly recommend that you convert your WSDL to wrapped
> > > document/literal.
> > >
> > > Here are the basic rules:
> > >
> > > 1 - Convert your input and output parameters to explicitly defined
> > > schema elements. The name of an input element should be the same as
> > > the operation name. The name of an output element should be a
> > > concatenation of the operation name and "Response". For example, for
> > > an operation called myOperation, with the following message
> > > descriptions:
> > >
> > >         <w:message name="myOperationRequest">
> > >            <w:part name="param1" type="x:string"/>
> > >            <w:part name="param2" type="x:int"/>
> > >         </w:message>
> > >
> > >         <w:message name="myOperationResponse"
> > >            <w:part name="return" type="x:string"/>
> > >         </w:message>
> > >
> > > Write the following schema definition:
> > >
> > >         <x:element name="myOperation" type="tns:myOperation"/>
> > >         <x:complexType name="myOperation">
> > >            <x:sequence>
> > >                <x:element name="param1" type="x:string"/>
> > >                <x:element name="param2" type="x:int"/>
> > >            </x:sequence>
> > >          <x:complexType>
> > >
> > >         <x:element name="myOperationResponse"
> > type="tns:myOperationResponse"/>
> > >         <x:complexType name="myOperationResponse">
> > >            <x:sequence>
> > >                <x:element name="return" type="x:string"/>
> > >            </x:sequence>
> > >          <x:complexType>
> > >
> > > And change the message definitions to:
> > >
> > >         <w:message name="myOperationRequest">
> > >            <w:part name="parameters" element="tns:myOperation"/>
> > >         </w:message>
> > >
> > >         <w:message name="myOperationResponse"
> > >            <w:part name="parameters"
> > element="tns:myOperationResponse"/>
> > >         </w:message>
> > >
> > > 2. Make the following changes to the <w:binding> definitions:
> > >
> > > Wherever it says style="rpc", change it to style="document". (This
> > > could be in the <soap:binding> or the <soap:operation> definitions.
> > >
> > > Wherever it says use="encoded", change it to use="literal". (This will
> >
> > > be in all <soap:body>, <soap:header>, <soap:fault>, and
> > > <soap:headerfault> definitions.). Likewise, in all these definitions,
> > > remove all encodingStyle and namespace attributes.
> > >
> > > e.g., the <soap:body> definition should look like this:
> > >
> > >          <soap:body use="literal"/>
> > >
> > > That's it. Tedious, but relatively straightforward.
> > >
> > > Anne
> > >
> > >
> > > On 7/19/07, david <da...@davidwbrown.name> wrote:
> > > > Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET
> > > > client
> > > generated WSDL (rpc-encoded). I want to convert this WSDL to either:
> > > rpc-literal or document-literal such that I can run Axis2 wsdl2java
> > > and generate an
> > > Axis2 service. Currently, this service is running as Axis1.4 and I
> > > would appreciate very much any and all ideas and suggestions as to
> how
> >
> > > to migrate to Axis2. I know the Axis2 wsdl2java does not support
> > > rpc-encoded. I read Ann Manes blog about converting wsdls but I am
> not
> >
> > > sure if this can be extended to rpc-encoded. I am secretly hoping Ann
> > > Manes will reply but any and all rants and raves welcomed. I can reply
> >
> > > with the target wsdl in question. Please advise, David.
> > > >
> > > > --------------------------------------------------------------------
> > > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by Anne Thomas Manes <at...@gmail.com>.
Actually, you made a lot more mistakes than the ones Chris cited. You
had numerous namespace issues; you didn't name the getversion and
getversionResponse types; you didn't follow the convention of giving
your input elements the same name as your operation; you didn't change
your message parts properly; you didn't remove the namespace
attributes from the <soap:body> definitions; etc. You might want to
get yourself a WSDL editor with a validation option to help you in the
future.

Here's a revised WSDL that validates:

<wsdl:definitions  xmlns:tns="http://service.myremote.my"
       xmlns:type="http://service.myremote.my/type"
       xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
       targetNamespace="http://service.myremote.my">
 <wsdl:types>
   <xs:schema targetNamespace='http://service.myremote.my/type'
     elementFormDefault='qualified'>

 <xs:element name='Transact' type='type:Transact'/>
 <xs:complexType name='Transact'>
       <xs:sequence>
               <xs:element name='userid' type='xs:string'/>
               <xs:element name='password' type='xs:string'/>
               <xs:element name='paramstr' type='xs:string'/>
       </xs:sequence>
 </xs:complexType>
 <xs:element name='TransactResponse' type='type:TransactResponse' />
 <xs:complexType name='TransactResponse'>
       <xs:sequence>
               <xs:element name='Result' type='xs:string'/>
               <xs:element name='paramstr' type='xs:string'/>
       </xs:sequence>
 </xs:complexType>
 <xs:element name='getversion' type='type:getversion'/>
 <xs:complexType name='getversion'>
       <xs:sequence>
       </xs:sequence>
 </xs:complexType>
 <xs:element name='getversionResponse' type='type:getversionResponse'/>
 <xs:complexType name='getversionResponse'>
       <xs:sequence>
               <xs:element name='Result' type='xs:string'/>
       </xs:sequence>
 </xs:complexType>
   </xs:schema>
 </wsdl:types>
 <wsdl:message name='TransactRequest'>
   <wsdl:part name='parameters' element='type:Transact'/>
 </wsdl:message>
 <wsdl:message name='TransactResponse'>
   <wsdl:part name='parameters' element='type:TransactResponse'/>
 </wsdl:message>
 <wsdl:message name='getversionRequest'>
   <wsdl:part name='parameters' element='type:getversion'/>
 </wsdl:message>
 <wsdl:message name='getversionResponse'>
   <wsdl:part name='parameters' element='type:getversionResponse'/>
 </wsdl:message>
 <wsdl:portType name='MyRemoteSoapPort'>
   <wsdl:operation name='Transact'>
     <wsdl:input message='tns:TransactRequest' />
     <wsdl:output message='tns:TransactResponse' />
   </wsdl:operation>
   <wsdl:operation name='getversion'>
     <wsdl:input message='tns:getversionRequest' />
     <wsdl:output message='tns:getversionResponse' />
   </wsdl:operation>
 </wsdl:portType>
 <wsdl:binding name='MyRemoteSoapBinding' type='tns:MyRemoteSoapPort' >
   <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http' />
   <wsdl:operation name='Transact' >
     <soap:operation
soapAction='http://service.myremote.my/action/MyRemote.Transact' />
     <wsdl:input>
       <soap:body use='literal' />
     </wsdl:input>
     <wsdl:output>
       <soap:body use='literal' />
     </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name='getversion' >
     <soap:operation
soapAction='http://service.myremote.my/action/MyRemote.getversion' />
     <wsdl:input>
       <soap:body use='literal'/>
     </wsdl:input>
     <wsdl:output>
       <soap:body use='literal'/>
     </wsdl:output>
   </wsdl:operation>
 </wsdl:binding>
 <wsdl:service name='MyRemote' >
   <wsdl:port name='MyRemoteSoapPort' binding='tns:MyRemoteSoapBinding' >
     <soap:address
location='http://localhost:8080/axis/services/MyRemote.wsdl' />
   </wsdl:port>
 </wsdl:service>
</wsdl:definitions>

On 7/20/07, Ebert, Chris <ch...@hp.com> wrote:
> Two things:
> 1) You've mixed single and double quotes around the name of your first
> type.
> 2) The type definitions should go inside the <schema> </schema> tags.
>
> Chris
>
> -----Original Message-----
> From: david [mailto:david@davidwbrown.name]
> Sent: Friday, July 20, 2007 15:54
> To: axis-user@ws.apache.org
> Subject: Re: rpc-encoded vs rpc-literal vs document-literal migrate
> Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit
>
> Hello Ann, thanks for the speedy reply. I see you working another user
> who is also trying to migrate an Axis1.4 WS to Axis2. I have an Axis1.4
> WS that is running OK as hinted at in my previous communication to the
> ML. I hand-converted the .wsdl with great tedium as you predicted.
> Notwithstanding the WSDL2JAVA tool (Eclipse/Axis plugin) bails before
> processing the .wsdl with the following error condition:
>
> Specified WSDL is invalid!
>
> I have included both WSDLs: the original source WSDL running under
> Asix1.4. And, the hand-edited WSDL that errors-out under the WSDL2JAVA
> tool. Thanks in advance and please advise, David.
>
>
> ************************************ SOURCE WSDL
> ***********************************************
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://tempuri.org/MYRemote/wsdl/"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="http://tempuri.org/MyRemote/wsdl/"
> xmlns:intf="http://tempuri.org/MyRemote/wsdl/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006
> (06:55:48 PDT)-->
>
>    <wsdl:message name="getversionRequest">
>
>    </wsdl:message>
>
>    <wsdl:message name="getversionResponse">
>
>       <wsdl:part name="Result" type="xsd:string"/>
>
>    </wsdl:message>
>
>    <wsdl:message name="TransactRequest">
>
>       <wsdl:part name="userid" type="xsd:string"/>
>
>       <wsdl:part name="password" type="xsd:string"/>
>
>       <wsdl:part name="paramstr" type="xsd:string"/>
>
>    </wsdl:message>
>
>    <wsdl:message name="TransactResponse">
>
>       <wsdl:part name="Result" type="xsd:string"/>
>
>    </wsdl:message>
>
>    <wsdl:portType name="MyRemoteSoapPort">
>
>       <wsdl:operation name="Transact" parameterOrder="userid password
> paramstr">
>
>          <wsdl:input message="impl:TransactRequest"
> name="TransactRequest"/>
>
>          <wsdl:output message="impl:TransactResponse"
> name="TransactResponse"/>
>
>       </wsdl:operation>
>
>       <wsdl:operation name="getversion">
>
>          <wsdl:input message="impl:getversionRequest"
> name="getversionRequest"/>
>
>          <wsdl:output message="impl:getversionResponse"
> name="getversionResponse"/>
>
>       </wsdl:operation>
>
>    </wsdl:portType>
>
>    <wsdl:binding name="MyRemoteSoapPortSoapBinding"
> type="impl:MyRemoteSoapPort">
>
>       <wsdlsoap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
>       <wsdl:operation name="Transact">
>
>          <wsdlsoap:operation
> soapAction="http://tempuri.org/MyRemote/action/MyRemote.Transact"/>
>
>          <wsdl:input name="TransactRequest">
>
>             <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
>
>          </wsdl:input>
>
>          <wsdl:output name="TransactResponse">
>
>             <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
>
>          </wsdl:output>
>
>       </wsdl:operation>
>
>       <wsdl:operation name="getversion">
>
>          <wsdlsoap:operation
> soapAction="http://tempuri.org/MyRemote/action/MyRemote.getversion"/>
>
>          <wsdl:input name="getversionRequest">
>
>             <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>
>
>          </wsdl:input>
>
>          <wsdl:output name="getversionResponse">
>
>             <wsdlsoap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>
>
>          </wsdl:output>
>
>       </wsdl:operation>
>
>    </wsdl:binding>
>
>    <wsdl:service name="MyRemote">
>
>       <wsdl:port binding="impl:MyRemoteSoapPortSoapBinding"
> name="MyRemoteSoapPort">
>
>          <wsdlsoap:address
> location="http://tech-pc06:8080/axis/services/MyRemoteSoapPort"/>
>
>       </wsdl:port>
>
>    </wsdl:service>
>
> </wsdl:definitions>
>
>
> ****************************************** hand-edited
> **********************************************
> <wsdl:definitions  xmlns:axis2="http://service.myremote.my"
>         xmlns:ns0="http://userid.myremote.my/xsd"
>         xmlns:ns1="http://password.myremote.my/xsd"
>         xmlns:ns2="http://paramstr.myremote.my/xsd"
>         xmlns:ns3="http://Result.myremote.my/xsd"
>         xmlns:ns4="http://paramstr.myremote.my/xsd"
>         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>         xmlns:xs="http://www.w3.org/2001/XMLSchema"
>         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>         xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>         targetNamespace="http://service.myremote.my/type">
>   <wsdl:types>
>     <xs:schema targetNamespace='http://service.myremote.my/type'
>       xmlns='http://www.w3.org/2001/XMLSchema'
>       xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
>       elementFormDefault='qualified'>
>     </xs:schema>
>   </wsdl:types>
>   <xs:element name='MyRemote.Transact' type='ns:MyRemote.Transact'/>
>   <xs:complexType name="MyRemote.Transact'>
>         <xs:sequence>
>                 <xs:element name='userid' type='xs:string'/>
>                 <xs:element name='password' type='xs:string'/>
>                 <xs:element name='paramstr' type='xs:string'/>
>         </xs:sequence>
>   </xs:complexType>
>   <xs:element name='MyRemote.TransactResponse'
> type='ns1:MyRemote.TransactResponse' />
>   <xs:complexType name='MyRemote.TransactResponse'>
>         <xs:sequence>
>                 <xs:element name='Result' type='xs:string'/>
>                 <xs:element name='paramstr' type='xs:string'/>
>         </xs:sequence>
>   </xs:complexType>
>   <xs:element name='MyRemote.getversion'
> type='ns2:MyRemote.getversion'/>
>   <xs:complexType>
>         <xs:sequence>
>         </xs:sequence>
>   </xs:complexType>
>   <xs:element name='MyRemote.getversionResponse'
> type='ns3:MyRemote.getversionResponse'/>
>   <xs:complexType>
>         <xs:sequence>
>                 <xsd:element name='Result' type='xs:string'/>
>         </xs:sequence>
>   </xs:complexType>
>   <wsdl:message name='MyRemote.Transact'>
>     <wsdl:part name='userid' element='ns0:MyRemote.Transact'/>
>     <wsdl:part name='password' element='ns1:MyRemote.Transact'/>
>     <wsdl:part name='paramstr' element='ns2:MyRemote.Transact'/>
>   </wsdl:message>
>   <wsdl:message name='MyRemote.TransactResponse'>
>     <wsdl:part name='Result' type='ns3:MyRemote.TransactResponse'/>
>     <wsdl:part name='paramstr' type='ns4:MyRemote.TransactResponse'/>
>   </wsdl:message>
>   <wsdl:message name='MyRemote.getversion'>
>   </wsdl:message>
>   <wsdl:message name='MyRemote.getversionResponse'>
>     <wsdl:part name='Result' type='ns3:MyRemote.getversionResponse'/>
>   </wsdl:message>
>   <wsdl:portType name='MyRemoteSoapPort'>
>     <wsdl:operation name='Transact' parameterOrder='userid password
> paramstr'>
>       <wsdl:input message='MyRemote.Transact' />
>       <wsdl:output message='wsdlns:MyRemote.TransactResponse' />
>     </wsdl:operation>
>     <wsdl:operation name='getversion' parameterOrder=''>
>       <wsdl:input message='wsdlns:MyRemote.getversion' />
>       <wsdl:output message='wsdlns:MyRemote.getversionResponse' />
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name='MyRemoteSoapBinding'
> type='wsdlns:MyRemoteSoapPort' >
>     <stk:binding/>
>     <soap:binding style='document'
> transport='http://schemas.xmlsoap.org/soap/http' />
>     <wsdl:operation name='Transact' >
>       <soap:operation
> soapAction='http://service.myremote.my/action/MyRemote.Transact' />
>       <wsdl:input>
>         <soap:body use='literal'
> namespace='http://service.myremote.my/message/' />
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use='literal'
> namespace='http://service.myremote.my/message/'/>
>       </wsdl:output>
>     </wsdl:operation>
>     <wsdl:operation name='getversion' >
>       <soap:operation
> soapAction='http://service.myremote.my/action/MyRemote.getversion' />
>       <wsdl:input>
>         <soap:body use='literal'/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use='literal'/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name='MyRemote' >
>     <wsdl:port name='MyRemoteSoapPort'
> binding='wsdlns:MyRemoteSoapBinding' >
>       <soap:address
> location='http://localhost:8080/axis/services/MyRemote.wsdl' />
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
>
>
> Anne Thomas Manes wrote ..
> > David,
> >
> > I just Googled looking for an automated converter utility, but no
> > luck. I think you'll have to do the conversions by hand. As a general
> > rule, I strongly recommend that you convert your WSDL to wrapped
> > document/literal.
> >
> > Here are the basic rules:
> >
> > 1 - Convert your input and output parameters to explicitly defined
> > schema elements. The name of an input element should be the same as
> > the operation name. The name of an output element should be a
> > concatenation of the operation name and "Response". For example, for
> > an operation called myOperation, with the following message
> > descriptions:
> >
> >         <w:message name="myOperationRequest">
> >            <w:part name="param1" type="x:string"/>
> >            <w:part name="param2" type="x:int"/>
> >         </w:message>
> >
> >         <w:message name="myOperationResponse"
> >            <w:part name="return" type="x:string"/>
> >         </w:message>
> >
> > Write the following schema definition:
> >
> >         <x:element name="myOperation" type="tns:myOperation"/>
> >         <x:complexType name="myOperation">
> >            <x:sequence>
> >                <x:element name="param1" type="x:string"/>
> >                <x:element name="param2" type="x:int"/>
> >            </x:sequence>
> >          <x:complexType>
> >
> >         <x:element name="myOperationResponse"
> type="tns:myOperationResponse"/>
> >         <x:complexType name="myOperationResponse">
> >            <x:sequence>
> >                <x:element name="return" type="x:string"/>
> >            </x:sequence>
> >          <x:complexType>
> >
> > And change the message definitions to:
> >
> >         <w:message name="myOperationRequest">
> >            <w:part name="parameters" element="tns:myOperation"/>
> >         </w:message>
> >
> >         <w:message name="myOperationResponse"
> >            <w:part name="parameters"
> element="tns:myOperationResponse"/>
> >         </w:message>
> >
> > 2. Make the following changes to the <w:binding> definitions:
> >
> > Wherever it says style="rpc", change it to style="document". (This
> > could be in the <soap:binding> or the <soap:operation> definitions.
> >
> > Wherever it says use="encoded", change it to use="literal". (This will
>
> > be in all <soap:body>, <soap:header>, <soap:fault>, and
> > <soap:headerfault> definitions.). Likewise, in all these definitions,
> > remove all encodingStyle and namespace attributes.
> >
> > e.g., the <soap:body> definition should look like this:
> >
> >          <soap:body use="literal"/>
> >
> > That's it. Tedious, but relatively straightforward.
> >
> > Anne
> >
> >
> > On 7/19/07, david <da...@davidwbrown.name> wrote:
> > > Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET
> > > client
> > generated WSDL (rpc-encoded). I want to convert this WSDL to either:
> > rpc-literal or document-literal such that I can run Axis2 wsdl2java
> > and generate an
> > Axis2 service. Currently, this service is running as Axis1.4 and I
> > would appreciate very much any and all ideas and suggestions as to how
>
> > to migrate to Axis2. I know the Axis2 wsdl2java does not support
> > rpc-encoded. I read Ann Manes blog about converting wsdls but I am not
>
> > sure if this can be extended to rpc-encoded. I am secretly hoping Ann
> > Manes will reply but any and all rants and raves welcomed. I can reply
>
> > with the target wsdl in question. Please advise, David.
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by "Ebert, Chris" <ch...@hp.com>.
Two things:
1) You've mixed single and double quotes around the name of your first
type.
2) The type definitions should go inside the <schema> </schema> tags.

Chris

-----Original Message-----
From: david [mailto:david@davidwbrown.name] 
Sent: Friday, July 20, 2007 15:54
To: axis-user@ws.apache.org
Subject: Re: rpc-encoded vs rpc-literal vs document-literal migrate
Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Hello Ann, thanks for the speedy reply. I see you working another user
who is also trying to migrate an Axis1.4 WS to Axis2. I have an Axis1.4
WS that is running OK as hinted at in my previous communication to the
ML. I hand-converted the .wsdl with great tedium as you predicted.
Notwithstanding the WSDL2JAVA tool (Eclipse/Axis plugin) bails before
processing the .wsdl with the following error condition:

Specified WSDL is invalid!

I have included both WSDLs: the original source WSDL running under
Asix1.4. And, the hand-edited WSDL that errors-out under the WSDL2JAVA
tool. Thanks in advance and please advise, David.


************************************ SOURCE WSDL
***********************************************

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://tempuri.org/MYRemote/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://tempuri.org/MyRemote/wsdl/"
xmlns:intf="http://tempuri.org/MyRemote/wsdl/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006
(06:55:48 PDT)-->

   <wsdl:message name="getversionRequest">

   </wsdl:message>

   <wsdl:message name="getversionResponse">

      <wsdl:part name="Result" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="TransactRequest">

      <wsdl:part name="userid" type="xsd:string"/>

      <wsdl:part name="password" type="xsd:string"/>

      <wsdl:part name="paramstr" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="TransactResponse">

      <wsdl:part name="Result" type="xsd:string"/>

   </wsdl:message>

   <wsdl:portType name="MyRemoteSoapPort">

      <wsdl:operation name="Transact" parameterOrder="userid password
paramstr">

         <wsdl:input message="impl:TransactRequest"
name="TransactRequest"/>

         <wsdl:output message="impl:TransactResponse"
name="TransactResponse"/>

      </wsdl:operation>

      <wsdl:operation name="getversion">

         <wsdl:input message="impl:getversionRequest"
name="getversionRequest"/>

         <wsdl:output message="impl:getversionResponse"
name="getversionResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="MyRemoteSoapPortSoapBinding"
type="impl:MyRemoteSoapPort">

      <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="Transact">

         <wsdlsoap:operation
soapAction="http://tempuri.org/MyRemote/action/MyRemote.Transact"/>

         <wsdl:input name="TransactRequest">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="TransactResponse">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getversion">

         <wsdlsoap:operation
soapAction="http://tempuri.org/MyRemote/action/MyRemote.getversion"/>

         <wsdl:input name="getversionRequest">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="getversionResponse">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="MyRemote">

      <wsdl:port binding="impl:MyRemoteSoapPortSoapBinding"
name="MyRemoteSoapPort">

         <wsdlsoap:address
location="http://tech-pc06:8080/axis/services/MyRemoteSoapPort"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>


****************************************** hand-edited
**********************************************
<wsdl:definitions  xmlns:axis2="http://service.myremote.my"
	xmlns:ns0="http://userid.myremote.my/xsd"
	xmlns:ns1="http://password.myremote.my/xsd"
	xmlns:ns2="http://paramstr.myremote.my/xsd"
	xmlns:ns3="http://Result.myremote.my/xsd"
	xmlns:ns4="http://paramstr.myremote.my/xsd"
	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
	targetNamespace="http://service.myremote.my/type">
  <wsdl:types>
    <xs:schema targetNamespace='http://service.myremote.my/type'
      xmlns='http://www.w3.org/2001/XMLSchema'
      xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
      elementFormDefault='qualified'>
    </xs:schema>
  </wsdl:types>
  <xs:element name='MyRemote.Transact' type='ns:MyRemote.Transact'/>
  <xs:complexType name="MyRemote.Transact'>
  	<xs:sequence>
  		<xs:element name='userid' type='xs:string'/>
  		<xs:element name='password' type='xs:string'/>
  		<xs:element name='paramstr' type='xs:string'/>
  	</xs:sequence>
  </xs:complexType>
  <xs:element name='MyRemote.TransactResponse'
type='ns1:MyRemote.TransactResponse' />
  <xs:complexType name='MyRemote.TransactResponse'>
  	<xs:sequence>
  		<xs:element name='Result' type='xs:string'/>
  		<xs:element name='paramstr' type='xs:string'/>
  	</xs:sequence>
  </xs:complexType>
  <xs:element name='MyRemote.getversion'
type='ns2:MyRemote.getversion'/>
  <xs:complexType>
  	<xs:sequence>
  	</xs:sequence>
  </xs:complexType>
  <xs:element name='MyRemote.getversionResponse'
type='ns3:MyRemote.getversionResponse'/>
  <xs:complexType>
  	<xs:sequence>
  		<xsd:element name='Result' type='xs:string'/>
  	</xs:sequence>
  </xs:complexType>
  <wsdl:message name='MyRemote.Transact'>
    <wsdl:part name='userid' element='ns0:MyRemote.Transact'/>
    <wsdl:part name='password' element='ns1:MyRemote.Transact'/>
    <wsdl:part name='paramstr' element='ns2:MyRemote.Transact'/>
  </wsdl:message>
  <wsdl:message name='MyRemote.TransactResponse'>
    <wsdl:part name='Result' type='ns3:MyRemote.TransactResponse'/>
    <wsdl:part name='paramstr' type='ns4:MyRemote.TransactResponse'/>
  </wsdl:message>
  <wsdl:message name='MyRemote.getversion'>
  </wsdl:message>
  <wsdl:message name='MyRemote.getversionResponse'>
    <wsdl:part name='Result' type='ns3:MyRemote.getversionResponse'/>
  </wsdl:message>
  <wsdl:portType name='MyRemoteSoapPort'>
    <wsdl:operation name='Transact' parameterOrder='userid password
paramstr'>
      <wsdl:input message='MyRemote.Transact' />
      <wsdl:output message='wsdlns:MyRemote.TransactResponse' />
    </wsdl:operation>
    <wsdl:operation name='getversion' parameterOrder=''>
      <wsdl:input message='wsdlns:MyRemote.getversion' />
      <wsdl:output message='wsdlns:MyRemote.getversionResponse' />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name='MyRemoteSoapBinding'
type='wsdlns:MyRemoteSoapPort' >
    <stk:binding/>
    <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http' />
    <wsdl:operation name='Transact' >
      <soap:operation
soapAction='http://service.myremote.my/action/MyRemote.Transact' />
      <wsdl:input>
        <soap:body use='literal'
namespace='http://service.myremote.my/message/' />
      </wsdl:input>
      <wsdl:output>
        <soap:body use='literal'
namespace='http://service.myremote.my/message/'/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name='getversion' >
      <soap:operation
soapAction='http://service.myremote.my/action/MyRemote.getversion' />
      <wsdl:input>
        <soap:body use='literal'/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use='literal'/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name='MyRemote' >
    <wsdl:port name='MyRemoteSoapPort'
binding='wsdlns:MyRemoteSoapBinding' >
      <soap:address
location='http://localhost:8080/axis/services/MyRemote.wsdl' />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>



Anne Thomas Manes wrote ..
> David,
> 
> I just Googled looking for an automated converter utility, but no 
> luck. I think you'll have to do the conversions by hand. As a general 
> rule, I strongly recommend that you convert your WSDL to wrapped 
> document/literal.
> 
> Here are the basic rules:
> 
> 1 - Convert your input and output parameters to explicitly defined 
> schema elements. The name of an input element should be the same as 
> the operation name. The name of an output element should be a 
> concatenation of the operation name and "Response". For example, for 
> an operation called myOperation, with the following message
> descriptions:
> 
>         <w:message name="myOperationRequest">
>            <w:part name="param1" type="x:string"/>
>            <w:part name="param2" type="x:int"/>
>         </w:message>
> 
>         <w:message name="myOperationResponse"
>            <w:part name="return" type="x:string"/>
>         </w:message>
> 
> Write the following schema definition:
> 
>         <x:element name="myOperation" type="tns:myOperation"/>
>         <x:complexType name="myOperation">
>            <x:sequence>
>                <x:element name="param1" type="x:string"/>
>                <x:element name="param2" type="x:int"/>
>            </x:sequence>
>          <x:complexType>
> 
>         <x:element name="myOperationResponse"
type="tns:myOperationResponse"/>
>         <x:complexType name="myOperationResponse">
>            <x:sequence>
>                <x:element name="return" type="x:string"/>
>            </x:sequence>
>          <x:complexType>
> 
> And change the message definitions to:
> 
>         <w:message name="myOperationRequest">
>            <w:part name="parameters" element="tns:myOperation"/>
>         </w:message>
> 
>         <w:message name="myOperationResponse"
>            <w:part name="parameters"
element="tns:myOperationResponse"/>
>         </w:message>
> 
> 2. Make the following changes to the <w:binding> definitions:
> 
> Wherever it says style="rpc", change it to style="document". (This 
> could be in the <soap:binding> or the <soap:operation> definitions.
> 
> Wherever it says use="encoded", change it to use="literal". (This will

> be in all <soap:body>, <soap:header>, <soap:fault>, and 
> <soap:headerfault> definitions.). Likewise, in all these definitions, 
> remove all encodingStyle and namespace attributes.
> 
> e.g., the <soap:body> definition should look like this:
> 
>          <soap:body use="literal"/>
> 
> That's it. Tedious, but relatively straightforward.
> 
> Anne
> 
> 
> On 7/19/07, david <da...@davidwbrown.name> wrote:
> > Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET 
> > client
> generated WSDL (rpc-encoded). I want to convert this WSDL to either: 
> rpc-literal or document-literal such that I can run Axis2 wsdl2java 
> and generate an
> Axis2 service. Currently, this service is running as Axis1.4 and I 
> would appreciate very much any and all ideas and suggestions as to how

> to migrate to Axis2. I know the Axis2 wsdl2java does not support 
> rpc-encoded. I read Ann Manes blog about converting wsdls but I am not

> sure if this can be extended to rpc-encoded. I am secretly hoping Ann 
> Manes will reply but any and all rants and raves welcomed. I can reply

> with the target wsdl in question. Please advise, David.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by david <da...@davidwbrown.name>.
Hello Ann, thanks for the speedy reply. I see you working another user who is also trying to migrate an Axis1.4 WS to Axis2. I have an Axis1.4 WS that is running OK as hinted at in my previous communication to the ML. I hand-converted the .wsdl with great tedium as you predicted. Notwithstanding the WSDL2JAVA tool (Eclipse/Axis plugin) bails before processing the .wsdl with the following error condition:

Specified WSDL is invalid!

I have included both WSDLs: the original source WSDL running under Asix1.4. And, the hand-edited WSDL that errors-out under the WSDL2JAVA tool. Thanks in advance and please advise, David.


************************************ SOURCE WSDL ***********************************************

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://tempuri.org/MYRemote/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://tempuri.org/MyRemote/wsdl/" xmlns:intf="http://tempuri.org/MyRemote/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->

   <wsdl:message name="getversionRequest">

   </wsdl:message>

   <wsdl:message name="getversionResponse">

      <wsdl:part name="Result" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="TransactRequest">

      <wsdl:part name="userid" type="xsd:string"/>

      <wsdl:part name="password" type="xsd:string"/>

      <wsdl:part name="paramstr" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="TransactResponse">

      <wsdl:part name="Result" type="xsd:string"/>

   </wsdl:message>

   <wsdl:portType name="MyRemoteSoapPort">

      <wsdl:operation name="Transact" parameterOrder="userid password paramstr">

         <wsdl:input message="impl:TransactRequest" name="TransactRequest"/>

         <wsdl:output message="impl:TransactResponse" name="TransactResponse"/>

      </wsdl:operation>

      <wsdl:operation name="getversion">

         <wsdl:input message="impl:getversionRequest" name="getversionRequest"/>

         <wsdl:output message="impl:getversionResponse" name="getversionResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="MyRemoteSoapPortSoapBinding" type="impl:MyRemoteSoapPort">

      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="Transact">

         <wsdlsoap:operation soapAction="http://tempuri.org/MyRemote/action/MyRemote.Transact"/>

         <wsdl:input name="TransactRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="TransactResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getversion">

         <wsdlsoap:operation soapAction="http://tempuri.org/MyRemote/action/MyRemote.getversion"/>

         <wsdl:input name="getversionRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tempuri.org/MyRemote/message/" use="encoded"/>

         </wsdl:input>

         <wsdl:output name="getversionResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tempuri.org/MyRemote/wsdl/" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="MyRemote">

      <wsdl:port binding="impl:MyRemoteSoapPortSoapBinding" name="MyRemoteSoapPort">

         <wsdlsoap:address location="http://tech-pc06:8080/axis/services/MyRemoteSoapPort"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>


****************************************** hand-edited **********************************************
<wsdl:definitions  xmlns:axis2="http://service.myremote.my"
	xmlns:ns0="http://userid.myremote.my/xsd"
	xmlns:ns1="http://password.myremote.my/xsd"
	xmlns:ns2="http://paramstr.myremote.my/xsd"
	xmlns:ns3="http://Result.myremote.my/xsd"
	xmlns:ns4="http://paramstr.myremote.my/xsd"
	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
	targetNamespace="http://service.myremote.my/type">
  <wsdl:types>
    <xs:schema targetNamespace='http://service.myremote.my/type'
      xmlns='http://www.w3.org/2001/XMLSchema'
      xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
      elementFormDefault='qualified'>
    </xs:schema>
  </wsdl:types>
  <xs:element name='MyRemote.Transact' type='ns:MyRemote.Transact'/>
  <xs:complexType name="MyRemote.Transact'>
  	<xs:sequence>
  		<xs:element name='userid' type='xs:string'/>
  		<xs:element name='password' type='xs:string'/>
  		<xs:element name='paramstr' type='xs:string'/>
  	</xs:sequence>
  </xs:complexType>
  <xs:element name='MyRemote.TransactResponse' type='ns1:MyRemote.TransactResponse' />
  <xs:complexType name='MyRemote.TransactResponse'>
  	<xs:sequence>
  		<xs:element name='Result' type='xs:string'/>
  		<xs:element name='paramstr' type='xs:string'/>
  	</xs:sequence>
  </xs:complexType>
  <xs:element name='MyRemote.getversion' type='ns2:MyRemote.getversion'/>
  <xs:complexType>
  	<xs:sequence>
  	</xs:sequence>
  </xs:complexType>
  <xs:element name='MyRemote.getversionResponse' type='ns3:MyRemote.getversionResponse'/>
  <xs:complexType>
  	<xs:sequence>
  		<xsd:element name='Result' type='xs:string'/>
  	</xs:sequence>
  </xs:complexType>
  <wsdl:message name='MyRemote.Transact'>
    <wsdl:part name='userid' element='ns0:MyRemote.Transact'/>
    <wsdl:part name='password' element='ns1:MyRemote.Transact'/>
    <wsdl:part name='paramstr' element='ns2:MyRemote.Transact'/>
  </wsdl:message>
  <wsdl:message name='MyRemote.TransactResponse'>
    <wsdl:part name='Result' type='ns3:MyRemote.TransactResponse'/>
    <wsdl:part name='paramstr' type='ns4:MyRemote.TransactResponse'/>
  </wsdl:message>
  <wsdl:message name='MyRemote.getversion'>
  </wsdl:message>
  <wsdl:message name='MyRemote.getversionResponse'>
    <wsdl:part name='Result' type='ns3:MyRemote.getversionResponse'/>
  </wsdl:message>
  <wsdl:portType name='MyRemoteSoapPort'>
    <wsdl:operation name='Transact' parameterOrder='userid password paramstr'>
      <wsdl:input message='MyRemote.Transact' />
      <wsdl:output message='wsdlns:MyRemote.TransactResponse' />
    </wsdl:operation>
    <wsdl:operation name='getversion' parameterOrder=''>
      <wsdl:input message='wsdlns:MyRemote.getversion' />
      <wsdl:output message='wsdlns:MyRemote.getversionResponse' />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name='MyRemoteSoapBinding' type='wsdlns:MyRemoteSoapPort' >
    <stk:binding/>
    <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http' />
    <wsdl:operation name='Transact' >
      <soap:operation soapAction='http://service.myremote.my/action/MyRemote.Transact' />
      <wsdl:input>
        <soap:body use='literal' namespace='http://service.myremote.my/message/' />
      </wsdl:input>
      <wsdl:output>
        <soap:body use='literal' namespace='http://service.myremote.my/message/'/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name='getversion' >
      <soap:operation soapAction='http://service.myremote.my/action/MyRemote.getversion' />
      <wsdl:input>
        <soap:body use='literal'/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use='literal'/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name='MyRemote' >
    <wsdl:port name='MyRemoteSoapPort' binding='wsdlns:MyRemoteSoapBinding' >
      <soap:address location='http://localhost:8080/axis/services/MyRemote.wsdl' />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>



Anne Thomas Manes wrote ..
> David,
> 
> I just Googled looking for an automated converter utility, but no
> luck. I think you'll have to do the conversions by hand. As a general
> rule, I strongly recommend that you convert your WSDL to wrapped
> document/literal.
> 
> Here are the basic rules:
> 
> 1 - Convert your input and output parameters to explicitly defined
> schema elements. The name of an input element should be the same as
> the operation name. The name of an output element should be a
> concatenation of the operation name and "Response". For example, for
> an operation called myOperation, with the following message
> descriptions:
> 
>         <w:message name="myOperationRequest">
>            <w:part name="param1" type="x:string"/>
>            <w:part name="param2" type="x:int"/>
>         </w:message>
> 
>         <w:message name="myOperationResponse"
>            <w:part name="return" type="x:string"/>
>         </w:message>
> 
> Write the following schema definition:
> 
>         <x:element name="myOperation" type="tns:myOperation"/>
>         <x:complexType name="myOperation">
>            <x:sequence>
>                <x:element name="param1" type="x:string"/>
>                <x:element name="param2" type="x:int"/>
>            </x:sequence>
>          <x:complexType>
> 
>         <x:element name="myOperationResponse" type="tns:myOperationResponse"/>
>         <x:complexType name="myOperationResponse">
>            <x:sequence>
>                <x:element name="return" type="x:string"/>
>            </x:sequence>
>          <x:complexType>
> 
> And change the message definitions to:
> 
>         <w:message name="myOperationRequest">
>            <w:part name="parameters" element="tns:myOperation"/>
>         </w:message>
> 
>         <w:message name="myOperationResponse"
>            <w:part name="parameters" element="tns:myOperationResponse"/>
>         </w:message>
> 
> 2. Make the following changes to the <w:binding> definitions:
> 
> Wherever it says style="rpc", change it to style="document". (This
> could be in the <soap:binding> or the <soap:operation> definitions.
> 
> Wherever it says use="encoded", change it to use="literal". (This will
> be in all <soap:body>, <soap:header>, <soap:fault>, and
> <soap:headerfault> definitions.). Likewise, in all these definitions,
> remove all encodingStyle and namespace attributes.
> 
> e.g., the <soap:body> definition should look like this:
> 
>          <soap:body use="literal"/>
> 
> That's it. Tedious, but relatively straightforward.
> 
> Anne
> 
> 
> On 7/19/07, david <da...@davidwbrown.name> wrote:
> > Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET client
> generated WSDL (rpc-encoded). I want to convert this WSDL to either: rpc-literal
> or document-literal such that I can run Axis2 wsdl2java and generate an
> Axis2 service. Currently, this service is running as Axis1.4 and I would
> appreciate very much any and all ideas and suggestions as to how to migrate
> to Axis2. I know the Axis2 wsdl2java does not support rpc-encoded. I read
> Ann Manes blog about converting wsdls but I am not sure if this can be
> extended to rpc-encoded. I am secretly hoping Ann Manes will reply but
> any and all rants and raves welcomed. I can reply with the target wsdl
> in question. Please advise, David.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by Anne Thomas Manes <at...@gmail.com>.
David,

I just Googled looking for an automated converter utility, but no
luck. I think you'll have to do the conversions by hand. As a general
rule, I strongly recommend that you convert your WSDL to wrapped
document/literal.

Here are the basic rules:

1 - Convert your input and output parameters to explicitly defined
schema elements. The name of an input element should be the same as
the operation name. The name of an output element should be a
concatenation of the operation name and "Response". For example, for
an operation called myOperation, with the following message
descriptions:

        <w:message name="myOperationRequest">
           <w:part name="param1" type="x:string"/>
           <w:part name="param2" type="x:int"/>
        </w:message>

        <w:message name="myOperationResponse"
           <w:part name="return" type="x:string"/>
        </w:message>

Write the following schema definition:

        <x:element name="myOperation" type="tns:myOperation"/>
        <x:complexType name="myOperation">
           <x:sequence>
               <x:element name="param1" type="x:string"/>
               <x:element name="param2" type="x:int"/>
           </x:sequence>
         <x:complexType>

        <x:element name="myOperationResponse" type="tns:myOperationResponse"/>
        <x:complexType name="myOperationResponse">
           <x:sequence>
               <x:element name="return" type="x:string"/>
           </x:sequence>
         <x:complexType>

And change the message definitions to:

        <w:message name="myOperationRequest">
           <w:part name="parameters" element="tns:myOperation"/>
        </w:message>

        <w:message name="myOperationResponse"
           <w:part name="parameters" element="tns:myOperationResponse"/>
        </w:message>

2. Make the following changes to the <w:binding> definitions:

Wherever it says style="rpc", change it to style="document". (This
could be in the <soap:binding> or the <soap:operation> definitions.

Wherever it says use="encoded", change it to use="literal". (This will
be in all <soap:body>, <soap:header>, <soap:fault>, and
<soap:headerfault> definitions.). Likewise, in all these definitions,
remove all encodingStyle and namespace attributes.

e.g., the <soap:body> definition should look like this:

         <soap:body use="literal"/>

That's it. Tedious, but relatively straightforward.

Anne


On 7/19/07, david <da...@davidwbrown.name> wrote:
> Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET client generated WSDL (rpc-encoded). I want to convert this WSDL to either: rpc-literal or document-literal such that I can run Axis2 wsdl2java and generate an Axis2 service. Currently, this service is running as Axis1.4 and I would appreciate very much any and all ideas and suggestions as to how to migrate to Axis2. I know the Axis2 wsdl2java does not support rpc-encoded. I read Ann Manes blog about converting wsdls but I am not sure if this can be extended to rpc-encoded. I am secretly hoping Ann Manes will reply but any and all rants and raves welcomed. I can reply with the target wsdl in question. Please advise, David.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: rpc-encoded vs rpc-literal vs document-literal migrate Axis1.4 wsdl (rpc-encoded) to Axis2 doc-lit

Posted by Jorge Fernandez <in...@yahoo.es>.
Hi David,

I found this article very useful. Maybe it can help you:

http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl/

Regards,

Jorge Fernández



david <da...@davidwbrown.name> escribió: Hello Ann and all the Axis2/wsdl gurus and users, I have a .NET client generated WSDL (rpc-encoded). I want to convert this WSDL to either: rpc-literal or document-literal such that I can run Axis2 wsdl2java and generate an Axis2 service. Currently, this service is running as Axis1.4 and I would appreciate very much any and all ideas and suggestions as to how to migrate to Axis2. I know the Axis2 wsdl2java does not support rpc-encoded. I read Ann Manes blog about converting wsdls but I am not sure if this can be extended to rpc-encoded. I am secretly hoping Ann Manes will reply but any and all rants and raves welcomed. I can reply with the target wsdl in question. Please advise, David.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



       
---------------------------------

Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.