Index: BL/Flow/Offerte/Parser/AbstractParserXML.cls.xml =================================================================== diff -u -r1393 -r1395 --- BL/Flow/Offerte/Parser/AbstractParserXML.cls.xml (.../AbstractParserXML.cls.xml) (revision 1393) +++ BL/Flow/Offerte/Parser/AbstractParserXML.cls.xml (.../AbstractParserXML.cls.xml) (revision 1395) @@ -24,10 +24,6 @@ Do ..ImportXML(DirRead, FileName, DirTemp) // Now convert the generic XML to a proxy object structure - // Optional specific post-processing of the proxy - // Do ..PostprocessProxy() - // Set:..pxOfferte'="" offertes(1)=..pxOfferte - If '$IsObject(..pxOfferte) { Set ParserStatus=##class(ParseStatus).%New(100,"Geen offertes in het bestand") ; geen inhoud } @@ -50,22 +46,22 @@ Set MSMGATEWAY=##Class(TECH.Config.ConfigMgr).Instance().GetString("MSMGATEWAY") Set MSMGATEWAYFOP=##Class(TECH.Config.ConfigMgr).Instance().GetString("MSMGATEWAY_FOP") - Do WL^vhDBG(" ImportXML:"_Dir_FileName) Set DirByFOP=$$$ConvertToFop(Dir) Set TempDirByFOP=$$$ConvertToFop(TempDir) // Get the XSLT to use (implemented by specific parsers) Set XSLT=..getXSLT() If $G(XSLT)="" Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", "","Xml wrong filename "_FileName) Quit // De XSL Transform on the input-xml - Set sc=##class(BL.Sys.FOP.Interface).TransformXML(XSLT,DirByFOP_FileName,$LB($$$Replace(FileName,".xml",""),TempDirByFOP)) + Set sc=##class(BL.Sys.FOP.Interface).TransformXML(XSLT, ##class(TECH.Files).AppendFile(DirByFOP,FileName), $LB($$$Replace(FileName,".xml",""), TempDirByFOP) ) H 5 ; 65 ; Allows the DocBase process to release the file-lock - If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"XSLTransform "_Dir_FileName_" XSLT:"_XSLT) Quit + If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"XSLTransform "_##class(TECH.Files).AppendFile(Dir,FileName)_" XSLT:"_XSLT) Quit ; Else // De gegenereerde xml (=output van XSLT) inlezen in Caché Set sc=..ReadXML(TempDir,FileName) + ;d WL^vhDBG("Result van Read XML : "_$$ParseStatus^vhLib(sc)) Set:($$$ISOK(sc)) Status=$$DELFILE^vhDEV(TempDir,FileName) ; Delete the file after succelful processing Quit @@ -78,21 +74,22 @@ Set reader = ##class(%XML.Reader).%New() // Begin processing of the XML input - Set sc=reader.OpenFile(Dir_FileName) - If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"Openfile: "_Dir_FileName) Quit "" + Set FullFileName=##class(TECH.Files).AppendFile(Dir,FileName) + Set sc=reader.OpenFile(FullFileName) + If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"Openfile: "_FullFileName) Quit "" Do reader.Correlate("ORDER","BL.Flow.Offerte.pxHoofding") ;Associate a class name with the XML element name - If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"Correlate: "_Dir_FileName) Quit "" + ;If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"Correlate: "_FullFileName) Quit "" Set Count=0 For Quit:'reader.Next(.pxOfferte,.sc) Do Quit:$$$ISERR(sc) - . If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"reader.Next: "_Dir_FileName) Quit + . If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"reader.Next: "_FullFileName) Quit . Set Count=Count+1 . Set ..pxOfferte=pxOfferte . Set sc=..PostprocessProxy() . If $$$ISOK(sc) Set Offertes(Count)=..pxOfferte - . If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"PostprocessProxy: "_Dir_FileName) Quit - Quit:$$$ISERR(sc) "" + . If $$$ISERR(sc) Do AddErrorToLog^BL.EC.Common("EDI", "XML2Offerte", sc,"PostprocessProxy: "_FullFileName) Quit + Quit:$$$ISERR(sc) sc Quit $$$OK ]]>