Problem to drop a Message in MSMQ on remote server...

iceborgiceborg Member Posts: 67
Im having some throuble simply just throwing a msmq message into a Queue on a remote computer....maybee i got the syntax mixed up or something..


Not sure im totally correct here but this should work under a button in a form right? (assuming i have a XML loaded in the XMLDoc)

it's a Public Queue called fromNavision on the comuter REMOTESERVER where everyone has full control.
As far a i know all ports etc. are open between the sending conouter and REMOTESERVER.


CREATE(MQBus);
CREATE(Cc2);
Cc2.AddBusAdapter(MQBus,1);
MQBus.OpenWriteQueue('REMOTESERVER\fromNavision',0,0);
OutMsg := Cc2.CreateoutMessage('Message [url=queue://REMOTESERVER]queue://REMOTESERVER[/url]\fromNavision');
OutS := OutMsg.GetStream;
XMLDoc.save(OutS);
OutMsg.Send(0);

Anyway ...it gives me a funny error saying "Automation Server Error returned HRESULT -2147352567 when trying OpenWriteQueue...



If anyone could help out I would be most greatful:-)

Comments

  • DenSterDenSter Member Posts: 8,307
    Try:
    MQBus.OpenWriteQueue('REMOTESERVER\private$\fromNavision',0,0);
    OutMsg := Cc2.CreateoutMessage('Message queue://REMOTESERVER\private$\fromNavision');
    
    You have to specify where Navision can find the queue, and I believe it has to be a private queue. By the way, the queue MUST be a NON-transactional message queue.
  • ErictPErictP Member Posts: 164
    I got the same HRESULT errorcode when there was no MSMQ installed on the clientmachine.
  • iceborgiceborg Member Posts: 67
    Hmmm... tried with Private Queues and it didn't work either.....
    I really hope its not so that hte Client machnie calling must have MSMQ installed in order for it to work.....
  • DenSterDenSter Member Posts: 8,307
    WHat components of the MSMQ do you have installed? I found that having the AD components installed made it totally inaccessible. I only have the common components installed, and I know of one of my customers who also have the triggers installed, but that's it. The Active Directory part for some reason screws things up.
  • iceborgiceborg Member Posts: 67
    On the Machine where the Naivsion Client is running and i want to drop the messages from I don't have any MSMQ stuff installed, Only the Naivsion DEV Toolkit and a Navision Client basically.

    On the Server where I want the Messages Drop in MSMQ I have MSMQ Common installed (Windows 2003 Server SP1). No AD Integration.

    Funny is that if I Install Naivison Client & SDK on the server with the MSMQ installed and run my form or codeunit with the code from this machine it works nicely and messages drop in the Local Queue.
  • IHateLinuxIHateLinux Member Posts: 223
    Hi,

    for using MSMQ you have to have installed MSMQ on the machine where you want to use MSMQ.

    Why?
    Because MSMQ is creating a temporary so called outgoing queue.

    HTH,

    Rainer
  • DenSterDenSter Member Posts: 8,307
    It should not make a difference, but have you tried installing MSMQ on the client machine? The code should use the Navision communication component and the Message Queue Adapter, which should work without having the queueing installed itself. Maybe a bare Navision client install does not register the communication component, since you are saying that your code DOES work from the server machine. Do you have Navision intalled or are you running it uninstalled?

    By the way, Google is not returning anything on the number you specified, are you sure that is the right number? Usually you get a number of posts when you copy the error number to google.
  • iceborgiceborg Member Posts: 67
    Hi Guys,
    Thanks for all the superfast input!

    I Agree, I also thought that the Adapter actually had some built in functionallity towards MSMQ... :D , like beeing able to produce a Outgoing Message itself, without having a Local Queue to depend on....


    So what Reiner says makes sense, but i sure hope its not like that, cause what i want is that the clients direct, (No not the naivsion way to drop in some temp table and let NAS doing it,I need instant reply) drop to MSMQ, but the clients are in a Citrix Environment and there is a lot of them....so getting another thing installed in the Citrix Farm like MSMQ Common would be abit troublesome, but i guess i have to try... ](*,) :shock:
  • iceborgiceborg Member Posts: 67
    here is the number again...(HRESULT) -2147352567

    But it's comming from Navisions Automation Object the MSMQBusAdapter so i guess its not a all super defined normal error number :-)

    This number I can produce Anytime!, OS please let me know if you need me to repeat it! \:D/ :mrgreen:
  • iceborgiceborg Member Posts: 67
    abit scary though...My Navision Clients running in Citrix...all having their own little sort of of temporary Outgoing Queues....huuuuuu...
    Sounds like trouble.
Sign In or Register to comment.