You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ji...@apache.org on 2004/04/12 14:30:43 UTC
[jira] Closed: (AXIS-444) WSDL2Java creating invalid bean when using ref attribute
Message:
The following issue has been closed.
Resolver: Davanum Srinivas
Date: Mon, 12 Apr 2004 5:30 AM
Closing as per prev comment.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-444
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-444
Summary: WSDL2Java creating invalid bean when using ref attribute
Type: Bug
Status: Closed
Resolution: FIXED
Project: Axis
Components:
WSDL processing
Versions:
1.0
Assignee:
Reporter: Mark Stiver
Created: Thu, 17 Oct 2002 3:33 PM
Updated: Mon, 12 Apr 2004 5:30 AM
Environment: Operating System: Other
Platform: All
Description:
Given the following schema fragment:
<complexType name="MyMessage">
<sequence>
<element ref="foo:MyElement" />
<element name="otherStuff" type="string" />
</sequence>
</complexType>
...where foo.xsd contains:
<element name="MyElement" type="tns:MyElementType" />
<complexType name="MyElementType">
<all>
<element name="a" type="string" />
<element name="b" type="string" />
</all>
</complexType>
...WSDL2Java generates the MyMessage.java bean class as follows:
...etc...
static {
org.apache.axis.description.FieldDesc field = new
org.apache.axis.description.ElementDesc();
field.setFieldName("myElement");
field.setXmlName(new javax.xml.namespace.QName
("http://foo.com", "MyElement"));
field.setXmlType(new javax.xml.namespace.QName
("http://foo.com", "MyElement"));
typeDesc.addFieldDesc(field);
...etc...
However, the XmlType should have been associated with "MyElementType" as is
reflected in the server-config.wsdd file:
...etc...
<typeMapping
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="" qname="ns6:MyElementType"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
type="java:com.foo.MyElementType" xmlns:ns6="http://foo.com"/>
...etc...
Since the MyMessage bean incorrectly maps MyElement to a non-existent type
(i.e. MyElement), the axis engine uses a SimpleDeserializer, which throws an
exception when it encounters the <a> sub-element in an incoming message.
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira