BizTalk Gurus

Error with BizTalk Http Adapter and Custom Pipeline Component

rated by 0 users
Answered (Verified) This post has 1 verified answer | 10 Replies | 1 Follower

Top 500 Contributor
5 Posts
Geordie posted on Sun, Dec 14 2008 9:19 PM

I have a problem with a BizTalk project.  I am receiving a multi part message, over http, form an application called ‘Ponton ‘.  While developing my custom pipeline component I used a ‘file’ receive port.  The custom component is basically accessing the message stream and adds some header information that is required by the MIME component in the pipeline to process the multi part message.  Using the file receive port it all works well.  When I then tried to convert the receive port into an http receive port.  I get an error server 500 error.  When I look at the event log I get the following error message.

Event Type:        Error

Event Source:    BizTalk Server 2006

Event Category:                BizTalk Server 2006

Event ID:              5719

Date:                     14/12/2008

Time:                     8:50:19 PM

User:                     N/A

Computer:          5SG5831VM2K3SRV

Description:

There was a failure executing the receive pipeline: "PAPINETPipelines.PontonPoReceive, CustomerIntegration2.PAPINET.Pipelines, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4ca3635fbf092bbb" Source: "Pre Mime Decoder Component" Receive Port: "RecHttpPonton" URI: "/BizTalkHTTPReceive/BTSHTTPReceive.dll?PAPINet_PO3" Reason: The method or operation is not implemented.

 

The ‘Pre Mime Decoder Component’ mentioned in the error message is the custom component in the pipeline.  I know the component is registered correctly as it works when the receive port is of type ‘file’.  It only fails when the port is converted to an http receive port.

I have also been able to validate that the http adapter is correctly configured and can receive messages.  I thought I’d found the problem at one stage.  A MS article talks about trust level of the isolated Host process.  So I created a new isolated host and made it trusted.  Then I assigned the new isolated host to the http adapter.  Unfortunately this did not resolve the problem.

Answered (Verified) Verified Answer

Top 500 Contributor
5 Posts
Verified by Geordie

I created a MS trouble ticket for this issue and we were able to identify the problem.

In the custom component code's Execute method I was grabbing the <inputmsg>.MsgPart.Data property and checking for length etc.  The file adatper implements the Data property as both a getter and setter.  The http adapter on the other hand only implements the setter.  Hence the error message.  To get the data you need to use the call the GetOriginalDataStream method.

Hope this helps anyone else who runs into this inconsistency.

Geordie

All Replies

replied on Mon, Dec 15 2008 1:55 AM

Could it be that you, in your pipeline component tries to access context properties that - like the ReceivedFileName property - is no longer existing when you're not using the http adapter?

Check the names and namespaces of all accessed context properties, you might find a FILE-word in there somewhere.

 

//Niklas

replied on Mon, Dec 15 2008 1:58 AM

A lot of type-o's and stuff there, I hope you understand.

Top 500 Contributor
5 Posts
Geordie replied on Mon, Dec 15 2008 10:45 AM

Thanks for the response Niklas.

The only work done in the custom component is on the message stream. No other context properties are touched.  The error also suggests that 'The method or operation is not implemented'.  I am wondering if the Http adapter requires an additional method to be implemented in the custom component?  It could also be access permissions but the modifications to the isolated host did not help.

Geordie

replied on Mon, Dec 15 2008 1:52 PM

Ok. I now recall having this issue in an earlier project. Use the stream.Can... -methods to see what you can do with it, if you cant do what you want, wrap it in another stream. This method we used to be able to read a an incomming stream from whatever (as far as we needed) it came.

        /// <summary>
        /// This method ensures that the stream is seekable so that it can be written to archive.
        /// </summary>
        /// <param name="stream">The stream to ensure is seekable.</param>
        public static Stream EnsureSeekableStream(Stream stream)
        {
            if (!stream.CanSeek)
            {
                stream = new Microsoft.BizTalk.Streaming.ReadOnlySeekableStream(stream);
            }
            return stream;
        }

//Niklas

 

Top 500 Contributor
5 Posts

Thanks for the reply Niklas.

I'll give it a go tomorrow and let you know how I get on.

Thanks,

Geordie

Top 500 Contributor
5 Posts

Hi Niklas

Thanks again for your reply.  I tried implementing the method you suggested in the custom component but there was no change in the error message.  It still appears to be missing some method in the component if the error message is accurate... 'Reason: The method or operation is not implemented.'

Any other thoughts would be appreciated.

Geordie

replied on Tue, Dec 16 2008 10:56 PM

Hummm... I really am sorry, but I've kind of run out of ideas. My only hint from here would be to start debugging the pipeline. Attach to BTSNTSvc.exe, breakepoints set in the Execute method of the component, run a message through the pipeline and see where it hits the fan. Besides that, I'm out of luck. Sorry.

//Niklas

Top 500 Contributor
5 Posts
Verified by Geordie

I created a MS trouble ticket for this issue and we were able to identify the problem.

In the custom component code's Execute method I was grabbing the <inputmsg>.MsgPart.Data property and checking for length etc.  The file adatper implements the Data property as both a getter and setter.  The http adapter on the other hand only implements the setter.  Hence the error message.  To get the data you need to use the call the GetOriginalDataStream method.

Hope this helps anyone else who runs into this inconsistency.

Geordie

replied on Thu, Dec 18 2008 10:47 PM

Aaah, the GetOriginalDataStream-method. Of course, when you mention this, I recall using the method, not where I've used it or why though but now I know.

Thanks for posting the answer here.

Happy bts:ing!

//Niklas

replied on Wed, Aug 5 2009 1:23 AM

I had also tried HTTP Adapter but thier is no access realted issues ... why iam nt able to configure

Page 1 of 1 (11 items) | RSS