cancel
Showing results for 
Search instead for 
Did you mean: 

ABSL String gets truncated beyond 883 characters

cf-michael
Participant
0 Kudos

Hello experts!

I'm currently working on an outbound call to a REST service using the WebServiceUtilities using the ExecuteRestServicesWithoutEncoding method. Initial tests of the service yielded positive results until we started adding more information to the payload after which we started getting HTTP 500 errors from the REST service.

A quick investigation revealed an incomplete XML message since the message from SAP seems to be truncated after 883 characters. I started looking at the ABSL code and found that after appending to the variable myPayload (of type String, which should be unlimited in length) the output seems to get truncated if the myPayload variable exceeds 883 characters. Looking deeper into the myPayload variable, I found that the complete string value is actually contained within the myPayload variable, and it seems it's the retrieval and output of the value that gets truncated with a message at the end of the output value:

...2021-04-20</MutatieDatum><PersonId>FLE" (truncated, original length: 1433)

If I perform a substring (of up to 883 character long) I am able to output the substring without the truncation message being appended to the end. If I perform a substring over 833 I get a truncated substring with a truncation message as above. I've attempted to split the payload into 2 variables which individually is 500 characters in length, but when I concatenate them and pass them in the payload parameter, the payload gets truncated as well:

var result = WebServiceUtilities.ExecuteRESTServiceWithoutEncoding(ScenarioName, ServiceName, HttpMethod, HttpResource, URLParameter, HeaderParameter, ContentType, myPayload1 + myPayload2);

I find this behavior quite baffling and I haven't found anything online to explain this issue. I'm hoping someone out there has encountered this issue and can point me to a solution.

Best Regards,

Michael

Accepted Solutions (1)

Accepted Solutions (1)

former_member206060
Contributor

Hello Michael,

Are you observing the truncation message while debugging in SDK? If that is the case then very well it would be that it is the known limitation from SDK side. Though you see the message is truncated in SDK, the message will be retrieved correctly in the backend and there should not be any issues due to this in the functionality.

You can use an external tool to execute the request, hence being able to inspect the full Response and manipulate the string within the SDK using the Response.

If you are receiving HTTP 500 errors still, you can create an incident to find out the actual issue.

Thanks,

Dhanya

cf-michael
Participant

You are exactly right Dhanya! The "truncation" does indeed stem from the SDK's limitations.

Thank you for taking the time to respond!

Answers (0)