CPHandler doc or example

fufikk
Member Posts: 104
Hi,
could you tell me where can I find documentation for using CpHandler for MSMQ?
or provide me with a short example how to send/receive a message?
thanks,
could you tell me where can I find documentation for using CpHandler for MSMQ?
or provide me with a short example how to send/receive a message?
thanks,
0
Comments
-
Take a look at Cu 7700 ADCS NAS Startup. It uses MSMQ0
-
Yep, but it uses Communication Component and Msmq bus adapter. I am particulary interested in CPHandler functions: SendToLabel etc...0
-
I C take a look at cu 6221 Request Handler
XMLDocumentRecv.ParseXMLDocument(XMLDocIn,XMLDocOut,ProcessType); QueueHandler.SendToLabel(NASMgt.GetReqOutQueue,XMLDocOut,QueuePriority,NASMgt.GetReplyTimeOut,NASMgt.GetHKEYLOCALMACHINEReq,FALSE)
0 -
Yep, I've seen that - the only problem is, that my computer doesn't have the registry keys that are in settings, thus I don't know what is supposed to be there...0
-
Could you explain what your problem is? You don't have Registry keys?0
-
Yep, pretty much. I don't know what should be there - what keys and what values.
I could also use a small sample of how to send and receive a message - somehow google doesn't show much it this subject.
And a general question - how is CPHandler better than ComCom2 + MSMQBusAdaper? more efficient?...0 -
Commerce portal is being discontinued. So it doesn't make sense to use it.0
-
Hi,
i'm using cphandler for interchange xml documents between Navision and other applications and it works fine.
It has one restriction, you must use cphandler in both sides. In exah machine you have define the registry keys.
With ComCom2 + MSMQBusAdaper i have problems wirh spanish spcial characters.
I give you an example:
v_pathregistro:='SOFTWARE\Navision\Navision_Infoges\'; //Path in the registry key
v_claveregistro:='Receive_queue';
//Registro windows is the automation 'Windows Script Host Object Model'.WshShell
v_colarecibir:=RegistroWindows.RegRead(('HKEY_LOCAL_MACHINE\'+v_pathregistro+v_claveregistro);
IF NOT queuehandler.ListenToLabel(v_claveregistro, v_pathregistro) THEN
ERROR('Can´t read');
You have define the cphandler automation with "with events" property and the system creates the event MessageReceived. This event occurs when a new message is received.
The codeunit whe you define this automation must have the "single instance" propertie with yes value.
To send a message is easier, you only need the name of the destination queue and a xml message and use the send to label method.
Regards, David.0 -
Even better is to program with the MSMQ object model directly. That way you can use VB or C# code samples to construct code in NAV.0
-
[Topic moved from Navision forum to Navision e-Commerce forum]\Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Ok, I'll try your solutions.
In Polish we also have some special chars, but when I use MSMQ Bus + XMLports (which encode data for example in UTF-8) I didn't have problems with special chars.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