1
我有一個wcf服務(使用xmlserialization)。 有一些類,它看起來在了SoapUI這樣的:IXmlSerializable實現後的WCF服務xsd不正確
<MyClass>
<propertyA>?</propertyA>
<propertyB>?</propertyB>
</MyClass>
我不得不實施它IXmlSerializable的接口。 這件事以後,類在了SoapUI奇怪的結構:
<MyClass>
<xs:schema>
<!--Ignoring type [{http://www.w3.org/2001/XMLSchema}schema]-->
</xs:schema>
<!--You may enter ANY elements at this point-->
</MyClass>
願它是以下實施的getSchema方法的結果?
public XmlSchema GetSchema()
{
return null;
}
下面是關於MyClass的從服務WSDL部分:
<xs:element name="MyClass" form="unqualified" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="xs:schema"/>
<xs:any/>
</xs:sequence>
</xs:complexType>
</xs:element>