[Moxy] Simple unmarshalling and marshalling changes xml [message #1058464] |
Tue, 14 May 2013 05:11  |
Eclipse User |
|
|
|
I have to write some xml-Data of specific format (see attachment). Since there are some constant attributes (especially in root element) i created a template (genrate from xsd from eclipse).
the Problem is if i unmarshal and marshal this template the content changes:
Input:
<?xml version="1.0" encoding="UTF-8"?>
<invoice:response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:invoice="http://www.forum-datenaustausch.ch/invoice" xmlns="http://www.forum-datenaustausch.ch/invoice" xsi:schemaLocation="http://www.forum-datenaustausch.ch/invoice generalInvoiceResponse_440.xsd" language="de">
<invoice:processing>
<invoice:transport from="" to="">
<invoice:via sequence_id="0" via=""/>
</invoice:transport>
</invoice:processing>
<invoice:payload response_timestamp="0">
<invoice:invoice request_date="2001-12-31T12:00:00" request_id="" request_timestamp="0"/>
</invoice:payload>
</invoice:response>
Output:
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.forum-datenaustausch.ch/invoice" xmlns:ns1="http://www.w3.org/2000/09/xmldsig#" xmlns:ns0="http://www.w3.org/2001/04/xmlenc#" language="de">
<processing>
<transport from="" to="">
<via via="" sequence_id="0"/>
</transport>
</processing>
<payload response_timestamp="0">
<invoice request_timestamp="0" request_date="2001-12-31T12:00:00.0" request_id=""/>
</payload>
</response>
Some of the attributes are missing and the name space prefix. i don't know if this changes are relevant (in respect to xsd) but i want as near as possible to the examples i got.
how to get moxy to leave all that is not touched unchanged (i think the attribute order really doesn't matter?)?
thx in advance
[Updated on: Tue, 14 May 2013 05:12] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04263 seconds