You must Sign In to post a response.
  • Category: WCF

    WCF REST Service Pass object ( Class ) as parameter in POST method

    Hi ,
    I have WCF Rest Service POST Method . this method have more than 50 parameter .
    How to send the POST Parameter in WCF Rest Service ?
    i have class also how to send it and consume the c# 3.5 framework

    Response is XML Format .
  • #768928
    Hai HemzChand,
    You can create a DataContrct which will have the properties similar to the parameters which you want to send. Now this data contract class will be passed as the parameter with the operation.
    1. So first create the DataContract class
    2. Initialize the DataContract class and assign the values to the class properties.
    3. Pass the DataContract as the parameter to the operation contract.
    For more details and references, you can follow the below link:

    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #768942

    follow below steps to pass multiple parameters to your wcf service.

    1) use DataContrast to avoid duplicates.
    2) use DataContractSerializer to help working with service.
    3) using webclient you can do whatever you want.

    Refer below link this might be helpful to you..

    Hope this helps you...

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • Sign In to post your comments