Yossi Dahan [BizTalk]


Thursday, September 13, 2007

Answer to a question from U3

"U3" has asked a question in a comment on my previous post -

"Dear Yossi , I have a n Question not in this post , but about how to oublish an bizTalk 2006 Orchestration that takes an Empty Request , hope to get my question..!!!! "

I'll start by saying, not trying to avoid the question obviously (or I wouldn't post this here) - it is always better to post such questions in the newsgroups as more people (I humbly presume) will see them and get a chance to throw in their 2 cents. None-the-less here's my view, and I officially invite others to add theirs as comments to this post if they so wish (not that any official invitation is ever needed)

If I understand correctly - and I'm almost certain I'm not, for reasons that will be apparent soon - "U3" wants to publish a web service that would start an orchestration, but passing in an "empty" request - i.e. without a message.

This does not make sense to me - first of all if you're specifically thinking about BizTalk it is quite clearly a platform driven by messages; nothing happens in BizTalk without a message.

But even if you broaden your scope and look at web services in general - there has to be something that goes over the wire to tell the server "Hey! I'm here, and I need you to do something for me."; this definitely requires a message to go across.

Create an ASP.net web service with a web method that takes not parameters and returns nothing, and look at the WSDL - messages for both input and output will be clearly defined (unless you explicitly flag your web method as one way in which case you could avoid the return message).

For example take the HelloWorld example you get when you create a new ASP.net web service project in VS, change the return type to void and your WSDL representation will look something like -

A message is going in and a message is going out. No way around it.

How else would the server know it needs to do something?!

So - for U3 - If I misunderstood your question please send me a clarification (and I guess you could use a comment on this post now..), otherwise - I hope this makes sense.


  • There are defiantly case where one doesn't have a clear request message. I've recently had a case where I needed to get a list of categories back from a database and is happened via a Web Service exposed orchestration communicating with SQL Server. I didn't have a request message I just wanted a list of categories in return.

    In .NET one calls a non parameter service like this Service.GetCategories(); and as you say in your post this creates an empty SOAP call but thats really up the proxy and as a developer it looks like just a parameterless call.

    A parameterless call like the above is however not possible in BizTalk I think as you actually need something more than the empty SOAP message to kick of you orchestration. What I in my case was to use the same type of message as a in parameter as I'd expect back in return. So the call is then Service.GetCategories(out categoryList). As you see BizTalk then generates a out parameter and I think this is the best way of expressing the intent with the service - at least in my case.

    Another option would be to actually manipulate the generated service to have this parameterless look we discussed and then add the empty out parameter object by code there so users of the service don't have to worry about that (sure you'd also have to change the return object to not use the out parameter and so on), but to me that way to messy.

    Is there a point in all this ramble? ;)

    Richard Hallgren

    By Blogger Richard Hallgren, at 19/09/2007, 05:41  

Post a Comment

<< Home