I assume you are receiving one big interchange that contains one or more groups each with multiple transaction sets. Let me know if that assumption is wrong.
It appears that you are trying to do the de-enveloping yourself. You don’t need to do so. Let TN do most of the work for you.
EDI for TN can do the splitting for you. It can quite easily split out each group and transaction set. When the interchange is received, it will split the interchange according to the applicable EDI TPA. EDI for TN can also automatically validate the interchange and send the appropriate FA/997.
My recommendation is to always split to the transaction set level. It is rare that a group of transaction sets MUST be processed together.
Then you can set up rules to 1) ignore the group document since you really don’t need it; 2) process each transaction set individually.
You don’t need to use both getTspace and getContentPartData. You don’t need to use getfile at all. And you likely don’t need to use validateEnvelope.
Read the EDIModuleUsersGuide.pdf (Chapter 19 for large doc handling) and the EDIModuleConceptsGuide.pdf. Lots of good info on how to process EDI. It’s likely that your transactions sets themselves are not that large–just the interchange that holds a group of them. If you let TN do the work for you, you won’t have to worry about large doc handling. But, if your transaction sets are indeed large (ship notices can get big, for example) then you’ll need to implement the handling described in the docs to avoid loading things completely into memory.
#webMethods#Integration-Server-and-ESB#edi