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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:43:36+00:00 2026-05-27T16:43:36+00:00

I encounter this problem : I have a django (python) server that serve XML

  • 0

I encounter this problem :

I have a django (python) server that serve XML files on localhost:8000

I have a liferay project using tomcat on localhost:8080, that need to call this XML files (in javascript with ajax)

It call the files, but never get them.

What do I have to do for tomcat to get this file ?

Thanks by advance.

Edit:

here is my request :

$.ajax({
      type: 'GET',
      url: "http://127.0.0.1:8000/charger/entreprise/",
      dataType: "xml",
      crossDomain : true,
      success: function(xml){
            alert(xml);
        }
    });

here is my request header :

Host    127.0.0.1:8000
User-Agent  Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0
Accept  application/json, text/javascript, */*; q=0.01
Accept-Language fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding gzip, deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection  keep-alive
Referer http://localhost:8080/web/guest/home
Origin  http://localhost:8080

In fact, I wonder if the problem come from the javascript, I think its because of the servers.

After trying many solution that didn’t work, I finally have solved my problem
You guys were right, JSONP was the solution, even if I had to adapt it to django, and my specific problem, which was not easy at all.

  • 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-27T16:43:36+00:00Added an answer on May 27, 2026 at 4:43 pm

    you have to use JSONP (JSON Padding) to do cross domain AJAX requests. }

    Refer to this link for info on JSONP

    http://www.ibm.com/developerworks/library/wa-aj-jsonp1/

    And jquery also has JSONP feature. Check that out in jquery documentation

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

Sidebar

Related Questions

I have a system that writes a XML file. The problem is that I
I've encountered this problem (while trying to add SQL Server Database (.mdf) file to
During coding I frequently encounter this situation: I have several objects ( ConcreteType1 ,
Problem: When I add UpdateCacheMiddleware and FetchFromCacheMiddleware to my Django project, I get unittest
This problem is a little similar to that solved by reservoir sampling , but
This is an interesting problem that I’ve not been able to solve yet. I
I use jsp to write a application, and i encounter such a problem, that
I have encounter a problem. I have a NSString and I would like to
I have a number of functions that parse data from files, usually returning a
Hi i encountered this problem whereby when i initialized my String[], there seems to

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.