Just a simple thought - have you thought about defining an Array in your wsdl and returning that? Simply create a List on the service side and use toArray() ?
iksrazal Em Terça 06 Dezembro 2005 10:20, o Tim R J Langford escreveu: > Greetings All, > > > 1) I am having a problem with the WSDL2Java code generated from the > current schema element : > > > <s:complexType name="ParagraphType"> > <s:sequence> > <s:choice minOccurs="0" maxOccurs="unbounded"> > <s:element minOccurs="0" maxOccurs="1" name="Text" > type="s1:FormattedTextTextType"/> > <s:element minOccurs="0" maxOccurs="1" name="Image" > type="s:string"/> > <s:element minOccurs="0" maxOccurs="1" name="URL" > type="s:anyURI"/> > </s:choice> > </s:sequence> > <s:attribute name="ParagraphNumber" type="s:nonNegativeInteger"/> > </s:complexType> > > > > 2) This schema represents (among other things) such messages as : > > <VendorMessage Title="XXXImages" Language="en" InfoType="URI"> > <SubSection SubTitle="95" SubSectionNumber="1"> > <Paragraph ParagraphNumber="1"> > <URL>http://www.XXX.com/1.gif</URL> > <URL>http://www.XXX.com/2.gif</URL> > <URL>http://www.XXX.com/3.gif</URL> > <URL>http://www.XXX.com/4.gif</URL> > <URL>http://www.XXX.com/5.gif</URL> > <URL>http://www.XXX.com/6.gif</URL> > </Paragraph> > </SubSection> > </VendorMessage> > > > 3) However the corresponding ParagraphType class generated by WSDL2Java > has the following member variables generated (which are not sets of the > corresponding elements) : > > private org.opentravel.www.OTA._2003._05.FormattedTextTextType text; > private java.lang.String image; > private org.apache.axis.types.URI URL; > private org.apache.axis.types.NonNegativeInteger paragraphNumber; > // attribute > > 4) So when the message is unmarshalled only the final <URL> (in this > example) is available through the accessor method of the unmarshalled > bean and the others are lost... > > I have looked though the other WSDL posts on this forum but cannot seem > to find a solution. Is there are special parameter I should set when > generating the Java, or is this possibly a bug in the generator (the > schema does seem a slightly esoteric way of defining the structure)? > > Any help would be greatfully appreciated because this has become a bit > of a show stopper to the project. > > Thankyou for your time, > > Tim
