<xs:complexType name="Course">
<xs:sequence>
<xs:element minOccurs="0" name="courseCode" nillable="true"
type="xs:string"/>
<xs:element minOccurs="0" name="schedules"
nillable="true" type="ns0:ScheduleArray"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ScheduleArray">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="schedule"
nillable="true" type="ns0:Schedule"/>
</xs:sequence>
</xs:complexType>
On Thu, May 1, 2008 at 6:21 PM, A Sunley <[EMAIL PROTECTED]> wrote:
>
> Greetings,
>
> We are attempting to generate some skeleton code from a wsdl using
> wsdl2java. Our schema contains some custom objects which have nested arrays.
>
> For instance we have a course object which has an array of schedules, and we
> want the course object in the SOAP message to be structured in the following
> way:
>
> <Course>
> <courseCode />
> <schedules>
> <schedule />
> <schedule />
> </schedules>
> </Course>
>
> We've specified the course object in the wsdl in the following way:
>
> <xs:complexType name="Course">
> <xs:sequence>
> <xs:element minOccurs="0" name="courseCode" nillable="true"
> type="xs:string"/>
> <xs:element maxOccurs="unbounded" minOccurs="0" name="schedules"
> nillable="true" type="ns0:Schedule"/>
> </xs:sequence>
> </xs:complexType>
>
>
> The problem is, the resulting soap structured like this:
>
> <Course>
> <courseCode />
> <schedules />
> <schedules />
> </Course>
>
> Rather then the schedule objects being nested in a <schedules> tag, they are
> listed one after another in <schedules/> tags.
>
> I gather I could create a 'wrapper' element for the array, but in the
> generated code this will also create a wrapper object for the array.
> Ideally we want the generated code to look like the following:
>
> Course
> {
> String courseCode;
> Schedule[] schedules;
>
> .....
> }
>
> How might I format the wsdl to achieve this?
>
> Thanks,
> Alan.
> --
> View this message in context:
> http://www.nabble.com/wsdl2java-tp16995096p16995096.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]