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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:49:03+00:00 2026-05-28T19:49:03+00:00

I have created a web service in django and its hosted on a shared

  • 0

I have created a web service in django and its hosted on a shared server.The django web service respond to request from a game made in unity. But whenever game tries to request a django Web service url the server send empty resonse.Response is always:

WWW Error: server return empty string

The Unity webplayer expects a http served policy file named “crossdomain.xml” to be available on the domain you want to access with the WWW class, (although this is not needed if it is the same domain that is hosting the unity3d file).So I placed a file “crossdomain.xml” at the root of my domain ,but still i am getting same empty reply.Help plz…

EDIT:
I tried it through browser my service works fine and reply with proper response.And you know what My game can communicate to django web service when both are running on local machine.But now the django project is hosted on actual server and when game tried accessing service it never get response 🙁

url.py

urlpatterns = patterns('',
    url(r'^crossdomain.xml$',views.CrossDomain),                   
    url(r'^ReadFile/$',views.ReadFile),
)

views.py

def CrossDomain(request):
    f = open(settings.MEDIA_ROOT+'jsondata/crossdomain.xml', 'r')
    data = f.read()
    f.close()
    return HttpResponse(data, mimetype="application/xml")

def ReadFile(request):
   f = open(settings.MEDIA_ROOT+'jsondata/some_file.json', 'r')
   data = f.read()
   f.close()
   return HttpResponse(data, mimetype="application/javascript")

def Test(request):
   return HttpResponse("Hello", mimetype="text/plain")
  • 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-28T19:49:04+00:00Added an answer on May 28, 2026 at 7:49 pm

    As I said using django for this is slight overkill because you could just serve them. Point aside though. If your serving on a different server it could be

    A) Connection problems mean that your response is lost
    B) Firewall issues mean that the request mean something
    C) The server isn’t setup correctly and therefore it justs get an error.

    You need to test the response on the server. so is you access the page on the server through your browser. If so then make the game make a request and check the server error and access logs. In the apache access log you should see something like

    GET “/url” 200 each time a request is made.

    If you don’t see any request getting through then either the request isn’t made or its been lost.
    If you do then the problem is in the code somewhere.

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

Sidebar

Related Questions

I have created a Web service using Netbeans', JEE6 and Jersey - Webservice from
I have created an Axis2 web service from Netbeans and deployed it successfully in
I have created one web service that will may called from web using jQuery
Background : I have created a web service client VoucherWebService (consumed from an external
I have created a Web Service and deployed it on an internal server here.
i have created a simple web service using Php Nusoap. its working correctly but
I have created a component to fetch data from a web service. The web
I have created an web service I need to publish this service. I need
I have created a web service which has a couple of methods developed using
I have created a web service in a virtual directory using VS 2008. I

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.