Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6382319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:30:25+00:00 2026-05-25T02:30:25+00:00

I have a WCF service with 3 string arguments. Calling this with jQuery and

  • 0

I have a WCF service with 3 string arguments. Calling this with jQuery and JSON does reach my method but only 1 of the arguments contain a value – the others are received null, even though they are passed. Any thoughts why?

[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
    public string Save(string site, string title, string contentType)
    {
        // method...
    }

JS:

                    $.ajax(
                      {
                        type: "POST",
                        url: "/Service.svc/Save",
                        dataType: "json",
                        data: "{\"title\": \"title...\", \"site\": \"site...\", \"contentType\": \"contentType...\"}",
                        contentType: "application/json; charset=utf-8",
                        success: function(data) {
                        },
                        error: function() {
                          alert("Sorry, an error has occured");
                        }
                      }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:30:26+00:00Added an answer on May 25, 2026 at 2:30 am

    False alarm.

    The argument name for those two missing arguments was different in the ServiceContract to the service. I was using the argument name that was in the service, not the one in the ServiceContract. Stupid.

    Thanks for the replies guys.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have C# WCF service.There I want to convert to JSON String.DataSet contain more
I have a WCF service with this declared operation: [WebGet(UriTemplate = Test/{*testString})] public String
I have a WCF-REST service with one method which returns a string: [ServiceContract] public
I have a WCF service, this is a method which I'd to call: [OperationContract]
I have a WCF service with one method: [OperationContract] bool VerifyLicense(string clientId, string license);
I have a WCF service that needs to return a string of XML. But
I have a WCF service which accepts a string as a paramter for one
Here is the scenario, I have a WCF service call that takes one string
Given that I have the following WCF service: class LookUpService { public List<County> GetCounties(string
I have a WCF service that accepts requests from JQuery. Currently, I can access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.