• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

Webmethod's and XSD

I'll attempt to do my best to describe my situation, as I'm fairly new to the topic:

I would like to create a webservice that exposes a webmethod that accepts xml as a parameter [I've provided sample method signatures in the code section]; however, the problem I'm seeing is the ?WSDL on the webservice outlines the datatype that was specified [see below], and what I would like to know is if it is possible to create an .xsd that outlines schema and rules for the expected xml and have that information display when the ?WSDL is viewed?

I'm using 3.5 Framework and Webservices.   Any help greatly appreciated

<s:element name="GetXmlDocument1">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="xmlInput">
- <s:complexType mixed="true">
- <s:sequence>
  <s:any /> 
  </s:sequence>
  </s:complexType>
  </s:element>
  </s:sequence>
  </s:complexType>
  </s:element>

- <s:element name="GetXmlDocument2">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="xmlInput" type="s:string" /> 
  </s:sequence>
  </s:complexType>
  </s:element>

Open in new window

[WebMethod]
        public string GetXmlDocument(XmlDocument xmlInput)
        {
            return string.Empty;
        }

        [WebMethod]
        public string GetXmlDocument(string xmlInput)
        {

        }

Open in new window

0
escheider
Asked:
escheider
1 Solution
 
grayeCommented:
The WSDL standard has a "documentation" element which can contain anything you want.  In your case I'd recommend that you add some text and a hyperlink to download the XSD file (rather than just dumping the XSD on the screen)
0
 
escheiderAuthor Commented:
So sorry for the delayed response.   This solution will provide exactly what I need ..  thank you very much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now