Problem
I try get a response from a wsdl WebService and use therefore Web.Contents https://docs.microsoft.com/en-us/powerquery-m/web-contents in Power Query and need to post optional xml-content.
Use Case One
In my first Use-Case I included a local xml-file with File.Contents https://docs.microsoft.com/en-us/powerquery-m/file-contents to post it to the Service. This works very well.
=Xml.Tables(Web.Contents("http://10.3.3.33:18080/WebService?wsdl",
[Content=File.Contents("E:\input.xml"),Headers=[#"Accept-
Encoding"="gzip,deflate", SOAPAction="", #"Content-
Type"="text/xml;charset=UTF-8"]]))
Use Case Two
In my seconde Use-Case I need to use the same Content of the xml-file out of a cell. With Text.FromBinary https://docs.microsoft.com/en-us/powerquery-m/text-frombinary I load the content to a new column called [XML_TEXT]. Edit it and convert it to a Binary with Text.ToBinary in a column called [Binary] in Power Query.
I do not know how to post [XML_TEXT] or [Binary] to the webservice!
= Table.AddColumn(PreviousStep, "UserDefined", each
Xml.Tables(Web.Contents("http://10.3.3.33:18080/WebService?wsdl",
[Content=[Binary],Headers=[#"Accept-Encoding"="gzip,deflate",
SOAPAction="", #"Content-Type"="text/xml;charset=UTF-8"]])))
Result
I expect to get a XML back as in Use Case One. But I receive the following message:
DataSource.Error: Fehler beim Abrufen von Inhalten von
"http://10.3.3.33:18080/WebService?wsdl" (500) durch "Web.Contents":
Internal Server Error
Details:
DataSourceKind=Web
DataSourcePath=http://10.3.3.33:18080/WebService
Url=http://10.3.3.33:18080/WebService?wsdl