|
Good day all.
I am using Castor version 0.9.3.9 and in partcular,
I am using the XML Schema binding functionality, to generate classes which
represent my XML Schema.
Once I have generated the classes, and implemented
them, I noticed that the marshaled data which I get from these classes only
loosely resembles the XML data I should be seeing.
I have attached first the structure generated by my
Castor classes, and then the structure the way it should be.
Castor generated XML:
<?xml
version="1.0"?>
<transactflex><header codtran="7001"/><txndata><accountdtls accountno="101120000028"/></txndata></transactflex> Required XML Structure:
<transactflex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="{0}"> <header codtran="7001"/> <txndata> <accountdtls accountno="101120000028"/> </txndata> </transactflex> There are three problems in particular that I
notice in the Castor generated XML.
1) The marshal method is outputting a single string
which has no formatting. Is this a problem?
2) The first line reads <?xml version="1.0"?>
and it should not be there, according to the second XML Structure.
3) Some fields in the Castor generated XML have
been dropped.
Could anyone please advise me as to why the Castor
generated XML is so vastly different to the Second structure, which
was supplied to me by the vendor, and consequently works.
The Castor generated XML structure is deemed not
valid by the server I am sending it to, but the second structure is accepted and
I receive a valid response when sending it to the server.
Many thanks and kind regards
Scott.
|
- Re: [castor-dev] Castor generated XML. Scott Venter
- Re: [castor-dev] Castor generated XML. Scott Venter
