Hi,
I am trying to figure out if there is some sort of reason why a call to a web service in OE10.2B will have a different result than OE11.3.
My situation is as follows.. I have to make a web service call (REST) and for ease of use I have opted to use the MS WebClient library. In my development environment I am running on OE11.6 - all fine and result is as expected. My client's application is running OE10.2B as there is no quick way to upgrade their application version at this time - hence the reason for using something other than the OE libraries to make the call.
The call is simple and works in both versions of OE, but when I get the response from the call in OE10.2B it seems to be in a different encoding. However, running the exact same code in OE11.3 it is in UTF8, as expected. This is a sample of the call:
DEFINE VARIABLE oWebClient AS WebClient NO-UNDO.
DEFINE VARIABLE cResponse AS LONGCHAR NO-UNDO.
DEFINE VARIABLE oData AS "System.Byte[]" NO-UNDO.
oWebClient = NEW WebClient().
oWebClient:Headers:Add("Content-Type","application/x-www-form-urlencoded").
oWebClient:QueryString:Add("Param1", "Value1").
oWebClient:QueryString:Add("Param2", "Value2").
ASSIGN
oData = oWebClient:UploadValues("requestUrl","POST",oWebClient:QueryString).
cResponse = UnicodeEncoding:UTF8:GetString(oData).
COPY-LOB FROM OBJECT cResponse TO FILE "D:\temp\test.json".
Why would OE10.2B cause the result to be different? I checked the cpinternal for both versions and they are set the same.
Perhaps something like this knowledgebase.progress.com/.../LONGCHARpopulatedfromNETmethodincorrectlysettoUTF16
Hi Tom,
Okay - that is a workaround - but a working one ;-) . I'll use that. Thanks
Nice to know :-)
<ProgressEmailLogo-png_2D00_150x42x2-png> Update from Progress Community
ChUIMonster Perhaps something like this knowledgebase.progress.com/.../LONGCHARpopulatedfromNETmethodincorrectlysettoUTF16
You received this notification because you subscribed to the forum. To unsubscribe from only this thread, go here.
Flag this post as spam/abuse.