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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:53:13+00:00 2026-06-04T03:53:13+00:00

This is (hopefully) an easy question. I have to submit a request to a

  • 0

This is (hopefully) an easy question. I have to submit a request to a web service via POST with XDomainRequest. I have found sparse documentation for this across the internet, but I refuse to believe that nobody has figured this out.

Here is my XDomainRequest code:

var testURL = 'http://localhost:4989/testendpoint';

//let us check to see if the browser is ie.  If it is not, let's 
if ($.browser.msie && window.XDomainRequest) {
    var xdr2 = new XDomainRequest();
    xdr2.open("POST", testURL);
    xdr2.timeout = 5000;
    xdr2.onerror = function () {
        alert('we had an error!');
    }
    xdr2.onprogress = function () { 
        alert('we have some progress!');
    };
    xdr2.onload = function () {
        alert('we load the xdr!');

        var xml2 = new ActiveXObject("Microsoft.XMLDOM");
        xml2.async = true;
        xml2.loadXML(xdr2.responseText);
    };

    //what form should my request take to be sending a string for a POST request?  
    xdr2.send("thisisastring");
}

My web service (WCF) takes a single parameter according to the web service’s help page, that looks like this:

<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">String content</string>

I’ve gotten this to work via other http clients (mobile and desktop APIs, fiddler) by building a string that concatenates the parameter I am trying to pass to the web service with the rest of the string serialization. For example, I have tried:

xdr2.send("thisisastring");
xdr2.send("<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">thisisastring</string>");

but the onerror handler is always tripped. I don’t think it has anything to do with the WCF because:

  • The WCF is always successful in every other client I call it from,
    and
  • If it was the service, the onerror method would never get tripped.
    It would return garbage, but it would be returning something.

When i use the console (in the dev tools in ie9) to log the responseText, it says:

LOG:undefined

So I am fairly sure that the issue is in how I use the XDomainRequest.

  • 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-06-04T03:53:15+00:00Added an answer on June 4, 2026 at 3:53 am

    If anybody comes across this, I ended up converting my web services to return JSON-formatted data. Using JSON negates the need for XDomainRequest, allowing me to use the conventional ajax jquery tools instead.

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

Sidebar

Related Questions

Hopefully this will be an easy question! I have two tables, a 'client(s)' table
Ok hopefully this is an easy question: I have a main viewcontroller that is
Hopefully this is a quick and easy question to answer. I have a MySQL
This is hopefully an easy question to answer for someone familiar with Mozilla, but
Hopefully an easy question, but I'd quite like a technical answer to this! What's
This will hopefully be an easy one. I have an F# project (latest F#
Another easy one hopefully. Let's say I have a collection like this: List<DateTime> allDates;
Hopefully this is an easy question. How can I define an XML type such
Hopefully a very easy question for you. I have a PHP object, one of
Hopefully this is a quick and easy question to answer. Do I need the

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.