Hi Andrei,

Your binding looks correct, though you modified Joshua's suggestion to 
use ordered="false". Did you try the binding as originally suggested by 
Joshua? The ordered="false" handling gets messy at times, and it's 
possible that it's creating a problem in this case. Other than that, I 
don't know what could be going wrong. What's the parser position on the 
exception?

  - 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



Dumitrescu Andrei wrote:
> I've tried your solution but i get an error:
> *The binding file:*
>
> <binding>
>     <mapping name="SOInvoice" 
> class="com.snapon.nemo.server.connectors.erp.tranformations.salesinvoice.SOInvoice"
>              ordered="false">
>         <namespace  
> uri="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/SOInvoice"; 
> default="elements"/>
>         <value name="advancesApplicable" field="advancesApplicable"/>
>        
> ..........................................................................................
>         <structure name="ControlArea">
>             <structure field="controlArea"/>
>         </structure>
>         <value name="ObjectEventId" field="objectEventId"/>
>     </mapping>
>
>     <mapping name="ControlArea" 
> class="com.snapon.nemo.server.connectors.erp.tranformations.salesinvoice.ControlArea"
>  
> ordered="false">
>         <namespace
>                 
> uri="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/ControlArea";
>                 default="elements"/>
>         <value name="eventEntity" field="eventEntity"/>
>         <value name="eventAction" field="eventAction"/>
>         <value name="eventContentType" field="eventContentType"/>
>         <value name="eventRequestID" field="eventRequestID"/>
>         <value name="eventTimeStamp" field="eventTimeStamp"/>
>         <value name="eventConsumer" field="eventConsumer"/>
>         <value name="eventSupplier" field="eventSupplier"/>
>         <value name="destination" field="destination"/>
>     </mapping>
> </binding>
>
> *The XML looks like this:*
> <Q1:SOInvoice 
> xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/SOInvoice"; 
> version="3.0.0" verb="OnEvent" locale="en_US" delta="false">
>  <Q1:advancesApplicable>xx</Q1:advancesApplicable>
> ...............................................................................
> <Q1:ControlArea>
>   <Q2:ControlArea 
> xmlns:Q2="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/ControlArea"; 
> version="3.0.0" verb="" locale="en_US" delta="false">
>    <Q2:eventEntity>xxxxxxxx</Q2:eventEntity>
>    <Q2:eventAction>xxxxxxx</Q2:eventAction>
>    <Q2:eventContentType>xx</Q2:eventContentType>
>    <Q2:eventRequestID>xxxx</Q2:eventRequestID>
>    <Q2:eventTimeStamp>xxxxxx</Q2:eventTimeStamp>
>    <Q2:eventConsumer>xxxxr</Q2:eventConsumer>
>    <Q2:eventSupplier>xxxxx</Q2:eventSupplier>
>    <Q2:destination>xxxxxx</Q2:destination>
>   </Q2:ControlArea>
>  </Q1:ControlArea>
>  <Q1:ObjectEventId>xxxxxxxx</Q1:ObjectEventId>
> </Q1:SOInvoice>
>
> The error:
> org.jibx.runtime.JiBXException: Missing required element 
> "{http://www.ibm.com/websphere/crossworlds/2002/BOSchema/ControlArea}eventEntity
>
> Thank you,
> Andrei
> Joshua Davies wrote:
>> Here's one way to do it:
>>
>> <binding direction="input">
>>   <mapping name="SOInvoice" class="SOInvoice">
>>     <namespace
>> uri="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/SOInvoice";
>> default="elements" />
>>     <value name="advancesApplicable" field="advancesApplicable" />
>>     <value name="lineOfBusiness" field="lineOfBusiness" />
>>     <value name="businessPartnerName" field="businessPartnerName" />
>>     <structure name="ControlArea">
>>       <structure field="controlArea" />
>>     </structure>
>>     <value name="ObjectEventId" field="objectEventId" />
>>   </mapping>
>>
>>   <mapping name="ControlArea" class="ControlArea">
>>     <namespace
>> uri="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/ControlArea";
>> default="elements" />
>>     <value name="eventConsumer" field="eventConsumer" />
>>     <value name="eventSupplier" field="eventSupplier" />
>>     <value name="destination" field="destination" />
>>   </mapping>
>> </binding>
>>
>> On Fri, 2008-01-04 at 16:41 +0200, Dumitrescu Andrei wrote:
>>   
>>> Hi,
>>>
>>>     I have this xml(this is the short version):
>>>
>>> <Q1:SOInvoice
>>> xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/SOInvoice"; 
>>> version="3.0.0" verb="OnEvent" locale="en_US" delta="false">
>>>  <Q1:advancesApplicable>xx</Q1:advancesApplicable>
>>>  <Q1:lineOfBusiness>xx</Q1:lineOfBusiness>
>>> .....................................
>>> <Q1:businessPartnerName>PIERRE DUBE</Q1:businessPartnerName>
>>>  <Q1:ControlArea>
>>>   <Q2:ControlArea
>>> xmlns:Q2="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/ControlArea";
>>>  version="3.0.0" verb="" locale="en_US" delta="false">
>>>   <Q2:eventConsumer>xx</Q2:eventConsumer>
>>>    <Q2:eventSupplier>xx</Q2:eventSupplier>
>>>    <Q2:destination>xx</Q2:destination>
>>>   </Q2:ControlArea>
>>>  </Q1:ControlArea>
>>>  <Q1:ObjectEventId>xx</Q1:ObjectEventId>
>>> </Q1:SOInvoice>
>>>
>>>
>>> And Java classes: SOInvoice and ControlArea. The problem is that i
>>> dont't know how to write the binding file for that part where the xml
>>> has "<Q1:ControlArea>
>>> <Q2:ControlArea"/> .....</Q2:ControlArea></Q1:ControlArea> ", same tag
>>> but with different ns. Thanks in advance
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________ jibx-users mailing list 
>>> jibx-users@lists.sourceforge.net 
>>> https://lists.sourceforge.net/lists/listinfo/jibx-users
>>>     
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> jibx-users mailing list
>> jibx-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jibx-users
>>
>>   
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to