Forum Discussion
How to get data from a SOAP WS with Power BI
I use this query:
let
Source = Xml.Tables(Web.Contents("xxxxxxxxxxxx"
,[Content=File.Contents("xxxxxxx\post.xml"),Headers=[Authorization="Basic xxxxxxxxxxx" ,#"Accept-Encoding"="gzip,deflate", #"Content-Type"="text/xml;charset=UTF-8"]]))
in
Source
The Authorization is OK. My post.xml is:
<soap:Envelope xmlns:urn="urn:sap-com:document:xxxxxxxx" xmlns:soap-envelope="http://www.w3.org/2003/05/soap-envelope" >
<soap:Header/>
<soap:Body>
<urn:ZimStockProl>
<IAlmacen>xx</IAlmacen>
<ICentro>xx</ICentro>
</urn:ZimStockProl>
</soap:Body>
</soap:Envelope>
I try it in SOAPUI and is OK, but the result in Power BI is different:
I think It must be the dirección "urn"
I ve got the same issue
with the query:
let
body="<soapenv:Envelope xmlns:soapenv=#(0022)http://schemas.xmlsoap.org/soap/envelope/#(0022) xmlns:csv=#(0022)http://www.csv.org#(0022)>
<soapenv:Header/>
<soapenv:Body>
<csv:ReportTransactions>
<csv:DateFrom>2020-01-01</csv:DateFrom>
<csv:DateBy>2020-01-04</csv:DateBy>
<csv:UNP>691759953</csv:UNP>
</csv:ReportTransactions>
</soapenv:Body>
</soapenv:Envelope>",
Source = Xml.Tables(Web.Contents("http://XXXXX.1cws?wsdl",
[Content=Text.ToBinary(body),
Headers =[
#"Authorization" = "basic XXXX",
#"Accept-Encoding"= "gzip,deflate",
#"User-Agent"= "Apache-HttpClient/4.1.1 (java 1.5)",
//#"Content-Length"="360",
//SOAPAction="#(0022)http://www.csv.org#JI_WScsv:ReportTransactions_DD#(0022)",
#"Content-Type"="application/soap+xml;charset=UTF-8;action=#(0022)http://www.csv.org#JI_WScsv:ReportTransactions_DD#(0022)",
#"Connection"="Keep-Alive"]]))
in
Source
it works in SOAP UI
but it returns result like no parameters are posted to service. Expanding of these tables does not give needed result
fiddler's header after SOAP UI (when SOAP gives needed result)
Can anybody help whith it?
- Anonymous6 years agoNot applicable
I have solved the problem
I needed in URL of WSDL - remove in the end "?wsdl"
let body="<soapenv:Envelope xmlns:soapenv=#(0022)http://schemas.xmlsoap.org/soap/envelope/#(0022) xmlns:csv=#(0022)http://www.csv.org#(0022)> <soapenv:Header/> <soapenv:Body> <csv:ReportTransactions> <csv:DateFrom>2020-01-01</csv:DateFrom> <csv:DateBy>2020-01-04</csv:DateBy> <csv:UNP>691759953</csv:UNP> </csv:ReportTransactions> </soapenv:Body> </soapenv:Envelope>", Source = Xml.Tables(Web.Contents("http://XXXXXXXXXXX/ws/ws_csv.1cws", // NOT http://XXXXXXXXXXX/ws/ws_csv.1cws?wsdl - // this ending ?WSDL stopped the recieving of the response! [Content=Text.ToBinary(body), Headers =[ #"Authorization" = "basic XXXXXXXXXX", #"Accept-Encoding"= "gzip,deflate", #"Content-Type"="text/xml;charset=UTF-8" ]])), Table = Source{1}[Table], Table1 = Table{0}[Table], Table2 = Table1{0}[Table] in- Anonymous6 years agoNot applicable
Hi All
I am facing issues while accessing the token bassed SOAP WSDL in Power BI.
Also any other way to accomplish this task part from Zapsys ODBC
Error
DataSource.Error: Web.Contents failed to get contents from 'https://sync.severa.com/webservice/S3/API.svc' (500): Internal Server Error
Details:
DataSourceKind=Web
DataSourcePath=https://sync.severa.com/webservice/S3/API.svc
Url=https://sync.severa.com/webservice/S3/API.svcCode in Advance Editor
let
Source = Xml.Tables(Web.Contents("https://sync.XXXXXX/S3/API.svc"
,[Content=File.Contents("C:\XX\post.xml"),Headers=[#"Accept-Encoding"="gzip,deflate", #"Content-Type"="text/xml;charset=UTF-8"]]))
in
Sourcepost.XML
<?xml version="1.0"?>
-<soapenv:Envelope xmlns:soap="http://soap.severa.com/" xmlns:ns1="http://soap.severa.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">-<soapenv:Header>
<ns1:WebServicePassword>Api Token Key</ns1:WebServicePassword>
</soapenv:Header>-
<soapenv:Body>-
<soap:GetHourEntriesByDate>
<soap:startdate>2020-04-12T09:00:00</soap:startdate>
<!--Optional:--></soap:GetHourEntriesByDate>
</soapenv:Body>
</soapenv:Envelope>
- Anonymous6 years agoNot applicable
Have you tried to get data with SOAP UI or POSTMAN software?
If it is OK - then I recommend to watch carefully for the headers in POST metod.