I have a partner who sends EDIINT documents to us which has the payload of the type text/plain instead of application/edi-x12. Since, submitting the payload to TN doesn’t work in this case, I have created a new processing rule for this partner and developed a service that is called by this processing rule. In the service, I’m using “getConetntPart” with part name as payload, converting it to a string by “bytesToString” and submitting it to the TN using an inbuilt serviuce that we have (This uses wm.tn.doc.xml:routeXml). I’m also sending an MDN back by using wm.EDIINT.rules:processMsg.
When the partner is sending the EDIINT data, I’m seeing an MDN back, but I see an unknown document in the TN. When I open the document, it has all the rest of the EDIINT data except the payload. Interestingly, if I reprocess the inbound EDIINT document in the TN or if I save the pipeline and run the service in my developer, every thing works fine and I see an MDN, and an X12 envelope getting created in the TN. Any suggestions? I’m using wM 6.0.1.
Please refer to the section in the webMethods EDI Module EDIINT User’s Guide Version 6.0.1 (Pg.#26-27) on “Enabling Payload Processing” to process a payload other than EDI or XML.
You basically create a payload processing service (mentioned in step 5 of that section) and configure it on the EDIINT home page. The payload will be submitted to Trading Networks, and this will eliminate the need for you to have a new processing rule.
Everything should process seamlessly after that.
Thanks for the suggestion Derek. I have muitiple partners with payload as edi/x-12 and one partner with payload as text/plain. If I mentioin a payoad processing service in the EDIINT home page, doesn’t it interfere with the other inbound EDIINT documents?
The payload will automatically submit back to TN if the content type is application/edi-X12, application/EDIFACT, or application/XML. If it’s anything else (such as text/plain), it will be sent to the service you specified on the configuration page.
Make sure your service accepts stream (object) and contentType (string) as input signatures.
Hope this helps.
I have to convert the payload to a string with the input signatures stream and contentType that you have mentioned. I’m trying to use wm.EDIINT.util:objectToString. Any suggestions?
Once you have stream object in the pipeline you should try using the pub.io:StreamTobytes,then pub.string:bytesToString WMPublic services.
If this doesnt work,may be Dave can answer you in better way.
Thanks RMG. I have a question though. I have saved the pipeline and is it something like we cannot save the stream object in the pipeline? becoz when I restore the pipeline and see the results, I see the stream as a string and its value as java.io.ByteArrayInputStream.
Streams can’t be saved to files. Put your “savePipelineToFile” after your “bytesToString” step.
You are right streams can’t be saved.So what you can do is use the same variable name that you are seeing in the pipeline ie like say contentStream or content object and map that to StreamTobytes…
Thanks alot Dave and RMG. That helped me.