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 "edward fan (JIRA)" <ax...@ws.apache.org> on 2006/03/28 22:27:21 UTC

[jira] Created: (AXIS-2452) WSDL2Java NOT map nillable type to wrapper class

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


[jira] Commented: (AXIS-2452) WSDL2Java NOT map nillable type to wrapper class

Posted by "Madhur Tanwani (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801774#action_12801774 ] 

Madhur Tanwani commented on AXIS-2452:
--------------------------------------

Hello,
I see that this issue has been raised in multiple tickets. Also this bug was fixed in issue http://issues.apache.org/jira/browse/AXIS-1587 in version 1.2, but has returned in 1.4

We are using Axis 1.4 to generate Java stubs and for a WSDL operation parameter entry like this : 
                        <xsd:element maxOccurs="1" minOccurs="1" name="ID" nillable="true" type="xsd:long"/>
the generated Service.java file defines the API parameter "ID" as a "long" and not "Long".

I understand that "minOccurs=0" will solve this case, but that really is not something everyone can control. 
Plus, since Java 1.5 (which was an era ago), defining nillable="true" as wrappers should be correct.

Will it be possible to please expedite the fix for this issue?

--
Madhur Tanwani
http://madhurtanwani.blogspot.com

> WSDL2Java NOT map nillable type to wrapper class
> ------------------------------------------------
>
>                 Key: AXIS-2452
>                 URL: https://issues.apache.org/jira/browse/AXIS-2452
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.3, 1.4
>         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
>         Attachments: wsdl.zip
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS-2452) WSDL2Java NOT map nillable type to wrapper class

Posted by "edward fan (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2452?page=all ]

edward fan updated AXIS-2452:
-----------------------------

    Attachment: wsdl.zip

> 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
>  Attachments: wsdl.zip
>
> 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


[jira] Updated: (AXIS-2452) WSDL2Java NOT map nillable type to wrapper class

Posted by "Adam Crume (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Crume updated AXIS-2452:
-----------------------------

    Affects Version/s: 1.4

I have this issue, too, using Axis 1.4 against a doc/lit web service.

> WSDL2Java NOT map nillable type to wrapper class
> ------------------------------------------------
>
>                 Key: AXIS-2452
>                 URL: https://issues.apache.org/jira/browse/AXIS-2452
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.3, 1.4
>         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
>         Attachments: wsdl.zip
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org