D
David O'Regan
Guest
Hi All, I have spent some more time working on this and come up with a solution, of sorts, but am failing to understand why it works and my above solution does not. If anyone could shed some light I'd appreciate so i understand better going forward (or anyone else has this issue). First a little more information, in case it's relevant. I am running version 11.6 SP 3 and the service I am trying to call is a third-party SOAP web service that requires an XML document passed to it and responds in kind with an XML document. Running the same request as my original post through POSTMAN or SOAPUI is successful. In the end i managed to get it working in my program by opting to use the System.Net.WebClient instead of OpenEdge.Net.HTTP. Here is the code I am using (successful), it is my understanding that this should not be functionally different from the above? /**** Code ****/ /* lcXML is a longchar generated by write-xml and webResponse is a longchar */ ASSIGN cURL = " http://Site/Service" . FIX-CODEPAGE(webResponse) = "UTF-8". HttpClient = NEW System.Net.WebClient(). httpClient:headers:add("content-type":U,"application/x-www-form-urlencoded":U). webResponse = HttpClient:UploadString(curl,"xmlRequest=":U + lcXML). HttpClient
ispose(). DELETE OBJECT HttpClient. MESSAGE WebResponse VIEW-AS ALERT-BOX. /* Success! */ Hope this helps if anyone is having the same problem. Hopefully someone can explain where I am going wrong. Thanks, David
Continue reading...

Continue reading...