How can I specify the Request object formatting in XML? My web services look like this:
[WebMethod]
public string MethodName(string str, string str2)
{
if (random())
return "123";
else
return "no";
}
Everything is in strings. How do I specify to a consumer what to request in XML? I am used to specifying this as HTTP GET:
http://domain.tld/service.asmx/MethodName?str=textgoeshere&str2=moretext
What does the whole XML Request object look like, and where can I find this format/specification in the future if I change data types or parameter names?
Edit
Current WSDL output:
<wsdl:definitions targetNamespace="my namespace">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="my namespace">
<s:element name="MyMethodName">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="str" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="str2" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="MyMethodNameResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="MyMethodNameResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Is the following an accurate XML specification?
<?xml version="1.0">
<str>1</str>
<str2>123456789</str2>