User bio
404 bio not found
Member since Jan 27, 2023
Replies:

Class TEST.pRequest Extends (%Persistent, %XML.Adaptor)
{

Property getURL As %String(MAXLEN = 10000000);

}

==================================

Class TEST.Operation.UrlOP Extends Ens.BusinessOperation
{

Parameter ADAPTER = "EnsLib.HTTP.OutboundAdapter";

Parameter INVOCATION = "Queue";

Method UrlApi(pRequest As TEST.pRequest, Output pResponse As TEST.pResponse) As %Status
{
    
        Set httpRequest= ##class(%Net.HttpRequest).%New()
        Set httpRequest.Server = ..Adapter.HTTPServer
        Set httpRequest.Location = ..Adapter.URL
        Set httpRequest.SSLConfiguration = ..Adapter.SSLConfig
        Set httpRequest.SSLCheckServerIdentity = 0
        Set httpRequest.Https = $$$YES
        Set httpRequest.ContentType = "application/xml"
        Set XmlStream = ##class(%Stream.GlobalCharacter).%New()
        Do XmlStream.Write("<?xml version=""1.0"" encoding=""UTF-8""?><getURL><Url1>"_pRequest.getURL_"</Url1></getURL>")
        //instead of above lines of code I would like to send pRequest into a stream 
        Do httpRequest.EntityBody.CopyFrom(XmlStream)
        Set sc = httpRequest.Post("", 2)
}    

QUIT $$$OK    

XData MessageMap        
{
<MapItems>
  <MapItem MessageType="TEST.pRequest">
    <Method>UrlApi</Method>
  </MapItem>
</MapItems>
}
}

=====================================

Certifications & Credly badges:
Krishnaveni has no Certifications & Credly badges yet.
Global Masters badges:
Krishnaveni has no Global Masters badges yet.
Followers:
Krishnaveni has no followers yet.
Following:
Krishnaveni has not followed anybody yet.