PeopleTools and Lifecycle Management - PSFT (MOSC)

MOSC Banner

Outbound REST POST always results in error

I have some code I am developing which will send a simple POST to a 3rd party system API endpoint which is shown below:

/* Create the message object */

   &msgOutbound = CreateMessage(@("Operation." | &strOperationname));

    

   /* Set the IB Info */

   &IBInfo = &msgOutbound.IBInfo;

   &bReturn = &IBInfo.LoadConnectorProp("HTTPTARGET");

   &bReturn = &IBInfo.LoadRESTHeaders();

   &IBInfo.ConnectorOverride = True;

   &IBInfo.IBConnectorInfo.ConnectorClassName = "HttpTargetConnector";

   &IBInfo.IBConnectorInfo.ConnectorName = "HTTPTARGET";

    

   &bReturn = &IBInfo.IBConnectorInfo.DeleteConnectorProperties("Content-Type");

   &bReturn = &IBInfo.IBConnectorInfo.AddConnectorProperties("Content-Type", &strContentType, %HttpHeader);

   If All(&strAuthorization) Then

     &bReturn = &IBInfo.IBConnectorInfo.DeleteConnectorProperties("Authorization");

     &bReturn = &IBInfo.IBConnectorInfo.AddConnectorProperties("Authorization", &strAuthorization, %HttpHeader);

   End-If;

   &bReturn = &IBInfo.IBConnectorInfo.DeleteConnectorProperties("URL");

   &bReturn = &IBInfo.IBConnectorInfo.AddConnectorProperties("URL", &strURL, %HttpProperty);

   &bReturn = &IBInfo.IBConnectorInfo.DeleteConnectorProperties("Method");

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center