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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  How to run template on pipe?

    Posted 01/27/10 07:50 PM

    I write a file and save in the template folder, such as \webMethods7\IntegrationServer\packages\Default\templates, and then call the method pub.report:runTemplateOnPipe, I set the value $package to “Default”, and then run the program, get error “java.io.FileNotFoundException:.\packages\Default\templates\test.html”. Do I set something wrong?


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


  • 2.  RE: How to run template on pipe?

    Posted 03/24/10 03:29 PM

    This service is pretty straight forward we use it to generate email body using template. Have you run this service stand alone?


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


  • 3.  RE: How to run template on pipe?

    Posted 05/09/19 12:54 PM

    Hi Lee/Jenny,

    I have created an html file with email structure under templates folder and mapping the html file as input to $template field and packagename to field $package of the service and I am mapping the output $txt to a string variable and then the string variable to content variable of smtp service and defining content type as text/html and when I execute the service I face the below error:

    com.wm.util.Values cannot be cast to java.lang.String

    Kindly suggest me to resolve this error.


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


  • 4.  RE: How to run template on pipe?

    Posted 05/09/19 06:09 PM

    Naveen,

    Convert $txt to stream and use pub.mime:createMimeData.

    Regards,
    Ashish Bania


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


  • 5.  RE: How to run template on pipe?

    Posted 05/10/19 08:52 AM

    Thank you Ashish for responding.

    I have concerted the output $txt to stream and then used “pub.mime:createMimeData” service and passing the stream variable(output of stringtostream) to input of “pub.mime:createMimeData”.

    Then invoked "pub.mime:addBodyPart " service and passed the inputStream(output of stringtostream) to “content” object which is the input of addBodyPart service and set the IsENVStream as yes.

    Then invoked the “pub.mime:getEnvelopeStream” to document “MIMEDATA” to input (doc-MIMEData) of the service and mapped the output of getEnvelopeStream service to smtp service’s mimeStream but still facing the same error “com.wm.util.Values cannot be cast to java.lang.String”


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