Answered by:
SSRS: XML Data Source (WebService): Can not read body of the soap envelope

Question
-
Hi,
I try to connect to a webservice to use its data for a SSRS report. After a lot of tweeking I finally managed to connect successfully and the webservice is returning data (checked by Fiddler). However SSRS gives me an error "Can not read Body of the Soap envelope". No matter what Kind of query I enter in the ElementPath, the error keeps the same (in fact I can enter complete nonsense there, it doesn't matter at all). So I guess there's something SSRS doesn't understand in the XML returned by the webservice. However the XML looks pretty nice for me:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Header></soapenv:Header> <soapenv:Body> <qt:SAPReturn xmlns:qt="http://tempuri.org/"> <qt:ET_DATA_INV_TABLE> <qt:ET_DATA_INV_ELEMENT> <qt:SAP_Fld_ZZVBELN>0420000293</qt:SAP_Fld_ZZVBELN> <qt:SAP_Fld_ZZPOSNR>000010</qt:SAP_Fld_ZZPOSNR> </qt:ET_DATA_INV_ELEMENT> <qt:ET_DATA_INV_ELEMENT> <qt:SAP_Fld_ZZVBELN>0420000293</qt:SAP_Fld_ZZVBELN> <qt:SAP_Fld_ZZPOSNR>000010</qt:SAP_Fld_ZZPOSNR> </qt:ET_DATA_INV_ELEMENT> </qt:ET_DATA_INV_TABLE> <qt:ET_DATA_MEA_TABLE> <qt:ET_DATA_MEA_ELEMENT> <qt:SAP_Fld_ZZVBELN>0420000293</qt:SAP_Fld_ZZVBELN> <qt:SAP_Fld_ZZPOSNR>000010</qt:SAP_Fld_ZZPOSNR> </qt:ET_DATA_MEA_ELEMENT> <qt:ET_DATA_MEA_ELEMENT> <qt:SAP_Fld_ZZVBELN>0420000293</qt:SAP_Fld_ZZVBELN> <qt:SAP_Fld_ZZPOSNR>000010</qt:SAP_Fld_ZZPOSNR> </qt:ET_DATA_MEA_ELEMENT> </qt:ET_DATA_MEA_TABLE> </qt:SAPReturn> </soapenv:Body> </soapenv:Envelope>
I removed some attributes due to privacy reasons.
Any idea what's the Problem here?
Thanks
Thomas Pagel
Monday, November 4, 2013 5:27 PM
Answers
-
So we finally found out the reason for this issue... The webservice was returning the content type "application/XML" which worked perfectly with ASP. However SSRS couldn't understand it (as well as the OLE Automation Integration in SQL Server). Changing the content type to "text/XML" did the trick. Never thought of the webservice as the root cause because I had the source code of an ASP page available and it worked with it. Crazy...
Thomas Pagel
- Marked as answer by Charlie Liao Wednesday, November 13, 2013 1:59 PM
Wednesday, November 13, 2013 12:47 PM
All replies
-
Hi Thomas,
From your description, the error occurs when using web services as the SQL Server Reporting Services report data source. In your scenario, it seems that you enter the detail XML code on the body of the soap envelope. When creating dataset using web services as datasource, we need type the detail XML code. Here are some links about it, please see:
WebService as DataSource in SSRS
SSRS: An Example of How to consume a web service without codingRegards,
Charlie LiaoIf you have any feedback on our support, please click here.
Charlie Liao
TechNet Community Support- Edited by Charlie Liao Wednesday, November 6, 2013 8:09 AM
- Proposed as answer by Charlie Liao Wednesday, November 13, 2013 5:35 AM
Wednesday, November 6, 2013 8:09 AM -
So we finally found out the reason for this issue... The webservice was returning the content type "application/XML" which worked perfectly with ASP. However SSRS couldn't understand it (as well as the OLE Automation Integration in SQL Server). Changing the content type to "text/XML" did the trick. Never thought of the webservice as the root cause because I had the source code of an ASP page available and it worked with it. Crazy...
Thomas Pagel
- Marked as answer by Charlie Liao Wednesday, November 13, 2013 1:59 PM
Wednesday, November 13, 2013 12:47 PM