Skip to Content

Manipulate content header attributes via config (without Java Mapping)?

I'm trying to send a "multi-part" message using the Advanced http adapter. Its actually a simple single part message but the receiver forces multi-part message structure.

The output is very close to what's required, but the sample code from the supplier shows filename with ".xml" extension, and instead PI

is hard coding "MainDocument" in "Content-Disposition" and suppling header attributes "Content-Type" and "content-id"

Is it possible to dynamically remove these use dynamic config rather than having to write a java mapping for the entire message. They're being set via the communication channel rather than coming from the payload.

Also to remove the "encoding" attribute on the XML declaration line?

I'm using PI 7.4 SP13. Whilst the PI message is technically correct with these, the receiving system doesn't recognise the content, failing with "Internal Server Error". I'm also in touch with the third party support, but it'd be great if its possible to close/narrow the gap in what I'm sending.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 13, 2016 at 12:17 PM

    Apparently "Content-Disposition" can be re-written by deselecting the "Set Form" tick box on the HTTP_AAE channel, and adding the "MessageTransformBean".

    Module Parameter=Transform.ContentDisposition

    Module Value=form-data; name="hrfeed"; filename="feed.xml"

    produces CONTENT-DISPOSITION: form-data; name="hrfeed"; filename="feed.xml"

    Its forcing the attribute to upper case, but http headers are case insensitive according to the specifications.

    Just need to find a way to remove "Content-Type" and "content-id" from the MIME header.

    Add comment
    10|10000 characters needed characters exceeded