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?
This service is pretty straight forward we use it to generate email body using template. Have you run this service stand alone?
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.
Convert $txt to stream and use pub.mime:createMimeData.
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”