Reg Sherwood wrote:
Hi,

Not really sure if I should ask this question here or in the junit mailing list.  Any help is appreciated. I am using Ant 1.5 in conjunction with the optional junitreport task.  After the test cases have finished executing I am sending the resulting output to junitreport for html formatting.  As seen with the following section from my build.xml:
<junitreport>, ironically, has nothing to do with JUnit per se. It simply aggregates XML files and then transforms the aggregate file into HTML.

Anyways, in the parsing of the resulting xml files, I receive this error:

[junitreport] [Fatal Error] TEST-test.com.FooSuite.xml:1331:10: The element
type "system-out" must be terminated by the matching end-tag "</system-out>".
[junitreport] The file W:\platform\1.0\reports\TEST-test.FooSuite.xml is not a valid XML document. It is possibly corrupted.
[junitreport] Using Xalan version: Xalan Java 2.4.D1
[junitreport] Transform time: 2323ms

No html report generation takes place.  I have included the offending section in the xml file.  (I can manually run the report generation if I remove the <![CDATA[ and ]]>
).
From the looks of the detail you provided, you're writing the SOAP response to System.out or .err, right?

I've seen this same problem happen when fishy stuff is written out during tests.

My recommendation would be to get rid of the System.out/.err stuff if it contains XML output since it will get merged into a CDATA section and what you have below has CDATA in it already making illegal XML.

Erik



<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><SOAP-ENV:Body><ns0:updatePassword xmlns:ns0='urn:PreferenceManagerProxy' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><arg0 xsi:type='bean:PasswordProxy' xmlns:bean='java:com.imagictv.platform.webservices.application.preference' ><createdBy xsi:null='1'></createdBy><typeId xsi:type='xsd:long'>1</typeId><oid xsi:type='xsd:long'>-9223372036854775808</oid><consumerId xsi:type='xsd:long'>1</consumerId><isNew xsi:type='xsd:boolean'>false</isNew><updatedDtm xsi:type='xsd:long'>-9223372036854775808</updatedDtm><confirmPassword xsi:type='xsd:string'>5671</confirmPassword><updatedBy xsi:null='1'></updatedBy><type xsi:type='bean:PasswordTypeProxy' xmlns:bean='java:com.imagictv.platform.webser
vices.application.preference' ><isNew xsi:type='xsd:boolean'>false</isNew><updatedDtm xsi:type='xsd:long'>957894600000</updatedDtm><modified xsi:type='xsd:boolean'>true</modified><updatedBy xsi:type='xsd:string'>BHS</updatedBy><name xsi:type='xsd:string'>Purchase</name><createdBy xsi:type='xsd:string'>BHS</createdBy><createdDtm xsi:type='xsd:long'>957894600000</createdDtm><oid xsi:type='xsd:long'>1</oid></type><modified xsi:type='xsd:boolean'>true</modified><createdDtm xsi:type='xsd:long'>-9223372036854775808</createdDtm><password xsi:type='xsd:string'>1111</password><newPassword xsi:type='xsd:string'>5671</newPassword></arg0></ns0:updatePassword></SOAP-ENV:Body></SOAP-ENV:Envelope>------------- RECEIVING XML -------------
<?xml version="1.0" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Body>
<soap:Fault>
<faultcode>
Client
</faultcode>
<faultstring>
com.foo.exception.ApplicationException
</faultstring>
<detail>
<![CDATA[
Application fault:
com.foo.exception.ApplicationException: error updating password, com.foo.exception.ApplicationException: Cannot create password - Error in ejbCreate:; nested exception is: javax.ejb.CreateException
]]>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>


Any help is apprecaited. I have confirmed the Xalan parser and its requirements.

-Reg


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@;jakarta.apache.org>

Reply via email to