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) }
go to post
Thank you Ashok Kumar
go to post
Thank you , I will try these.
go to post
Hi Eduard,
I have a scheduler task and associated class that works.
Class Sample.Util.CreateTask Extends (%SYS.Task.Definition, %Persistent)
{
Parameter PROPERTYVALIDATION = 1;
Parameter TaskName = "Sample.Util.CreateTask";
Method OnTask() As %Status
{
// Perform the logic
}
}
Is there a way to Enable or Disable the abbove task "CreateTask()" from an external function/Method/class ?
go to post
Thank you Padmaja.
go to post
Many thanks , it worked
go to post
I tried using "w" also "wt" - no luck.
Below is the version that I am using
IRIS for UNIX (Red Hat Enterprise Linux 7 for x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:13:58 EDT [HealthConnect:3.5.0] [HealthConnect:3.5.0]
go to post
Thank you , I will try
go to post
My target is an .xsd
which I read it from Target class - EnsLib.EDI.XML.Document
go to post
Thank You.
go to post
Thank you.
go to post
I have tried this but it is not giving current time , an hour back it displays.
go to post
Thank you .This Worked for me.
DATEDIFF('s',inputDt,NOW())
go to post
Thank You.It worked
go to post
It worked :
set status = pRequest.XMLExportToStream(.XmlStream)
Do httpRequest.EntityBody.CopyFrom(XmlStream)
go to post
Do XmlStream.Write("<?xml version=""1.0"" encoding=""UTF-8""?><getURL><Url1>"_pRequest.getURL_"</Url1></getURL>")
This is removing CDATA from the xml.
go to post
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>
}
}
=====================================
go to post
Hi ,
Did you get a solution for erasinng <![CDATA[]]>?
I am having similar issue.
go to post
What if I need output in format - yyyymmddhhmmss
go to post
Thank you.
go to post
I recreated the Router and then worked as expected.