Click here to Skip to main content
15,886,574 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i have a WCF service with multiple parameters like

C#
[OperationContract]
 [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,BodyStyle=WebMessageBodyStyle.WrappedRequest, UriTemplate = "PutTestDataMulti")]
        string PutTestDataMulti(string id, Testclass fd);

For the above method i will be sending a class object and an id as parameter.

Till now i have achieved passing multiple parameters like string,string,int etc.. and passing a class object by serializing the data. But no luck with passing class object along with one more parameter like the case mentioned above.

Please let me know how to achieve it using C# webclient not with jquery (how to serialize both the parameters into one and pass it to operation contract) or else is there any other way to achieve this.

Thanks in advance.

Thanks,

Vasanth
Posted
Updated 17-Apr-14 22:20pm
v3
Comments
Rishikesh_Singh 18-Apr-14 12:46pm    
What is the error you are getting? If you are calling from .net client then on adding the webreference it would generate the proxy with TestClass class for you to use. Can you post the client code you are using. Also check in Fiddler or WCF trace using traceviewer if you are getting any error .

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900