I am trying to transform an Enlib.EDI.XML.Document through aXLT I know how to trans form the xml document through a xlt stylesheet but been trying to get an Enlib.EDI.XML. Document from a procees by creating aoperation that will do the transformation of this to file if this can be done in a process all ideas welcome so far I have come to this and I keep getting an error :ERROR{ERROR #5002: Cache error: <PROPERTY DOES NOT EXIST>zXMLTOJson+6^TestEnvironment.Custom.GENERAL.CUSTOM.XLT.XMLToJsonOperation1.1 *Parameters,EnsLib.EDI.XML}
Class XLT.XMLToJsonOperation1 Extends (Ens.BusinessOperation, EnsLib.XSLT.Transformer)
{ Parameter ADAPTER = "EnsLib.File.OutboundAdapter"; Property Adapter As EnsLib.File.OutboundAdapter; /// Style sheet to convert Message to Json
Property XLTStyleSheet As %String(MAXLEN = ""); Parameter SETTINGS = "XLTStyleSheet:Basic"; Parameter INVOCATION = "Queue"; /// Default operation is to use a TransformationRequest to transform the input XML into the output
Method XMLTOJson(pRequest As EnsLib.EDI.XML.Document, Output pResponse As EnsLib.XSLT.TransformationResponse) As %Status
{
Set tSC=$$$OK,$ZT="Trap"
do {
// Grab the input content and the stylesheet key
Set tInput = pRequest
Set tSSKey = ..XLTStyleSheet
Set tSC = ..Transform(tInput,tSSKey,pRequest.Parameters,.tOutput)
If $$$ISOK(tSC) {
Set pResponse = ##class(EnsLib.XSLT.TransformationResponse).%New()
Set pResponse.Content = tOutput
}
} while (0)
Exit Quit tSC
Trap Set tSC=$$$ERROR($$$CacheError,$ZE) Goto Exit
} XData MessageMap
{
<MapItems>
<MapItem MessageType="EnsLib.EDI.XML.Document">
<Method>XMLTOJson</Method>
</MapItem>
</MapItems>
} }