Skip to Main Content

How to send the text data in Oracel soa 12c ( REST Adapter.

siva naga prasadApr 21 2021

Hi All,
One of the customer requirement, We need to send the text data (GraphQL format) to the customer REST API, For this requirement we are write the java code inside the BPEL and store the data in one variable. String data is stored in the particular variable this variable we are used in the invoke activity for sending the request to the customer API . In the REST adapter we configured as request body as text you can see the below screen shot.
image.pngWe are invoked the the rest service and deployed the composite and tested it is getting error "Length Required" and Error code is 411
<?xml version="1.0" encoding="UTF-8"?><messages>
<body_var>mutation {
loadId: "16228",
ecrd: "2021-05-31T13:01:09+00:00"
}) {
errors {
<bindingFault xmlns="">
<part name="summary">
<summary>Length Required</summary>
<part name="code">
<part name="detail">
<detail><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
If I am using the property in the invoke activity "<bpelx:toProperty name="rest.binding.http.Content-Length">0</bpelx:toProperty>" then we are not getting the above error.
Can any one suggest me how to send the text data in REST Adapter to the customer API and provide the solution of this technical issue.
Suggest me any blogs or documents of reference.
Please let me know if you need any further information.
Best Regards,
Siva Prasad.

Post Details
Added on Apr 21 2021
1 comment