IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Invoke a IS service via E-Mail

  • 1.  Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 11:56 AM

    Hi all,

    I want to demo the invocation of a IS service via email. in order to do so, i set up a dedicated IMAP server (i can connect to it from the machine running IS via outlook).

    I created an EMail port, put in the credentials + host for this IMAP server. This port is enabled and has ‘Allow by default’ as access mode.

    When reading the XML Service Developer Guide, i would expet that i can send a mail in plain text format to

    user@imaphost.com

    with subject set to ‘pub.math:addInts’ and a content of
    'num1=12&num2=34&$user=user&$pass=secret’

    i do not get any response and the mail stays unread in the incoming messages folder forever.

    My question: is there some working sample? Do i really have to send XML attachments? if yes, are there sample for this as well? and finally: can i analyse whats going on by enabling appropriate debug flags?

    Thanks,

    Thomas


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 02:33 PM

    Can you provide the details of how your e-mail port is configured?

    You don’t have to send XML attachments.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 03:10 PM

    I found no way to put the pictures in here directly, so i attached them to this post.

    1: this shows the settings in the Security > Ports screen
    2: this shows the settings in the Security > Ports screen > View Email Client Settings
    3: shows the access mode settings
    4: shows the IP Access settings

    After turning on all logging in IS i get the following messages on the serverNNNNNNNN.log file:

    15:37:25 CEST [ISP.0068.0024W] The connection to the IMAP server localhost for user user was temporarily lost. Some messages may not have been processed.
    15:37:27 CEST [ISS.0069.9998V4] (Complex Job Manager, 30.0, 1188394647050, running) was successfully allocated a thread
    15:37:35 CEST [ISP.0068.0001V5] Successfully logged in as user user on host localhost
    15:37:37 CEST [ISS.0069.9998V4] (Session Sweeper, 600.0, 1188394657971, running) was successfully allocated a thread
    15:37:40 CEST [ISS.0069.9998V4] (Statistics Log, 60.0, 1188394660074, running) was successfully allocated a thread
    1.jpg
    3.jpg
    4.jpg
    2.jpg


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 04:37 PM

    Hmm. That all looks okay. Perhaps the thing to do at this point is to create a service of your own that you invoke via e-mail. In that service you can log a message or do some other activity to see if your service is getting invoked. If it is, then there would appear to be some issue in the interaction between IS and the IMAP server.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 5.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 05:20 PM

    Thats what my service and my mail look like. probably here is an error?

    subject: mon.helloWorldJava:sayHello
    content: message=hello_world&$user=user&$pass=secret

    6.jpg


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 05:49 PM

    Why did you write a Java service? What does that service do so that you can verify that it was called?


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 06:49 PM

    I had this service already done before. It prints it’s argument ‘message’ together with a timestamp to System.out.

    I tested it with Developer before. Is there any problem implementing a service with Java - it’s only a 5 liner and you get half of the code generated?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 8.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 08:58 PM

    As long as you had a way to see that your service was invoked by the e-mail port–was it?

    A FLOW service would have been one step–a call to pub.debug:log to write the incoming data to server.log.

    There a few threads around here discussing the use of Java within IS. No problem per se, just that it tends to get used when it shouldn’t.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 10:16 PM

    When my service is invoked from IS i can see it’s output. so far, so good.

    When I look into the log’s of my IMAP server, i see IS is connecting and disconnecting every 10 seconds, but looks like it does not find a mail it likes. Could it be that the message i sent using outlook (in plain text format) is not well formatted? Can you suggest a client application (with small footprint) or what services within IS could be used to
    -send a message that should be digestable
    -check whats in the IMAP store
    and finally, which is what i might try next, can you recommend a suitable IP sniffer for WindowsXP to see the interactions between IS and my service.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 10.  RE: Invoke a IS service via E-Mail

    Posted Wed August 29, 2007 11:15 PM

    I wonder if the configuration using ‘localhost’ might be the issue. The mail was sent to user@imaphost.com. Might this mismatch be the bugger?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB