Hi
I have a RPC Encoded webservice.
The method looks like this
[WebMethod]
[return: System.Xml.Serialization.SoapElementAttribute("ret urn",
DataType="NMTOKEN")]
public string
echoNMTOKEN([System.Xml.Serialization.SoapElementAttribute(Data Type="NMTOKEN")] string inputString)
{
return inputString;
}
When I send a SOAP Message which looks like this.
POST http://bowie/DotnetServices/XmlTypes...dTypesRpc.asmx
Content-Type: text/xml; charset="utf-8"
SOAPAction: http://soapinterop.org/derivedtypesrpc/echoNMTOKEN
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soap
enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://soapinterop.or
g/derivedtypesrpc"
xmlns:types="http://soapinterop.org/derivedtypesrpc/encodedTy
pes" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2
001/XMLSchema-instance">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:echoNMTOKEN>
<inputString xsi:type="xsd:NMTOKEN">NMTOKEN</inputString>
</tns:echoNMTOKEN>
</soap:Body>
</soap:Envelope>
I get a error
Cannot assign object of type System.Xml.XmlNode[] to an object of type
System.String
The response looks like this
<?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/XM
LSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Server was unable to read request. --> There is an error i
n XML document (4, 64). --> Cannot assign object of type System.Xml.XmlNode[]
to an object of type System.String.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
** E N D R E S P O N S E **
I am able to get a similar example with Document Literal webservice to work
Let me know
Thanks
--
AJ