Topic
  • 15 replies
  • Latest Post - ‏2012-06-21T05:43:27Z by SystemAdmin
SystemAdmin
SystemAdmin
8523 Posts

Pinned topic Triggering .Net Web Service Call from Queue on MQ (z/OS)

‏2012-05-02T19:40:43Z |
Hello: My organization has MQ v7.1 on z/OS. I would like to know, for a given request queue, can I configure Triggering in a queue to call a .Net Web Service?

The workflow would be this: message placed on a queue by a Cobol Program-->queue sends data/message on to an initiation queue-->initiation queue makes a call to a .Net Web Service and passes the queue data to the .Net Web Service in that call-->Web Service takes that data and does what it needs to do with it.

In MQ Explorer, I click on a request queue and choose "Properties". In the Properties Dialog that then opens, if I click on the Triggering Tab, I see the "Initiation Queue" and "Process Name" fields. This looks promising but I don't know enought to know if there is some OOB .Net Initiation Queue that I can use, or if one can easily be setup otherwise, etc?? I know within my organization we have done the described workflow above, but the difference was that a CICS Web Service was used and not a .Net Web Service. I would think that any web service should be able to be called/triggered, regardless of that platform it resides on, but that is just my assumed expectation at this point....hence this post.

If someone could tell me if this is possible, if I am on the right track, and how to set this up I would appreciate it very much.

Thanks!

Chris
Updated on 2012-06-21T05:43:27Z at 2012-06-21T05:43:27Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-02T20:15:00Z  
    So I did some more digging and here's where I'm at with this now....

    It looks like I would need to create/define a new initiation queue in MQ for what I want to do with my request queue. This looks pretty straightforward.

    The next step would be that I would have to create/define a new process in MQ. Where I think the real magic comes into play and is the ultimate determining factor of whether this is possible or not. In the definition of this new process it looks like I would need to asign:
    APPLTYPE=WINDOWS
    APPLICID=The URL of my .Net Web Service
    DESCR=Example Process for Triggering a .Net Web Service

    It then looks like the data in the Queue would be passed via the how the USERDATA or possibly the ENVRDATA parameters are specified on this process???

    Assuming the that a process can be defined to support this and that the initiation queue and process are setup successfully, then it's just a matter of going back to the Triggering tab on the Properties of the Request Queue and filling in the applcable values in the "Initiation Queue" and "Process Name" fields.

    If someone could verify I'm on the right track and fill in some of these knowldege gaps for me I would appreciate it.

    Thanks!
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-02T20:32:41Z  
    So I did some more digging and here's where I'm at with this now....

    It looks like I would need to create/define a new initiation queue in MQ for what I want to do with my request queue. This looks pretty straightforward.

    The next step would be that I would have to create/define a new process in MQ. Where I think the real magic comes into play and is the ultimate determining factor of whether this is possible or not. In the definition of this new process it looks like I would need to asign:
    APPLTYPE=WINDOWS
    APPLICID=The URL of my .Net Web Service
    DESCR=Example Process for Triggering a .Net Web Service

    It then looks like the data in the Queue would be passed via the how the USERDATA or possibly the ENVRDATA parameters are specified on this process???

    Assuming the that a process can be defined to support this and that the initiation queue and process are setup successfully, then it's just a matter of going back to the Triggering tab on the Properties of the Request Queue and filling in the applcable values in the "Initiation Queue" and "Process Name" fields.

    If someone could verify I'm on the right track and fill in some of these knowldege gaps for me I would appreciate it.

    Thanks!
    From more digging.....

    It looks like I would also need to define a new Trigger Monitor for use with the new Initiation Queue.

    If someone could verify I'm on the right track and fill in some of these knowledge gaps for me I would appreciate it.

    Thanks!
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-03T01:41:07Z  
    From more digging.....

    It looks like I would also need to define a new Trigger Monitor for use with the new Initiation Queue.

    If someone could verify I'm on the right track and fill in some of these knowledge gaps for me I would appreciate it.

    Thanks!
    >I would think that any web service should be able to be called/triggered, regardless
    >of that platform it resides on, but that is just my assumed expectation at this point....

    Yes, all you need is a long-running trigger monitor program which waits for messages on the initiation queue, and is capable of interpreting the trigger message, and starting the requested program or service. The started program then loops to get and process messsages from the original queue, until there are no more left after a suitable wait interval.

    If the trig mon runs on z/OS, how do you proposed that it is able to start a .Net program?
    The trig mon could be a MQ client app which runs on a Window server.

    HTH, G.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-03T18:27:31Z  
    >I would think that any web service should be able to be called/triggered, regardless
    >of that platform it resides on, but that is just my assumed expectation at this point....

    Yes, all you need is a long-running trigger monitor program which waits for messages on the initiation queue, and is capable of interpreting the trigger message, and starting the requested program or service. The started program then loops to get and process messsages from the original queue, until there are no more left after a suitable wait interval.

    If the trig mon runs on z/OS, how do you proposed that it is able to start a .Net program?
    The trig mon could be a MQ client app which runs on a Window server.

    HTH, G.
    Glenn, thanks for the reply. My responses to your post are below.

    If the trig mon runs on z/OS, how do you proposed that it is able to start a .Net program?

    Thru a simple Request to the URL of the Web Service where the queue data would be passed as a parameter to the Web Service. Having a URL and making a request to that URL is platform independent..........and also adds a lot of integration points and flexibility for how MQ could be used.

    The trig mon could be a MQ client app which runs on a Window server.

    Please do tell more. Is there a good example of this somewhere....where a MQ Client App on a Windows Server is a Trigger Monitor for a queue that resides on z/OS??

    Thanks again!
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-03T23:43:47Z  
    Glenn, thanks for the reply. My responses to your post are below.

    If the trig mon runs on z/OS, how do you proposed that it is able to start a .Net program?

    Thru a simple Request to the URL of the Web Service where the queue data would be passed as a parameter to the Web Service. Having a URL and making a request to that URL is platform independent..........and also adds a lot of integration points and flexibility for how MQ could be used.

    The trig mon could be a MQ client app which runs on a Window server.

    Please do tell more. Is there a good example of this somewhere....where a MQ Client App on a Windows Server is a Trigger Monitor for a queue that resides on z/OS??

    Thanks again!
    >Is there a good example of this somewhere....where a MQ Client App on a
    >Windows Server is a Trigger Monitor for a queue that resides on z/OS??

    Google for "mq client trigger monitor". Sample source code is available for amqstrg0 if you want to roll your own to start a local web service.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-04T03:14:05Z  
    >Is there a good example of this somewhere....where a MQ Client App on a
    >Windows Server is a Trigger Monitor for a queue that resides on z/OS??

    Google for "mq client trigger monitor". Sample source code is available for amqstrg0 if you want to roll your own to start a local web service.
    Thanks for the reply Glenn. I Googled what you told me to and read the readme.txt file for MA7K. That looks promising. However, maybe I'm missing something or just dumb, but I don't get how one would wire this Trigger Monitor sitting on a MQ Client on a Windows OS based host back into an Init Queue that resides on an MQ installation that is on z/OS. What steps would be necessary to do that?

    Thanks again....Chris
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-04T04:30:25Z  
    Thanks for the reply Glenn. I Googled what you told me to and read the readme.txt file for MA7K. That looks promising. However, maybe I'm missing something or just dumb, but I don't get how one would wire this Trigger Monitor sitting on a MQ Client on a Windows OS based host back into an Init Queue that resides on an MQ installation that is on z/OS. What steps would be necessary to do that?

    Thanks again....Chris
    I re-read that file again...

    So, it looks like the system environmental variable named MQSERVER would have the URL to the MQ Server on z/OS???

    Then when running the install for MA7K specify the queue name and queue manager parameters in an associated INI file that the installer uses??

    Step 3 really loses me in the 4 steps it outlines.....are the first 3 steps to be run on z/OS in my particular case?

    Am I in the ballpark here? What else needs to be done, or what am I missing? Please advise.

    Thanks!
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-04T04:58:38Z  
    I re-read that file again...

    So, it looks like the system environmental variable named MQSERVER would have the URL to the MQ Server on z/OS???

    Then when running the install for MA7K specify the queue name and queue manager parameters in an associated INI file that the installer uses??

    Step 3 really loses me in the 4 steps it outlines.....are the first 3 steps to be run on z/OS in my particular case?

    Am I in the ballpark here? What else needs to be done, or what am I missing? Please advise.

    Thanks!
    I re-read one more time....regarding the 4 steps in Step 3....

    1. On the server, edit the supplied sample definitions file "ma7k.mqsc"
    and change to location of the MQ sample program amqsechc.exe (which
    is located on the client machine).

    Is the ma7k.mqsc file already on z/OS (which is where MQ Server is installed) or do I have to run an update to get it on there?

    Changing the location of amqsechc.exe......for example, if amqsechc.exe was in C:\Temp\IBM then I would change to: C:\Temp\IBM\amqsechc.exe, correct?

    Could I specify a Web Service URL instead of an exe like amqsechc.exe?

    2. On the server, run: runmqsc < ma7k.mqsc

    Assuming in my case this is done in z/OS, correct?

    3. On the server, run the sample program: amqsreq MA7K.TEST and provide it
    with some messages at the command prompt.

    Assuming in my case this is done in z/OS, correct?

    What does MA7K.TEST signify? An output file?

    4. If all is well, a process should start on the client machine (running amqsechc.exe)
    and the message you typed should be sent back.

    To where?? MA7K.TEST??
    Is amqsechc.exe the mechanism that is sending the message back?
    Is amqsechc.exe able to get/see/access the data that was put on the request queue to begin with?

    Thanks!
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-04T05:05:13Z  
    I re-read one more time....regarding the 4 steps in Step 3....

    1. On the server, edit the supplied sample definitions file "ma7k.mqsc"
    and change to location of the MQ sample program amqsechc.exe (which
    is located on the client machine).

    Is the ma7k.mqsc file already on z/OS (which is where MQ Server is installed) or do I have to run an update to get it on there?

    Changing the location of amqsechc.exe......for example, if amqsechc.exe was in C:\Temp\IBM then I would change to: C:\Temp\IBM\amqsechc.exe, correct?

    Could I specify a Web Service URL instead of an exe like amqsechc.exe?

    2. On the server, run: runmqsc < ma7k.mqsc

    Assuming in my case this is done in z/OS, correct?

    3. On the server, run the sample program: amqsreq MA7K.TEST and provide it
    with some messages at the command prompt.

    Assuming in my case this is done in z/OS, correct?

    What does MA7K.TEST signify? An output file?

    4. If all is well, a process should start on the client machine (running amqsechc.exe)
    and the message you typed should be sent back.

    To where?? MA7K.TEST??
    Is amqsechc.exe the mechanism that is sending the message back?
    Is amqsechc.exe able to get/see/access the data that was put on the request queue to begin with?

    Thanks!
    Is MA7K.TEST a request queue?

    If so then my other question from last post may be answered too in that amqsechc.exe can see what is put on a request queue because in this example the data being put on the queue are the messages that the user types in, correct?

    Man I hope I am getting close on this.

    Please advise...thanks!
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-09T21:46:46Z  
    Is MA7K.TEST a request queue?

    If so then my other question from last post may be answered too in that amqsechc.exe can see what is put on a request queue because in this example the data being put on the queue are the messages that the user types in, correct?

    Man I hope I am getting close on this.

    Please advise...thanks!
    Hey Glenn....if you could give me info on the things mentioned in my last 3-4 posts I would appreciate it. I think I am close to understanding and having this all figured out but would like some confirmation or feedback from you on the questions or points raised in my last 3-4 posts.

    Thanks!
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-05-10T00:45:16Z  
    Hey Glenn....if you could give me info on the things mentioned in my last 3-4 posts I would appreciate it. I think I am close to understanding and having this all figured out but would like some confirmation or feedback from you on the questions or points raised in my last 3-4 posts.

    Thanks!
    Sorry, I haven't used that SupportPac. You can try contacting the author by email or ask a question in the "Comment" box on the SupportPac page.

    I think you need to do some more research / learning about MQ features. eg. MQSERVER envrionment variable does not contain a URL. If you search in the MQ Inforcenter it will provide the correct argument format.

    HTH, G.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-06-19T22:37:32Z  
    Sorry, I haven't used that SupportPac. You can try contacting the author by email or ask a question in the "Comment" box on the SupportPac page.

    I think you need to do some more research / learning about MQ features. eg. MQSERVER envrionment variable does not contain a URL. If you search in the MQ Inforcenter it will provide the correct argument format.

    HTH, G.
    Is there anyone out there who can give me the quick lowdown on this that has actually used it? Surely someone has used this SupportPac and can give me answers in 5 mins that might otherwise take me hours or days????

    Thanks.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-06-20T00:02:28Z  
    Is there anyone out there who can give me the quick lowdown on this that has actually used it? Surely someone has used this SupportPac and can give me answers in 5 mins that might otherwise take me hours or days????

    Thanks.
    You could try posting to mqseries.net, it has a larger readership that this forum.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-06-20T00:11:08Z  
    You could try posting to mqseries.net, it has a larger readership that this forum.
    What forum at http://www.MQSeries.net do you suggest that I post these questions to?

    Thanks.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Triggering .Net Web Service Call from Queue on MQ (z/OS)

    ‏2012-06-21T05:43:27Z  
    What forum at http://www.MQSeries.net do you suggest that I post these questions to?

    Thanks.
    "WebSphere MQ Installation/Configuration Support" would be OK, its essentially a configuration design issue.