xml schema and java objects -


i have received xml schema third party vendor. xml schema , xml don't seem match atleast guess. using intellij , use jaxb plugin java objects.

my code never returns field values i.e. never returns "my string value" xml

<field type="address">                 <value type="value">my string value</value>             </field> 

i data

0 = {fieldtype@1372}   characters = null  value = {fieldtypetype@1381} "address"   value = {string@1383} "address"   data = null   name = {string@1382} "address"   ordinal = 8 1 = {fieldtype@1373}   characters = null  value = {fieldtypetype@1387} "card_number" 2 = {fieldtype@1374}   characters = null  value = {fieldtypetype@1389} "date" 3 = {fieldtype@1375}  

i have xml (part of it)

<field type="address">             <value type="value">my string value</value>         </field>         <field type="cardnumber">             <value type="value">xxxxx</value>         </field>         <field type="date">             <value type="day">21</value>             <value type="month">4</value>             <value type="year">2015</value>         </field>         <field type="phone">             <value type="value">212xxx</value>         </field>         <field type="subtotal">             <value type="value">xxx</value>         </field> 

and schema is

 <xs:complextype name="receipttype">     <xs:sequence>       <xs:element name="field" type="tns:fieldtype" minoccurs="0" maxoccurs="unbounded"></xs:element>       <xs:element name="lineitem" type="tns:lineitemtype" minoccurs="0" maxoccurs="unbounded"></xs:element>       <xs:element name="recognizedtext" type="xs:string" minoccurs="0" maxoccurs="1"></xs:element>     </xs:sequence>     <xs:attribute name="paymenttype" type="tns:paymenttypetype"></xs:attribute>     <xs:attribute name="cardtype" type="tns:cardtypetype"></xs:attribute>     <xs:attribute name="currency" type="xs:string"></xs:attribute>     <xs:attribute name="purchasetype" type="xs:string"></xs:attribute>   </xs:complextype>    <xs:simpletype name="paymenttypetype">     <xs:restriction base="xs:string">       <xs:enumeration value="card"></xs:enumeration>       <xs:enumeration value="cash"></xs:enumeration>       <xs:enumeration value="undefined"></xs:enumeration>     </xs:restriction>   </xs:simpletype>    <xs:simpletype name="cardtypetype">     <xs:restriction base="xs:string">       <xs:enumeration value="americanexpress"></xs:enumeration>       <xs:enumeration value="eurocard"></xs:enumeration>       <xs:enumeration value="mastercard"></xs:enumeration>       <xs:enumeration value="visa"></xs:enumeration>       <xs:enumeration value="undefined"></xs:enumeration>     </xs:restriction>   </xs:simpletype>    <xs:complextype name="fieldtype">     <xs:sequence>       <xs:element name="value" type="tns:valuetype" minoccurs="1" maxoccurs="unbounded">       </xs:element>       <xs:element name="characters" type="tns:characterstype" minoccurs="0" maxoccurs="1"></xs:element>     </xs:sequence>     <xs:attribute name="value" type="tns:fieldtypetype"></xs:attribute>   </xs:complextype>    <xs:complextype name="valuetype">     <xs:attribute name="type" type="tns:valuetypetype"></xs:attribute>   </xs:complextype>    <xs:simpletype name="valuetypetype">     <xs:restriction base="xs:string">       <xs:enumeration value="value"></xs:enumeration>       <xs:enumeration value="day"></xs:enumeration>       <xs:enumeration value="month"></xs:enumeration>       <xs:enumeration value="year"></xs:enumeration>       <xs:enumeration value="hour"></xs:enumeration>       <xs:enumeration value="minute"></xs:enumeration>       <xs:enumeration value="second"></xs:enumeration>     </xs:restriction>   </xs:simpletype>    <xs:simpletype name="fieldtypetype">     <xs:restriction base="xs:string">       <xs:enumeration value="total"></xs:enumeration>       <xs:enumeration value="subtotal"></xs:enumeration>       <xs:enumeration value="cardnumber"></xs:enumeration>       <xs:enumeration value="totaltax"></xs:enumeration>       <xs:enumeration value="tax"></xs:enumeration>       <xs:enumeration value="date"></xs:enumeration>       <xs:enumeration value="time"></xs:enumeration>       <xs:enumeration value="vendor"></xs:enumeration>       <xs:enumeration value="address"></xs:enumeration>       <xs:enumeration value="phone"></xs:enumeration>       <xs:enumeration value="fax"></xs:enumeration>     </xs:restriction>   </xs:simpletype> 

appreciate help!


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -