Options

How do I call NAS from Clients

ashu_gargsashu_gargs Member Posts: 16
Hi All,
I want to route the posting documents through MSMQ. I am able to create the Write and Read Queue. The problem that i am facing is, when sending a message to MSMQ it's sent from the client's machine and to the local MSMQ client installed on the client's machine.
How can i trigger creation of this Queue from NAS as soon as user clicks on the Post button from Nav Client??? this will help me in installing MSMQ server on NAS server only and not on the clients..
Any alternative method for this???

Please help.....

Comments

  • Options
    SaalekSaalek Member Posts: 181
    Hi
    What DLL are you using with the queues ???

    You can try to send the documents directly to the server's queue.
    I get it using CPHandler DLL (Navision uses this to manage commerce portal). This DLL's functions, allows you to pass a windows registry path as a parameter to know where the queue is.
    You can add a reference in Windows registry to a queue stored in the server and when you post the document the queue used will be th servers queue. Now you can use NAS to retrieve the document from a queue and save it in a directory.

    Example:
    My servers's queue is MYQUEUE
    I added in windows registry this key
    In LOCAL_MACHINE\SOFTWARE\QUEUES\SERVERQUEUE
    The key is Direct=OS:Server\Private$\MYQUEUE

    In Navision I declared an automation (MYQUEUES) using CPHandler.
    And a XML Doc (for example, it works with file variables)

    IF ISCLEAR(MYQUEUES) THEN
    CREATE(MYQUEUES);
    IF ISCLEAR(XMLDocOUT) THEN
    CREATE(XMLDocOUT);

    XMLDocOUT.load('c:\MyXML.xml');

    Cola.SendToLabel('MYQUEUES',XMLDocOUT,1,0'SOFTWARE\QUEUES\SERVERQUEUE',FALSE);

    This instruction, send the doc to the queue referenced in this registry path with the name MYQUEUES, in this case to servers queue

    I think this can help you

    Bye
  • Options
    DenSterDenSter Member Posts: 8,304
    No it's really not that complicated... The queue path defined in your system is probably defined as '.\private$\somequeuename', where the dot at the start means the current machine. If you replace the dot with the machine name that holds the queue, or the IP address, you should be all set.
  • Options
    ashu_gargsashu_gargs Member Posts: 16
    Thanks buddy .. now it's working from clients also by just changing the path of the queue....

    One more query ... how can i make MSMQ to wait before sending the second, only once some codeunits are successfully run for the first message.
Sign In or Register to comment.