Question
· Feb 23, 2021

Using HTTP.OutboundAdapter to send Page

I am trying to figure out how to send a Page via a HTTP.OutboundAdapter to a URL from Ensemble.

We have a URL that I am able to pass PNo=xxxx%PMsg=xxxx as parameters to send the page to a pager.

http://xxxxx.xxxxx.xxx/Employee/Tools/Paging/SendPage.aspx?PNo=1817&PMsg...

When I send the above URL through a REST client I receive a Response of "SENT".

But when I try to send it through the HTTP.OutboundAdpater I do not get a response.

Method Sample(pReq As osuwmc.Page.DataStructures.Page, Output pResp As %Net.HttpResponse) As %Status
{
    set pInput = "PNo="_pReq.PagerNumber_"&PMsg="_pReq.Message
    set tSC = ..Adapter.Post(.tResponse,,.pInput)
    if ('tSC)
    {
        $$$LOGERROR(tSC)
    }
    quit tSC
}
 
When I call ..Adapter.Post(.tResponse,,.pInput) am I to assume that .pInput is putting
the data into the body of the message and not appending it to the URL?
 
How can I input parameters to be added to the end of the URL that is
being passed in the settings of the Operation?
 
Thanks
Scott
Product version: Ensemble 2018.1
$ZV: Cache for UNIX (IBM AIX for System Power System-64) 2018.1.3 (Build 414U) Mon Oct 28 2019 11:24:02 EDT
Discussion (3)2
Log in or sign up to continue

Hey Scott.

I think you can achieve this by setting the second parameter to a comma delimted list of the request names, and then pass each value afterwards (in the same order you have the names).

For example:

Method Sample(pReq As osuwmc.Page.DataStructures.Page, Output pResp As %Net.HttpResponse) As %Status
{

    Set FormItems = "PNo,PMsg"
    
    set tSC = ..Adapter.Post(.tResponse,FormItems,pReq.PagerNumber,pReq.Message)

    if ('tSC)

    {

        $$$LOGERROR(tSC)

    }

    quit tSC

}