[Mono-dev] Writing Unit Test in WsdlExporterTest
Peter Dobson
pete at shout-telecoms.com
Fri Sep 5 14:29:28 UTC 2014
Hello,
I am still trying to write a unit test for a bug fix (16256) where parameters are missing in WSDL using MessageContracts. I am trying to access the wsdl you would get with "?xsd=xsd1" to check, in my example, that "Result" is in AddResponse (previously missing), i.e.:
<?xml version="1.0" encoding="utf-8" ?>
-<http://192.168.0.138:8010/?xsd=xsd1> <xs:schema xmlns:tns="urn:Test" elementFormDefault="qualified" targetNamespace="urn:Shout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
-<http://192.168.0.138:8010/?xsd=xsd1> <xs:element name="Add">
-<http://192.168.0.138:8010/?xsd=xsd1> <xs:complexType>
-<http://192.168.0.138:8010/?xsd=xsd1> <xs:sequence>
<xs:element minOccurs="0" name="n1" type="xs:double" />
<xs:element minOccurs="0" name="n2" type="xs:double" />
</xs:sequence>
</xs:complexType>
</xs:element>
-<http://192.168.0.138:8010/?xsd=xsd1> <xs:element name="AddResponse">
-<http://192.168.0.138:8010/?xsd=xsd1> <xs:complexType>
-<http://192.168.0.138:8010/?xsd=xsd1> <xs:sequence>
<xs:element minOccurs="0" name="Result" type="xs:double" />
</xs:sequence>
</xs:complexType>
</xs:element>
In WsdlExporterTest.cs I can retrieve a schema, of two available, (using GetXmlSchema()) that has elements "Add" and "AddResponse" (and only these). But these are XmlSchemaElements (as opposed to say, XmlSchemaComplexType) and I can dig no further into the parameters above (assuming this is right). Is this test possible to write? Should I submit the fix for consideration anyway?
Thanks,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140905/7197e502/attachment.html>
More information about the Mono-devel-list
mailing list