SSIS 2005 mangling input XML from web service.
Hi, I've got a strange problem that I have spent an entire day and a half trying to figure out. In a SSIS 2005 package, I am calling a web service method, which returns an xml document in a string, to be saved to a file (initially). However, whether I attempt to output the response xml string to a variable, or a file, the resulting xml is invalid. The problem is that first, SSIS wraps the entire xml string in a "<string>" tag, then it escapes the "<" and ">" characters. Here is a snippit of the output: <?xml version="1.0" encoding="utf-16"?> <string> &lt;SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt; ... &lt;/SOAP-ENV:Body&gt; </string> I have trapped and saved the response from the web service method, and it is passing valid XML to callers. I've even explicitly set the web method output to a valid xml string, so I could be absolutely sure of what's being passed back to the calling application. Also, the WSDL "headers" are exactly the same as well. I know I could create a script task, and replace the escaped characters, but not only does that add a ton of extra processing, there's no reason why I should HAVE to perform string replacement, when I know I've created another package that correctly handles web service xml data. Any ideas? Any and all help, greatly appreciated. Thanks. Tony
March 22nd, 2011 5:53pm

I Figured out the problem. I was passing the xml from the web service as a string (which is something you should not do). DOH! I changed the web method to return an xmldocument, loaded the well-formed xml string into THAT, and passed it back to the calling app (SSIS in this case). XML is now perfectly formed in SSIS. Tony
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2011 7:46pm

Hi Tony, I am facing the same problem by using SSIS 2005, I don't know how to change the web method to return an xmldocument.
May 11th, 2011 2:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics