I have a trading partner who’s sending EDI with a file extension (.xml) and a Content-Type: text/plain and they’re also sending EPCIS xml files which are also of Content-Type: text/plain. I need to determine which files are legit xml/edi and route them accordingly.
I use a script on my EDI files to add additional headers, but I don’t think this will work on the xml EPCIS files because they are not EDI.
<!-- code I use to add additional headers to edi files -->
<arc:set attr="edi.File" value="[FilePath]" />
<arc:call op="x12Scan" in="edi" out="edi">
<arc:enum item="edi">
<arc:set attr="output.header:[_attr]" value="[_value]" />
</arc:enum>
</arc:call>
<arc:set attr="output.filepath" value="[filepath]" />
<arc:push item="output" />Since the EPCIS files are true xml, I feel like this will bomb on the op=”x12Scan”. Anyone have a suggestion for adding a script to check the actual content-type of inbound files?
Thanks

