Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

/sap/bc/soap/rfc/ returns invalid HTTP response if short dump

Sandra_Rossi
Active Contributor

I have activated the ICF service /sap/bc/soap/rfc/ so that to call RFC-enabled function modules generically without generating a specific Service for each function module I need to call (I know, it's "bad").

If a short dump happens, or even an Error or Abort message, the ABAP kernel takes the control to send an HTTP response which violates the HTTP protocol.

e.g.

FUNCTION z_http_test.
  MESSAGE 'test' TYPE 'X'.
ENDFUNCTION.

The response contains "content type" added by the ABAP kernel which violates the HTTP protocol (space is forbidden) - This can be an issue in software reading this response -- e.g C# library System.Net.Http fails with message "An error occurred while sending the request. The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF" / the reason is misleading because it's not about CR and LF, it's about the invalid space in "content type" / in C# it's very difficult to capture the HTTP response as explanation here -- :

HTTP/1.1 500 Internal Server Error
Content-Type: text/html; charset=utf-8
Content-Length: 537
connection: close
content type: text/xml; charset=utf-8        <======= violates the HTTP protocol

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode> SOAP-ENV:Client </faultcode>
      <faultstring> Internal Server Error </faultstring>
      <detail>
        <rfc:Error xmlns:rfc="urn:sap-com:document:sap:soap:functions">
          <type>RABAX_STATE</type>
          <message>The current application has triggered a termination with a short dump.</message>
        </rfc:Error>
      </detail>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I tested it with kernels 753 SP300 and 785 SP100 (ABAP 7.52 and 7.56), still same error. No SAP note found.

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

I didn't find a solution in SAP to fix the faulty behavior of the kernel. No SAP note found.

In case I get such an error in the C# program, I know that I need to look at SAP short dumps (ST22), and possibly use the ICF Recorder (SICF > Edit > Recorder > Activate > select Request + Response) if needed to see the exact response.

1 REPLY 1

Sandra_Rossi
Active Contributor

I didn't find a solution in SAP to fix the faulty behavior of the kernel. No SAP note found.

In case I get such an error in the C# program, I know that I need to look at SAP short dumps (ST22), and possibly use the ICF Recorder (SICF > Edit > Recorder > Activate > select Request + Response) if needed to see the exact response.