Hi
I have a RPC Encoded webservice.
The method looks like this
[WebMethod]
[return: System.Xml.Seri alization.SoapE lementAttribute ("return",
DataType="NMTOK EN")]
public string
echoNMTOKEN([System.Xml.Seri alization.SoapE lementAttribute (DataType="NMTO KEN")] 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:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:soap
enc="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:tns="http ://soapinterop.or
g/derivedtypesrpc "
xmlns:types="ht tp://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:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<tns:echoNMTOKE N>
<inputString xsi:type="xsd:N MTOKEN">NMTOKEN </inputString>
</tns:echoNMTOKEN >
</soap:Body>
</soap:Envelope>
I get a error
Cannot assign object of type System.Xml.XmlN ode[] to an object of type
System.String
The response looks like this
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:soap="htt p://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>Se rver was unable to read request. --> There is an error i
n XML document (4, 64). --> Cannot assign object of type System.Xml.XmlN ode[]
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
I have a RPC Encoded webservice.
The method looks like this
[WebMethod]
[return: System.Xml.Seri alization.SoapE lementAttribute ("return",
DataType="NMTOK EN")]
public string
echoNMTOKEN([System.Xml.Seri alization.SoapE lementAttribute (DataType="NMTO KEN")] 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:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:soap
enc="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:tns="http ://soapinterop.or
g/derivedtypesrpc "
xmlns:types="ht tp://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:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<tns:echoNMTOKE N>
<inputString xsi:type="xsd:N MTOKEN">NMTOKEN </inputString>
</tns:echoNMTOKEN >
</soap:Body>
</soap:Envelope>
I get a error
Cannot assign object of type System.Xml.XmlN ode[] to an object of type
System.String
The response looks like this
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:soap="htt p://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>Se rver was unable to read request. --> There is an error i
n XML document (4, 64). --> Cannot assign object of type System.Xml.XmlN ode[]
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