Michael Stephenson

keeping your feet on premise while your heads in the cloud
posts - 257, comments - 277, trackbacks - 11

My Links

News

View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn

Twitter












Archives

Post Categories

Image Galleries

BizTalk

Mates

One to watch for with WSE Filters

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

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Sunday, May 06, 2007 4:58 PM | Filed Under [ BizTalk .net 2 ]

Feedback

Gravatar

# re: One to watch for with WSE Filters

Haha

The first time I read your blog in weeks and you've actually linked me! Guess I better post something now ;)
5/8/2007 2:26 PM | Nicolai Sorensen
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: