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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to