axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A Sunley <alan.sun...@gmail.com>
Subject wsdl2java
Date Thu, 01 May 2008 22:21:12 GMT

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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message