My Oracle Support Banner

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

Last updated on APRIL 30, 2018

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

To view full details, 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 a vibrant support community of peers and Oracle experts.