cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Re: How to get data from a SOAP WS with Power BI

@Jonas1 

@juliovidigal 

@Yggdrasill 

@amitchandak 

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.svc

 

Code 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
Source

 

post.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>

Highlighted
Frequent Visitor

Re: How to get data from a SOAP WS with Power BI

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.

Highlighted
Regular Visitor

Re: How to get data from a SOAP WS with Power BI

Yes its working in SOAP UI and I have created above mentioned xml and query by following this thread.

Highlighted
Frequent Visitor

Re: How to get data from a SOAP WS with Power BI

Then it should work.

I had a trouble in some unnoticable things - like conncetion string ending...

 

Also I do not see that in your XML you use #(0022)  instead of " . See my example below - may the trouble in it.

 

body="<soapenv:Envelope xmlns:soapenv=#(0022)http://schemas.xmlsoap.org/soap/envelope/#(0022)

Highlighted
Regular Visitor

Re: How to get data from a SOAP WS with Power BI

I am not using #022 in soap UI and also I made this by review previous posts and they are not using this.

Highlighted
Helper V
Helper V

Re: How to get data from a SOAP WS with Power BI

As @Bulat mentions, you need to replace the quote marks " from the SOAP UI envelope to #(0022) like so:

<?xml version="1.0"?>

-<soapenv:Envelope xmlns:soap=#(0022)http://soap.severa.com/#(0022) xmlns:ns1=#(0022)http://soap.severa.com/#(0022) xmlns:soapenv=#(0022)http://schemas.xmlsoap.org/soap/envelope/#(0022)>-<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>

 

 

If you can connect via SOAP UI and not Power BI, you're doing something wrong in the PQ (advanced editor)

Highlighted
Frequent Visitor

Re: How to get data from a SOAP WS with Power BI

Like a few of the others, I am also having an issue where I just end up with this

 

sanfly_0-1598696790849.png

 

and I'm not sure how to troubleshoot.  Can anyone assist?

 

let
    SourceURL = "http://soap.proofhq.com/19_2_6/soap.wsdl",

options = [ #"Accept-Encoding"= "gzip,deflate",
           // SOAPAction="", 
            #"Content-Type"="text/xml;charset=UTF-8",
            #"Connection"="Keep-Alive"
          ],
WebContent = Web.Contents(SourceURL, 
// Content options in Web.Contents() requires you to authenticate anonymously ! 
    [Content=Text.ToBinary("
    <?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv=#(0022)http://schemas.xmlsoap.org/soap/envelope/#(0022) xmlns:soap=#(0022)https://soap.proofhq.com/#(0022)>
   <soapenv:Header/>
   <soapenv:Body>
      <soap:doLogin>
         <Login>me@mydomain.com</Login>
         <Password>jy@%MZdI#O7gikwl23dKI@IG9!5W</Password>
         <Subdomain>mysubdomain</Subdomain>
      </soap:doLogin>
   </soapenv:Body>
</soapenv:Envelope>
"), 
Headers=options]) ,
XmlContent = Xml.Tables(WebContent)
in
    XmlContent
Highlighted
Advocate I
Advocate I

Re: How to get data from a SOAP WS with Power BI

Good Morning.
What should your output be?

In the ones I did in the past, I always used XML.Tables ....

let

Source = Xml.Tables(Web.Contents("https://advertising.criteo.com/API/v201305/AdvertiserService.asmx?WSDL"

,[Content=Text.ToBinary("<soapenv:Envelope xmlns="&Character.FromNumber(34)&"https://advertising.criteo.com/API/v201305"&Character.FromNumber(34)&" xmlns:soapenv="&Character.FromNumber(34)&"http://schemas.xmlsoap.org/soap/envelope/"&Character.FromNumber(34)&">

<soapenv:Body>

<clientLogin>

<username>aaaaa@aaaa.com</username>

<password>aaaaaaaa</password>

</clientLogin>

</soapenv:Body>

</soapenv:Envelope>"),Headers=[#"Accept-Encoding"="gzip,deflate", #"Content-Type"="text/xml;charset=UTF-8"]]))

in

Source

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors