Hi,

I am trying to unmarshall the xml below:

<ns2:GETSTATUS_RESPONSE xmlns:ns2="http://rts.splwg.com/webservices/packets"; 
xmlns:ns3="http://rts.splwg.com/webservices/fields";>
                <ns2:DBMS_STATUS><ns3:STATUS>UP</ns3:STATUS> </ns2:DBMS_STATUS>
                
<ns2:REGION_STATUS><ns3:REGION>DEV</ns3:REGION><ns3:STATUS>UP</ns3:STATUS></ns2:REGION_STATUS>
                <ns2:GEOCODE_STATUS><ns3:STATUS>DOWN</ns3:STATUS> 
</ns2:GEOCODE_STATUS>
                <ns2:RESULT><ns3:RESULT>SUCCESS</ns3:RESULT></ns2:RESULT>
</ns2:GETSTATUS_RESPONSE>

But getting this exception:

org.jibx.runtime.JiBXException: Expected 
"{http://rts.splwg.com/webservices/packets}GEOCODE_STATUS"; start tag, found 
"{http://rts.splwg.com/webservices/packets}REGION_STATUS"; start tag (line 6, 
col 21)
      at 
org.jibx.runtime.impl.UnmarshallingContext.throwStartTagNameError(UnmarshallingContext.java:220)

Snippet from binding file:

<mapping class="com.splwg.rts.webservices.packets.GETSTATUSRESPONSE" 
name="GETSTATUS_RESPONSE">
    <structure map-as="ns3:DBMS_STATUS" get-method="getDBMSSTATUS" 
set-method="setDBMSSTATUS" name="DBMS_STATUS"/>
    <structure map-as="ns3:GEOCODE_STATUS" get-method="getGEOCODESTATUS" 
set-method="setGEOCODESTATUS" name="GEOCODE_STATUS"/>
    <collection get-method="getREGIONSTATUSs" set-method="setREGIONSTATUSs" 
create-type="java.util.ArrayList">
      <structure map-as="ns3:REGION_STATUS" name="REGION_STATUS"/>
    </collection>
    <structure map-as="ns3:RESULT" get-method="getRESULT" 
set-method="setRESULT" name="RESULT"/>
    <collection get-method="getERRORs" set-method="setERRORs" 
create-type="java.util.ArrayList">
      <structure map-as="ns3:ERROR" name="ERROR"/>
    </collection>
  </mapping>

If I edit the xml and change the order of the elements to be the same as the 
binding file then I don't get the exception e.g move GEOCODE_STATUS before the 
REGION_STATUS.

Is there a way I can tell the unmarshaller not to be strict with the order of 
elements?

Regards,

Adnan





______________________________________________________________________
This email and any attachments may contain privileged and confidential
information and are intended for the named addressee only. If you have
received this e-mail in error, please notify the sender and delete
this e-mail immediately. Any confidentiality, privilege or copyright
is not waived or lost because this e-mail has been sent to you in
error. It is your responsibility to check this e-mail and any
attachments for viruses.  No warranty is made that this material is
free from computer virus or any other defect or error.  Any
loss/damage incurred by using this material is not the sender's
responsibility.  The sender's entire liability will be limited to
resupplying the material.
______________________________________________________________________
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to