axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samuel (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (AXIS2-4108) WSDL2Java: minOccurs="0" on primitive types doesn't work properly
Date Fri, 31 Oct 2008 09:50:44 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644252#action_12644252
] 

samlemarnais edited comment on AXIS2-4108 at 10/31/08 2:50 AM:
---------------------------------------------------------

With this AXIS2 Standard Binary Distribution version :
Apache Axis2 1.4.1 build (13-08-2008) 

Downloaded here :
http://ws.apache.org/axis2/download/1_4_1/download.cgi

The wsdl2java's argument "-uwc" is not recognized...

      was (Author: samlemarnais):
    With this AXIS2 version (found in "README.txt" and "release-notes.html") :
Apache Axis2 1.4.1 build (13-08-2008) 

Downloaded here :
http://ws.apache.org/axis2/download/1_4_1/download.cgi

The wsdl2java's argument "-uwc" is not recognied...
  
> WSDL2Java: minOccurs="0" on primitive types doesn't work properly
> -----------------------------------------------------------------
>
>                 Key: AXIS2-4108
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4108
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4.1
>         Environment: Windows XP
> Eclipse Version: 3.3.2 Build id: M20080221-1800
> Apache Axis2 1.4.1 build  (13-08-2008)
>            Reporter: Samuel
>            Priority: Critical
>
> When I'm generating Java classes with wsdl2java (using eclipse WTP plugin) from this
part of xsd :
> -----------------------------------------------------------------------------
> 	<xsd:complexType name="Frids_GetFundInType">
> 		<xsd:sequence>
> 			<xsd:element maxOccurs="1" minOccurs="0"
> 				name="fund_id"
> 				type="xsd:int">
> 			</xsd:element>
> 		</xsd:sequence>
> 	</xsd:complexType>
> -----------------------------------------------------------------------------
> I'm getting an int variable that can not be set to null.
> In the class "Frids_GetFundInType" (generated by wsdl2java), I see this :
> -----------------------------------------------------------------------------
> 	/**
> 	 * Auto generated getter method
> 	 * 
> 	 * @return int
> 	 */
> 	public int getId() {
> 		return localId;
> 	}
> 	/**
> 	 * Auto generated setter method
> 	 * 
> 	 * @param param
> 	 *            Id
> 	 */
> 	public void setId(int param) {
> 		// setting primitive attribute tracker to true
> 		if (param == java.lang.Integer.MIN_VALUE) {
> 			localIdTracker = false;
> 		} else {
> 			localIdTracker = true;
> 		}
> 		this.localId = param;
> 	}
> -----------------------------------------------------------------------------
> So, if I correctly understand the code :
> - If a client set a value equal to "Integer.MIN_VALUE", my server will think that he
didn't set this field.
> - I can not check if this field is null or not : 
> -----------------------------------------------------------------------------
> I can not write if (myVariable.fund_id == null){
>  then...
> }
> -----------------------------------------------------------------------------
> as an int can not be null, and the xxxTracker variable is protected...
> I seen a similar bug marked as fixed but I've download the last release 2 days ago and
this samples are from this version...
> If it's really fixed, can you tell me how can I have the good version (and its number)
and what do I have to do (is it automatically corrected ?)
> Thanks

-- 
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


Mime
View raw message