08-17-04 10:50 PM
I'm getting an when I publish my orchestration as a web service and bring up
the wsdl-generated test page: "The XML element named 'WorkPhone' from
namespace 'http://www.mycompany.com' is already present in the current scope
.
Use XML attributes to specify another XML name or namespace for the element.
"
Apparently, this error stems from the following construct in my schema:
- <xs:group name="ContactInfo">
- <xs:annotation>
<xs:documentation xml:lang="en">All contact types are optional, but at
least oe contact type must be specified.</xs:documentation>
</xs:annotation>
- <xs:choice>
- <xs:sequence>
<xs:element name="HomePhone" type="PhoneType" />
<xs:element minOccurs="0" name="WorkPhone" type="PhoneType" />
<xs:element minOccurs="0" name="Fax" type="PhoneType" />
<xs:element minOccurs="0" name="OtherPhone" type="PhoneType" />
<xs:element minOccurs="0" name="Email" type="EmailType" />
</xs:sequence>
- <xs:sequence>
<xs:element name="WorkPhone" type="PhoneType" />
<xs:element minOccurs="0" name="Fax" type="PhoneType" />
<xs:element minOccurs="0" name="OtherPhone" type="PhoneType" />
<xs:element minOccurs="0" name="Email" type="EmailType" />
</xs:sequence>
- <xs:sequence>
<xs:element name="Fax" type="PhoneType" />
<xs:element minOccurs="0" name="OtherPhone" type="PhoneType" />
<xs:element minOccurs="0" name="Email" type="EmailType" />
</xs:sequence>
- <xs:sequence>
<xs:element name="OtherPhone" type="PhoneType" />
<xs:element minOccurs="0" name="Email" type="EmailType" />
</xs:sequence>
- <xs:sequence>
<xs:element name="Email" type="EmailType" />
</xs:sequence>
</xs:choice>
</xs:group>
I found an MSDN article that implies this is by design, but what I don't
understand is why the schema editor doesn't balk at this, and why I have no
problem using this schema in my "home grown" web services.
Any help would be appreciated. TIA
[ Post a follow-up to this message ]
|