Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Yggdrasill
Responsive Resident
Responsive Resident

SOAP web services XML

Hello

 

I'm having issues getting data from a SOAP WS XML. The source uses Preemptive basic HTTP authentication with user/pass which I've already received.

 

 

let
    Source = Xml.Tables(Web.Contents("URL"))
in
    Source

This returns attribute names and such but no data at all. I'm not prompted for authentication by the way.

 

 

I've tried to manipulate the headers 

 

 

let
    Source = Web.Contents("wsdl", 
[Headers=[Authorization="user pass"]]), Xml = Xml.Tables(Source) in Xml

 

 

 

Does anyone have any idea how to actually get data from this ?

2 ACCEPTED SOLUTIONS
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Yggdrasill,

Please change your code to the following and check if you get data.

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


There is a disscussion in the following similar thread, you can check JasonL's reply and erickfranz's reply to get details.
https://community.powerbi.com/t5/Desktop/How-to-get-data-from-a-SOAP-WS-with-Power-BI/td-p/29040

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks Lydia. I got it to work with a lot of help with the thread you listed.

First of all to list my setup and envorinment

 

  • Host uses SOAP web services with preemptive authentication in HTTP header.
  • My IP is allowed to pass through my source which as well have given me a username and a password.

With a little tweak this is my solution.

let
SourceURL = "wsdl-URL", //host provides this address. Url ends often with "wsdl"

options = [ #"Authorization" ="Basic USER:PASS=", //User:pass decoded with SOAP UI
            #"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 text pasted from wordpad (which I created with SOAPUI open source program)-- "), Headers=options]) , XmlContent = Xml.Tables(WebContent), in XmlContent


References used to create this code:

This thread (Jasons solution and juliovidigal alterations)
This video (on how to use SOAP UI to create the XML file/text)
This program (Download the freeware SOAP UI to create the Xml which is pasted in the "Xml text" Section. Paste the Xml text to wordpad and replace all " with #(0022) and then paste from wordpad to the "Xml text" section the advanced editor in power query.

Host actually blocked my IP for a mistake so I blame them for few of those hours of my life. However this took some time and I hope this helps someone

Edit: Funny how the "Code window" changes ":" and "P" to a smiley ass

 

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Yggdrasill,

Please change your code to the following and check if you get data.

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


There is a disscussion in the following similar thread, you can check JasonL's reply and erickfranz's reply to get details.
https://community.powerbi.com/t5/Desktop/How-to-get-data-from-a-SOAP-WS-with-Power-BI/td-p/29040

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Lydia. I got it to work with a lot of help with the thread you listed.

First of all to list my setup and envorinment

 

  • Host uses SOAP web services with preemptive authentication in HTTP header.
  • My IP is allowed to pass through my source which as well have given me a username and a password.

With a little tweak this is my solution.

let
SourceURL = "wsdl-URL", //host provides this address. Url ends often with "wsdl"

options = [ #"Authorization" ="Basic USER:PASS=", //User:pass decoded with SOAP UI
            #"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 text pasted from wordpad (which I created with SOAPUI open source program)-- "), Headers=options]) , XmlContent = Xml.Tables(WebContent), in XmlContent


References used to create this code:

This thread (Jasons solution and juliovidigal alterations)
This video (on how to use SOAP UI to create the XML file/text)
This program (Download the freeware SOAP UI to create the Xml which is pasted in the "Xml text" Section. Paste the Xml text to wordpad and replace all " with #(0022) and then paste from wordpad to the "Xml text" section the advanced editor in power query.

Host actually blocked my IP for a mistake so I blame them for few of those hours of my life. However this took some time and I hope this helps someone

Edit: Funny how the "Code window" changes ":" and "P" to a smiley ass

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.