Skip to Content
Mar 18, 2019 at 03:55 PM

Unexpected character '-' (code 45) in prolog

2444 Views Last edit Mar 20, 2019 at 12:32 PM 2 rev

I am developing a call to an SAP Fieldglass web service via a CL_HTTP_CLIENT object. The call is not made through a consumer proxy.

When I do a test call in soapUI, the call succeeds so I've written the HTTP client object to mimic the soapUI call as closely as possible. In the ABAP code, the HTTP request does reach the Fieldglass server, but the response is:

Unexpected character '-' (code 45) in prolog; expected '<' # at [row,col {unknown-source}]: [1,1]

There is no character '-' passed in the data or anywhere that I can see. I searched the Internet extensively looking for a solution and though many sites like Stackoverflow discuss similar issues unrelated to SAP, none of the varied solutions have resolved the issue in SAP.