go to post Krishnaveni Kapu · Jun 17 It worked : set status = pRequest.XMLExportToStream(.XmlStream) Do httpRequest.EntityBody.CopyFrom(XmlStream)
go to post Krishnaveni Kapu · Jun 17 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 Krishnaveni Kapu · Jun 17 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 Krishnaveni Kapu · Jun 14 Hi , Did you get a solution for erasinng <![CDATA[]]>? I am having similar issue.
go to post Krishnaveni Kapu · May 23 This is how I am doing : --------- Class PKG.ObservationWrapper Extends %Persistent{ Property bundleReq As HS.FHIR.DTL.vR4.Model.Resource.Bundle; } ------- Set wrapperBundleObj = ##class(PKG.ObservationWrapper).%New() Set wrapperBundleObj.bundleReq = ##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(reqStream,"vR4")Set tSC = BusinessService.SendRequestSync("SAMPLE_ROUTER", wrapperBundleObj.bundleReq) expection : ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zNewRequestMessage+4^Ens.MessageHeader.1 *%GetSwizzleObject,HS.FHIR.DTL.vR4.Model.Resource.Bundle -- logged as '-' number - @'' =======================================
go to post Krishnaveni Kapu · May 23 I have similar requirement ; I would like to send bundle object to a router and then perform a DTL with in the routing rule ( this BundleObject as a souce to my DTL). during this process , I get below expection reqStream = json content in a stream Set BundleObject=##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(reqStream,"vR4") Set tSC = BusinessService.SendRequestSync("SAMPLE_ROUTER", BundleObj) expection : ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zNewRequestMessage+4^Ens.MessageHeader.1 *%GetSwizzleObject,HS.FHIR.DTL.vR4.Model.Resource.Bundle -- logged as '-' number - @''
go to post Krishnaveni Kapu · May 15 Hi All , It is solved : Using this earlier : d ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(pTarget.EntityBody,pRequest,,,1,"aelqtw") using the below solved the issue : d ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(pTarget.EntityBody,pRequest,,,1,"aeltw")
go to post Krishnaveni Kapu · May 13 I have below issue - I have an ID with 123456.(ID as a dynamic value coming from request message) I wanted it to be displayed as "123456" in Json Stream. Code Example: set object = ##class(%ZEN.proxyObject).%New() set object.ID = ID set x = ##class(%ZEN.Auxiliary.jsonArrayProvider).%WriteJSONStreamFromObject(.json,object) Case:1ID : 123456 Will output: { "ID": 123456 } but I need : { "ID": "123456" } Case:2ID : "123456" (adding double quotes) Will output: { "ID": "\"123456\"" } but I need : { "ID": "123456" } Thanks in advance.
go to post Krishnaveni Kapu · Apr 26 It is working now my XML : <Input> <data> <Id> <Type>A</Type> <Value>123</Value> </Id> </data></Input> need to use --> Document.data.Id
go to post Krishnaveni Kapu · Apr 26 Thanks for your reply. I wants to read in a routing rule when condition.(not in a class method)
go to post Krishnaveni Kapu · Apr 26 Document.{/dasta/is/ip/lo/loi/@material} What is "Document" here ? parent tag of xml ? Actually I am looking for syntax to read through XML input in my routing rule .. Used something like this - <when condition="XML.{/Msg/Info/Id} = "123""> but its not working ?
go to post Krishnaveni Kapu · Jun 20, 2023 Its resolved : ..ConvertDateTime("09/Jun/23 09:40:00 BST","%d/%b/%y %H:%M:%S BST","%Y%m%d%H%M%S") output = 20230609094000