views:

794

answers:

1

Hello.

A simple question on how to get the response from a Web Service that can be validated using Liquid XML Studio.

Web Service code (ASP.NET 2.0):

[WebMethod]
[return: XmlElement("TestMe")]
public string TestMe(int value)
{
  return value.ToString();
}

The will result in this response:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  <soap:Body>
    <TestMeResponse xmlns="http://example.org/WebServiceTest"&gt;
      <TestMe>7499</TestMe>
    </TestMeResponse>
  </soap:Body>
</soap:Envelope>

If I save this as a XML file, open it up in Liquid XML Studio and try to validate it, i get this error message:

Could not find schema information for the element 'http://example.org/WebServiceTest:TestMeResponse'.

Could not find schema information for the element 'http://example.org/WebServiceTest:TestMe'

So how do I add the correct namespace and/or schema for this to validate correctly?

My WSDL ...asmx?WSDL includes the schema definition for the TestMeResponse and TestMe elements, but how do I get this into the response?

Thanks.

+1  A: 

You don't put the schema in the response. It's in the WSDL. You'll need to pull the schema (or schemas) out of the WSDL for Liquid XML to see.

John Saunders