Hi,

I have a similary problem. I have an URL with parameters, when the 2
parameters are correct, I have an XML response. If the parameters are
bad I have an other XML response with a code.
If i test with good parameters, it's ok, but if I test with wrong
parameters, I have a FileNotFoundException.
If I copy url with wrong parameters in a browser, I can see my
response with my code.
My url looks like this :
http://lan_ip/pages/param1=login&param2=pass

On 12 juin, 13:58, xinit <gerard.pa...@gmail.com> wrote:
> Hi Mark,
>
> Thanks for respose !
>
> I run some tests and its a bit more confusing:
>
> 1) If I set the URL to another site for example "http://
> newsrss.bbc.co.uk/rss/newsonline_uk_edition/uk/rss.xml" then it works.
> So I think the setup of my Emulator and network is good.
>
> 2)So I put the Google News RSS URL directly into the emulator's
> browser. The page resolves but is incorrect, its the standard news
> html page But it is not the RSS raw text file that I would see on IE
> on my pc browser. So I think the google server is doing something to
> the request.
>
> 3)So navigating on the Emulators browser i select the RSS feed option
> which displays the raw rss text file in the browser. I copy that URL
> into my application and rerun application and I get the same error.
>
> So I guess this is an issue with the way Google have setup there
> server ?
>
> Regards
>
> On Jun 12, 12:24 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > xinit wrote:
> > > Hello
>
> > > I am starting Android and am using SDK 1.5 r2 and hope someone can
> > > suggest to me where problem could lie.
>
> > > The following code does two simple things, Create URL object and then
> > > return InputStream by using openStream().
>
> > > When I call openStream() I get a io.FileNotFoundException.
>
> > > Here is sample code:
>
> > > try {
> > >            URL feed = new URL("http://news.google.co.uk/news?
> > > pz=1&ned=uk&hl=en&output=rss");
>
> > >                    try {
>
> > >                            InputStream is = feed.openStream();
>
> > >                    } catch (IOException e) {
> > >                            // TODO Auto-generated catch block
> > >                            Log.d("LOG", e.toString());
> > >                    }
>
> > > My manifest contains the Internet permission:
>
> > >  <uses-permission android:name="android.permission.INTERNET" />
>
> > > The problem is as though the DNS cant resolve the domain ?
>
> > > Any ideas ??
>
> > Have you tried putting that URL in the Browser app? I know it will not
> > display properly, but it will indicate whether your emulator/device can
> > access that specific domain given the nature of your Internet connection.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Need help for your Android OSS project?http://wiki.andmob.org/hado-Hide 
> > quoted text -
>
> > - Show quoted text -
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to