by community-syndication | Jul 7, 2009 | BizTalk Community Blogs via Syndication
Hi all
A guy on the forums posted a very small schema, in which he had promoted an element
as a distinguished field.
His schema was this:
<?xml version="1.0" encoding="utf-16" ?>
<xsd:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified"
elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="outbound_task">
<xsd:annotation>
<xsd:appinfo>
<properties xmlns="http://schemas.microsoft.com/BizTalk/2003">
<property distinguished="true"
xpath="/*[local-name()=’outbound_task’ and namespace-uri()=”]/*[local-name()=’task’
and namespace-uri()=”]/*[local-name()=’task_id’ and namespace-uri()=”]" />
</properties>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="task">
<xsd:complexType>
<xsd:sequence>
<xsd:element
minOccurs="0" name="task_id" type="xsd:decimal" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
His issue was, that when he tried using the distinguished field in an orchestration,
the task_id field just didn’t show up in intellisense. And if he just entered the
complete value in the expression shape (like this: Message.task.task_id) then he got
a compile time error.
I messed around with it a lot, trying all sorts of stuff, but ended up with a quite
simple solution: the word “task” is a reserved word. For a complete list of the reserved
words, take a look at http://msdn.microsoft.com/en-us/library/aa547020.aspx.
So, basically, renaming the “task” element to “Task” or something completely different
(but still avoiding any reserved words) will work.
Hope this helps.
—
eliasen
by community-syndication | Jul 7, 2009 | BizTalk Community Blogs via Syndication
That Alan Smith is always up to something. He’s just created a new online community for hosting webcasts about Microsoft technologies (Cloud TV). It’s mainly an excuse for him to demonstrate his mastery of Azure. Show off. Anyway, I recently produced a webcast on the ESB Toolkit 2.0 for Mick Badran Productions, and we’ve uploaded […]
by community-syndication | Jul 7, 2009 | BizTalk Community Blogs via Syndication
Most of the sample from Microsoft have so far been more about HOW to use “Oslo”, rather then WHY and WHEN. This has brought many developers to struggle about what to make out of “Oslo”, and how to put it in good use.
There are, however, several very interesting community posts about Oslo. But most of them are about M Grammar, and very few (I haven’t seen any) has been about the “Repository”.
M Grammar, is without a doubt a more “sexy” technique, as the Repository is nothing more than a SQL store for your models. – BUT I’m willing to bet that the Repository will play a very significant part in the future of any Microsoft technology. By writing this article, I hope to broaden your vision of how to use “Oslo”, and envision where Microsoft is going with the it.
Service Configuration => “Oslo” Repository;
A service host, hosts one or more services. It is created by a service host factory which, by default, loads all service configurations (bindings, services and behaviors) from one configuration file. The default factory is System.ServiceModel.Activation.ServiceHostFactory.
The samples in this post will show you how you could load the configurations for all your services from ONE “Oslo” Repository, rather than from many configuration files. As if all your services would share the same config file.
The sample above would of course work for any number of web servers accessing the same Repository database.
To accomplish this we need:
- A “Oslo” model representing system.serviceModel. The January release of “Oslo” where shipped with the system.serviceModel model. However it was cut out in the May release, so I just created my own.
- A custom service host factory that loads Services and endpoints, along with all bindings and behaviors. I didn’t bother to make this to generic, so it only supports basicHttpBinding, wsHttpBinding, netTcpBinding and of course mexHttpBinding.
– “So what?”
Actually, I think this is a pretty big deal. Having one single repository for all your services, means one single store for managing and configuring these services. – And what better tool to use than the “Oslo” Quadrant!
Try it out:
- If you haven’t already installed the Oslo May CTP release, you can find it at the “Oslo” Developer Center.
- Download the zip file and open the bLogical.ServiceModel.m file using “Intellipad”.
- In “Intellipad”, switch to “SQL-Preview” by using the “M mode” in the menu bar.
- Open SQL Management Studio, create a new query window and select the Repository database.
- Copy the T-Sql from “Intellipad”, paste it in to the query window and execute it. This will create all the Tables, and populate them with sample data.
- Open Visual Studio 2008, and create a new WCF Service by selecting “New Web site”. Don’t change the name of the service, as the samples created in step 5 assumes your service is called “Service”, and its interface is called IService. If you do want to change the name or use it for an already existing project, make sure to to do the changes in the repository.
- Add the bLogical.Oslo.ServiceHostFactory project to your solution.
- Open your .svc file and add the bLogical service factory:
<%@ ServiceHost
Language="C#"
Debug="true"
Service="Service"
CodeBehind="~/App_Code/Service.cs"
factory="bLogical.Oslo.ServiceHostFactory.ServiceHostFactory"
%>
Run the service!
HTH
Special thanks to Yossi Dahan, for encouraging me to do this article.
//Mikael
by community-syndication | Jul 6, 2009 | BizTalk Community Blogs via Syndication
My webcast on the new WCF SQL Adapter has been made available on Cloud TV, a great initiative started by Alan Smith. Clout TV is a community based website for hosting webcasts relating to Microsoft technologies.
Here’s the link to the presentation:
http://cloudtv.cloudapp.net/ViewWebcast.aspx?webcastid=2521554268962766719
There are several other webcasts on the site already, including two others by Kent Weare […]
by community-syndication | Jul 6, 2009 | BizTalk Community Blogs via Syndication
Hi all
A long time ago, I had a post about the toolbox in Visual Studio keeping old functoids
on it and crashing and stuff.
The post can be found here: http://blog.eliasen.dk/2006/12/05/RemovingFunctoidFromToolbox.aspx (Note
the comments).
With this post I just wanted all to know that the path to the toolbox* file that should
be deleted on a Windows Server 2008 with visual Studio 2008 is C:\Users\<User>\AppData\Local\Microsoft\VisualStudio\9.0
Hope it helps
—
eliasen
by community-syndication | Jul 6, 2009 | BizTalk Community Blogs via Syndication
Hi all
So, yesterday I had to loop through all properties on a message inside a pipeline
component.
When you program a general pipeline component, you get an Execute method that looks
like this:
public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
Now, in order to loop through the properties, the common solution is like this (and
you can find this in many many blog posts around the great internet):
for (int i = 0; i <= pInMsg.CountProperties; i++)
{
string name;
string ns;
object value = pInMsg.Context.ReadAt(i, out name, out ns);
// Do something with the vale, name and namespace
}
Now, this is quite all right as it is, but there is one small pitfall that I don’t
think most people realize; The CountProperties property is a uint, meaning that it
can contain values up to 2^32 = 4294967296. Unfortunately, the first parameter to
the ReadAt method is an int, which only holds values up to (2^31) – 1 = 2147483647.
So, if there are, say 3000000000 properties, then the CountProperties property will
return the correct number of properties, but there is no way of calling the ReadAt
method to get the property.
This is kind of silly.
Now, to be fair, I think that the most properties I have seen on a message ever may
have been around 40-50 properties. So there is a looooong way to 2 billion properties
🙂 So in real life, I don’t expect anyone to run into this limitation – if you do,
I’ll buy you a beer! 🙂
BUT, just to be sure, what you should do to be absolutely correct in your code is
this:
uint counter = pInMsg.CountProperties;
string name;
string ns;
if (counter > int.MaxValue)
{
counter = int.MaxValue;
}
for (int i = 0; i < counter; i++)
{
object value = pInMsg.Context.ReadAt(i, out name, out ns);
// Do something with the vale, name and namespace
}
And then, off course, you should somehow notify someone that there were more properties
than you could handle – like a Debug statement, an error in the eventlog or the such
perhaps even throw an exception BEFORE trying to enumerate the properties, sine it
would be useless, the result you get.
Anyway hope this is somehow a help to someone not sure how, though 🙂
—
eliasen
by community-syndication | Jul 6, 2009 | BizTalk Community Blogs via Syndication
I’ve just added a few webcasts to Cloud TV:
%u00b7 WCF – Windows Authentication
%u00b7 Transactions and Compensation
%u00b7 Creating a Highly Available BTS 09 Environment
%u00b7 All you need to know about the SAP Adapter
%u00b7 All you need to know about the SQL Adapter
Thanks to Mick Badran and the other “Light and Easy” BizTalk guys.
The site is here.
Please let me know via the contact form if you have any webcasts you would like me to add.
by community-syndication | Jul 6, 2009 | BizTalk Community Blogs via Syndication
Background
EPiServer implements standard provider functionality for role and membership access through the ASP.NET framework. The most common membership- and role provider is the SQL provider….
Daniel Berg’s blog about ASP.NET, EPiServer, SharePoint, BizTalk
by community-syndication | Jul 5, 2009 | BizTalk Community Blogs via Syndication
=======================================================================
IMPORTANT: this is my old blog and is not being updated anymore.
For my new site/blog/RSS, please visit http://blog.brianloesgen.com
=======================================================================
by community-syndication | Jul 5, 2009 | BizTalk Community Blogs via Syndication
It looks as though the VirtualBox Team have added a nice new feature in their 3.0 release – the full-screen toolbar!
When running a VM in full-screen mode, moving your mouse to the bottom of the screen displays the new toolbar, as shown below.
All of the features available when running the VM in windowed mode are […]