472,126 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

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 1972

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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.