[jbossws-issues] [JBoss JIRA] Commented: (JBWS-1079) Incorrect WSDL to Java mapping for anonymous struct.
Darran Lofthouse (JIRA)
jira-events at jboss.com
Sun Nov 5 08:40:41 EST 2006
[ http://jira.jboss.com/jira/browse/JBWS-1079?page=comments#action_12346291 ]
Darran Lofthouse commented on JBWS-1079:
----------------------------------------
Test case and fix in branch https://svn.jboss.org/repos/jbossws/branches/dlofthouse/JBWS-1079
As we have the jaxrpc mapping we do not need to use a specific naming convention of the generated classes, we just need to make sure the name of the generated classes are in synch with the generated jaxrpc-mapping.
The fix keeps the current implementation of concatenating the enclosing names as this reduces the chance of naming conflicts, the jaxrpc mapping generation now matches this.
> 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.1, jbossws-1.0.0
> Reporter: Darran Lofthouse
> Assigned To: Darran Lofthouse
> Fix For: jbossws-1.0.5
>
>
> 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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossws-issues
mailing list