Thanks in advance for any help on this.  I am working with a pretty 
complex XML file (see below) and trying to bind it into classes with 
collections.

I am getting the following error message: 
org.jibx.runtime.JiBXException: Expected "workHistory" start tag, found 
"impact" start tag (line 1, col 526)
        at 
org.jibx.runtime.impl.UnmarshallingContext.throwStartTagNameError(
UnmarshallingContext.java:286)
        at org.jibx.runtime.impl.UnmarshallingContext.matchStart(
UnmarshallingContext.java:706)
        at org.jibx.runtime.impl.UnmarshallingContext.parsePastStartTag(
UnmarshallingContext.java:742)
        at 
com.chase.adf.troubleticket.TroubleTicket.JiBX_TroubleTicket_binding_unmarshal_1_0(TroubleTicket.java)
        at 
com.chase.adf.troubleticket.JiBX_TroubleTicket_bindingTroubleTicket_access.unmarshal()
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(
UnmarshallingContext.java:2537)
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(
UnmarshallingContext.java:2680)
        at 
com.chase.adf.troubleticket.SCIncidentWebServiceSoapProxy.query(
SCIncidentWebServiceSoapProxy.java:117)
        at com.chase.adf.troubleticket.ServiceCenter.query(
ServiceCenter.java:8)
        at com.chase.adf.troubleticket.Test.main(Test.java:14)


I have the following binding.xml file:
<binding>
   <mapping name="SCIncidentWebService" 
class="com.chase.adf.troubleticket.TroubleTicket">
      <structure name="response">
         <value name="returnCode" field="returnCode" usage="optional" 
set-method="setReturnCode"/>
                           <structure name="incident">
                                        <value name="incidentNumber" 
field="incidentNumber" usage="optional" set-method="setIncidentNumber"/>
                                        <value name="ticketStatus" 
field="ticketStatus" usage="optional" set-method="setTicketStatus"/>
                                        <value name="incidentTitle" 
field="incidentTitle" usage="optional" set-method="setIncidentTitle"/>
                                        <value name="system" 
field="system" usage="optional" set-method="setSystem"/>
                                        <value name="component" 
field="component" usage="optional" set-method="setComponent"/>
                                        <value name="item" field="item" 
usage="optional" set-method="setItem"/>
                                        <value name="module" 
field="module" usage="optional" set-method="setModule"/>
                                        <value name="priority" 
field="priority" usage="optional" set-method="setPriority"/>
                                        <value name="assigneeGroup" 
field="assigneeGroup" usage="optional" set-method="setAssigneeGroup"/>
                                        <value name="incidentDescription" 
field="incidentDesc" usage="optional" set-method="setIncidentDesc"/>
                                        <value name="impact" 
field="impact" usage="optional" set-method="setImpact"/>
                                        <value name="standardID" 
field="customerID" usage="optional" set-method="setCustomerID"/>
                                        <value name="firstName" 
field="customerFirstName" usage="optional" 
set-method="setCustomerFirstName"/>
                                        <value name="lastName" 
field="customerLastName" usage="optional" 
set-method="setCustomerLastName"/>
                                        <value name="city" 
field="customerCity" usage="optional" set-method="setCustomerCity"/>
                                        <value name="state" 
field="customerState" usage="optional" set-method="setCustomerState"/>
                                        <value name="country" 
field="customerCountry" usage="optional" set-method="setCustomerCountry"/>
                                        <value name="openedAt" 
field="openTimeStamp" usage="optional" set-method="setOpenTimeStamp"/>
                                        <value name="event" field="event" 
usage="optional" set-method="setEvent"/>
                                        <value name="technicianName" 
field="technicianName" usage="optional" set-method="setTechnicianName"/>
                                        <value name="outageEndTime" 
field="outageEndTime" usage="optional" set-method="setOutageEndTime"/>
                                        <value name="phone" field="phone" 
usage="optional" set-method="setPhone"/>
                                        <value name="location" 
field="location" usage="optional" set-method="setLocation"/>
                                        <value name="mailStop" 
field="mailStop" usage="optional" set-method="setMailStop"/>
                                        <value name="customerFloor" 
field="customerFloor" usage="optional" set-method="setCustomerFloor"/>
                                        <value name="executive " 
field="executive" usage="optional" set-method="setExecutive"/>
                                        <value name="slaLevel" 
field="slaLevel" usage="optional" set-method="setSlaLevel"/>
                                        <value name="extension" 
field="extension" usage="optional" set-method="setExtension"/>
                                        <value name="email" field="email" 
usage="optional" set-method="setEmail"/>
                                        <value name="costCenter" 
field="costCenter" usage="optional" set-method="setCostCenter"/>
                                        <value name="address1" 
field="address1" usage="optional" set-method="setAddress1"/>
                                        <value name="address2" 
field="address2" usage="optional" set-method="setAddress2"/>
                                        <value name="address3" 
field="address3" usage="optional" set-method="setAddress3"/>
                                        <value name="postalCode" 
field="postalCode" usage="optional" set-method="setPostalCode"/>
                                        <value name="officeCube" 
field="officeCube" usage="optional" set-method="setOfficeCube"/>
                                        <value name="assetType" 
field="assetType" usage="optional" set-method="setAssetType"/>
                                        <value name="assetSubType" 
field="assetSubType" usage="optional" set-method="setAssetSubType"/>
                                        <value name="manufacturer" 
field="manufacturer" usage="optional" set-method="setManufacturer"/>
                                        <value name="configurableItem" 
field="configurableItem" usage="optional" 
set-method="setConfigurableItem"/>
                                        <value name="openedBy" 
field="openedBy" usage="optional" set-method="setOpenedBy"/>
                                        <value name="hostname" 
field="hostname" usage="optional" set-method="setHostname"/>
                                        <value name="timeZone" 
field="timeZone" usage="optional" set-method="setTimeZone"/>
                                        <value 
name="impactedRegionAmericas" field="impactedRegionAmericas" 
usage="optional" set-method="setImpactedRegionAmericas"/>
                                        <value name="impactedRegionEMEA " 
field="impactedRegionEMEA" usage="optional" 
set-method="setImpactedRegionEMEA"/>
                                        <value name="impactedRegionAP " 
field="impactedRegionAP" usage="optional" 
set-method="setImpactedRegionAP"/>
                                        <value name="accountableRegion" 
field="accountableRegion" usage="optional" 
set-method="setAccountableRegion"/>
                                        <structure name="workHistory">
                                                <collection 
field="workHistoryList" usage="optional" 
item-type="com.chase.adf.troubleticket.WorkHistory" 
factory="org.jibx.runtime.Utility.arrayListFactory"/>
                                        </structure>
                                </structure>
      </structure>
        </mapping>
        <mapping name="record" 
class="com.chase.adf.troubleticket.WorkHistory">
                <value name="numberprgn" field="workHistIncidentNum" 
usage="optional" set-method="setworkHistIncidentNum"/>
                <value name="type" field="workHistType" usage="optional" 
set-method="setworkHistType"/>
                <value name="datestamp" field="workHistUpdateTime" 
usage="optional" set-method="setworkHistUpdateTime"/>
                <value name="operator" field="workHistOperator" 
usage="optional" set-method="setworkHistOperator"/>
                <value name="description" field="workHistDesc" 
usage="optional" set-method="setworkHistDesc"/>
        </mapping>
</binding>


With a generated XML being passed in as the following (note that the XML 
results can vary):
  <?xml version="1.0" encoding="utf-8" standalone="yes" ?> 
- <SCIncidentWebService action="query">
- <response>
  <returnCode>0</returnCode> 
- <incident>
  <incidentNumber>10697040</incidentNumber> 
  <ticketStatus>Pending</ticketStatus> 
  <incidentTitle>ADF ITE - JOB STUCK IN UNLOAD INSERTER FILE
</incidentTitle> 
  <system>MIDRANGE</system> 
  <component>ADF</component> 
  <item>REPORT</item> 
  <module>MISSING MODULE</module> 
  <priority>P2</priority> 
  <assigneeGroup>GROUP1</assigneeGroup> 
  <incidentDescription>Job 1011866 in ADF ITE is stuck in the 
UnloadInserterFile step. The job has been completed and the Select file 
has been created, but still error's out. Job needs moved to the next step.
</incidentDescription> 
  <event /> 
  <impact>Test delay.</impact> 
  <technicianName>H003759</technicianName> 
  <outageEndTime /> 
  <standardID>E010966</standardID> 
  <firstName>JOHN A</firstName> 
  <lastName>SMITH</lastName> 
  <phone>972-321-1234</phone> 
  <location>67 Noname Road</location> 
  <mailStop>TX1</mailStop> 
  <customerFloor>01</customerFloor> 
  <executive /> 
  <slaLevel>Select</slaLevel> 
  <extension /> 
  <email>[EMAIL PROTECTED]</email> 
  <costCenter>271907</costCenter> 
  <address1>67 Noname Road</address1> 
  <address2 /> 
  <address3 /> 
  <city>Anywhere</city> 
  <state>TX</state> 
  <postalCode>79456</postalCode> 
  <officeCube /> 
  <assetType /> 
  <assetSubType /> 
  <manufacturer /> 
  <configurableItem /> 
  <openedBy>E000799</openedBy> 
  <openedAt>02/22/08 20:37:17</openedAt> 
  <hostname /> 
  <country>USA</country> 
  <timeZone>US/Central</timeZone> 
  <impactedRegionAmericas>Impacted</impactedRegionAmericas> 
  <impactedRegionEMEA /> 
  <impactedRegionAP /> 
  <accountableRegion>Americas</accountableRegion> 
- <workHistory count="3">
- <record>
  <numberprgn>10697040</numberprgn> 
  <type>Status Change</type> 
  <datestamp>2/22/2008 8:46:35 PM</datestamp> 
  <operator>H003759</operator> 
  <description>Status Changed To Acknowledged From Transferred
</description> 
  </record>
- <record>
  <numberprgn>10697040</numberprgn> 
  <type>Description Change</type> 
  <datestamp>2/22/2008 8:37:18 PM</datestamp> 
  <operator>E000799</operator> 
  <description>Changed Description from: to: Job 1011866 in ADF ITE is 
stuck in the UnloadInserterFile step. The job has been completed and the 
Select file has been created, but still error's out. Job needs moved to 
the next step.</description> 
  </record>
- <record>
  <numberprgn>10697040</numberprgn> 
  <type>Open</type> 
  <datestamp>2/22/2008 8:37:18 PM</datestamp> 
  <operator>E000799</operator> 
  <description>Job 1011866 in ADF ITE is stuck in the UnloadInserterFile 
step. The job has been completed and the Select file has been created, but 
still error's out. Job needs moved to the next step.</description> 
  </record>
  </workHistory>
  </incident>
  </response>
  </SCIncidentWebService>

Here is my class structure:

public class TroubleTicket {

        private int incidentNumber;
        private String eventUser;
        private int returnCode;
        private String openTimeStamp;
        ...
        ...(etc)
        private List<WorkHistory> workHistoryList;
 
        //i have the get and set methods included but I am not showing 
them to save space
}

public class WorkHistory {
        private int workHistIncidentNum;
        private String workHistType;
        private String workHistUpdateTime;
        private String workHistOperator;
        private String workHistDesc;

        //again i have get and set methods but not shown
}


-----------------------------------------
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.

Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
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

Reply via email to