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

Handling Inbound EDIINT Documents with payload of the type textplain

webMethods Community Member

webMethods Community MemberTue March 08, 2005 10:34 PM

webMethods Community Member

webMethods Community MemberWed March 09, 2005 05:38 PM

  • 1.  Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Tue March 08, 2005 07:31 PM

    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.


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 2.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Tue March 08, 2005 08:41 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 3.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Tue March 08, 2005 09:07 PM

    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.


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 4.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Tue March 08, 2005 09:22 PM

    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.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 5.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Tue March 08, 2005 10:34 PM


  • 6.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Wed March 09, 2005 04:11 PM

    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.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Wed March 09, 2005 04:16 PM

    Mark,

    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.

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 8.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Wed March 09, 2005 04:59 PM

    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.


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 9.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Wed March 09, 2005 05:27 PM

    Mark,

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

    Dave


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 10.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Wed March 09, 2005 05:28 PM

    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.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 11.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Wed March 09, 2005 05:38 PM


  • 12.  RE: Handling Inbound EDIINT Documents with payload of the type textplain

    Posted Wed March 09, 2005 08:22 PM

    Thanks alot Dave and RMG. That helped me.

    Mark.


    #edi
    #Integration-Server-and-ESB
    #webMethods