Thursday, 07 September 2006

Hi

Today, I had the pleasure of helping a fellow BizTalk guy on the microsoft.public.biztalk.general newsgroup. He has a schema which showed up with lots of root elements in the schema editor. He wanted to fix that, but how?

The "problem" is well known if you for instance use schemas created by InfoPath 2003. They will look something like this:

There are lots of elements that appear to be the root node. Now, I know that "myFields" is the actual root node that I want to use, but it sure isn't easy to see. What I want shown is this:

And if I create an instance of this schema, I will get this:

<ns0:CustomerName xmlns:ns0="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-09-07T18:24:45">CustomerName_0</ns0:CustomerName>

But that isn't what I wanted. I wanted this:

<ns0:myFields ns1:anyAttr="anyAttrContents" xmlns:ns1="http://www.w3.org/XML/1998/namespace" xmlns:ns0="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-09-07T18:24:45">
  <ns0:CustomerName>CustomerName_0</ns0:CustomerName>
  <ns0:OrderLines>
    <ns0:OrderLine ns0:ID="ID">
      <ns0:Description>Description_0</ns0:Description>
      <ns0:Quantity>100</ns0:Quantity>
      <ns0:ItemID>100</ns0:ItemID>
    </ns0:OrderLine>
    <ns0:OrderLine ns0:ID="ID">
      <ns0:Description>Description_0</ns0:Description>
      <ns0:Quantity>100</ns0:Quantity>
      <ns0:ItemID>100</ns0:ItemID>
    </ns0:OrderLine>
    <ns0:OrderLine ns0:ID="ID">
      <ns0:Description>Description_0</ns0:Description>
      <ns0:Quantity>100</ns0:Quantity>
      <ns0:ItemID>100</ns0:ItemID>
    </ns0:OrderLine>
  </ns0:OrderLines>
</ns0:myFields>

So, how do I achive this?

Well, the answer is quite simple, really... although it does involve manually editing the schema file (the .xsd file).

What you want to do is add a BizTalk specific annotation to the schema to let BizTalk Schema Editor know which node is to be treated as the root node.

So my schema looked like this:

<xsd:schema xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-09-07T18:24:45" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-09-07T18:24:45" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:attribute name="ID" type="my:requiredString" />
  <xsd:element name="myFields">
... and a whole bunch more

and I edited it and now it looks like this:

<xsd:schema xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-09-07T18:24:45" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-09-07T18:24:45" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:annotation>
    <xsd:appinfo>
      <b:schemaInfo is_envelope="no" version="1.0" root_reference="myFields" displayroot_reference="myFields" xmlns:b="http://schemas.microsoft.com/BizTalk/2003">
      </b:schemaInfo>
    </xsd:appinfo>
  </xsd:annotation>
  <xsd:attribute name="ID" type="my:requiredString" />
  <xsd:element name="myFields">


So under annotations under appinfo, I added a BizTalk specific schemaInfo element, which describes which node to treat as the root node.

Clever and simple. But remember that you need to do this editing every time a new version of the schema needs to be used.

You can find my schemas here:

myschema.zip (,78 KB)

and here:

correctedmyschema.zip (,88 KB)

 

I hope this helps someone.

--

eliasen

Thursday, 07 September 2006 23:17:51 (Romance Daylight Time, UTC+02:00)  #    Comments [2]  | 
Thursday, 24 August 2006

Hi

Well, today was the day where I passed the 70-235 exam in BizTalk Server 2006.

So now I have passed all three BizTalk exams - BizTalk 2000, BizTalk 2004, and BizTalk 2006. Anyone else who has done that? :-)

I wonder how soon I can order my welcome kit at microsoft.com/learning :-)

--

eliasen

Thursday, 24 August 2006 22:29:21 (Romance Daylight Time, UTC+02:00)  #    Comments [2]  | 
Tuesday, 22 August 2006

Hi

Today I ran into a problem configuring the WSS Adapter for BizTalk 2006. In the configuration wizard I just couldn't choose a web site for the adapter that would satisfy the configuration wizard. I got this error:

And I was pretty tired of it :-) Especially because I was sure WSS was installed on this web site, the web site was extended with WSS and everything should have been ok.

Anyway, some searching on the net gave me a hint as to what was going on. I found an article on topxml.com that helped me. In short, I had installed Windows Sharepoint Services on a web site I had created for this purpose, but I had forgotten to make sure the web site was running ASP.NET 2.0 before installing WSS. This made WSS run on .NET 1.1 and BizTalk 2006 has a requirement that it must run under .NET 2.0.

So in order to register ASP.NET 2.0 with IIS and upgrade my WSS installation to use .NET 2.0, I ran the following two commands:

"c:\windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe" -i

"c:\program files\common files\Microsoft Shared\web server extensions\60\BIN\STSADM.exe" -o upgrade -url http://localhost:4242 -forceupgrade

The :4242 is because my WSS web site is configured to run on this port.

After this, there were no problems, and I could then configure the WSS adapter. I didn't need to restart the configuration wizard - I just had to select the default web site and then select my WSS Site again.

Hope this helpes someone. Should you have comments, please go ahead.

--

eliasen

Tuesday, 22 August 2006 16:37:56 (Romance Daylight Time, UTC+02:00)  #    Comments [3]  | 
Sunday, 20 August 2006
Hi

I ran into this one a while ago. I couldn't find any information about the error on the internet, so I tried the microsoft public newsgroups. Again, no help (although those newsgroups are a GREAT place for getting help...). Anyway, I found out, what the error was, and it can probably be found in google groups by now, but I thought I'd just share it here as well.

Basically, the problem was that BizTalk 2004 SP1 apparently has a bug. If you have a "Call Orchestration"-shape (or a "Start Orchestration"-shape) in your orchestration, and this shape is placed in some particular unreachable code, you get this error.

I had a decision shape in my orchestration, but I hadn't gotten around to deciding what the rule in the decision shape was going to be. So I entered "1 == 1" in order for the assembly to compile and then I could deploy it and test it for that branch of my decision shape. Then, I wanted to test the other branch, still not knowing what the final rule would be. So I modified the orchestration to have the rule to be "1 != 1" - but then I couldn't compile - weird, eh?

Below is my orchestration.




So, as you can see - no funny stuff. Another weird thing is, that I can compile just fine with my "Call Orchestration"-shape after a Terminate-shape. But that is unreachable code as well.

I don't know what is happening, but it sure is weird.

I hope this posting has helped some of you.

You can find a copy of my project here: CompileErrorWhenDecisionShapeRuleIsFalse.zip (59.09 KB)

Let me know if you have any comments.

--
eliasen
Sunday, 20 August 2006 15:04:37 (Romance Daylight Time, UTC+02:00)  #    Comments [1]  | 
Saturday, 19 August 2006
Hi everyone!

Three weeks ago, my second son was born. So now I am the proud father of two sons.

They have a homepage, my sons... it can be found at http://andreas-og-emil.eliasen.dk

It is only in Danish, I'm afraid.

Oh yeah, and it is my first attempt at making anything in ASP.NET 2.0 - and I've even used the Masterpage functionality :-)

--
eliasen

Saturday, 19 August 2006 23:27:55 (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Wednesday, 12 July 2006

Hi, and welcome to my very first blog entry here at http://blog.eliasen.dk - I hope to be able to blog about some issues I run into using BizTalk and other server products from time to time.

Let me know if you have any questions and/or comments for me.

--

Eliasen Jr.

Wednesday, 12 July 2006 11:34:10 (Romance Daylight Time, UTC+02:00)  #    Comments [1]  | 

Theme design by Jelle Druyts