469,612 Members | 2,163 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

How to pass parameters to web service -Literal encoding

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

Jul 25 '06 #1
0 1884

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Don | last post: by
7 posts views Thread by Zlatko Matić | last post: by
2 posts views Thread by =?Utf-8?B?dmlzaHJ1dGg=?= | last post: by
1 post views Thread by =?Utf-8?B?dmlzaHJ1dGg=?= | last post: by
2 posts views Thread by =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.