axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heitzeg, Bill" <bill.heitzeg....@sabre.com>
Subject RE: wsdl2java mapping primitives to objects
Date Tue, 17 Feb 2004 16:55:39 GMT
Sekhar,
            
            I'm using 1.2 alpha, so maybe I need to try this with 1.1 as well.  I think what
I'll do is to create a test case using multiple primitives, try it out with 1.1, 1.2 alpha,
and the nightly builds.  If it is indeed a bug, I'll then add it to BugZilla along with my
test case.  Thanks for your help on this.
 
Bill
 
-----Original Message-----
From: Mallipeddi, Sekhar [mailto:smallipeddi@Viewlocity.com]
Sent: Tuesday, February 17, 2004 11:34 AM
To: 'axis-user@ws.apache.org'
Subject: RE: wsdl2java mapping primitives to objects
 
Bill,
    I am using axis 1.1 and it does work for me but for a slightly different case.  The case
I have is <element name="totalCost" nillable="true" type="xsd:double"/> and it maps
to a Double. I do not have a specific case for Integer but was assuming it would work if it
came up.  
 
I also had a case where I was creating a custom type (since axis did not crate it when using
jav2wsdl ) and by mistake I set nillable to true when it should be mapped it primitive int.
 But it did not seem to make a difference and was was working fine with nillable true or false.
 
Hope this helps
 
Sekhar
-----Original Message-----
From: Heitzeg, Bill [mailto:bill.heitzeg.ctr@sabre.com]
Sent: Tuesday, February 17, 2004 10:20 AM
To: axis-user@ws.apache.org
Subject: RE: wsdl2java mapping primitives to objects
Sekhar,
            Based on the documentation, it looks like there is a bug in wsdl2java.  Have you
been able to map a nillable xsd:int to a Java Integer?  Has anyone else?
 
Bill


 
 
Bill Heitzeg
1-734-995-9131
 
-----Original Message-----
From: Mallipeddi, Sekhar [mailto:smallipeddi@Viewlocity.com]
Sent: Tuesday, February 17, 2004 11:13 AM
To: 'axis-user@ws.apache.org'
Subject: RE: wsdl2java mapping primitives to objects
 
Here is the documentation on this from user guide 
---------------------------------------- 
Standard mappings from WSDL to Java 
xsd:base64Binary byte[] 
xsd:boolean boolean 
xsd:byte byte 
xsd:dateTime java.util.Calendar 
xsd:decimal java.math.BigDecimal 
xsd:double double 
xsd:float float 
xsd:hexBinary byte[] 
xsd:int int 
xsd:integer java.math.BigInteger 
xsd:long long 
xsd:QName javax.xml.namespace.QName 
xsd:short short 
xsd:string java.lang.String 
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.
----------------------------------------------- 
This means that the your wsdl is saying that it is actually mapped to Integer. 
Sekhar 
-----Original Message----- 
From: Heitzeg, Bill [ mailto:bill.heitzeg.ctr@sabre.com] 
Sent: Tuesday, February 17, 2004 10:06 AM 
To: axis-user@ws.apache.org 
Subject: RE: wsdl2java mapping primitives to objects 
 
Thanks Matt, 
Unfortunately, the WSDL does specify that the element is nillable, but it is still being mapped
to an int.  In the wsdl the element looks like:  <element name="sailMinLenDays" nillable="true"
type="xsd:int" />
Bill 
Bill Heitzeg 
1-734-995-9131 
 -----Original Message----- 
From:   Matthew Sgarlata [ mailto:sgarlatm@crystalcognition.com] 
Sent:   Tuesday, February 17, 2004 10:42 AM 
To:     axis-user@ws.apache.org 
Subject:        Re: wsdl2java mapping primitives to objects 
I believe that if the WSDL specifies that the field is nillable, then 
xsd:int is mapped to Integer instead of int.  Can you change your WSDL? 
Matt 
----- Original Message ----- 
From: "Heitzeg, Bill" <bill.heitzeg.ctr@sabre.com> 
To: "Axis-User (E-mail)" <axis-user@ws.apache.org> 
Sent: Tuesday, February 17, 2004 10:30 AM 
Subject: wsdl2java mapping primitives to objects 
 
Hi, 
When I generate a client using wsdl2java, xsd:int is mapped to a java int 
type.  I would like it to be mapped to an Integer.  Does anyone know how to 
do this? 
Thanks, 
Bill 
Bill Heitzeg 
1-734-995-9131 





Mime
View raw message