"EAI HTTP Transport" does NOT encode payload from "HTTPRequestBodyTemplate", when invoked from server side code (eScript) (Doc ID 754192.1)

Last updated on MARCH 02, 2017

Applies to:

Siebel CRM - Version 7.8.2.3 SIA [19221] and later
Information in this document applies to any platform.

Symptoms

Requirement is to use EAI HTTP Transport to POST data to php server.

With POST method an error is received from the php server. It seems that the POST array is empty :-

The incoming message on the Apache server contained a null between each character, preventing php to recognize the POST message.

With GET method, the data was recognized ok, and it could create records in the database.

eScript provided was as follows :-

var EAISiebelAdapter = TheApplication().GetService("EAI HTTP Transport");
var Inputs = TheApplication().NewPropertySet();
var Outputs = TheApplication().NewPropertySet();

var sURL = "http://test010678/index.php";
var sRequest = "var1=test1&var2=test2&var3=test3&var4=test4&var5=test5";

Inputs.SetProperty("HTTPRequestBodyTemplate" , sRequest.toString());
//Inputs.SetValue(sRequest);
Inputs.SetProperty("HTTPRequestURLTemplate",sURL);
Inputs.SetProperty("HTTPRequestMethod" , "POST");
Inputs.SetProperty("CharSetConversion" , "UTF-8");
Inputs.SetProperty("HTTPContentType" , "Content-Type: application/x-www-form-urlencoded");

EAISiebelAdapter.InvokeMethod("SendReceive", Inputs , Outputs);
...

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms