Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 ?
Solved! Go to Solution.
@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
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
@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
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
Check out the July 2025 Power BI update to learn about new features.