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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.