Today, I came across something totally weird with BizTalk 2004. I'm hoping someone out there will have an explanation for this one.
When we want to build a web service for BizTalk, the first thing we do is create an XML Schema. This gets compiled into code using xsd.exe. Once done, we compile xsd.exe's output (together with other schemes) into an assembly. Our web service that BizTalk consumes uses this assembly to define the documents that we want BizTalk to use when communicating with our web service. In this way, we know what the schema will look like in advance before we work with it inside BizTalk.
So, today we built a schema that describes the following document:
When we added our web method returning an object that serializes into the above, BizTalk refused to add the web reference. Sometimes it complained about arrays returned from web services are not allowed.
If we change the schema by simply adding a node, like so:
<Title>Times of day</Title>
BizTalk is happy.
So what is going on here? Is this BizTalk that is getting confused or is the WSDL generator doing something funny?