Could anyone please assist me in resolving the Duplicate element error? Any
help would be greatly appreciated...
XML<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><ns3:FinalizeRewardsRequest
xmlns:ns2="http://www.naxml.org/POSBO/Vocabulary/2003-10-16"
xmlns:ns4="http://www.pcats.org/schema/core/v01"
xmlns:ns3="http://www.pcats.org/schema/naxml/loyalty/v01">
<ns3:TransactionData> <ns3:TransactionDetailGroup>
<ns3:TransactionLine status="normal">
<ns3:LineNumber>1</ns3:LineNumber> <ns3:FuelLine
fuelPrepayFlag="no">
<ns2:FuelGradeID>001</ns2:FuelGradeID>
<ns3:Promotion>
<ns3:PromotionID>HOSTRefID6085997634</ns3:PromotionID>
<ns3:LoyaltyRewardID>HOSTRefID6085997634</ns3:LoyaltyRewardID>
<ns3:PromotionAmount>0.00</ns3:PromotionAmount>
<ns2:PromotionReason>loyaltyOffer</ns2:PromotionReason>
</ns3:Promotion>
<ns3:Promotion>
<ns3:PromotionID>00004K</ns3:PromotionID>
<ns3:LoyaltyRewardID>00004K</ns3:LoyaltyRewardID>
<ns3:PromotionAmount>0.00</ns3:PromotionAmount>
<ns2:PromotionReason>loyaltyOffer</ns2:PromotionReason>
</ns3:Promotion>
<ns2:PaymentSystemsProductCode>001</ns2:PaymentSystemsProductCode>
</ns3:FuelLine> </ns3:TransactionLine>
<ns3:TransactionLine status="normal">
<ns3:LineNumber>2</ns3:LineNumber> <ns3:TenderInfo
entryMethod="Other">
<ns2:TenderCode>cash</ns2:TenderCode>
<ns3:TenderSubCode>Other</ns3:TenderSubCode>
<ns2:TenderAmount currency="USD">0.00</ns2:TenderAmount>
<ns2:ChangeFlag value="no"/>
</ns3:TenderInfo> </ns3:TransactionLine>
</ns3:TransactionDetailGroup>
</ns3:TransactionData></ns3:FinalizeRewardsRequest>
Binding<binding name="FinalizeRewardsRequest" direction="input"
xmlns:ns3="http://www.pcats.org/schema/naxml/loyalty/v01"
xmlns:ns2="http://www.naxml.org/POSBO/Vocabulary/2003-10-16"
xmlns:ns4="http://www.pcats.org/schema/core/v01" trim-whitespace="true">
<namespace prefix="ns3"
uri="http://www.pcats.org/schema/naxml/loyalty/v01" default="elements" />
<namespace prefix="ns2" uri="http://www.naxml.org/POSBO/Vocabulary/2003-10-16"
/> <namespace prefix="ns4" uri="http://www.pcats.org/schema/core/v01" />
<mapping class="com.model.FinalizeRewardsRequest"
name="FinalizeRewardsRequest" ordered="false" flexible="true">
<structure name="TransactionData" usage="optional" > <structure
type="org.pcats.schema.naxml.loyalty.v01.TransactionDetailGroup"
set-method="setTransactionDetailGroup" ordered="false" flexible="true"
usage="optional"/> </structure> </mapping>
<mapping name="TransactionDetailGroup"
class="org.pcats.schema.naxml.loyalty.v01.TransactionDetailGroup"
ordered="false"> <collection
item-type="org.pcats.schema.naxml.loyalty.v01.TransactionLine"
set-method="setTransactionLineList" create-type="java.util.ArrayList"/>
</mapping>
<mapping name="TransactionLine"
class="org.pcats.schema.naxml.loyalty.v01.TransactionLine" ordered="false"
flexible="true"> <format
type="org.pcats.schema.naxml.loyalty.v01.TransactionLine$TransactionLineStatus"
enum-value-method="xmlValue"/> <value style="element" name="LineNumber"
set-method="setLineNumber"/> <structure
type="org.pcats.schema.naxml.loyalty.v01.FuelLine" test-method="ifFuelLine"
set-method="setFuelLine" usage="optional"/> <value style="attribute"
name="status" set-method="setStatus" usage="optional"/> </mapping>
<mapping class="org.pcats.schema.naxml.loyalty.v01.FuelLine" name="FuelLine"
ordered="false" flexible="true" > <value style="element"
name="FuelGradeID" set-method="setFuelGradeID"
ns="http://www.naxml.org/POSBO/Vocabulary/2003-10-16" />
<collection name="Promotion" set-method="setPromotionList"
create-type="java.util.ArrayList" usage="optional"> <structure
type="org.pcats.schema.naxml.loyalty.v01.Promotion" ordered="false"
flexible="true" usage="optional"> <value style="element"
name="PromotionID" set-method="setPromotionID" usage="optional" />
<value style="element" name="PromotionAmount"
set-method="setPromotionAmount" usage="optional" /> </structure>
</collection> </mapping></binding>
Exceptionorg.jibx.runtime.JiBXException: Duplicate element
"{http://www.pcats.org/schema/naxml/loyalty/v01}Promotion"(line 1, col 1059)
at
org.jibx.runtime.impl.UnmarshallingContext.throwNameException(UnmarshallingContext.java:249)
~[jibx-run.jar:1.2.5] at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_16()
~[app1.jar:na] at
org.pcats.schema.naxml.loyalty.v01.JiBX_FinalizeRewardsRequestFuelLine_access.unmarshal()
~[app1.jar:na] at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_13()
~[app1.jar:na] at
org.pcats.schema.naxml.loyalty.v01.JiBX_FinalizeRewardsRequestTransactionLine_access.unmarshal()
~[app1.jar:na] at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_11()
~[app1.jar:na] at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_12()
~[app1.jar:na] at
org.pcats.schema.naxml.loyalty.v01.JiBX_FinalizeRewardsRequestTransactionDetailGroup_access.unmarshal()
~[app1.jar:na] at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_9()
~[app1.jar:na] at
org.pcats.schema.naxml.loyalty.v01.JiBX_FinalizeRewardsRequestFinalizeRewardsRequest_access.unmarshal()
~[app1.jar:na] at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2757)
~[jibx-run.jar:1.2.5] at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2948)
~[jibx-run.jar:1.2.5]org.jibx.runtime.JiBXException: Duplicate element
"{http://www.pcats.org/schema/naxml/loyalty/v01}Promotion"(line 1, col 1059)
at
org.jibx.runtime.impl.UnmarshallingContext.throwNameException(UnmarshallingContext.java:249)
at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_16()
at
org.pcats.schema.naxml.loyalty.v01.JiBX_FinalizeRewardsRequestFuelLine_access.unmarshal()
at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_13()
at
org.pcats.schema.naxml.loyalty.v01.JiBX_FinalizeRewardsRequestTransactionLine_access.unmarshal()
at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_11()
at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_12()
at
org.pcats.schema.naxml.loyalty.v01.JiBX_FinalizeRewardsRequestTransactionDetailGroup_access.unmarshal()
at
org.pcats.schema.naxml.loyalty.v01.JiBX_CancelTransactionRequestMungeAdapter.JiBX_FinalizeRewardsRequest_unmarshal_1_9()
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users