12-21-04 10:51 PM
Please ignore the LogEvent(...) mention I made
"paul" <boloh77@hotmail.com> wrote in message
news:e5hUVE45EHA.3648@TK2MSFTNGP11.phx.gbl...
> Hi there
>
> Thanks for the reply! I've made some progress thanks to your advice.
> There is still one wrinkle left for me to iron out however.
>
> On the CLIENT side, I added the following header info to my
> HTTPWebRequest:
>
> HttpWebRequest request = (HttpWebRequest)
> HttpWebRequest.Create(requestLocation);
> request.Method = "POST";
>
> NameValueCollection colHeader = new NameValueCollection();
> colHeader.Add("myName", "My Name");
> colHeader.Add("myTitle", "My Title");
> colHeader.Add("mySource", "my.source.com");
> colHeader.Add("myPort", "80");
>
> int iCount = colHeader.Count;
>
> for(int i=0; i<iCount; i++)
> {
> request.Headers.Add(colHeader.Keys[i], colHeader[i]);
> }
>
> request.ContentType="application/x-www-form-urlencoded";
> request.ContentLength = xmlDocument.OuterXml.Length;
>
>
> On the BIZTALK side inside the custom pipeline I have the following code
> to access the header:
>
> private IBaseMessage ExecuteInternal(IPipelineContext pContext,
> IBaseMessage pInMsg)
> {
> ...
>
> IBaseMessageContext myContext = pInMsg.Context;
> uint propCount = myContext.CountProperties; // get the number of
> properties
>
> string[] propName = new string[propCount];
> string[] propNamespace = new string[propCount];
> object[] propObj = new Object[propCount];
>
> // cycle through each context property and store the property's name and
> values via LogEvent(...)
> for(int i=0; i<myContext.CountProperties; i++)
> {
> myContext.ReadAt(i, out propName[i], out propNamespace[i]);
> propObj[i] = myContext.Read(propName[i], propNamespace[
i]);
> }
>
> ...
> }
>
>
> Here's the thing, when I look at the content of the header through
> probObj[i].ToString(), all I get is the following:
> Connection: Keep-Alive
> Content-Length: 12845
> Content-Type: application/x-www-form-urlencoded
> E
>
> I don't see the additional information regarding myName, myTitle,
> mySource, and myPort. Anybody know why this is the case? What am I
> missing? (maybe you know Matt?)
>
> Thanks,
> Paul
>
>
[ Post a follow-up to this message ]
|