I don't mind treating the min=0/max=1 case as a Single java object.

You said that you already check in the code ?

If such a beast were inside a complexType and was omitted on the wire, then
it
would be precisely the same as nillable.  So this would require no changes.
(However to be precise the Axis serialization will need to understand that
a
null value means don't send anything over the wire...)

If such a beast were a parameter to a method and was omitted on the wire,
it seems like the Skeleton would need to know that it was an optional
parameter
in order to do correct method resolution.
So we may need more meta data in the skeleton.  I am in favor of any meta
data in the skeleton that allows us to do more precise resolution.

Do you concur.  No knives necessary :-)

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                       
                                            
                      Tom Jordahl                                                      
                                            
                      <tomj@macromedia.        To:       "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]>                     
                      com>                     cc:                                     
                                            
                                               Subject:  RE: [wsdl2java] combining 
maxOccurs="0" with maxOccurs="1" genera         
                      03/01/2002 09:06          tes      data members as arrays, is 
this normal?                                   
                      AM                                                               
                                            
                      Please respond to                                                
                                            
                      axis-dev                                                         
                                            
                                                                                       
                                            
                                                                                       
                                            




This was discussed at the interop this week.

The consensus seems to be that min=0/max=1 means
the value is 'omittable'.  For certain languages (Java)
this might mean basically the same thing as nillable=true,
but not exactly.  That is on the server side, the function
getting called would get a null argument if the value was
omitted from the XML input.

But no one seemed to think the right thing to do was to treat it as an
array.
I believe Glen (and I) as part of our big interop change this week special
cased
the min=0/max=1 case to emit a single Java Object.  Now we know that this
is also 'wrong', but I think this is a "better" wrong that
the array.

I think we need to put Glen and Rich in a room (maybe with a knife) and see
what
comes out. :-)

--
Tom Jordahl
Macromedia


-----Original Message-----
From: R J Scheuerle Jr [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 1:11 PM
To: [EMAIL PROTECTED]
Cc: Axis Dev (E-mail)
Subject: Re: [wsdl2java] combining maxOccurs="0" with maxOccurs="1"
generates data members as arrays, is this normal?


There has been some discussion about what maxOccurs="1" minOccurs="0"
means.

Currently the only way that axis can get this to flow over the wire
correctly is to map this as an array.
There needs to be a way to know if the value exists or not.  Checking for
nill is not sufficient because there is no way
the current serializer can differentiate between ("nillable=true") and
(maxOccurs="1" minOccurs="0") cases.

So either meta data needs to be added to the class, or we continue to map
this as an array.



Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)



                      "St-Germain,

                      Sylvain"                   To:       "Axis Dev
(E-mail)" <[EMAIL PROTECTED]>
                      <Sylvain.StGermain@        cc:

                      cognos.com>                Subject:  [wsdl2java]
combining maxOccurs="0" with maxOccurs="1" generates
                                                  data members as arrays,
is this normal?
                      02/27/2002 11:54 AM

                      Please respond to

                      axis-dev







Removing the minOccurs as below fixes it.
I get two strings instead of two arrays of strings, which is what I want.

<complexType name="cookie">
             <sequence>
                         <element name="name" type="xsd:string" maxOccurs
="1"/>
                         <element name="value" type="xsd:string" maxOccurs
="1"/>
             </sequence>
</complexType>

I think that maxOccurs="1" shouldn't generate an array.
--
Sylvain

This message may contain privileged and/or confidential information.  If
you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.





Reply via email to