]
Darran Lofthouse updated JBWS-1079:
-----------------------------------
JBoss Forum Reference:
Incorrect WSDL to Java mapping for anonymous struct.
----------------------------------------------------
Key: JBWS-1079
URL:
http://jira.jboss.com/jira/browse/JBWS-1079
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: wstools
Affects Versions: jbossws-1.0.0, jbossws-1.0.1
Reporter: Darran Lofthouse
Assigned To: Darran Lofthouse
Fix For: jbossws-1.0.4
When running wsdl to java for a wsdl that contains a complex type that contains an
anonymous struct the class generated for the anonymous struct is incorrect.
<xsd:complexType name="Person">
<xsd:sequence>
<xsd:element name="Address">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Address1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
The above example would generate an class with the name 'PersonAddress'.
From the jax-rpc specification (section 4.2.3) : -
" An XML struct maps to a JavaBeans class with the same name as the type of the XML
struct. If the struct is anonymous, then the name of the nearest enclosing xsd:element,
xsd:complexType or xsd:simpleType is used instead."
So the name of the generated type should be Address.
The generation of the jaxrpc-mapping actually does assume the generated class was
generated with the name 'Address' so the code generation and jaxrpc-mapping
generation are out of synch.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: