Skip to Content
0
Former Member
Jul 26, 2006 at 04:17 PM

XI Soap Adapter: problems in parsing XML

101 Views

Hallo,

I call a Web Service using XMLSpy and this is the response (note tag <File>):

http://tempuri.org/PRWBS_PRIMAVERA/message/">

<RESULT>OK</RESULT>

<File>&lt;?xml version=&apos;1.0&apos; encoding=&apos;UTF-8&apos;?&gt;

&lt;Dati:Parametri xmlns:Dati=&quot;Schema&quot;&gt;

&lt;ELSAG xmlns=&quot;Schema&quot;&gt;

&lt;proj_id&gt;4623&lt;/proj_id&gt;

&lt;BS_short_name&gt;FS0084AAAA01 - B1&lt;/BS_short_name&gt;

&lt;BS_proj_id&gt;1302&lt;/BS_proj_id&gt;

&lt;TARGET_START&gt;2004-04-01&lt;/TARGET_START&gt;

....etc...

If I call the same Web Service from XI, this is the response:

http://tempuri.org/PRWBS_PRIMAVERA/message/" xmlns:SOAP=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAPSDK3=" http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAPSDK2=" http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAPSDK1=" http://www.w3.org/2001/XMLSchema">

<RESULT>OK</RESULT>

<File>&#60;?xml version="1.0" standalone="yes"?&#62;

&#60;Dati:Parametri xmlns:Dati="Schema"&#62;

&#60;ELSAG xmlns="Schema"&#62;

&#60;proj_id&#62;4623&#60;/proj_id&#62;

&#60;BS_short_name&#62;FS0084AAAA01 - B1&#60;/BS_short_name&#62;

&#60;BS_proj_id&#62;1302&#60;/BS_proj_id&#62;

&#60;TARGET_START&#62;2004-04-01&#60;/TARGET_START&#62;

....etc....

In my flow, I use a java mapping to parse the content of tag <File> into a message.

My mapping works correctly only with the first option.

Is it possible to change XI Soap Adapter encoding for HTML?

My java mapping uses this parser:

public void execute(InputStream MyInputStream, OutputStream MyOutputStream)

throws StreamTransformationException {

SAXReader reader = new SAXReader();

Document document;

try {

document = reader.read(MyInputStream);

...

this instruction generates an Exception only with XI message.

Can anybody help me??

Thanks;-)