Hi
i have started a webservice wich has a webmethod with parameters using
literal encoding & encoded encoding . The webservice is compiled
successfully . But i don know how to pass the parameters that satisfy
these encodings .
My web method is
---------------------------------------------
[WebMethod(Description="A sample for accomplishing literal Paramter
encoding")]
[SoapDocumentMethod(
"http://www.contoso.com/DocumentLiteral",
RequestNamespace="http://www.contoso.com",
ResponseNamespace="http://www.contoso.com",
Use= SoapBindingUse.Literal)]
public string parameterencodslit(string var)
{
return var;
}
---------------------------------------------------------
in the client app , i used the parameterencodslit(var) method directly
and ends with soap error.
i also have Beginparameterencodslit(string var) method , i tried
calling like this also,
IAsyncResult ar=ws.Beginparameterencodslit("abc",null,null);
string s=ws.parameterencodslitEndDisplaytext(ar)
When i compile it , it ends with soap errors like
--------------------------
System.Web.Services.Protocols.SoapException: The methods
ParamtrEncodedEncoding and parameterencodslit use the same SOAPAction
'http://www.contoso.com/DocumentLiteral'. When the RoutingStyle of the
XML Web service is SoapAction, SOAPAction values must be unique across
methods on the XML Web service. You can change the SOAPAction with the
Action parameter to the SoapDocumentMethod or SoapRpcMethod attributes,
or you can specify a RoutingStyle of RequestElement on the XML Web
service. at System.Web.Services.Protocols.SoapServerType..ctor (Type
type, ProtocolsEnum versionsSupported) at
System.Web.Services.Protocols.SoapServerProtocol.I nitialize() at
System.Web.Services.Protocols.ServerProtocol.SetCo ntext(Type type,
HttpContext context, HttpRequest request, HttpResponse response) at
System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing)
-------------------------------------------
Please tell me how can i pass parameters for literalencoding &
Encodedencoding ...
Thanks & Regards
Raghuraman.C