|
Home > Archive > BizTalk Server Orchestration > August 2005 > HTTP Post Non-XML
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Don Keller 2005-08-15, 2:47 am |
| I need to perform an HTTP POST and set the value of several input form fields
of the posted form. It seems the HTTP adapter simply sends and XML document
using the HTTP POST method rather than allowing you to set the value of
individual HTTP input form fields.
Is this best handled by passing the XML document from my orchestration to
either a web service or referenced class that performs the HTTP POST rather
than using the HTTP adapter?
I also need to initialize a correlation set when performing the send because
an asynchronous result will need to reactivate the instance. I think
correlation sets can only be initialized during a send process instead of
simply calling a .NET class within an expression shape. Which is why I think
I may need to send to a web service that will perform the HTTP post to the
remote server.
I'm trying to implement a credit card processing process with BizTalk and
the processing agency we use has the following procedure:
1. Perform an HTTP POST and pass specific values to their service within
input fields in the HTTP form.
2. Their server performs an HTTP POST with their response to a stored URL
in their server associated with our account. So instead of receiving a
response from the intitial HTTP post, the response comes in a separate
asynchronous process that needs to be correlated back to the original request.
3. Their HTTP POST to our server will submit an XML document with the
results of the credit card transaction.
This all seems like it should be a piece of cake with BizTalk, but I just
can't figure out how best to post to their server from within my
orchestration.
| |
| Scott Colestock 2005-08-15, 5:51 pm |
| If you set the content type (within the send port configuration) to
application/x-www-form-urlencoded, you can do this.
However, if you need to actually have your posted content consist of a set
of "form variables", you will have to do this work manually.
Consider using the RawString class
(http://msdn.microsoft.com/library/e....asp?frame=true)
for your outbound logical port operation, and preparing the string in your
orchestration or a component that your orchestration delegates to (using
HttpUtility.UrlEncode, if you like - passing it a string that you've built
up with (x=y&foo=bar, etc.)
Is the return HTTP post also structured as a form? If so, you may want to
receive it as type RawString and then use a component to parse the various
portions. If it is a straight XML doc being posted back, you can use a
regularly-typed port.
Scott Colestock
www.traceofthought.net
"Don Keller" <DonKeller@discussions.microsoft.com> wrote in message
news:74AA74C8-C388-4F0D-8709-1984497366A7@microsoft.com...
>I need to perform an HTTP POST and set the value of several input form
>fields
> of the posted form. It seems the HTTP adapter simply sends and XML
> document
> using the HTTP POST method rather than allowing you to set the value of
> individual HTTP input form fields.
>
> Is this best handled by passing the XML document from my orchestration to
> either a web service or referenced class that performs the HTTP POST
> rather
> than using the HTTP adapter?
>
> I also need to initialize a correlation set when performing the send
> because
> an asynchronous result will need to reactivate the instance. I think
> correlation sets can only be initialized during a send process instead of
> simply calling a .NET class within an expression shape. Which is why I
> think
> I may need to send to a web service that will perform the HTTP post to the
> remote server.
>
> I'm trying to implement a credit card processing process with BizTalk and
> the processing agency we use has the following procedure:
>
> 1. Perform an HTTP POST and pass specific values to their service within
> input fields in the HTTP form.
> 2. Their server performs an HTTP POST with their response to a stored URL
> in their server associated with our account. So instead of receiving a
> response from the intitial HTTP post, the response comes in a separate
> asynchronous process that needs to be correlated back to the original
> request.
> 3. Their HTTP POST to our server will submit an XML document with the
> results of the credit card transaction.
>
> This all seems like it should be a piece of cake with BizTalk, but I just
> can't figure out how best to post to their server from within my
> orchestration.
| |
| Don Keller 2005-08-15, 5:51 pm |
| Thanks for the feedback. Can correlation sets only be initialized with the
Send shape?
"Scott Colestock" wrote:
> If you set the content type (within the send port configuration) to
> application/x-www-form-urlencoded, you can do this.
>
> However, if you need to actually have your posted content consist of a set
> of "form variables", you will have to do this work manually.
>
> Consider using the RawString class
> (http://msdn.microsoft.com/library/e....asp?frame=true)
> for your outbound logical port operation, and preparing the string in your
> orchestration or a component that your orchestration delegates to (using
> HttpUtility.UrlEncode, if you like - passing it a string that you've built
> up with (x=y&foo=bar, etc.)
>
> Is the return HTTP post also structured as a form? If so, you may want to
> receive it as type RawString and then use a component to parse the various
> portions. If it is a straight XML doc being posted back, you can use a
> regularly-typed port.
>
> Scott Colestock
> www.traceofthought.net
>
>
>
> "Don Keller" <DonKeller@discussions.microsoft.com> wrote in message
> news:74AA74C8-C388-4F0D-8709-1984497366A7@microsoft.com...
>
>
>
| |
| Scott Colestock 2005-08-15, 5:51 pm |
| No, you can initialize a correlation on a receive as well.
Scott Colestock
www.traceofthought.net
"Don Keller" <DonKeller@discussions.microsoft.com> wrote in message
news:F47EDF72-DF53-4A49-8729-916112794BD9@microsoft.com...[vbcol=seagreen]
> Thanks for the feedback. Can correlation sets only be initialized with
> the
> Send shape?
>
> "Scott Colestock" wrote:
>
|
|
|
|
|