Parsing WSDL and System.Web.Services.Description

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top