Sending Messages as FORM Variables with the HTTP Adapter

Here's a quickie. If you want to send a message, as a FORM Variable in a HTTP request, this is what you do:

1) Set the Content Type property of the HTTP send port, to application/x-www-form-urlencoded.

2) Create a custom pipeline and plug-in a Custom Pipeline Component, that pre-pends Variable-Name= in front of the message, and url encode it. e.g: ClaimPacket=

3) Use this pipeline with your HTTP send port, and you are done!

Post a comment for a sample.

Update : Screen shot of the Content Type property:

Comments

Anonymous said…
Thanks, I was struggling with that.
Anonymous said…
I can't find the ContentType property on the HTTP send port. Could someone walk me through it?
Devdutt said…
Hey JT,

Added a screen shot of the location of the ContentType property. Hope that helps.
Anonymous said…
Dev,

Thank you SO MUCH for having this post available. I am very thankful to you for sending me a custom pipeline component. After unsuccessfully using FixMsg from the SDK, your component saved the day! FixMsg was putting some chars between the prepend and the actual message that was causing the post to fail. Your component worked beautifully. Not only that, but it was so straightforward that I was able to easily modify it to accept additional parameters for the post variables.

Your timeliness and continued responses to me during this effort are truly appreciated. You are an asset to the development community.

I've bookmarked you as a "favorite". Keep the posts coming!

Michael
Anonymous said…
This is absolutely what I need to do as I have to prepend QUERY= to the front of an xml document before HTTP POSTing it out.

Thanks for the 'Heads-Up', you've saved me some serious time here.

I was going to start out with FixMsg as well but I noticed Michael's comments. Would it be possible to also get a copy of your Pipeline component?

Keep 'em coming...

Popular posts from this blog

Using recursion in the In-line XSLT Template type Scripting Functoid

Uniform Sequential Convoys in BTS 2004 using Correlation