Manually Calling SOAP web services

Just in case others are facing a similar issue: -

Just struggled with calling a SOAP web service that returned Base64 data in a string (this was the contents of a file held in a database). It doesn’t work! Case 34352.

So instead I used an HTTPSocket: -

Dim socket As New HTTPSocket
Dim SOAPCall As String
Dim SOAPResponse As String
Dim XML As New XmlDocument
Dim Data As String

’ This generates the SOAP call. I can share this routine if you are interested.
SOAPCall = GenerateSOAPCall
URL = “http://dell-laptop/tldisubscriber/dlsubscriber.asmx
socket.SetRequestContent(SOAPCall, “text/xml; charset=utf-8”)
SOAPResponse = socket.Post(URL, 30)
XML.LoadXML (SOAPResponse)

’ This was a test app so not the best way of reaching the data! But if you now save “Data” to a file, the file is correctly created!
Data = DecodeBase64(XML.FirstChild.FirstChild.FirstChild.FirstChild.Child(1).FirstChild.Value)

You may also need to set the SOAPAction header.

socket.SetRequestHeader(“SOAPAction”, ActionName)

[quote=108693:@Jim Brock]Just in case others are facing a similar issue: -

Just struggled with calling a SOAP web service that returned Base64 data in a string (this was the contents of a file held in a database). It doesn’t work! Case 34352.

So instead I used an HTTPSocket: -

Dim socket As New HTTPSocket
Dim SOAPCall As String
Dim SOAPResponse As String
Dim XML As New XmlDocument
Dim Data As String

’ This generates the SOAP call. I can share this routine if you are interested.
SOAPCall = GenerateSOAPCall
URL = “http://dell-laptop/tldisubscriber/dlsubscriber.asmx
socket.SetRequestContent(SOAPCall, “text/xml; charset=utf-8”)
SOAPResponse = socket.Post(URL, 30)
XML.LoadXML (SOAPResponse)

’ This was a test app so not the best way of reaching the data! But if you now save “Data” to a file, the file is correctly created!
Data = DecodeBase64(XML.FirstChild.FirstChild.FirstChild.FirstChild.Child(1).FirstChild.Value)[/quote]

But, so You Invoke a Webservice that lack of WSDL Definition??

So I have a WSDL Webservice (WCF - Windows Common Foundation) That lacks of WSDL Definition, nevertheless, It receives requests and Also answer that requests.

But only on VB dot Net, But I’m trying to Replying it on Xojo.

Hi,
If your code is working and you managed to call a SOAP web service in this way, Please send me your GenerateSOAPCall procedure.

thank you very much
oms336@gmail.com