Wrongful Java Code Generation - when using union in simple types.
-----------------------------------------------------------------
Key: AXIS-2516
URL: http://issues.apache.org/jira/browse/AXIS-2516
Project: Apache Axis
Type: Bug
Components: WSDL processing
Versions: 1.4
Environment: Windows XP, JDK1.4, Axis 1.4
Reporter: Uffe Heerfordt
Hi,
I have found a problem when having attributes containing simple types using
union.
Current Output
2 classes are generated TestType and TestAttribute(an empty class)
Expected Output
1 class called TestType containg a String called testAttribute
I have created a test WSDL to recreate my problem.:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:y="http://test.wsdl"
xmlns:types="http://test.wsdl/types" targetNamespace="http://test.wsdl">
<wsdl:types>
<xs:schema>
<xs:complexType name="testType">
<xs:sequence>
<xs:element name="testElement"
type="xs:normalizedString"/>
</xs:sequence>
<xs:attribute name="testAttribute"
type="y:testAttribute"/>
</xs:complexType>
<xs:simpleType name="testAttribute">
<xs:annotation>
<xs:documentation xml:lang="en">Identifies a identifier
(1 to 4 numbers followed by optional uppercase A - Z, which specifies an
operational suffix) or OPEN or ARNK.</xs:documentation>
</xs:annotation>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,4}[A-Z]?"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="OPEN">
<xs:annotation>
<xs:documentation
xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ARNK">
<xs:annotation>
<xs:documentation
xml:lang="en">Us</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:element name="testAction">
<xs:complexType>
<xs:sequence>
<xs:element name="testParam"
type="y:testType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="testActionResp">
<xs:complexType>
<xs:sequence>
<xs:element name="testResp"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="testActionRequest">
<wsdl:part name="parameters" element="y:testAction"/>
</wsdl:message>
<wsdl:message name="testActionResponse">
<wsdl:part name="parameters" element="y:testActionResp"/>
</wsdl:message>
<wsdl:portType name="testPortType">
<wsdl:operation name="testAction">
<wsdl:input message="y:testActionRequest"/>
<wsdl:output message="y:testActionResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testSoapBinding" type="y:testPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="testAction">
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="testService">
<wsdl:port name="testPort" binding="y:testSoapBinding">
<soap:address
location="http://localhost:8080/axis/services/testPort"/>
</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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]