code de service Web (ASP.NET 2.0):Comment faire pour valider mon XML Web Response dans Liquid XML Studio?
[WebMethod]
[return: XmlElement("TestMe")]
public string TestMe(int value)
{
return value.ToString();
}
Le entraînera cette réponse:
<?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">
<soap:Body>
<TestMeResponse xmlns="http://example.org/WebServiceTest">
<TestMe>7499</TestMe>
</TestMeResponse>
</soap:Body>
</soap:Envelope>
Si je l'enregistrer comme un fichier XML, ouvrez-le dans Liquid XML Studio et essayer de valider, je reçois ce message d'erreur:
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'
Alors, comment puis-je ajouter l'espace de noms correct et/ou schéma pour valider correctement ce? Mon WSDL ... asmx? WSDL inclut la définition de schéma pour les éléments TestMeResponse et TestMe, mais comment l'obtenir dans la réponse?