Invoke MIM Transfer from Web Page

Ethan Beisher
Ethan Beisher E Community Moderator

Does anyone have a sample server-side script for invoking a MIM Transfer from a web page? This would preferably be for IIS.

 

Thank you,

Ethan

Tagged:

Comments

  • Ethan Beisher
    Ethan Beisher E Community Moderator

    Attached is an example. It provides two examples, one using VB and one using .NET C#.

     

    To install:

     

    1 - Open IIS and create a Virtual Directory. 

    2 - Unzip the contents and put into the Virtual Directory

    3 - Update the web.config file to an appropriate user ID and password that has Websphere MQ permissions

    4 - Browse to either testVB.aspx or testCS.aspx

     

    Notes:

     

    1 - The code has a hard coded Workflow message that starts a Process Flow called myprocess. You can make the page more dynamic and have the Workflow created, by example using the Microsoft XML DOM.

    2 - The Bin directory has the Websphere MQ 7.0.1.0 version of the .NET DLL. You will want to replace this with the version that you have installed on your machine. You can typically grab this from c:\Program Files\IBM\Websphere MQ\bin

    3 - You can do this on a Java based web server using JMS 

     

     

  • Do you have any examples or configuration recommendations of how to set up a java web service to be used to invoke MIM file transfer workflows?

  • Ethan Beisher
    Ethan Beisher E Community Moderator

    Basically you will want to have your web service put a properly formatted message to a queue.

     

    Here is a sample of building a web service in Java.

     

    Here is a sample of writing to a queue.

     

    The format of the message will be determined by the transfer. When you build your transfer in the Process Monitor, it shows you the transfer XML. You then build a Workflow XML message around that transfer XML, e.g.:

     

        Transfer_File

        {Transfer XML}

     

     

    I will do some checking and see if I can find a more specific example.

     

    If you want your Web Service to be synchronous (i.e., wait for the tranfer to complete), you will need to specify a MQ reply to queue, and then wait on that queue for the response.

     

    Ethan

  • I am sure that you have seen this before, but if you want to see the XML for the request from a commnd line prompt, just add the "-showxml" parm to the request.

     

    As Ethan suggests, you can also see the XML in the Process Monitor.