Geeks With Blogs

News View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn
Michael Stephenson keeping your feet on premise while your heads in the cloud

Scenario

I am currently working on a project where one of the things we deliver is a web service exposed by BizTalk which allows other applications to interact with one of the legacy systems.  The service is consumed primarily by a .net application being developed on another project within the same company.  When trying to consume the service the developers of the .net application were recieving an error and with BizTalk being involved the usual case of blaming BizTalk as it is this strange mystical beast that we dont really understand so it must be its fault.

Solution

I was working with a collegue to help with this problem that the developer was experiencing and with a little diagnosis we found the cause of the problem to be in the WSE Input filter used by the application.  The .net application was a distributed application which had some middle tier web services which a smart client used.  One of the middle tier components would be calling the BizTalk web service.  In these web services there was a WSE input filter which was expected to validate something on requests made from the smart client but it was also acting upon the response sent from the BizTalk service where the code wasnt anticipated to run.  Without getting into what the filter did it basically had an error when it was running on the response from BizTalk.  The solution to this was that in the filter we added a like to check that it was a request message we were dealing with and if it wasnt we would not execute the filters code.  I think the syntax was something like

soapEnvelope.Context.IsRequest

The lessons to take away from this are as follows:

  • When developing a service consumer it is a good practice to develop a stub of the service and code initially against that so you can get your code working without the complexity of what would be normally behind the service.
  •  
  • when using WSE Filters ensure you check the type of message (request or response) if it can break your code being in the wrong context

As an aside my collegue who helped with this is Nicolai Sorensen, he blog is here http://devauthority.com/blogs/nicolai/default.aspx although i wouldnt recommend reading it as it is pretty boring

Posted on Sunday, May 6, 2007 4:58 PM BizTalk , .net 2 | Back to top


Comments on this post: One to watch for with WSE Filters

# re: One to watch for with WSE Filters
Requesting Gravatar...
Haha

The first time I read your blog in weeks and you've actually linked me! Guess I better post something now ;)
Left by Nicolai Sorensen on May 08, 2007 2:26 PM

Your comment:
 (will show your gravatar)


Copyright © Michael Stephenson | Powered by: GeeksWithBlogs.net