I'm running into problems adding a collection to my schema in a wsdl. It works 
fine if the binding is in-line:

   <mapping type-name="xsd:eventType" abstract="true" 
class="edu.iris.ws.phasepick.Event">
     <value name="localId" field="id"/>
     <value name="location" field="location"/>
     <value name="prefOrigin" field="prefOrigin"/>
     <value name="author" field="author"/>
     <collection field="arrivals">
       <structure name="arrival" type="edu.iris.ws.phasepick.Arrival">
         <value name="station" field="station"/>
         <value name="distance" field="distance"/>
         <value name="phase" field="phase"/>
         <value name="azimuth" field="azimuth"/>
         <value name="author" field="author"/>
         <value name="arrivalTime" field="arrivalTime"/>
       </structure>
     </collection>
   </mapping>

generates the expected XML:

<inputEvent>
   <localid>2</localid>
   <location>Oregon Coast</location>
   <prefOrigin>12</prefOrigin>
   <author>UW Geophysics</author>
   <arrival>
     <station>SUW</station>
     <distance>402.7</distance>
     <phase>P</phase>
     <azimuth>19.4</azimuth>
     <author>K Creager</author>
     <arrivalTime>2004-01-10T21:22:53Z</arrivalTime>
   <arrival>
   <arrival>
     <station>GBS</station>
     <distance>1052.8</distance>
    ... etc.

But when I try to remove the collection as a separate mapping:

<mapping type-name="xsd:eventType" abstract="true" 
class="edu.iris.ws.phasepick.Event">
   <value name="localId" field="id"/>
   <value name="location" field="location"/>
   <value name="prefOrigin" field="prefOrigin"/>
   <value name="author" field="author"/>
   <collection field="arrivals" name="arrival" 
item-type="edu.iris.ws.phasepick.Arrival"/>
</mapping>

   <mapping name="xsd:arrivalType" class="edu.iris.ws.phasepick.Arrival">
     <value name="station" field="station"/>
     <value name="distance" field="distance"/>
     <value name="phase" field="phase"/>
     <value name="azimuth" field="azimuth"/>
     <value name="author" field="author"/>
     <value name="arrivalTime" field="arrivalTime"/>
   </mapping>

I get:

<inputEvent>
   <localid>2</localid>
   <location>Oregon Coast</location>
   <prefOrigin>12</prefOrigin>
   <author>UW Geophysics</author>
   <arrival>
     <station>SUW</station>
     <distance>402.7</distance>
     <phase>P</phase>
     <azimuth>19.4</azimuth>
     <author>K Creager</author>
     <arrivalTime>2004-01-10T21:22:53Z</arrivalTime>
   <arrival>
   <station>GBS</station>
   <distance>1052.8</distance>
   <phase>P</phase>
   <azimuth>29.1</azimuth>
   <author>K Creager</author>
   <arrivalTime>2004-01-10T21:23:53Z</arrivalTime>
   &gt;
</inputEvent>

This looks like a bug, but is it because I'm not writing the mapping the right 
way and should be using a named mapping or abstract (neither of which has 
worked 
for me in this instance)?

Thanks, Joanna



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to