axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1191) Incorrect mapping of local elements with minOccurs="0" maxOccurs="1"
Date Tue, 27 Jul 2004 08:30:17 GMT
The following comment has been added to this issue:

     Author: Andrei Iltchenko
    Created: Tue, 27 Jul 2004 1:28 AM
       Body:
Davanum,

Sorry, I didn't notice your question. I'll try to write a patch and a test case by Monday
(2-nd August) next week.

Regards,
Andrei.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1191?page=comments#action_36885

---------------------------------------------------------------------
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, 27 Jul 2004 1:28 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


Mime
View raw message