WSDL2Java NOT map nillable type to wrapper class
------------------------------------------------

         Key: AXIS-2452
         URL: http://issues.apache.org/jira/browse/AXIS-2452
     Project: Apache Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.3    
 Environment: Linux plutonium 2.6.13-1.1532_FC4 #1 Thu Oct 20 01:30:08 EDT 2005 
i686 i686 i386 GNU/Linux

java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)

    Reporter: edward fan


wsdl code sample:
/*************************************************************************/
      <element name="addEClassifiedProductToCategory">
        <complexType>
          <sequence>
            <element name="siteinfo" type="impl:SiteInfoType"/>
            <element name="productid" type="xsd:int"/>
            <element name="categoryid" type="xsd:int"/>
            <element name="packageid" type="xsd:int" nillable="true"/>
          </sequence>
        </complexType>
      </element>
/*************************************************************************/

Expected result: map "packageid" to Java "Integer" class
[as described in the user-guide:
If the WSDL says that an object can be nillable, that is the caller may choose 
to return a value of nil, then the primitive data types are replaced by their 
wrapper classes, such as Byte, Double, Boolean, etc.
http://ws.apache.org/axis/java/user-guide.html#HowYourJavaTypesMapToSOAPXMLTypes
]

Actual result: WSDL2Java always maps "packageid" to primitive type "int"
/*********************************************************************************/
public void 
addEClassifiedProductToCategory(com.cityxpress.external.SiteInfoType siteinfo, 
int productid, int categoryid, int packageid) throws java.rmi.RemoteException, 
com.cityxpress.external.CXFaultType;
/*********************************************************************************/


-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to