Reading MSMQ message with XMLPort.Import

kostrat
Member Posts: 2
Hello all,
I am working on an integration project involving Navision 4.0.
I am sending an MSMQ message of the following form (contains non english characters)
to read it in and create this customer. 55002 is the corresponding XMLPort.
It does not work.
When I read the same xml from a regular file it works fine.
Any suggestions?
Best regards,
Kostas
I am working on an integration project involving Navision 4.0.
I am sending an MSMQ message of the following form (contains non english characters)
<?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);
to read it in and create this customer. 55002 is the corresponding XMLPort.
It does not work.
When I read the same xml from a regular file it works fine.
Any suggestions?
Best regards,
Kostas
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions