Encoded use is not supported incorrect when
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" in wsdl
----------------------------------------------------------------------------------------------------------
Key: AXIS2-3587
URL: https://issues.apache.org/jira/browse/AXIS2-3587
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: codegen
Affects Versions: 1.3
Environment: J2SE 1.5
Reporter: Martin Gainty
contents of Scott.wsdl
<wsdl:definitions
targetNamespace="http://localhost:8089/infoSERVER/services/SearchProcessor"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:8089/infoSERVER/services/SearchProcessor"
xmlns:intf="http://localhost:8089/infoSERVER/services/SearchProcessor"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="urn:BeanService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="urn:BeanService"
xmlns="http://www.w3.org/2001/XMLSchema">
<import
namespace="http://localhost:8089/infoSERVER/services/SearchProcessor"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="TTopicPart">
<sequence>
<element name="Value" nillable="true" type="xsd:string"/>
</sequence>
<attribute name="Name" type="xsd:string"/>
</complexType>
<complexType name="Search">
<sequence>
<element name="Reports" nillable="true" type="xsd:string"/>
<element name="Item" nillable="true" type="impl:ArrayOf_tns1_TTopicPart"/>
<element name="Formats" nillable="true" type="xsd:string"/>
<element name="DateFrom" nillable="true" type="xsd:dateTime"/>
<element name="DateTo" nillable="true" type="xsd:dateTime"/>
</sequence>
</complexType>
<complexType name="TTopic">
<sequence>
<element name="item" nillable="true" type="impl:ArrayOf_tns1_TTopicPart"/>
</sequence>
<attribute name="Reference" type="xsd:int"/>
</complexType>
<complexType name="TReport">
<sequence>
<element name="ReportID" nillable="true" type="xsd:string"/>
<element name="Title" nillable="true" type="xsd:string"/>
<element name="Path" nillable="true" type="xsd:string"/>
<element name="DateTime" nillable="true" type="xsd:dateTime"/>
<element name="Topics" nillable="true" type="impl:ArrayOf_tns1_TTopic"/>
</sequence>
<attribute name="FileID" type="xsd:int"/>
</complexType>
</schema>
<schema
targetNamespace="http://localhost:8089/infoSERVER/services/SearchProcessor"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="urn:BeanService"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOf_tns1_TTopicPart">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:TTopicPart[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOf_tns1_Search">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Search[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOf_tns1_TTopic">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:TTopic[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOf_tns1_TReport">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:TReport[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="searchResponse">
<wsdl:part name="searchReturn" type="impl:ArrayOf_tns1_TReport"/>
</wsdl:message>
<wsdl:message name="searchRequest">
<wsdl:part name="searchFilter" type="impl:ArrayOf_tns1_Search"/>
</wsdl:message>
<wsdl:portType name="BeanService">
<wsdl:operation name="search" parameterOrder="searchFilter">
<wsdl:input message="impl:searchRequest" name="searchRequest"/>
<wsdl:output message="impl:searchResponse" name="searchResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SearchProcessorSoapBinding" type="impl:BeanService">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="search">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="searchRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://xenos2.samples" use="encoded"/>
</wsdl:input>
<wsdl:output name="searchResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8089/infoSERVER/services/SearchProcessor"
use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BeanServiceService">
<wsdl:port binding="impl:SearchProcessorSoapBinding"
name="SearchProcessor">
<wsdlsoap:address
location="http://localhost:8089/infoSERVER/services/SearchProcessor"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
wsdl2Java -uri Scott.wsdl
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:147)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: Encoded use is not supported
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.java contents:
private List getPartsListFromSoapBody(List extensibilityElements) {
List partsList = null;
ExtensibilityElement extElement;
for (Iterator iter = extensibilityElements.iterator(); iter.hasNext();)
{
extElement = (ExtensibilityElement) iter.next();
// SOAP 1.1 body element found!
if (extElement instanceof SOAPBody) {
SOAPBody soapBody = (SOAPBody) extElement;
if ((soapBody.getUse() != null) &&
(soapBody.getUse().equals(ENCODED_USE))) {
throw new WSDLProcessingException("Encoded use is not
supported"); //????????????
}
partsList = soapBody.getParts();
} else if (extElement instanceof SOAP12Body) {
SOAP12Body soapBody = (SOAP12Body) extElement;
if ((soapBody.getUse() != null) &&
(soapBody.getUse().equals(ENCODED_USE))) {
throw new WSDLProcessingException("Encoded use is not
supported"); //makes sense
}
Take a look at the line with the comment with the question marks
Martin
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]