axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Perham" <Mike.Per...@webifysolutions.com>
Subject RE: why oh why - soapenc & minOccurs -- some resolution!
Date Thu, 04 Sep 2003 17:10:22 GMT
JAX-RPC says that an xsd:int should be treated as a Java int.  However,
since you specified that it is optional, it must be nullable which
requires a Java Integer.  I believe the code is trying to use the
soapenc:int type since that maps to an Integer.  Instead, try using an
xsd:integer which maps to a nullable type.

-----Original Message-----
From: Cory Wilkerson [mailto:cwilkerson@travelnow.com] 
Sent: Thursday, September 04, 2003 11:39 AM
To: axis-user@ws.apache.org
Subject: RE: why oh why - soapenc & minOccurs -- some resolution!


Anne,

I should have clarified, it was meant to represent rpc/literal.  I guess
it all boils down to whether or not the minOccurs attribute should have
an affect on  how a type is interpreted.  If I've specified the type as
xsd:int with minOccurs=0, is it valid for a toolkit to make the
assumption that, since it could be absent from the payload (and by
extension, nillable???), it has to be represented as soapenc:int?

Thanks for all your help,
Cory



-----Original Message-----
From: Anne Thomas Manes [mailto:anne@manes.net]
Sent: Thursday, September 04, 2003 10:30 AM
To: axis-user@ws.apache.org
Subject: RE: why oh why - soapenc & minOccurs -- some resolution!


A doc/literal schema should not use use soap encoding data types.

Anne

At 08:40 AM 9/4/2003 -0500, you wrote:
>I'm kind of hoping that someone will back me up and confirm that this 
>*is*
>a bug.
>
>Cory
>
>-----Original Message-----
>From: Mike Perham [mailto:Mike.Perham@webifysolutions.com]
>Sent: Thursday, September 04, 2003 8:35 AM
>To: axis-user@ws.apache.org
>Subject: RE: why oh why - soapenc & minOccurs -- some resolution!
>
>
>Cory, don't forget to enter a bug or this will just get lost...
>
>-----Original Message-----
>From: Cory Wilkerson [mailto:cwilkerson@travelnow.com]
>Sent: Wednesday, September 03, 2003 10:28 PM
>To: axis-user@xml.apache.org
>Subject: FW: why oh why - soapenc & minOccurs -- some resolution!
>
>
>Make that org.apache.axis.wsdl.symbolTable.Utils
>
>-----Original Message-----
>From: Cory Wilkerson
>Sent: Wednesday, September 03, 2003 10:26 PM
>To: axis-user@xml.apache.org
>Subject: RE: why oh why - soapenc & minOccurs -- some resolution!
>
>
>Aha -- because if the minOccurs attribute = 0, then Axis replaces the 
>qname that woulda been "xsd:int" (where xsd =
>http://www.w3.org/2001/XMLSchema) with "soapenc:int" (where soapenc = 
>http://schemas.xmlsoap.org/soap/encoding/).  This all takes place in 
>org.apache.axis.wsdl.symbolTable#getNillableQName -- it appears that 
>the Axis developers are coupling the concept of nillable and minOccurs 
>= 0 as per this comment from the source:
>
>                     // If we have a minoccurs="0"/maxoccurs="1", this 
>is just
>                     // like a nillable single value, so treat it as 
>such.
>
>I don't mean to drag everyone into this, but is that correct?  If the 
>thing *doesn't* occur, I suppose it could be represented as xs:nil, 
>but, seeing as how Axis is generating this from WSDL that clearly 
>states the type is of type "xsd:int" -- I don't think the the toolkit 
>should be making judgments as to whether or not it can swap in/out 
>namespaces. After all, the server side will most likely be expecting to

>see a value from the xsd namespace.
>
>The issue gets further muddied when you consider that the soapenc's
>(http://schemas.xmlsoap.org/soap/encoding/.) representation of int is 
>just a restriction on xsd's int (http://www.w3.org/2001/XMLSchema).
>
>I guess this is one of the reasons the ws-i people put their collective

>foot down. Cory
>
>
>-----Original Message-----
>From: Cory Wilkerson [mailto:cwilkerson@travelnow.com]
>Sent: Wednesday, September 03, 2003 5:20 PM
>To: axis-user@xml.apache.org
>Subject: why oh why - soapenc & minOccurs
>
>
>All,
>
>Does anyone have any input as to why, when given schema such as the
>following:
>
><wsdl:types>
>         <xsd:schema targetNamespace="http://www.foo.com"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>                 <xsd:element name="foo">
>                         <xsd:complexType>
>                                 <xsd:sequence>
>                                         <xsd:element name="bar" 
>type="xsd:int" minOccurs="0"/>
>                                 </xsd:sequence>
>                         </xsd:complexType>
>                 </xsd:element>
>         </xsd:schema>
><wsdl:types>
>
>WSDL2Java generates code that indicates that bar is of type "int" as 
>defined in the "http://schemas.xmlsoap.org/soap/encoding/" namespace?  
>I am bewildered.  If I remove the minOccurs attribute, Axis will 
>generate the correct stub.
>
>Sorry for a quasi-repost -- perhaps I didn't phrase my original issue 
>well or no one knew the answer ;).
>
>Thanks,
>Cory Wilkerson


Mime
View raw message