|
|
| View previous topic :: View next topic |
| Message |
|
Author
|
Raghuramanace
Newbie
|
Joined: 26 Jul 2006
Posts: 3
|
|
Posted: Wed Jul 26, 2006 1:00 am
Post subject: How to pass values to soapencoding -literal encoding webmethod |
|
|
Hi
i have started a webservice which has a webmethod with a parameter 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.Initialize() at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type,
HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.ServerProtocolFactory.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
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|