users@glassfish.java.net

Re: Calling ASP URL from JSF

From: Hassan Schroeder <hassan.schroeder_at_gmail.com>
Date: Tue, 20 Apr 2010 09:36:09 -0700

On Tue, Apr 20, 2010 at 9:19 AM, Vijaya Maddela <vijay.reddy_at_eaiesb.com> wrote:

> String URL1 =
> "http://eaiesb.com/Webservice.aspx?User=va&passwd=demo&mobilenumber=9704179993";
> --- It works fine  with below code
>
> HttpClient httpclient = new DefaultHttpClient();
>             HttpGet httpget = new HttpGet(URL1);

> If I use  below code ( Dynamically generating URL String ).
>
> String smsURL =  "http://eaiesb.com/Webservice.aspx?User=va&passwd=demo";
>         String MobileNumber = "&mobilenumber="
> +tmobileNumber.getText().toString() ;
>
> HttpClient httpclient = new DefaultHttpClient();
>             HttpGet httpget = new HttpGet(URL1);

> I compared both strings both are same but I am not able to call asp page if
> I generate url dynamically.

Your second example doesn't make sense: you're calling the same
URL1 variable as the first, and the code you show above it doesn't
do anything to combine "smsURL" and "MobileNumber", assuming
your intent was to use smsURL in your HttpGet.

Plus "I am not able to call..." is utterly meaningless.

-- 
Hassan Schroeder ------------------------ hassan.schroeder_at_gmail.com
twitter: @hassan