<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Customers> <Customer> <No.>888888</No.> <Name>Kostas Stratelos</Name> <Address>612 South Sunset Drive</Address> <Address2/> <City>Miami</City> <PhoneNo/> <TerritoryCode>ΕΞΩΤΕΡΙΚΟΥ</TerritoryCode> <CreditLimitLCY>0</CreditLimitLCY> <CustomerPostingGroup>ΕΞΩΤΕΡΙΚΟΥ</CustomerPostingGroup> <CurrencyCode>USD</CurrencyCode> <LanguageCode>ENU</LanguageCode> <PaymentTermsCode>1M(8D)</PaymentTermsCode> <SalespersonCode>JR</SalespersonCode> <ShipmentMethodCode>ΕΣΑ</ShipmentMethodCode> <CountryCode>US</CountryCode> <LocationCode>ΚΙΤΡΙΝΟ</LocationCode> <VATBusPostingGroup>ΕΞΑΓΩΓΕΣ</VATBusPostingGroup> <E-Mail>spotsmeyer's.furnishings@cronuscorp.net</E-Mail> </Customer> </Customers>to a queue and use the following code
OnRun() CREATE(MQBus); CREATE(CC2); CREATE(XMLDom); CC2.AddBusAdapter(MQBus, 1); MQBus.OpenReceiveQueue('.\private$\toNavision', 0, 0); CC2::MessageReceived(VAR InMessage : Automation "''.IDISPATCH") InMsg := InMessage; InS := InMsg.GetStream(); // open the response queue and create a new message MQBus.OpenWriteQueue('.\private$\fromNavision', 0, 0); OutMsg := CC2.CreateoutMessage('Message queue://.\private$\fromNavision'); OutS := OutMsg.GetStream(); XMLPORT.IMPORT(55002, InS); OutS.WRITE('Finished import'); OutMsg.Send(0);