InputStream in envelopeProcess

Hi,
I am trying to call envelopeProcess passing a stream as an input parameter for edidata.
It fails with an error message “Unrecognized EDI data (not ANSI X12 nor UN/EDIFACT)” and an error code “DA-0010”.
It works if I pass a string, but what I really need is to pass InputStream.
Can someone help!!
Shubhro

Sorry, the full path of the service is wm.b2b.edi:envelopeProcess.

Hi,
I am trying to call envelopeProcess passing a stream as an input parameter for edidata.
It fails with an error message “Unrecognized EDI data (not ANSI X12 nor UN/EDIFACT)” and an error code “DA-0010”.
It works if I pass a string, but what I really need is to pass InputStream.
Can someone help!!
Shubhro

Hi,
Has anybody faced this problem before ?
Shubhro

Shubro,

envelopeProcess doesnt allow stream objects.But will converting stream to string doesnt help.you know string is working fine.

Please elaborate your requirement that why you want to map only stream?

HTH,
RMG

RMG,
I wanted to avoid converting the stream into string before calling envelopeProcess(). The documentation for this service says it can take both InputStream as well as string.
Shubhro

Shubhro,

you may be right,but we always pass string(edidata) in envelopeProcess and you can also notice the service input shows as string.

HTH,
RMG

Hello,
In order to use the stream version of envelopeprocess you must have at least:

  1. a variable named “edidata” on the pipeline with the data in an inputstream
  2. a document on the pipeline named “headers” with atleast a field name “Content-type” with the value “application/EDIstream”
  3. your edi document delimiters should not be in unicode format or be control characters (like carriage return or linefeed). do any manual or automatic replaces as necessary.

These are all musts. You should be able to parse your data in stream format. If the data is small enough, you will get the data in the undefdata field, else you get a new stream RID in that location. Good day.

Yemi Bedu