C
Chris Bardon
I'm trying to write an application that will parse a WSDL file and
extract the method names and parameters at runtime, and am having some
problems with document/literal style WSDL files. I can import the
WSDL into a System.web.services,description object just fine, and for
RPC style stuff I can get all the information I need. The problem is
that the input/output parameters for the document style are up in the
schema, which I can't figure out how to access through this object.
Here's a snippet of the WSDL:
<types>
- <s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
- <s:element name="AddStrings">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s1" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="s2" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
I want to be able to extract that there are two strings (named s1 and
s2) required for the message "AddStrings". I have a reference to the
name "AddStrings" and the namespace from another point in the file,
but as I said I can't seem to get at the schema elements that I need.
Does anyone have any idea how I can do this? I have a
System.Web.Services.Description.ServiceDescription object that I'm
working with, and would like to extract this information from that if
possible.
Thanks,
Chris
extract the method names and parameters at runtime, and am having some
problems with document/literal style WSDL files. I can import the
WSDL into a System.web.services,description object just fine, and for
RPC style stuff I can get all the information I need. The problem is
that the input/output parameters for the document style are up in the
schema, which I can't figure out how to access through this object.
Here's a snippet of the WSDL:
<types>
- <s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
- <s:element name="AddStrings">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s1" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="s2" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
I want to be able to extract that there are two strings (named s1 and
s2) required for the message "AddStrings". I have a reference to the
name "AddStrings" and the namespace from another point in the file,
but as I said I can't seem to get at the schema elements that I need.
Does anyone have any idea how I can do this? I have a
System.Web.Services.Description.ServiceDescription object that I'm
working with, and would like to extract this information from that if
possible.
Thanks,
Chris