using cphandler

Dduran
Member Posts: 22
I'm using the cphandler dll to communicate two applications using xml documents througth msmq service. The first one using .net and the second one with dynamics Nav 4.0 sp2. If in the first one we dont use this dll to send the message then, then message arrive and its readed but then event cphandler::messagerecieved is not activated.
I´ve tried with Navision communication component -->cphandler with the same results.
Sorry for my english..... :oops:
I´ve tried with Navision communication component -->cphandler with the same results.
Sorry for my english..... :oops:
0
Comments
-
[Topic moved from Dynamics NAV to Navision forum]0
-
Find a help file called devguide.chm on your product CD. This file will explain how to use the communication component and MSMQ. You're looking for the MQBusadapter, not the CPHandler. I couldn't get the CP one to work either, but the BA is quite easy to program.0
-
Hi denster,
we have tried the Navision comunication component with the mqbusadapter and found problems with spanish special characters that cut the message, that with cphandler dont occurs.
We suppose that this dll is listening for messages and when one arrive the event "message_received" is activated, but thet not occurs. The message dissapear from the queue but the event is not activated.
We´ve resolved the problem using cphandler in both sides but we want know why?
Thanks.0 -
Hi,
two questions:
1.) Have you set the property "WithEvents" on your Automation variable?
2.) Is the codeunit running as "Single Instance" == True ?
HTH,
Rainer0 -
it's because of double byte characters. I used to have a ink to how this works internally, but can't find it. Basically, single byte characters are represented by a pair of bits, and double byte characters are represented by two pairs of bits. For single a byte character to be represented by a double byte character, you need to have a value in the second bit pair, and it was decided that the pair '00' would be the "filler" for these characters. So if the single byte character is '12', then the double byte character for the same character would be '12 00'.
The problem with this is that a single byte character stream's EOS character is the bit pair '00'. So if you work with a component that can only understand single byte characters (like the Navision MSMQ Bus Adapter), it sees the '00' and then thinks it is EOS, and it will stop processing. Because the component has some serious limitations (there's no error feedback, the message just disappears), it is really difficult to figure out what is going on.
I may be incorrect on parts of this, because I only understand it halfway, but it is because of the double byte EOS bit pair that the BA fails. I've solved it by programming a MSMQ monitor by using the object model directly, but it now appears that the CPhandler can handle those characters also.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