Send XML Message to remote IP message queue
Steve
Member Posts: 81
Hello All,
I have two machines that need to keep specific table data in sync.
1. I created a process that will convert all the changes in actions and send them in XML format to another computer's message queue.
2. The other computer will monitor the queue, retrieve the message and act upon the actions.
All this works perfectly as long a the queue is on the same network or machine ALPHA can communicate with machine BRAVO.
I need the ability to send the message to a IP across the internet to a remote machines message queue.
A bit of the code I researched is below, but I continue to get errors in the OPENWRITEQUEUE command.
This works fine
Files.OPEN('C:\Test.xml');
Files.CREATEINSTREAM(InS);
XMLDom.load(InS);
CC2.AddBusAdapter(MQBus,1);
MQBus.OpenWriteQueue('.\private$\toNavision',0,0);
OutMsg := CC2.CreateoutMessage('Message [url=queue://]queue://[/url].\private$\toNavision');
OutS := OutMsg.GetStream();
XMLDom.save(OutS);
OutMsg.Send(0);
This does not work, but is the concept I'm looking for.
Files.OPEN('C:\Test.xml');
Files.CREATEINSTREAM(InS);
XMLDom.load(InS);
CC2.AddBusAdapter(MQBus,1);
MQBus.OpenWriteQueue('Direct=TCP:xxx.xxx.xxx.xxx\\private$\\tonavision',0,0);
OutMsg := CC2.CreateoutMessage('FormatName:Direct=TCP:xxx.xxx.xxx.xxx\\private$\\tonavision');
OutS := OutMsg.GetStream();
XMLDom.save(OutS);
OutMsg.Send(0);
](*,)
Thanks in advance
Steve
I have two machines that need to keep specific table data in sync.
1. I created a process that will convert all the changes in actions and send them in XML format to another computer's message queue.
2. The other computer will monitor the queue, retrieve the message and act upon the actions.
All this works perfectly as long a the queue is on the same network or machine ALPHA can communicate with machine BRAVO.
I need the ability to send the message to a IP across the internet to a remote machines message queue.
A bit of the code I researched is below, but I continue to get errors in the OPENWRITEQUEUE command.
This works fine
Files.OPEN('C:\Test.xml');
Files.CREATEINSTREAM(InS);
XMLDom.load(InS);
CC2.AddBusAdapter(MQBus,1);
MQBus.OpenWriteQueue('.\private$\toNavision',0,0);
OutMsg := CC2.CreateoutMessage('Message [url=queue://]queue://[/url].\private$\toNavision');
OutS := OutMsg.GetStream();
XMLDom.save(OutS);
OutMsg.Send(0);
This does not work, but is the concept I'm looking for.
Files.OPEN('C:\Test.xml');
Files.CREATEINSTREAM(InS);
XMLDom.load(InS);
CC2.AddBusAdapter(MQBus,1);
MQBus.OpenWriteQueue('Direct=TCP:xxx.xxx.xxx.xxx\\private$\\tonavision',0,0);
OutMsg := CC2.CreateoutMessage('FormatName:Direct=TCP:xxx.xxx.xxx.xxx\\private$\\tonavision');
OutS := OutMsg.GetStream();
XMLDom.save(OutS);
OutMsg.Send(0);
](*,)
Thanks in advance
Steve
Steve
0
Comments
-
When you're working with Message Queues across domain lines will the private message queue still be accessible?
Have you tried making the destination message queue public?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
- 323 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