axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R J Scheuerle Jr" <sc...@us.ibm.com>
Subject Re: XSD
Date Fri, 15 Mar 2002 19:11:38 GMT
I don't want to use a Vector.  Whatever mapping is chosen should be simple,
complete and "roundtrippable",

Looking at the spec, maxOccurs can also be applied to sequence and all
groups, too.  This is important to remember.

So here are some questions to ask to decide how to map this.

   How would the user expect to access the Author and Title values ?
      Would they want to access them as separate properties getAuthor(int
      i)  & getTitle(int i) ?
      Or would they expect to access them as separate choice items
      getChoice(int i) and then inspect the choice to see if it was an
      Author or Title ?
   How can we represent the structures in a way that we can do
   roundtripping ?

So I don't think we should support this format for rpc encoded.

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


                                                                                         
                                  
                      Davanum Srinivas                                                   
                                  
                      <dims@yahoo.com>         To:       R J Scheuerle Jr/Austin/IBM@IBMUS,
Russell Butek/Austin/IBM@IBMUS  
                                               cc:                                       
                                  
                      03/15/2002 12:50         Subject:  Re: XSD                         
                                  
                      PM                                                                 
                                  
                      Please respond to                                                  
                                  
                      dims                                                               
                                  
                                                                                         
                                  
                                                                                         
                                  



Rich,

Yes, That is definitely a possibility. Another option is to generate a
Vector that can be filled
with either Author's or Title's. This way we preserve the order in which
they occured in the SOAP
Response. Of course, this is not the usual way a Bean works.

Thanks,
dims

--- R J Scheuerle Jr <scheu@us.ibm.com> wrote:
> Dims,
>
> I assume this means allow an unbounded number of choice elements,
> where an individual choice could be either an author or title.
>
> Thus you could have author, author, title
> or you could have title, author, title.
>
> Of course the axis runtime does not have any checking for choice.
> But I suppose you are asking for WSDL2Java to understand that
> maxOccurs applies to both author and title...thus author and title should
> be modeled as indexed bean properties versus regular bean properties.
>
> Am I correct ?
>
>
> Rich Scheuerle
> XML & Web Services Development
> 512-838-5115  (IBM TL 678-5115)
>
>
>

>
>                       Russell Butek

>
>                                                To:       R J Scheuerle
Jr/Austin/IBM
>
>                       03/15/2002 11:34         cc:

>
>                       AM                       From:     Russell
Butek/Austin/IBM@IBMUS
>
>                                                Subject:  XSD

>
>

>
>

>
>

>
>
>
>
> From dims.  He expects NewDataSet to allow you to provide any number of
> Authors and Titles.
>
> Russell Butek
> butek@us.ibm.com
> ---------------------- Forwarded by Russell Butek/Austin/IBM on
03/15/2002
> 11:28 AM ---------------------------
>
>
>
> Davanum Srinivas <dims@yahoo.com> on 03/15/2002 11:26:08 AM
>
> Please respond to dims@yahoo.com
>
> To:    butek@apache.org
> cc:    Russell Butek/Austin/IBM@IBMUS
>
> Subject:    XSD
>
>
>
>
>
>
>
> =====
> Davanum Srinivas - http://xml.apache.org/~dims/
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
> <?xml version="1.0" encoding="utf-8"?>
> <xs:schema xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id
> ="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema">
>   <xs:element msdata:IsDataSet="true" name="NewDataSet">
>     <xs:complexType>
>       <xs:choice maxOccurs="unbounded">
>         <xs:element name="Authors">
>           <xs:complexType>
>             <xs:sequence>
>               <xs:element minOccurs="0" name="au_id" type="xs:string" />
>               <xs:element minOccurs="0" name="au_lname" type="xs:string"
/>
>               <xs:element minOccurs="0" name="au_fname" type="xs:string"
/>
>               <xs:element minOccurs="0" name="phone" type="xs:string" />
>               <xs:element minOccurs="0" name="address" type="xs:string"
/>
>               <xs:element minOccurs="0" name="city" type="xs:string" />
>               <xs:element minOccurs="0" name="state" type="xs:string" />
>               <xs:element minOccurs="0" name="zip" type="xs:string" />
>               <xs:element minOccurs="0" name="contract" type="xs:boolean"
>               />
>             </xs:sequence>
>           </xs:complexType>
>         </xs:element>
>         <xs:element name="Titles">
>           <xs:complexType>
>             <xs:sequence>
>               <xs:element minOccurs="0" name="title_id" type="xs:string"
/>
>               <xs:element minOccurs="0" name="title" type="xs:string" />
>               <xs:element minOccurs="0" name="type" type="xs:string" />
>               <xs:element minOccurs="0" name="pub_id" type="xs:string" />
>               <xs:element minOccurs="0" name="price" type="xs:decimal" />
>               <xs:element minOccurs="0" name="advance" type="xs:decimal"
/>
>               <xs:element minOccurs="0" name="royalty" type="xs:int" />
>               <xs:element minOccurs="0" name="ytd_sales" type="xs:int" />
>               <xs:element minOccurs="0" name="notes" type="xs:string" />
>               <xs:element minOccurs="0" name="pubdate" type="xs:dateTime"
>               />
>             </xs:sequence>
>           </xs:complexType>
>         </xs:element>
>       </xs:choice>
>     </xs:complexType>
>   </xs:element>
> </xs:schema>
>
>
>
>


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/




Mime
View raw message