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

  • Home
  • SEARCH
  • 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 1076559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:26:34+00:00 2026-05-16T21:26:34+00:00

Can anyone tell me what i can do to fix this error when i

  • 0

Can anyone tell me what i can do to fix this error when i call a WCF SOAP service from JQuery?

Error:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="en-US">The message with Action '' 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).</faultstring></s:Fault></s:Body></s:Envelope>

If i use Fiddler to rebuild the request and add the SOAPAction http header portion, i get the same error except with the value i gave it.

Here is my web.config:

<configuration>
<system.web>
    <compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="soapBinding">
                <security mode="None">
                </security>
            </binding>
        </basicHttpBinding>
    </bindings>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
    <services>
        <service name="CatalogService" behaviorConfiguration="defaultBehavior">
            <endpoint address="" binding="basicHttpBinding" bindingConfiguration="soapBinding" contract="ICatalogService"/>
        </service>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="defaultBehavior">
                <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
                <serviceMetadata httpGetEnabled="true"/>
                <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
                <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
</system.serviceModel>
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

Here is my App_Code/CatalogService.cs:

[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]  public class CatalogService : ICatalogService  {
public string HelloWorld(string name){
    return String.Format("Hello {0}", name);}}

Here is my App_Code/CatalogIService.cs:

[ServiceContract(Namespace = "http://miami.edu/")]  public interface ICatalogService {
[WebInvoke(Method = "POST",
             BodyStyle = WebMessageBodyStyle.Wrapped,
             ResponseFormat = WebMessageFormat.Xml,
             RequestFormat = WebMessageFormat.Xml)]
string HelloWorld(string name);}

Here is my jQuery client code:

    $.ajax({
type: 'POST',
url: 'http://localhost/csw/service.svc/soap',
data: request,
contentType: 'text/xml; charset=utf-8',
dataType: 'text',
success: function (result) {
    console.log(result);

    $("#result").text(result);
    //result.responseXML
    //result.responseText
},
error: function (message) {
    console.log(message);
    alert("error has occured" + message);
}});

Here is my SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">  <s:Body>  <HelloWorld xmlns="http://cstars.miami.edu/CatalogService">  <name>CarlosK</name>  </HelloWorld>  </s:Body>  </s:Envelope>
  • 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-16T21:26:34+00:00Added an answer on May 16, 2026 at 9:26 pm

    You are missing OperationContract attribute on your HelloWorld method. Than calling from Fiddler should work with SOAPAction http://miami.edu/ICatalogService/HelloWorld
    If it still doesn’t work you can explicitly define Action and ReplyAction in OperationContract attribute.

    To your jQuery problem. I just check $.ajax function in jQuery in action book and I think you need to define function to create SOAPAction header and assign that function to beforeSend in $.ajax.

    Edit:

    Based on this question and your previous question: Why do you want to use SOAP? It looks like you are developing service and client by yourselves. Do you have specific requirement to use SOAP or is it only some excercise? It is much easier to consume RESTful service from jQuery. RESTful service can return POX (plain old XML) or JSON.

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

Sidebar

Related Questions

Can anyone tell me what's wrong with this robots.txt? http://bizup.cloudapp.net/robots.txt The following is the
Can anyone tell me how to fix this? My order by is by coursenum
Can anyone tell me what exactly does this Java code do? SecureRandom random =
Can anyone tell me what the need/advantage is to using a web service with
I have cornered this error down to a redirect action call by DotNetOpenAuth( http://www.dotnetopenauth.net/
Can anyone tell me where to find an visual studios 2010 atl web service
Can anyone tell me how I can display a status message like 12 seconds
Can anyone tell me what is the memory usage overhead associated with PHP opcode
Can anyone tell me if there are RDBMSs that allow me to create a
Can anyone tell me what version of the .NET framework (CLR and BCL) is

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.