Setting Promoted, Distinguished Fields on BizTalk Web Messages

Just finishing up a week-long 12-hour-a-day BizTalk workshop for my SoCal customers, and wanted to post a few bits I built for the class. This post focuses on using promoted properties and distinguished fields on web messages.

One apparent challenge when consuming an existing web service from within a BizTalk orchestration is the fact that you don’t appear to have a schema added to your project. Oh, you get “web message types” and so forth, but that’s not the same. What if you need to access a field in the input/output message in a message assignment shape, or, need to initialize a correlation set when you call a one-way service?

When you add a “web reference” to your project, you get something like this …

However, if you open up the reference all the way, you can drill through the and you’ll find references.xsd. This XSD schema holds all the types used in the WSDL.

So, if you want to distinguish a field, or promote a property, it’s as easy as opening up this schema, and making that choice. Then you can easily access web message fields from within orchestration shapes, or, initialize new correlation sets on web service calls.

The obvious disclaimer applies: this is a auto-generated schema, and if I “update reference” I’d lose any promoted or distinguished distinction.

Technorati Tags: ,

Comments (2)

  1. andreas says:

    As always – good work Richard, just wanna share my 2 cents…

    I think that you should point out that people should use pipelines with a disassembler to be able to do this. Another thing worth mentioning is that you should name the web method and the orchestration operation exactly the same IF you choose to publish your schemas as a web service and not your orchestration. This will create a subscription "under the hood" if you’ve specified the schema as the message type in your orchestration.

    Have loads of more info about BTS and web services if you’re interested.


    PS: Nice meeting you in Redmond last month Richard, have some interesting business rule projects starting up at the moment, in part because of your session at the conference. 🙂

  2. Hey Andreas,

    Good comment.  If you’re promoting fields, it’s definitely much safer for web messages to do that in a pipeline.  I’ll be posting something else today that relates to your second point (naming the operation the same as the web method name).