WSDL2Java will generate array for exceptions potentially, such as " void
somemethod() throws ExpType[ ] "
---------------------------------------------------------------------------------------------------------
Key: AXIS-2475
URL: http://issues.apache.org/jira/browse/AXIS-2475
Project: Apache Axis
Type: Bug
Components: WSDL processing
Versions: 1.3
Environment: axis 1.3 and 1.4
Reporter: Chelski
even we can use --wrapArrays to avoid this issue, but sometimes I do not want
to wrap parameters and return values to array, but exceptions should be wrapped
at all times.
An example is the WSDL for UDDI v3, if you do not specify --wrapArrays, you
will get java type as below:
public interface UDDI_Inquiry_PortType extends java.rmi.Remote {
public ... find_binding(...) throws api_v3.uddi_org.Result[ ], ...;
...
}
so I think exceptions should always be wrapped in spite of --wrapArrays
The following is an example wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://ens"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://ens"
xmlns:intf="http://ens" 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 elementFormDefault="qualified" targetNamespace="http://ens"
xmlns="http://www.w3.org/2001/XMLSchema">
<simpleType name="bindingKey" >
<element type="xsd:int"/>
</simpleType>
<complexType name="ArrayExceptionType" final="restriction">
<sequence>
<element type="impl:bindingKey" maxOccurs="unbounded"/>
</sequence>
</complexType>
<element name="ArrayException" type="impl:ArrayExceptionType"
final="restriction"/>
<element name="ArrayParam"><complexType><sequence><element
maxOccurs="unbounded" name="in0"
type="xsd:string"/></sequence></complexType></element>
<element name="ArrayParamResponse"><complexType><sequence><element
maxOccurs="unbounded" name="ArrayParamReturn"
type="xsd:string"/></sequence></complexType></element>
</schema>
</wsdl:types>
<wsdl:message name="ArrayParamResponse">
<wsdl:part element="impl:ArrayParamResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="ArrayParamRequest">
<wsdl:part element="impl:ArrayParam" name="parameters"/>
</wsdl:message>
<wsdl:message name="ArrayFault">
<wsdl:part element="impl:ArrayException" name="parameters"/>
</wsdl:message>
<wsdl:portType name="Interface">
<wsdl:operation name="ArrayParam">
<wsdl:input message="impl:ArrayParamRequest" name="ArrayParamRequest"/>
<wsdl:output message="impl:ArrayParamResponse" name="ArrayParamResponse"/>
<wsdl:fault message="impl:ArrayFault" name="fault"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Projects_APSoapBinding" type="impl:Interface">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ArrayParam">
<wsdlsoap:operation soapAction="ArrayParam"/>
<wsdl:input name="ArrayParamRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="ArrayParamResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="fault">
<wsdlsoap:fault use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WIP">
<wsdl:port binding="impl:Projects_APSoapBinding" name="Projects_AP">
<wsdlsoap:address location="http://127.0.0.1/webservice/Projects_AP"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira