Going to PDC? Want to meet the team?

3 weeks to go until PDC09; sessions are being reviewed, demos are being polished, schedules are being finalized, and the booth machines are being installed and packed up to go down to Los Angeles. Among the WCF, WF, and ’Dublin’ group, we have about 15 people who will be down at PDC to chat with you about what is coming out with the release of .NET Framework 4 and to discuss some of the thoughts around what might come afterwards.

With 15 people at the event, that provides about 40-ish opportunities to chat with folks over lunch at the event. With PDC 3 weeks out, we would like to offer up about 30-40 spots with the folks heading to PDC09. Attending the event this year are folks from the PG who write and design WCF and WF, as well as the folks behind the ’Dublin’ technologies. These are our architects, our program managers, our devs, and some folks from our business group.

If you have interest in catching up with one of us at the event

  1. Click the ’Email’ link in the header above (white text; lower left hand portion of the header), or drop us an email to the endpoint alias (at – of course – microsoft.com)
  2. Use the subject ’Meet at PDC’
  3. In the message/body, give us an idea of who you would like to catch up with (general role is fine; we’ll match folks up appropriately) and what you would like to discuss
  4. Don’t forget to use/specify the best email to reach you at

Starting next week (week of Nov 2nd), we’ll start matching up the top 20 submissions to folks – and connect you up someone from the team. You can then coordinate lunch or coffee/tea or whatever in advance of the event. We’ll then fill up the remaining spots in the week before PDC.

Topics can range from the technical (feedback on the product, suggestions about what you would like to see done differently, a discussion on issues you’re currently having (and how a change we might make would make it easier)) to business (potential case study, compelling partner product, would like to learn how to better partner) to how to get more involved with authoring tutorials/whitepapers to feedback on what could be done differently on the web properties.

That being said, the team will also be heavily representing the technologies at PDC – in sessions, at the booths, and in the lounge. Even if you don’t get selected (or even submit) for a slot, we’d love to meet you and learn more about how you’re using (or would like to use) our technologies!

See you at PDC!
– Cliff

Testing a map when using the “Fixed” property on an element in your schema

Testing a map when using the “Fixed” property on an element in your schema

Hi all

Today I tried playing with the “Fixed” property that can be set on an element or an
attribute in your schema. According to the documentation, this is then a value that
MUST be present in the element.

image

So the mapper is actually quite down with this – you cannot map anything to the field
that has a value in the “Fixed” property. And when expecting the XSLT that is generated
by the mapper you will find, that the mapper simply inserts the correct and hard coded
value into the field.

image

Great.

Now, I created some links in the map just to test it, and chose that the mapper should
validate the input for my map, but not the output, since I hadn’t bothered dragging
all the necessary links.

To my surprise I got this error:

 1: Output validation error: The value
of the 'MiddleNames' element does not equal its fixed value.

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

An error validating the output of the map but this surely must be a mistake, because
I turned validation of the output from the map off and besides; the value in “MiddleNames”
cannot be wrong, because the mapper has put it there it self, taken from the schema.
Very weird indeed.

Only after quite a search, did I discover that the error was in validation of the
INPUT to the map and not the output. I had used the same schema as both input and
output, and my input instance did not have the correct value since it was an old test
instance.

But really Microsoft that error message could be better! 🙂

Hope this helps someone.



eliasen

SharePoint 2010 – access data through ADO.NET Data Services (Astoria)

SharePoint 2010 – access data through ADO.NET Data Services (Astoria)

Last week – I had the privilege of speaking at Microsoft’s
SharePoint conference in Las Vegas
.  I had a talk about Workflows in SharePoint
2010 – and had a blast at the conference.  Honestly probably the best technical
conference I’ve ever spoke at, certainly the best I’ve been to in at least 10 years.

I’m super excited about SharePoint 2010, expect more blog posts and other information
flowing from this blog RSN.

One thing I am really really excited about it is all the emphasis on REST in SharePoint
2010.  Case in point – as you can read over at the ADO.NET Data Services team
blog =  http://blogs.msdn.com/astoriateam/
SharePoint list data is going to be exposed via ADO.NET Data Services!

Just go to /_vti_bin/ListData.svc/   (note that you may have to install ADO.NET
Data Services 1.5 CTP2
if you haven’t already  as you’ll get 404 – page not
found errors if you try to hit the ListData.svc URI without it installed).

Another really cool part of this integration between ADO.NET Data Services and SharePoint
2010 is that document libraries are exposed as well -and documents are exposed as
Atom pub media links (a standard way to expose binary data as part of an atom feed).

I was playing around with this today – and wanted to blog about how to use it through
the ADO.NET generated client.  The DataServiceContext object you use to connect
to your list data has two methods :  GetReadStream, and SetSaveStream.

When you want to retrieve the document from the document library associated with a
list item, you pass the list item to GetReadStream:

 1: var
uri = new Uri("http://flash/spc/_vti_bin/ListData.svc");

 2: var
ctx = new TwiddlerDataContext(uri); 

 3: ctx.Credentials
= System.Net.CredentialCache.DefaultCredentials;

 4: var
extf = ctx.FlowTest.FirstOrDefault();

 5: var
stream = ctx.GetReadStream(extf); 

You use SetSaveStream to associate a list item with a stream that will be save as
the document.



Check out my new book on REST.

Keyboard Shortcut to insert a cross reference in Word 2007

Keyboard Shortcut to insert a cross reference in Word 2007

Hi all

As many have noticed, I am co-authoring a book and
right now I am writing all my stuff in Word 2007.

As you might have guessed, I have lots of sections, subsections, figures, tables and
other numbered items in my text, and naturally, they are there because I need to reference
them in my text.

In order to insert a cross reference from some text to a given numbered item, I found
two options:

  1. Go to the “References” tab and click on “Cross-reference” in the “Captions” section.
  2. Go to the “Insert” tab and click on “Cross-reference” in the “Links” section.

Both will give me this window:

image

This is all very fine, but I need a quicker access point, since it appears that I
most often need both clicks to get to the dialog box, since I am usually not on either
the “Insert” or the “References” tab.

So I discovered the “Quick Access Toolbar” by chance. This happened when I accidentally
right-clicked on the “Cross-reference” in stead of clicking on it. Here I could add
the functionality to the “Quick Access Toolbar” and also choose to show the “Quick
Access Toolbar”, as seen here:

image

The arrow points to the “Quick Access Toolbar” and the red square is around the “Cross-reference”
functionality. So now I always only need one click, which made me happy for a while
🙂

Because once I could do it with just one click, I started wondering about a keyboard
shortcut for it. I couldn’t find one, and I searched and searched and finally just
after posting my question to a newsgroup, I found how to do it:

Go to “Word Options”, which is a button at the lower right when clicking on the Start
button at the upper left of Word:

image

This will open up the Word Options. Go to “Customize” and click on “Customize” as
seen in the image below:

image

After this you get a screen where you can change short cuts, as seen here:

image

Choose “Insert Tab” and then “InsertCrossReference” and click in the “Press new shortcut
key:” box. Now enter the shortcut you want (I entered Alt+Ctrl+Shift+C). Word will
tell you if the shortcut you have chosen is all ready assigned to another function
(Mine is “Unassigned” as you can see) and then you can click on “Assign” to complete
the task.

So now, every time I need to insert a cross reference, I just pres Ctrl+Alt+Shift+C
and the dialog box comes up.

All that is left now is to get the “Only Label and number” as the default value for
the drop down that decides what to insert instead of “Entire Caption”, but a Word
MVP wrote in a post I found that this was not possible. Bummer. Keeping my fingers
crossed for Office 2010! 🙂

I hope this helps someone.



eliasen

Strange BizTalk WMI behavior (curious BizTalk SQL)

This week a co-worker raised an issue with a WMI query where he did a simple query for an orchestrations messages, and for some reason not all of them were returned. This behavior exists on both 2006 R2 and 2009, and thus most likely on 2006 as well. The query was simple:

select    *
from    MSBTS_MessageInstance
where    ServiceInstanceID = '{9DD50CE0-CC9C-478C-B19D-A3AAFD33ACA3}'

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }This was supposed to return two messages, but only one was returned, illustrated below in WMIExplorer:

He came up with a solution where he could instead do a LIKE query and get both message instances returned:

select    *
from    MSBTS_MessageInstance
where    ServiceInstanceID LIKE '{9DD50CE0-CC9C-478C-B19D-A3AAFD33ACA3}'

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

Now I was ok with this as a solution, but I wanted to find out a bit about why this happened.

Using SQL Profiler to see what this WMI query meant I found a call that looked like this when I used ’=’:

exec BOM_LookupMessageReferences
  @nvcHost=NULL,@nServiceClass=127,@uidServiceType=NULL,%u00a8
  @uidInstanceId='9DD50CE0-CC9C-478C-B19D--3AAFD33ACA3',
  @uidMessageId=NULL,@snStatus=63,@nReferenceType=15,
  @dtFrom='Oct 25 3009 12:06:31:360PM',@dtUntil='Oct 25 1809 12:06:31:360PM',
  @nMaxMatches=200

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

and like this when using ’LIKE’:

exec MBOM_LookupMessageReferences
  @nvcHost=NULL,@nServiceClass=127,@uidServiceType=NULL,
  @uidInstanceId=NULL,
  @uidMessageId=NULL,@snStatus=63,@nReferenceType=15,
  @dtFrom='Oct 25 3009 12:06:42:867PM',@dtUntil='Oct 25 1809 12:06:42:867PM',
  @nMaxMatches=200

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

Spot the difference?

Sure enough in one case we send in the (service)instanceId and in the latter, we don’t. This in effect, causes the latter query to return all messages matching the other criteria, and filtering on the serviceInstanceId is made elsewhere, presumably in the code executed by the WMI call, although I haven’t investigated that further.

So what makes the first query return only one message? It’s got the service instance Id with it, and nothing else, so what’s causing it to filter out the single message.

Looking further into the call chain in SQL, the method MBOM_LookupMessageReferences uses methods named MBOM_LookupMessageReferences_<host>, for example MBOM_LookupMessageReferences_BizTalkServerApplication.

In this (these) procedures you can find the following code:

if (@uidInstanceId IS NOT NULL)
    set ROWCOUNT 1
else if (@nMaxMatches > 0)
    set ROWCOUNT @nMaxMatches

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

So if we send in a serviceInstanceId we will just get a single message instance returned. I’m not sure what the point of this is really, but it seems to be interfering with what we want.

It’s an universal truth that you do best to stay out of the BizTalk databases and their queries. I’m not going to suggest something that I will call a solution in this post, especially not since I haven’t done sufficient testing to see that this doesn’t interfere with something else.

However, from the test I have done, it seems as if the following code change might be what was intended:

if (@uidMessageId IS NOT NULL)
    set ROWCOUNT 1
else if (@nMaxMatches > 0)
    set ROWCOUNT @nMaxMatches

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

Which gives the result I want for a serviceInstanceId query:

as well as for a messageInstanceID query;

We are not likely to use this alteration, since I’m ok with the way that the LIKE query works, even though it takes a wider scope then necessary. But perhaps this might help or enlighten someone that finds themselves with a similar puzzle.

BizTalk 2009/VS 2008 Creating project ’project name’ project creation failed.

Just a quick post.  I hit this on my machine today whilst writing a quick sample.  When creating a BizTalk Project I got Creating project ’project name’ project creation failed in the VIsual Studio dialog bottom left of the screen.  Changing the reg key referenced by Guru/Vinay in the BizTalk CPR blog fixes it http://blogs.msdn.com/biztalkcrt/archive/2009/08/21/visual-studio-2008-fails-to-create-open-biztalk-projects.aspx 


 


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}]


“PossibleProjectExtensions”=”csproj”   – Original VS install reg value. “PossibleProjectExtensions”=”csproj;btproj” – Post Biztalk installation reg value

SOA Manifesto Unveiled

As I mentioned before, I was invited to participate in a working group to define a SOA Manifesto.

That happened this week at the SOA Symposium in Rotterdam. It was truly an honor to work with such a talented and intelligent group of individuals to define a SAO Manifesto, there were a lot of intense discussions and much hard work, but we got it done.

The manifesto was agreed upon, formally signed, and officially unveiled on Friday. The Web site is up now at SOA-Manifesto.org, but this is all just happening now, more information will be added to the site in the coming weeks.

I (and my co-authors) will be certainly be blogging more about this, but for now, you can see the official ceremony at  http://www.youtube.com/watch?v=TCg16oTZSV0

Error using unit test of schemas

Hi all

If you are also receiving this error when unit testing your schemas:

TOMTreeGenerator.GetElementAbsoluteType: Object reference not set to an instance of
an object.

then I can inform you that the reason is, that the built-in unit test framework does
not support schemas that include or import other schemas.

To partially overcome this, take a look at the seventh issue of the BizTalk Hotrod
at http://biztalkhotrod.com/default.aspx,
where it is explained how to write a small helper class that will allow you to do
unit testing on schemas that include and/or import other schemas.

Unfortunately this does not cover native file formats, but one can hope that Microsoft
will improve the unit testing features in future versions of BizTalk.

Webcast MsgBoxViewer

Webcast MsgBoxViewer

Hello,


I did recently a webcast about MBV for the UK SOA/BPM User Group (SBUG)


Link to the video is available here : http://geekswithblogs.net/michaelstephenson/archive/2009/10/13/135448.aspx


I would like to thank Michael Stephenson for this web cast invitation which was a good opportunity for me to explain MBV goal and its usage and do some Q&A with participants !


JP