# Handling Inbound EDIINT Documents with payload of the type textplain

**URL:** <https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [March 9, 2005, 12:31am UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706 "2005-03-09T00:31:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 9, 2005, 12:31am UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/1 "2005-03-09T00:31:08Z")

</div>

Hello all.

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.

Thanks,

Mark.

---

<div class="post-metadata">

**Author:** ![djg200](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@djg200](https://techcommunity.softwareag.com/u/djg200)\
**Post date:** [March 9, 2005, 1:41am UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/2 "2005-03-09T01:41:17Z")

</div>

Hello Mark,

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.

Derek

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 9, 2005, 2:07am UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/3 "2005-03-09T02:07:29Z")

</div>

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?

Thanks,  
Mark.

---

<div class="post-metadata">

**Author:** ![dave05](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@dave05](https://techcommunity.softwareag.com/u/dave05)\
**Post date:** [March 9, 2005, 2:21am UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/4 "2005-03-09T02:21:31Z")

</div>

Mark,

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.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 9, 2005, 3:34am UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/5 "2005-03-09T03:34:28Z")

</div>

Thanks Dave.

Mark.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 9, 2005, 9:10pm UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/6 "2005-03-09T21:10:41Z")

</div>

Dave,

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?

Thanks,  
Mark.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [March 9, 2005, 9:15pm UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/7 "2005-03-09T21:15:56Z")

</div>

Mark,

Once you have stream object in the pipeline you should try using the [pub.io](http://pub.io):StreamTobytes,then pub.string:bytesToString WMPublic services.

If this doesnt work,may be Dave can answer you in better way.

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 9, 2005, 9:58pm UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/8 "2005-03-09T21:58:35Z")

</div>

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.

Thanks,  
Mark.

---

<div class="post-metadata">

**Author:** ![dave05](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@dave05](https://techcommunity.softwareag.com/u/dave05)\
**Post date:** [March 9, 2005, 10:26pm UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/9 "2005-03-09T22:26:49Z")

</div>

Mark,

Streams can’t be saved to files. Put your “savePipelineToFile” after your “bytesToString” step.

Dave

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [March 9, 2005, 10:28pm UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/10 "2005-03-09T22:28:27Z")

</div>

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…

HTH,  
RMG.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 9, 2005, 10:37pm UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/11 "2005-03-09T22:37:31Z")

</div>

yah , mar is right…

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 10, 2005, 1:22am UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/12 "2005-03-10T01:22:02Z")

</div>

Thanks alot Dave and RMG. That helped me.

Mark.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:05pm UTC](https://techcommunity.softwareag.com/t/handling-inbound-ediint-documents-with-payload-of-the-type-textplain/108706/13 "2021-04-02T15:05:20Z")

</div>


