Index: WSimpl/Vhisie4/Winkelkar/WinkelkarExport/Sender.cls.xml =================================================================== diff -u -r40567 -r40812 --- WSimpl/Vhisie4/Winkelkar/WinkelkarExport/Sender.cls.xml (.../Sender.cls.xml) (revision 40567) +++ WSimpl/Vhisie4/Winkelkar/WinkelkarExport/Sender.cls.xml (.../Sender.cls.xml) (revision 40812) @@ -19,8 +19,13 @@ 1 + +WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IntractoInformeerder +1 + + -FtpAPI:TECH.Ftp.FtpAPI="",DateTimeApi:TECH.DateTime.DateTimeAPI,FormatApi:TECH.Format.FormatAPI +FtpAPI:TECH.Ftp.FtpAPI="",DateTimeApi:TECH.DateTime.DateTimeAPI,FormatApi:TECH.Format.FormatAPI,IntractoInformeerder:WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IntractoInformeerder 1 1 %Status @@ -29,6 +34,7 @@ set ..FtpAPI = $$$Inject(FtpAPI,##class(TECH.Context).Instance().GeefFtpAPI()) set ..DateTimeApi = $$$Inject(DateTimeApi,##class(TECH.Context).Instance().GeefDateTimeAPI()) set ..FormatApi = $$$Inject(FormatApi,##class(TECH.Context).Instance().GeefFormatAPI()) + set ..IntractoInformeerder = $$$Inject(IntractoInformeerder,##class(WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IoCContainer).Instance().Resolve("IntractoInformeerder")) quit $$$OK ]]> @@ -43,10 +49,16 @@ try { set FtpConfiguratie = ##class(TECH.Ftp.FtpConfiguratie).%New(##class(TECH.Config.ConfigMgr).Instance().GeefString("Vhisie4.WinkelkarExport.FtpConfiguratie.ConnectionString")) set FtpConfiguratie.ServerBestandsLocatie = ##class(TECH.Config.ConfigMgr).Instance().GeefString("Vhisie4.WinkelkarExport.FtpConfiguratie.ServerBestandsLocatie") + Do ..FtpAPI.Connecteer(FtpConfiguratie) - Do ..FtpAPI.VerzendStream(..GeefXMLStream(Winkelkar),..GeefBestandNaam(Winkelkar) ) + #dim BestandNaam As %String = ..GeefBestandNaam(Winkelkar) + + Do ..FtpAPI.VerzendStream(..GeefXMLStream(Winkelkar), BestandNaam ) Do ..FtpAPI.VerbreekVerbinding() + + Do ..IntractoInformeerder.Registreer(BestandNaam) + } catch { #Dim Exception as TECH.IException = ##class(TECH.ExceptionHandler).Catch() Set Response = ..GeefVerzondenGefaaldSendResponse(Winkelkar,Exception.ToString()) @@ -108,7 +120,7 @@ Set SendResponse = ##class(WS.Vhisie4.WinkelkarExport.SendResponse).%New() Set SendResponse.Winkelkar.VanHoeckeId = Winkelkar.Id Set SendResponse.Winkelkar.Status = Status - Set SendResponse.Winkelkar.Foutmelding = Foutmelding + Do SendResponse.Winkelkar.Foutmelding.Write(Foutmelding) Quit SendResponse ]]> Index: WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder.cls.xml =================================================================== diff -u --- WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder.cls.xml (revision 0) +++ WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder.cls.xml (revision 40812) @@ -0,0 +1,15 @@ + + + +1 +TECH.Mockable + + +1 +BestandNaam:%String +WS.Vhisie4.WinkelkarExport.SendResponse + + + + + Index: vhUnitTest/WSimpl/Vhisie4/Winkelkar/Sender/Test.cls.xml =================================================================== diff -u -r40567 -r40812 --- vhUnitTest/WSimpl/Vhisie4/Winkelkar/Sender/Test.cls.xml (.../Test.cls.xml) (revision 40567) +++ vhUnitTest/WSimpl/Vhisie4/Winkelkar/Sender/Test.cls.xml (.../Test.cls.xml) (revision 40812) @@ -25,13 +25,18 @@ Do FtpApiMock.VerwachtMethodCall("VerzendStream",..Matches.Stream(##class(vhTest.Utils.WS.Vhisie4.WinkelkarExport.dto.Winkelkar).StandaardProductAsStream()),"VH-WinkelkarId-2011-06-30-091500.xml").DanDoeNiks() Do FtpApiMock.VerwachtMethodCall("VerbreekVerbinding").DanDoeNiks() - Set Sender = ##class(WSimpl.Vhisie4.Winkelkar.WinkelkarExport.Sender).%New(FtpApiMock) + set IntractoInformeerderMock = ##class(vhTest.Mock.WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IntractoInformeerder).%New() + do IntractoInformeerderMock.VerwachtMethodCall("Registreer","VH-WinkelkarId-2011-06-30-091500.xml") + Set Sender = ##class(WSimpl.Vhisie4.Winkelkar.WinkelkarExport.Sender).%New(FtpApiMock,,,IntractoInformeerderMock) + #dim SendResponse As WS.Vhisie4.WinkelkarExport.SendResponse = Sender.Send(##class(vhTest.Utils.WS.Vhisie4.WinkelkarExport.dto.Winkelkar).StandaardProduct()) Do $$$AssertEquals(SendResponse.Winkelkar.VanHoeckeId,"WinkelkarId") Do $$$AssertEquals(SendResponse.Winkelkar.Status,"Bezig") + Do $$$AssertEquals(SendResponse.Winkelkar.Foutmelding.Read(),"") Do FtpApiMock.Verifieer() + Do IntractoInformeerderMock.Verifieer() ]]> Index: WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerderSoap.cls.xml =================================================================== diff -u --- WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerderSoap.cls.xml (revision 0) +++ WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerderSoap.cls.xml (revision 40812) @@ -0,0 +1,90 @@ + + + +1 +WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IntractoInformeerder,%SOAP.WebClient + + + +This is the URL used to access the web service. +http://new.vanhoecke.be/nl/api/cart/import + + + + +This is the namespace used by the Service +http://new.vanhoecke.be/nl/api/cart/import + + + + +Use xsi:type attribute for literal types. +1 + + + + +This is the name of the Service +CartImportService + + + + +This is the SOAP version supported by the service. +1.1 + + + +BestandNaam:%String +WS.Vhisie4.WinkelkarExport.SendResponse + + + + +Cart:WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IntractoInformeerder.Cart +1 +WS.Vhisie4.WinkelkarExport.SendResponse + + + + +Object:%CacheString +1 +WS.Vhisie4.WinkelkarExport.SendStatus + + + + +1 +bestandsnaam:%String +1 +1 +WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IntractoInformeerder.Cart +1 +rpc +encoded + + + + + + Index: WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder/Line.cls.xml =================================================================== diff -u --- WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder/Line.cls.xml (revision 0) +++ WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder/Line.cls.xml (revision 40812) @@ -0,0 +1,63 @@ + + + + + +1 +%RegisteredObject,%XML.Adaptor +right + + +0 + + + +http://new.vanhoecke.be/nl/api/cart/import + + + +Line + + + +0 + + + +%String + + + + + +%String + + + + + +%String +1 + + + + + +%String + + + + + +%GlobalCharacterStream + + + + +%GlobalCharacterStream + + + + + + Index: WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerderMail.cls.xml =================================================================== diff -u --- WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerderMail.cls.xml (revision 0) +++ WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerderMail.cls.xml (revision 40812) @@ -0,0 +1,41 @@ + + + +1 +TECH.RegisteredObject,WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IntractoInformeerder + + +TECH.Mail.MailAPI +1 + + + +1 +1 +%Status +1 + + + + +BestandNaam:%String +WS.Vhisie4.WinkelkarExport.SendResponse + + + + + + Index: WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IoCContainer.cls.xml =================================================================== diff -u --- WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IoCContainer.cls.xml (revision 0) +++ WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IoCContainer.cls.xml (revision 40812) @@ -0,0 +1,16 @@ + + + +TECH.IoC.Container + + +1 + + + + + + Index: WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder/Cart.cls.xml =================================================================== diff -u --- WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder/Cart.cls.xml (revision 0) +++ WSimpl/Vhisie4/Winkelkar/WinkelkarExport/IntractoInformeerder/Cart.cls.xml (revision 40812) @@ -0,0 +1,59 @@ + + + + + +1 +%RegisteredObject,%XML.Adaptor +right + + +0 + + + +http://new.vanhoecke.be/nl/api/cart/import + + + +Cart + + + +0 + + + +%String + + + + + +%String + + + + + +%String +1 + + + + + +%GlobalCharacterStream + + + + +WSimpl.Vhisie4.Winkelkar.WinkelkarExport.IntractoInformeerder.Line +list + + + + + + + Index: WS/Vhisie4/WinkelkarExport/SendStatus.cls.xml =================================================================== diff -u -r39686 -r40812 --- WS/Vhisie4/WinkelkarExport/SendStatus.cls.xml (.../SendStatus.cls.xml) (revision 39686) +++ WS/Vhisie4/WinkelkarExport/SendStatus.cls.xml (.../SendStatus.cls.xml) (revision 40812) @@ -27,8 +27,7 @@ -%String - +%GlobalCharacterStream