Simple XML call
I'm now just getting back into Web services after a many year absence and tried creating a simple cXMLHttpTransfer process to send a vendor a small xml file and get a return. I tested the site and the XML I'm sending with Postman and it works as expected but obviously I'm not doing something right with the DF call.
Code:
Get Create (RefClass(cXmlHttpTransfer)) to hoHttp
Move "www.VendorSite.com" to sServer
Move "api/sizesrch" to sFilePath
Get Create (RefClass(cXMLDOMDocument)) to hoDoc
Set psDocumentName of hoDoc to "C:\api\MyXML.xml"
Get LoadXMLDocument of hoDoc to bOk
If (bOk) Begin
Get HttpGetXmlString of hoHttp sServer sFilePath hoDoc to sXmlR
If (sXmlR="") Send Stop_Box "No document returned" "Error"
Send Destroy of hoHttp
End
But what happens is that I get an error from the vendor in sXmlR that says invalid security which means it isn't reading the XML I'm sending it. The XML contains a "secret" or password node. Again, this works fine in Postman.
What might I be missing?
Bob Worsley
203-249-2633
rlworsley at gmail.com
Do or do not. There is no try. — Yoda