<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blognote &#187; BizTalk 2004</title>
	<atom:link href="http://blog.edwardsmit.com/category/biztalk-2004/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.edwardsmit.com</link>
	<description>Edward&#039;s Unicode Sequences</description>
	<lastBuildDate>Thu, 01 Jul 2010 06:32:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>BizTalk Web Service Publishing Wizard Error: Method not found: System.Xml.Serialization.XmlMapping.get_ElementName()</title>
		<link>http://blog.edwardsmit.com/2007/08/biztalk-web-service-publishing-wizard-error-method-not-found-system-xml-serialization-xmlmapping-get_elementname/</link>
		<comments>http://blog.edwardsmit.com/2007/08/biztalk-web-service-publishing-wizard-error-method-not-found-system-xml-serialization-xmlmapping-get_elementname/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 11:38:29 +0000</pubDate>
		<dc:creator>Edward</dc:creator>
				<category><![CDATA[BizTalk 2004]]></category>

		<guid isPermaLink="false">http://blog.edwardsmit.com/BizTalk+Web+Service+Publishing+Wizard+Error+Method+Not+Found+SystemXmlSerializationXmlMappinggetElementName.aspx</guid>
		<description><![CDATA[I was stunned, I had defined a Request schema and a Response schema to be used by a Web Service I wanted to implement in BizTalk 2004. The Request schema was straightforward, just some fields which made up a Service Request. The response would be a collection of 0 to N &#8220;Records&#8221;. I had the [...]]]></description>
			<content:encoded><![CDATA[<p>I was stunned, I had defined a Request schema and a Response schema to be used by a Web Service I wanted to implement in BizTalk 2004. The Request schema was straightforward, just some fields which made up a Service Request. The response would be a collection of 0 to N &#8220;Records&#8221;.</p>
<p>I had the Response Schema defined somewhere around the lines of this:</p>
<pre class="brush: xml">
&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;xs:schema xmlns="http://BizTalk_Webservice_Publishing_issue.Schema2"
  xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
  targetNamespace="http://BizTalk_Webservice_Publishing_issue.Schema2"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;xs:element name="Root"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element minOccurs="0" maxOccurs="unbounded" name="Record"&gt;
          &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
              &lt;xs:element name="Field1" type="xs:string" /&gt;
              &lt;xs:element name="Field2" type="xs:string" /&gt;
              &lt;xs:element name="Field3" type="xs:string" /&gt;
            &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;
</pre>
<p>Looks sensible right? It compiles okay, I can make an Orchestration with a Request-Response port, everything looks fine, until the Web Service Publishing Wizard gives me:</p>
<pre class="brush: csharp">
Failed to create project http://localhost/BizTalk_Webservice_Publishing_issue_Proxy.
[Microsoft.BizTalk.WebServices.PublishingException] Failed to construct code for schema "http://BizTalk_Webservice_Publishing_issue.Schema2".
Method not found: System.String System.Xml.Serialization.XmlMapping.get_ElementName().
</pre>
<p>I didn&#8217;t get it, what was wrong? After searching the internet (in which I obviously found one of <a href="http://bloggingabout.net/blogs/wellink/archive/2007/05/22/solving-the-microsoft-biztalk-webservices-publishingexception-with-imported-schema-s.aspx">Patrick&#8217;s blogpost</a> which didn&#8217;t help in this case as I had no imported schema&#8217;s) I began some experiments. I determined that the cause lies in the multiplicity on the <strong>Record</strong> element. It didn&#8217;t matter what values I used, as soon as the schema allowed more than one <strong>Record</strong> element to be a part of the message, the Wizard failed on me.</p>
<p>I don&#8217;t remember how I got the idea, but the solution is rather simple. It appears that the Wizard doesn&#8217;t like the multiplicity <em>on the <strong>element</strong></em>. So, let&#8217;s put the multiplicity one level higher, <strong><em>around</em></strong> the element, like this:</p>
<pre class="brush: xml">
&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;xs:schema xmlns="http://BizTalk_Webservice_Publishing_issue.Schema2"
  xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
  targetNamespace="http://BizTalk_Webservice_Publishing_issue.Schema2"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;xs:element name="Root"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
          &lt;xs:element name="Record"&gt;
            &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                &lt;xs:element name="Field1" type="xs:string" /&gt;
                &lt;xs:element name="Field2" type="xs:string" /&gt;
                &lt;xs:element name="Field3" type="xs:string" /&gt;
              &lt;/xs:sequence&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;
</pre>
<p>So after encapsulating the <strong>Record</strong> element in a <em>Sequence</em> on which I added the multiplicity, all was well. I don&#8217;t think I fully understand why the Wizard (or XSD.exe which is running the show in the background) fails on the first version, but now I do know how to solve this.</p>
<p><strong>Update:</strong> fixed the formatting of the XML Schema&#8217;s for readability.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.edwardsmit.com/2007/08/biztalk-web-service-publishing-wizard-error-method-not-found-system-xml-serialization-xmlmapping-get_elementname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the UK SDC BizTalk 2004 Documenter to run</title>
		<link>http://blog.edwardsmit.com/2006/09/getting-the-uk-sdc-biztalk-2004-documenter-to-run/</link>
		<comments>http://blog.edwardsmit.com/2006/09/getting-the-uk-sdc-biztalk-2004-documenter-to-run/#comments</comments>
		<pubDate>Thu, 21 Sep 2006 10:03:05 +0000</pubDate>
		<dc:creator>Edward</dc:creator>
				<category><![CDATA[BizTalk 2004]]></category>

		<guid isPermaLink="false">http://blog.edwardsmit.com/Getting+The+UK+SDC+BizTalk+2004+Documenter+To+Run.aspx</guid>
		<description><![CDATA[Finally I&#8217;ve managed to get the BizTalk 2004 Documenter to run. If you&#8217;ve got problems creating documentation using this tool yourself maybe this will do the trick for you as well. The problem I had was that after the generation a Error box would show up, and nothing was created. After fixing both problems below [...]]]></description>
			<content:encoded><![CDATA[<p>Finally I&#8217;ve managed to get the BizTalk 2004 Documenter to run. If you&#8217;ve got problems creating documentation using this tool yourself maybe this will do the trick for you as well. The problem I had was that after the generation a Error box would show up, and nothing was created. After fixing both problems below the tool worked like a charm.</p>
<p><font size=3>The TMP environment-variable<br /></font>On&nbsp;the machine I&#8217;m currently using the TMP environment-variable was mapped to %userprofile%\local settings\temp and the UserProfile is redirected to a network-share. I changed the TMP environment-variable to a directory on the local drive. You can change this in a dialog which you can&nbsp;edit after pressing the Environment Variables button on the&nbsp;the Advanced tab of the System Properties which you get when selecting Properties from the context menu of My Computer.</p>
<p><font size=3>The path to Microsoft.BizTalk.XLangView.dll<br /></font>The documenter relies on forementioned dll. The path to this dll is configured in the Microsoft.Sdc.BiztalkDocumenter.exe.config file. When you&#8217;ve got a default install, the path to this dll is set correctly, but in my case BizTalk 2004 is installed on a non-default location, so I had to change this path.&nbsp;It was there right under my nose the whole time&#8230;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.edwardsmit.com/2006/09/getting-the-uk-sdc-biztalk-2004-documenter-to-run/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
