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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:32:04+00:00 2026-06-16T00:32:04+00:00

This must be something really stupid, trying to solve this issue for a couple

  • 0

This must be something really stupid, trying to solve this issue for a couple of days now and it’s really not working. I searched everywhere and there probably is someone with the same problem, but I can’t seem to find it.

I’m working on an Android app and this app pulls some xml from a website. Since this website is down a lot, I decided to save it and run it locally. Now what I did:

  • I downloaded the kWs app for hosting the downloaded xml file.
  • I put the file in the right directory and could access it through the mobile browser, but not with my app (same code as I used with pulling it from some other website, not hosted by me, only difference was the URL obviously).

So I tried to host it on my PC and access it with my app from there. Again the same results, the mobile browsers had no problem finding it, but the app kept saying 404 Not Found: "The requested URL /test.xml&parama=Someone&paramb= was not found on this server."

Note: Don’t mind the 2 parameters I am sending, I needed that to get the right stuff from the website that wasn’t hosted by me.

My code:

public String getStuff(String name){
        String URL = "http://10.0.0.8/test.xml";

        ArrayList<NameValuePair> params = new ArrayList<NameValuePair>(2);
        params.add(new BasicNameValuePair("parama", name));
        params.add(new BasicNameValuePair("paramb", ""));

        APIRequest request = new APIRequest(URL, params);
        try {
                RequestXML rxml = new RequestXML();
                AsyncTask<APIRequest, Void, String> a = rxml.execute(request);
                ...
        } catch(Exception e) {
                e.printStackTrace();
        }
        return null;
}

That should be working correctly. Now the RequestXML class part:

class RequestXML extends AsyncTask<APIRequest, Void, String>{
        @Override
        protected String doInBackground(APIRequest... uri) {
                HttpClient httpclient = new DefaultHttpClient();
                String completeUrl = uri[0].url;

        // ... Add parameters to URL ...

                HttpGet request = null;
                try {
                        request = new HttpGet(new URI(completeUrl));
                } catch (URISyntaxException e1) {
                        e1.printStackTrace();
                }

                HttpResponse response;
                String responseString = "";
                try {
                        response = httpclient.execute(request);
                        StatusLine statusLine = response.getStatusLine();
                        if(statusLine.getStatusCode() == HttpStatus.SC_OK){
                        // .. It crashes here, because statusLine.getStatusCode()
                        // returns a 404 instead of a 200.
  • The xml is just plain xml, nothing special about it. I changed the contents of the .htaccess file into “ALLOW FROM ALL” (works, cause the browser on my mobile device can access it and shows the correct xml).

  • I am running Android 4.0.4 and I am using the default browser AND chrome on my mobile device.

  • I am using MoWeS to host the website on my PC.

Any help would be appreciated and if you need to know anything before you can find an answer to this problem, I’ll be more than happy to give you that info.

Thank you for you time!

Cheers.

  • 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-16T00:32:05+00:00Added an answer on June 16, 2026 at 12:32 am

    I think you just miss the question mark after your filename

    /test.xml?&parama=Someone&paramb=

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

Sidebar

Related Questions

This is a very simple issue. I must just be doing something stupid: This
I'm trying out my first Spring project and must be doing something really stupid
I know SQL well but I must be missing something really dumb here. This
This code was working earlier today, then randomly stopped, something must of changed, but
I'm really sorry. This must seem like an incredibly stupid question, but unless I
I feel like I must be doing something really stupid. What can I do
I feel like there must be something really simple that I'm not seeing here.
I must be doing something really wrong as this seems like a very simple
I must be missing something really simple because this doesnt seem like it should
I'm sure this must be something really easy, but I can't seem to make

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.