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 6322653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:22:23+00:00 2026-05-24T16:22:23+00:00

I created a simple wcf service that exposes a GetData method. It’s actually the

  • 0

I created a simple wcf service that exposes a GetData method. It’s actually the template created when you create a new wcf project.

I added the application to iis server, so it can be accessed from the outside, like this: http://192.168.0.100/TFSWrapper/Service1.svc

I used a generic soap client to send a request to the GetData method. This is the soap request that was generated:

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <GetData xmlns="http://tempuri.org/" />
  </soap:Body>
</soap:Envelope>

Here is the soap response:

<?xml version="1.0" encoding="utf-16"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <GetDataResponse xmlns="http://tempuri.org/">
      <GetDataResult>You entered: 87</GetDataResult>
    </GetDataResponse>
  </s:Body>
</s:Envelope>

By the way, I removed the parameter from the method and hardcoded a return value.

As you can see, everything works as it should.

Next, I created a Titanium client that calls the same service. I used the exact soap request as above, just to make sure.

Basically I did this:

var s='<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetData xmlns="http://tempuri.org/" /></soap:Body></soap:Envelope>';
        //xhr.send(config.envelopeBegin+body+config.envelopeEnd);
        xhr.send(s);

When this is sent, the server is returning a “500 internal server error” response together with the following fault string:

The message with Action ‘http://tempuri.org/GetData&#8217; cannot be
processed at the receiver, due to a ContractFilter mismatch at the
EndpointDispatcher. This may be because of either a contract mismatch
(mismatched Actions between sender and receiver) or a binding/security
mismatch between the sender and the receiver. Check that sender and
receiver have the same contract and the same binding (including
security requirements, e.g. Message, Transport, None).

At first I used the titanium soap api to create the request xml, but I was getting the same error. I though it was a problem with how that is created, so that’s why I hard-coded a request (that works), but still no luck.

  • 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-24T16:22:25+00:00Added an answer on May 24, 2026 at 4:22 pm

    By default, WCF Service OperationContracts can only be invoked using an HTTP POST. When you call open() on the Titanium HTTPClient, are you specifying a GET or POST for HTTP method parameter?

    Secondly, since your service binding is using SOAP 1.1, you need to pass a SOAPAction header in your request so that WCF can route the message to the GetData method. If an Action parameter is not specified in the service’s OperationContract attribute, the Action should be the method name preceded by the namespace and service contract name (probably http://tempuri.org/IService1/GetData if you’re using what the default WCF application created). You’ll also need to specify a content-type. So, you’d need to setup your xhr like this prior to calling send:

    xhr.setRequestHeader('Content-Type', 'text/xml; charset=utf-16');
    xhr.setRequestHeader('SOAPAction', '"http://tempuri.org/IService1/GetData"');
    xhr.send(s);
    

    Also, you can explicitly specify an action for a WCF service operation:

    [OperationContract(Action = "MyAction")]
    string GetData()
    {
        // ...snip...
    }
    
    xhr.setRequestHeader('SOAPAction', '"MyAction"');
    

    And lastly, you can allow service operations to be invoked via an HTTP GET by decorating the method with the [WebGet] attribute. This allows the operation to be called in REST fashion: http://msdn.microsoft.com/en-us/library/system.servicemodel.web.webgetattribute.aspx

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

Sidebar

Related Questions

I have created an Ajax enabled WCF web service that contains this simple method:
I created a simple WCF web service that has one method: SubmitTicket(flightticket ft, string
I have created a simple wcf service which used the WCF Service Library template.
I created a simple RESTful WCF service with a single method for receiving files
I created a very simple WCF class library and added this project to the
Created a simple WCF service that basically logs to a db. the build is
I have created a simple WCF service that is to be configured by an
i am new to wcf. i have created and hosted simple wcf service on
I have a WCF service that exposes 1 method GetNextObjectInList(int id) which hits a
This is real simple. I have a wcf service (nothing fancy, just New Project->

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.