Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[2131] Get the Message - MSMQ

Last post 07-29-2008 10:52 AM by shahidnoor86. 27 replies.
Page 2 of 2 (28 items) < Previous 1 2
Sort Posts: Previous Next
  • 04-01-2003 11:47 AM In reply to

    oMsg.Body = oDOM.xml

    1) Set the Message's Body to the DOM's xml property
             oMsg.Body = oDOM.xml
    2) Send the message
    3) After receiving/peek the message, loadXML from the oMsg.Body
             oDOM.loadXML oMsg.Body

    NOTE: The message body will be stored as Unicode, 2 bytes per character. So, if the msg is limited to 4MB in size, then effectively only 2MB of text (the oDOM.xml property) can be sent.

    >> Henry

    Quote:
    [1]Posted by vg on 14 Sep 2002 04:32 PM[/1]
    successfully sent as I could see the xml text in the body


    • Post Points: 0
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 04-15-2003 4:46 PM In reply to

    • binoy
    • Not Ranked
    • Joined on 04-15-2003
    • New Member
    • Points 5

    VB-AS/400 App

    We have an app working this way -
       Web/MSMQ server creates a message packet in XML/DB2 format, wraps it using base64 algorithm and keeps it in outboundq of the web/msmq server. A trigger (MSMQ trigger) fires which will post (HTTPS) this data to supplier queues in a server around our premises which will unwrap it and insert into our AS/400 (using HitODBC). [We use this mechanism since a third party is hosting our server]
       CRON services working on our local server picks data from the AS/400 and will send across to our web/msmq server using the same mechanism.

    -Binoy
    • Post Points: 0
  • 06-03-2003 2:27 AM In reply to

    • amaretto
    • Not Ranked
    • Joined on 06-03-2003
    • New Member
    • Points 25

    Messagebody an XML doc

    Documentation states that anything could be referred as the body of the MSMQMessage , as f.ex. an XML document . Would it be possible to give me a glimp of how you reference this object to enpack it in the body ?
    I'm having problems with it . Thnks in advance .
    • Post Points: 0
  • 06-11-2003 5:55 AM In reply to

    • amaretto
    • Not Ranked
    • Joined on 06-03-2003
    • New Member
    • Points 25

    bodystream

    using SYSTEM.messaging, one could use the Body.bodystream to pump a filestream into the body of the message . Is it still available usder MSMQ API ? I cannot find it .
    Furthermore, the explanation given below is very valuable for me . I have still one question, I do have to get rid of the unicode property : I cannot effort doubling the data on small radiolinks . In order to compare performance of MSMQ3.0 with other products (TIBCO RendezVous), I have to get UTB8 , ASCII ...
    But the data coming from the layers above me is always XML-document . How can I accomplish ?

    Perhaps bytestream ? But then again : no streamproperty for the messageBody ...
    • Post Points: 0
  • 07-08-2003 9:52 AM In reply to

    • amaretto
    • Not Ranked
    • Joined on 06-03-2003
    • New Member
    • Points 25

    no so smart to do

    Best thing to do is byte[] .
    Putting it into a string : look on your networksniffer : a lot of formatting data
    (20h) gets included ! No ideal when the network is on heavy duty .
    • Post Points: 0
  • 01-07-2004 10:17 PM In reply to

    • asp_msmq
    • Not Ranked
    • Joined on 01-07-2004
    • New Member
    • Points 5

    ASP and MSMQ

    OK I've got the windows forms idea down. How can I send and receive from an ASP page. What I would like to be able to do is the following:

    1. A user modifies data.
    2. post the user change to the queue.
    3. Have a listener pick up and process the user change.
    4. Post to the queue a sucess.
    5. return that sucuss to the user.

    I have a problem with sept 2 and how to impliment.

    Step 5 I have no idea on how to do this. It seems that I would need an additional listener that would pick up the return sucess message and would know what user to return it it. I am thinking that I will need some type of block on the ASP page that will wait until it receives an return....but how??

    • Post Points: 0
  • 03-11-2004 4:22 PM In reply to

    MSMQ Requirements?

    I have installed MSMQ on 2 Win2000 machines and have written a simple program to send a message from one to the other. I can successfully send a message from VB to my local machine with a pathname of ".\Private$\testq". However, when I attempt to cross the network to a known computer called RMPOSC-714 it fails the the error message below. This time I am setting pathname to "RMPOSC-714\testq".

    The error is: -1072824214: The operation is not supported for a WORKGROUP installation.

    Both PCs are on the network and in the domain.

    What am I missing?
    • Post Points: 0
  • 04-13-2004 11:13 AM In reply to

    • MDeiters
    • Not Ranked
    • Joined on 04-13-2004
    • New Member
    • Points 5
    You need to use this pathname:
    Dim q As New Messaging.MessageQueue("FormatNameIRECT=OS:RMPOSC-714\private$\testq")

    A good example on how to get the Queues real path would be this

    For Each queue As Messaging.MessageQueue In Messaging.MessageQueue.GetPrivateQueuesByMachine("RMPOSC-714")
               messagebox.show(queue.Path)
    Next
    • Post Points: 0
  • 05-25-2004 4:05 PM In reply to

    • gdiazzap
    • Not Ranked
    • Joined on 05-25-2004
    • New Member
    • Points 5

    MSMQ

    I need to Know hoy many messages are in a MSMQ Queue using API, WMI or OCX component using Visual Basic
    Any Idea?

    Gabriel
    • Post Points: 0
  • 09-21-2004 12:23 AM In reply to

    • thongfam
    • Not Ranked
    • Joined on 09-21-2004
    • New Member
    • Points 5

    MSMQ

    Hi,


    I have similar error "The operation is not supported on a workgoup installation of computer" while testing MSMQ program. I am using VB6 to write the MSMQ program. Do you have any advise on how can I overcome it?

    I also have problem determining the MSMQ server name and Queue name. Any idea where can I find these info. I have installed MSMQ and added reference to MSMQ 2.0 Object Library.

    The syntax which you have posted seems to be for .NET version. Thanks in advance.

    Regards
    Thongfam
    • Post Points: 0
  • 12-08-2004 6:33 AM In reply to

    How to send and receive an XML file in a message q

    Hi,

    Could you please let me know, how to send an xml file as an object to a message queue? If possible can you provide me any code snippet for this as I'm novice to this technology.

    Also, I want to receive this message as an XML file only.

    Thanks in advance.
    -CyberLotus
    • Post Points: 0
  • 12-08-2004 7:26 PM In reply to

    XML sample

    Ummm, there's a lot of other stuff around the code that I have (which was in a VB.DLL used within ASP pages), but I tried to pull out the working code that would get to the essence of what you need. Essentially, this code opens a queue, creates a message on the queue, sets the body of the message, then sends the message. We developed another module which gets back the Id from the message sent so we use that to track the status of the send. Not sure if it works, but it's pretty close ... maybe I left something off, but this is code that has been working for the last several years ... having generated hundreds of thousands of messages. If you have any questions, or want some ideas on some more complicated stuff we put around it for sending and checking results, let me know at henry @ dcbiking . com

    >> Henry

       Dim oDOM As MSXML2.DOMDocument          'Holds XML to be sent
       Dim oQueueInfo As MSMQ.MSMQQueueInfo    'Used to return the queue info for formatting message props.
       Dim oQueue As MSMQ.MSMQQueue            'Queue
       Dim oMsg As MSMQ.MSMQMessage            'Message to be placed on queue
       
       Set oQueueInfo = CreateObject("MSMQ.MSMQQueueInfo")
       oQueueInfo.Pathname = "MACHINENAME\PATHNAMEBLAHBLAH"
       Set oQueue = oQueueInfo.Open(MSMQ.MQ_SEND_ACCESS, MSMQ.MQ_DENY_NONE)

       Set oDOM = Server.CreateObject("MSXML2.DOMDocument")
       oDOM.loadXML = "<call><sendTo>user@user.com</sendTo><method>Sum</method><parms><parm>1</parm><parm>2</parm></parms></call>"
       
       ' Create message
       
       If oQueue.IsOpen Then
           Set oMsg = CreateObject("MSMQ.MSMQMessage")
           oMsg.Body = oDOM.xml
       Else
           Err.Raise 203, "sendRequest", "MSMQ queue could not be opened to send the message."
       End If
       
       ' Send message
       'Message sending will accommodate both transactional and non-transactional queues.
       'If the queue is transactional, send the message with the single message option.
       'If the queue is not transactional, send the message as non-transactional.
       If oQueueInfo.IsTransactional Then
           oMsg.Send oQueue, MQ_SINGLE_MESSAGE
       Else
           oMsg.Send oQueue, MQ_NO_TRANSACTION
       End If
           
       'Close queue; Null all objects
       oQueue.Close
       Set oMsg = Nothing
       Set oQueue = Nothing
       Set oQueueInfo = Nothing
       Set oDOM = Nothing
    • Post Points: 0
  • 07-29-2008 10:52 AM In reply to

    enableNotification in MSMQ using vb.net

    I am using MSMQ-3 on my local machine. I am using enableNotification method to notify me when a message comes in the queue. But i am getting error message while using enableNotification. The message comes is "Access is denied" (error no. -1072824283). I am getting the message in the following line

     Dim evnt As MSMQ.MSMQEvent
                evnt = New MSMQ.MSMQEvent
                vMyQSend.EnableNotification(evnt)

     

    Please anybody help me.

    • Post Points: 5
Page 2 of 2 (28 items) < Previous 1 2