Stefan,

There were a number of reasons why the Axis2 team decided not to
implement support for SOAP encoding:

1- it's prohibited by WS-I Basic Profile
2- SOAP encoding is an optional feature in SOAP 1.2
3- It would have been a ton of work to implement support for a feature
that is being deprecated by the standards community.
4- There are still tons of other more useful features to be
implemented that have a higher priority.

If you need to maintain use of SOAP encoding, you should stick with Axis 1.x.

If you want to migrate to Axis2, you will have to convert the service
to either document/literal or rpc/literal.

The easier conversion is to rpc/literal, but I advise against that,
because there are still many environments that don't support it
(especially .Net 1.x). To convert to rpc/literal, simply change all
instances of use="encoded" to use="literal" and remove the
encodingStyle attribute from the bindings. You should also review all
your type definitions, and convert any soap encoding types to schema
types (e.g., type="soapenc:string" to type="xsd:string"), and convert
all soap encoding arrays to simple XSD arrays defined using
maxOccurs="unbounded".

The conversion to document/literal requires the following:
- change style="rpc" to style="document"
- change use="encoded" to use="literal"
- remove the namespace and encodingStyle attributes from the bindings
- define wrapper elements for all your input and output message
parameters. Input message elements should be given the same name as
the operation. Output message elements should be given a name in the
form of <methodName>Response. Each element should be defined as a
sequence containing elements of the types you've currently defined as
your message parts.
- remove all your current message parts and replace them with a single
message part referencing your newly defined wrapper elements.

For example:

Current message description:

<w:message name="fooMethodRequest">
 <w:part name="foo1" type="s:string"/>
 <w:part name="foo2" type="s:int"/>
</w:message>

Should be change to this:

<w:types>
 <s:schema targetNamespace="urn:foo:types"
     xmlns:ns1="urn:foo:types">
     <s:element name="fooMethod">
        <s:complexType>
           <s:sequence>
              <s:element name="foo1" type="s:string"/>
              <s:element name="foo2" type="s:int"/>
           </s:sequence>
        </s:complexType>
      </s:element>
   </s:schema>
</w:types>
<w:message name="fooMethodRequest>
  <w:part name="parameters" element="ns1:fooMethod"/>
</w:message>

Anne


On 5/3/07, stefan_dragnev <[EMAIL PROTECTED]> wrote:

Dims,

I'm sure the wsdl uses rpc/encoded because it contains the following
section:

<binding name="WebServiceSoap" type="s0:WebServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>
    <operation name="UpdateCategoriesReq">
      <soap:operation
soapAction="http://www.openuri.org/UpdateCategoriesReq"; style="rpc"/>
      <input>
        <soap:body use="encoded" namespace="http://www.openuri.org/";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body use="encoded" namespace="http://www.openuri.org/";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    <operation name="BPDataReq">
      <soap:operation soapAction="http://www.openuri.org/BPDataReq";
style="rpc"/>
      <input>
        <soap:body use="encoded" namespace="http://www.openuri.org/";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body use="encoded" namespace="http://www.openuri.org/";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
......
</binding>

I know that rpc/encoded is not supported in WS-I basic profile but this WSDL
was developed some time ago and is used in production so I'm not sure
whether I will be allowed to modify. If I'm allowed to modify it what will
be the best way to do it so Axis2 1.2's wsdl2java will not throw errors?

Thanks.
Stefan


>I believe we are throwing better exceptions now...if you post the wsdl
>in a bug report, we can take a look to confirm that it is indeed an
>rpc/encoded wsdl which we don't support.
>
>thanks,
>dims

--
View this message in context: 
http://www.nabble.com/WSDL2Java%3A-WSDLProcessingException%3A-Encoded-use-is-not-supported--tf3678548.html#a10312820
Sent from the Axis - User mailing list archive at Nabble.com.


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