WSDL2Java generates incorrect proxy when you have extension base in schema
--------------------------------------------------------------------------
Key: AXIS-2688
URL: https://issues.apache.org/jira/browse/AXIS-2688
Project: Axis
Issue Type: Bug
Components: WSDL processing
Affects Versions: 1.3, 1.4
Environment: Windows XP, JDK 1.4 Axis 1.3 and 1.4
Reporter: Anand Kasi
Priority: Blocker
When I use wsdl2Java to generate client side proxy, Axis generates the proxy
which is invalid and cannot be compiled. This problem happens everytime there
is an extension and base in schema. We get the schemas and wsdl from a
different company and changing the schemas is not an easy option.
I can generate the proxy just fine with JAX WS and also .NET, but this is a
problem with Axis 1.3 and 1.4.
Find below a simple wsdl file with one service. The generated java file for the
"countryName" element is causing the problem. This seems to happen everytime
there is an extension defined in the wsdl.
<!-- WSDL begin -->
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://webservices.sabre.com/cruise"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://webservices.sabre.com/cruise"
xmlns:intf="http://webservices.sabre.com/cruise"
xmlns:tns1="urn:sailingavailability:datatypes:communications:cruise:sabre:com"
xmlns:tns2="urn:datatypes:communications:cruise:sabre:com"
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://webservices.sabre.com/cruise"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="SailingAvailability">
<complexType>
<sequence>
<element name="in0"
type="tns1:SailingAvailabilityRequest"/>
</sequence>
</complexType>
</element>
<element name="SailingAvailabilityResponse">
<complexType>
<sequence>
<element
name="SailingAvailabilityReturn" type="tns1:SailingAvailabilityResponse"/>
</sequence>
</complexType>
</element>
</schema>
<schema elementFormDefault="qualified"
targetNamespace="urn:sailingavailability:datatypes:communications:cruise:sabre:com"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="SailingAvailabilityRequest">
<sequence>
<element name="reqString"
type="xsd:string"/>
</sequence>
</complexType>
<complexType name="SailingAvailabilityResponse">
<sequence>
<element name="reqString"
type="xsd:string"/>
<element minOccurs="0"
name="CountryName" type="tns1:CountryNameType"/>
</sequence>
</complexType>
<complexType name="CountryNameType">
<simpleContent>
<extension
base="tns1:StringLength0to64">
<attribute name="Code"
type="tns1:ISO3166" use="optional">
</attribute>
</extension>
</simpleContent>
</complexType>
<simpleType name="StringLength0to64">
<restriction base="xsd:string">
<minLength value="0"/>
<maxLength value="64"/>
</restriction>
</simpleType>
<simpleType name="ISO3166">
<restriction base="xsd:string">
<pattern value="[a-zA-Z]{2}"/>
</restriction>
</simpleType>
</schema>
</wsdl:types>
<wsdl:message name="SailingAvailabilityRequest">
<wsdl:part element="impl:SailingAvailability"
name="parameters"/>
</wsdl:message>
<wsdl:message name="SailingAvailabilityResponse">
<wsdl:part element="impl:SailingAvailabilityResponse"
name="parameters"/>
</wsdl:message>
<wsdl:portType name="CruiseCommunicationAPI">
<wsdl:operation name="SailingAvailability">
<wsdl:input message="impl:SailingAvailabilityRequest"
name="SailingAvailabilityRequest"/>
<wsdl:output message="impl:SailingAvailabilityResponse"
name="SailingAvailabilityResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CruiseAPISoapBinding"
type="impl:CruiseCommunicationAPI">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SailingAvailability">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="SailingAvailabilityRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="SailingAvailabilityResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CruiseCommunicationAPIService">
<wsdl:port binding="impl:CruiseAPISoapBinding" name="CruiseAPI">
<wsdlsoap:address
location="http://10.19.65.152:3008/SailAvail/services/CruiseAPI"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
<!-- WSDL End -->
--
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]