Hi there,
When de-serializing the attached xml, the nested xml doc under the 'payload'
element comes blank. my code:
Background:
We have a java application that serializes java objects that are created
from XSD file using the JAXB library. Since jaxb does not support android,
we have started using jackson as this library will be consumed by android
app.
XmlMapper mapper = (XmlMapper) new
XmlMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
false);
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS, true);
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES, true);
Response response1 = null;
try {
response1 = (Response) mapper.readValue(xml, Response.class);
} catch (IOException e) {
e.printStackTrace();
}
I am new to java and jackson, Could you help me get past this?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-user/7a570eb5-6a5a-43fc-bb26-422864e2880en%40googlegroups.com.
<?xml version="1.0" encoding="UTF-8"?>
<Response Version="3" xmlns="http://securetransport.dw/rcservice/xml">
<RespClientID>
<DID>00041372277848179310</DID>
<ClientRef>0172758VRSU005</ClientRef>
</RespClientID>
<Status StatusCode="OK"></Status>
<TransactionResponse>
<ReturnCode>000</ReturnCode>
<Payload Encoding="cdata"><![CDATA[<GMF xmlns="com/fiserv/Merchant/gmfV10.02"><CreditResponse><CommonGrp><PymtType>Credit</PymtType><TxnType>Authorization</TxnType><LocalDateTime>20211129172757</LocalDateTime><TrnmsnDateTime>20211129115757</TrnmsnDateTime><STAN>172757</STAN><RefNum>1129172757</RefNum><OrderNum>1129172757</OrderNum><TermID>00000003</TermID><MerchID>RCTST1000091636</MerchID><TxnAmt>27722</TxnAmt><TxnCrncy>840</TxnCrncy></CommonGrp><CardGrp><AcctNum>371030089111551</AcctNum><AVSResultCode>Z</AVSResultCode><CCVResultCode>Match</CCVResultCode></CardGrp><AmexGrp><AmExTranID>0129115801466773</AmExTranID></AmexGrp><RespGrp><RespCode>002</RespCode><AuthID>570606</AuthID><AddtlRespData>APPROVED</AddtlRespData><AthNtwkID>01</AthNtwkID></RespGrp></CreditResponse></GMF>]]></Payload>
</TransactionResponse>
</Response>