WCF Ajax service - How can I pass an Array or JSON to the service? What should the method parameter

Posted by Kettenbach on Stack Overflow See other posts from Stack Overflow or by Kettenbach
Published on 2009-09-04T22:54:09Z Indexed on 2010/03/13 9:05 UTC
Read the original article Hit count: 301

Filed under:
|
|
|
|

I have a very simple WCF service I would like to pass it an array or json?

[OperationContract, WebGet(ResponseFormat = WebMessageFormat.Json)]
    public string GetPreDisplay(string inputData)
    {
        //DoSomething with inputData
        return "Sweet!";
    }

My javascript...

 var data = [paymentControls['claimNum'], paymentControls['claimSeq']];
        $lps.GetPreDisplay(data, onComplete);

Obviously string is the wrong type. Can anyone point me in the right direction?

Thanks, ~ck

© Stack Overflow or respective owner

Related posts about wcf

Related posts about serialization