Web Connection Wishlist
UTF 16 not 8 from soap
10/03/2005
01:42:05 PM
1MN0TD7YA Show this entire thread in new window
From:
Stephen Wilde
To:
All
Attachments:
None

When using wwsoap
if the response is UTF 16 from soap then it appears as if lcresult is empty
so we use following code to adjust for it

*-- Use Soap to Get Synchronous Data
lcResult = loSoap.CallSoapServer(InputData)

IF !EMPTY(lcResult)

*-- Put Results back and Complete this Event
toAsync.CompleteEvent(, lcResult)

ELSE

*-- Look for UTF16. WC will show an Empty Result (Failure),
* but XML is held in cResponseXML, so test for this and process that here,
*rather than change WC code. Use STRCONV( ,5) to convert back to UTF8

IF loSoap.cResponseXML = CHR(255) + CHR(254)
lcResult = SUBSTR(loSoap.cResponseXML, 3) && Strip off Control Chars
lcResult = STRCONV(lcResult, 10) && Convert to UTF8
IF lcResult = "<?xml"