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

The Archive Base Latest Questions

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

I would like consume cross-domain web-service from client with jquery function TestService() { $.ajax({

  • 0

I would like consume cross-domain web-service from client with jquery

function TestService() {
    $.ajax({
        url: "http://service.asmx/GetGeoCompletionList",
        data: { "prefixText":"eka", "count":"10", "contextKey":"Trace_0$Rus" },
        dataType: "jsonp",
        type: "GET",
        contentType: "application/json; charset=utf-8",
        success: function (data) {
            alert(data);
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert(XMLHttpRequest.statusText);
        }
    });
}

At the error hander I have:
textStatus=parseerror

XMLHttpRequest has status 200 and readyState 4

errorThrown is jQuery16103495572647140...78197139 was not called

I’ve spent on it for a lot of hours and couldn’t make it work. Can u help me?

UPDATED

Thanks, I change to GET, and fix my data string.

Service returns valid JSON object. I can see it at firebug on other site, which consume this service. But that site is getting common json(since it has one domain).

So, if the web-service returns valid JSON(not jsonp), I can’t use the same method with jsonp? What can I do for consiming json web-service from other domain?

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

    Summary of problems:

    1. Make sure you’re using valid JSON
      as @Quentin mentioned.
    2. Make sure you’re using GET requests, as
      @lonesomeday mentioned
    3. Make sure the response from the server is
      JSONP, as seen here
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to consume a CXF web-service from a .net c# client. We
I have a web service I would like to consume with Javascript. I've tried
I would like to know if it is possible to consume a AMF Service
I am using SOAP in C# .Net 3.5 to consume a web service, from
I would like to consume WCF service (created by ASP .NET) with PHP. I
I have a HTML document and an .asmx service I would like to consume.
I would like to know if it is possible to consume a Java web
What I would like to do is have a common Service class which has
I would like to print messages from a SQL Stored Procedure. If I execture
I am trying to consume the Exchange 2010 Web Service interface using JAX-WS. I'm

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.