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 ax...@ws.apache.org on 2004/08/03 17:21:20 UTC
[jira] Updated: (AXIS-1191) Incorrect mapping of local elements with minOccurs="0" maxOccurs="1"
The following issue has been updated:
Updater: Andrei Iltchenko (mailto:andrei.iltchenko@nl.compuware.com)
Date: Tue, 3 Aug 2004 8:20 AM
Comment:
The promised patch for the problem.
Changes:
Attachment changed to diff_1191.txt
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/AXIS-1191?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1191
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1191
Summary: Incorrect mapping of local elements with minOccurs="0" maxOccurs="1"
Type: Bug
Status: Open
Project: Axis
Components:
WSDL processing
Versions:
1.1
Assignee: Axis Developers Mailing List
Reporter: Andrei Iltchenko
Created: Fri, 16 Jan 2004 10:13 AM
Updated: Tue, 3 Aug 2004 8:20 AM
Environment: Operating System: Other
Platform: Other
Description:
The current version of JAX-RPC says:
There are a number of cases in which a built-in simple XML data type must be
mapped to the corresponding Java wrapper class for the Java primitiv type:
* an element declaration with the nillable attribute set to true
* an element declaration with the minOccurs attribute set to 0 (zero)
and the maxOccurs attribute set to 1 (one)or absent;
* an attribute declaration with the use attribute set to optional or
absent and carrying neither the default nor the fixed attribute;
However, this doesn't seem to be the approach that Axis takes. When the global
element "DoExample" is referenced, WSDL2Java maps the local element "value2" to
the primitive type long, instead of mapping it to java.lang.Long, as it should
be.
<element name="out" type="xsd:long"/>
<element name="DoExample">
<complexType>
<sequence>
<element name="value1" nillable="true" maxOccurs="unbounded"
type="xsd:base64Binary"/>
<element name="value2" minOccurs="0" maxOccurs="1"
ref="typens:out"/>
</sequence>
</complexType>
</element>
When the attached wsdl document is fed to WSDL2Java, the following service
endpoint interface is generated:
public interface ExampleSoap extends java.rmi.Remote {
public void doExample(byte[][] value1,
long out,
javax.xml.rpc.holders.ByteArrayHolder ret,
javax.xml.rpc.holders.LongHolder out2)
throws java.rmi.RemoteException;
}
whereas the proper mapping is:
public interface ExampleSoap extends java.rmi.Remote {
public void doExample(byte[][] value1,
java.lang.Long out,
javax.xml.rpc.holders.ByteArrayHolder ret,
javax.xml.rpc.holders.LongWrapperHolder out2)
throws java.rmi.RemoteException;
}
---------------------------------------------------------------------
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