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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Anonymous
Not applicable

@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

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
Anonymous
Not applicable

@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

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.