Michael Stephenson

Microsoft BPM/SOA Adventures
posts - 187, comments - 185, trackbacks - 15

My Links

News

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

Archives

Post Categories

Image Galleries

BizTalk

Mates

Problem with BizTalk one way web service

Problem

We have a BizTalk orchestration which has been published as a web service.  The orchestration has a one way recieve port which results in a web service being generated which contains a method with a void return type.

The behaviour we experienced was that on occasion the service was called by a client which was returned an http 202 return code and indicated that the message had been accepted.  The problem how ever was that the message hadnt made it to the message box.  An example of this was if the recieve location was disabled.

Upon inspection of the web service this was caused because the web method was marked with the one way attribute with a value of true.  This means that once the web server accepts the message from the client, the client will continue executing and not care of the result of the call.

This was not what we wanted, we wanted to know that the message had made it to the message box and that any error in the inbound process would be reported to the client.

Solution

The solution was simple in that we just needed the web service and the clients web service proxy to mark the web method as one way = false.  This was not as straight forward to implement though because the web service and proxy code is generated at build time by our msbuild process.

The solution to this was to amend the web service description file used to generate the web services before the build task automated the web service publishing wizard to generate the service.

In the web service description file there is the following attribute for the method

ForceRequestResponse="Default"

The change was to change this attribute to "Yes" which would then result in the code behind for the web service being marked as OneWay="false" for the web method.

This would then result in the desired behaviour where the message gets to the message box before the respose is returned to the client

Disclaimer

I have noticed a few sites that seem to copy the content of blog articles and display them in their own site.  It is a bit annoying that they do not clearly reference or acknowledge the author so I have decided to put this note on the bottom of all of my posts from now so it is clear who wrote it.

This article was written by: Michael Stephenson

The source of this article is: http://www.geekswithblogs.net/michaelstephenson

Print | posted on Monday, January 07, 2008 3:22 PM | Filed Under [ BizTalk ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 

Powered by: