Generating a SOAP message from WSDL without creating a proxy class.
I am writing a program that reads the WDSL document and generates a SOAP message in C#. I don’t want to create a proxy class from the WSDL document, I need the program to understand the WSDL document and be able to generate a SOAP message. I am working on generating the SOAP body from the types part of the WSDL, using the ServiceDescription class. My problem now is thatI can’t reach the elements contained within other elements in the schema, and work on them. I’m using
XmlSchemaObjectTable XmlSchema.Element to access the elements, but when I use that and count the elements for example, it doesn’t count the element contained inside the other elements and I don’t know how to access them.Below is an example:
<wsdl:types>
<s:schemaelementFormDefault="qualified"targetNamespace="http://www.webserviceX.NET/">
<s:elementname="GetQuote">
<s:complexType>
<s:sequence>
<s:elementminOccurs="0"maxOccurs="1"name="symbol"type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:elementname="GetQuoteResponse">
<s:complexType>
<s:sequence>
<s:elementminOccurs="0"maxOccurs="1"name="GetQuoteResult"type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:elementname="string"nillable="true"type="s:string"/>
</s:schema>
</wsdl:types>
When I count the elements in the schema the answer is 3, GetQuote, GetQuoteResponse and string, and I don’t know what methods or classes to use to access the other ones. Can anybody help me with this. If my question is not clear enough I can try to explain it better.
Best regards,
Signy

