Forum Discussion
dramus
4 years agoContinued Contributor
Calling multiple SOAP calls
I have a business need to grab data from a cloud source that requires multiple SOAP calls to complete. The process is as follows: Login Execute Report Download Report results Logout. Tryin...
smpa01
4 years agoCommunity Champion
dramus just being curious, how do you make SOAP calls through PQ? I could not do that and I had a use case? I had to switch to powershell making SOAP calls and fetching data.
- dramus4 years agoContinued Contributor
SOAPEnvelope= "<s:Envelope xmlns:s=""http://www.w3.org/2003/05/soap-envelope"" xmlns:a=""http://www.w3.org/2005/08/addressing""> <s:Header> <a:Action s:mustUnderstand=""1"">http://www.XXX.com/dataservices/bidata/DataService/ExecuteReport</a:Action> <a:To s:mustUnderstand=""1"">https://servicehost/services/DataService</a:To> </s:Header> <s:Body> <ExecuteReport xmlns=""http://www.XX.com/dataservices/bidata/""> <request xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""> <ReportPath>"&ReportPath&"</ReportPath> <ReportParameters> </ReportParameters> </request> <context xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""> <ServiceId>"&ServiceIDValue&"</ServiceId> <ClientAccessKey>"&MyKey&"</ClientAccessKey> <Token>"&TokenValue&"</Token> <Status>Ok</Status> <StatusMessage i:nil=""true"" /> <InstanceKey>"&InstanceIDValue&"</InstanceKey> </context> </ExecuteReport> </s:Body> </s:Envelope> ", GetReportKey = Xml.Document( Web.Contents( "https://service2.XXX.com/services/DataService", [Content = Text.ToBinary(SOAPEnvelope), Headers = [#"Content-Type" = "application/soap+xml; charset=utf-8"]] ) )Here's an example from my PQ