Thanks for getting back to me Dennis. Removing the abstract from the arrival 
mapping and going from name to type-name fixed that mapping problem.

Close... but not there yet. Probably related to the eventType being abstract 
and 
how the collection is generated via the wsdl. One problem is an extra layer of 
<arrival>, the other is the addition of a namespace qualifier to the first 
arrival element:

<returnedEvent>
     <localid>2</localid>
     <location>Oregon Coast</location>
     <prefOrigin>12</prefOrigin>
     <author>UW Geophysics</author>
     <arrival xmlns="http://www.iris.edu/phasepick/xsd";>
       <arrival>
         <station>SUW</station>
         <distance>402.7</distance>
         <phase>P</phase>
        ...
       <arrival>
       <arrival>
        ...
       <arrival>
     </arrival
</returnedEvent>

Within the wsdl this response is

<element name="eventFinderResponse">
   <complexType>
     <sequence>
      <element maxOccurs="unbounded" name="returnedEvent" type="xsd:eventType"/>
     </sequence>
   </complexType>
</element>

Is the solution to create an EventFinderResponse with a non-abstract mapping to 
wrap the eventTypes in?

Thanks, Joanna

PS the current state of the binding is:

   <mapping name="arrival" 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>

   <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 name="arrival" field="arrivals"/>
   </mapping>



Dennis Sosnoski wrote:
> Hi Joanna,
> 
> It looks like you're getting a somewhat unintended side-effect of the 
> abstract mapping in your second binding, with the collection as a 
> separate mapping. Abstract mappings aren't really intended to be used 
> directly as collection item types, and I should probably have a 
> validation check to catch it when this is done. The intended ways to do 
> what you want are (1) make the Arrival mapping concrete, with a name 
> specified on the <mapping>, in which case the collection can reference 
> it directly as an item-type, or (2) keep the Arrival mapping abstract, 
> and add a child element to the collection:
> 
>   <collection field="...">
>     <structure name="arrival" type="... Arrival"/>
>   </collection>
> 
> If either of these approaches doesn't work for you I'd appreciate a Jira 
> bug report with the specifics. Thanks,
> 
>   - Dennis
> 
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> 
> 
> 

-------------------------------------------------------------------------
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