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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:35:19+00:00 2026-05-28T01:35:19+00:00

I am facing a strange problem with calling two web services in the same

  • 0

I am facing a strange problem with calling two web services in the same activity.
While i was calling two methods of the web services one after another gave me an exception.
Everything was correct only, i dont know the problem.
Anybody has faced this problem?
Pleas give me some suggestions…

This is the code for calling web services:

   public static String getRelatedVideoResponse(String request, String url,
        String action, String method, String namespace, String value) {
    try {
         System.setProperty("http.keepAlive", "false");

        URL u = new URL(url);

        URLConnection uc = u.openConnection();
        HttpURLConnection connection = (HttpURLConnection) uc;

        connection.setRequestProperty("connection", "close");

        connection.setUseCaches(false);
        connection.setConnectTimeout(30000);
        connection.setDoInput(true);
        connection.setDoOutput(true);
        connection.setRequestProperty("SOAPAction", action);
        connection.setRequestMethod("POST");
        connection.setRequestProperty("Content-Type",
                "text/xml;charset=UTF-8");

        OutputStream out = connection.getOutputStream();

        Writer wout = new OutputStreamWriter(out);

        wout.write(request);

        wout.flush();


        wout.close();
        Log.e("before buffer","buffer");

        BufferedReader rd = new BufferedReader(new InputStreamReader(
                connection.getInputStream()));
        Log.e("buffer",rd+"");
        Log.e("code...", connection.getResponseCode() + "");

        while ((StaticUtils.sRelResult = rd.readLine()) != null) {

            Log.e("result", StaticUtils.sRelResult);
            return StaticUtils.sRelResult;
        }

    } catch (MalformedURLException e) {

        e.printStackTrace();
    } catch (IOException e) {
        Log.e("error occured", "here");
        e.printStackTrace();
    }
    return StaticUtils.sRelResult;
}

Activity:

    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.searchvideos);
mHandler = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                // TODO Auto-generated method stub
                super.handleMessage(msg);
                switch (msg.what) {
                case SUCCESS:
                    s = "<tns:int xmlns:tns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">";
                    t = "</tns:int>";
                    buffer.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
                    buffer.append("<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns=\"http://tempuri.org/\">");
                    buffer.append("<soap:Body><GetScoresForVideos><videoIDs>");
                    for (int i = 0; i < StaticUtils.sAlRelId.size(); i++) {
                        buffer.append(s + StaticUtils.sAlRelId.get(i) + t);
                    }
                    buffer.append("</videoIDs>");
                    buffer.append("</GetScoresForVideos></soap:Body></soap:Envelope>");
                    Log.e("bufer string", buffer.toString());
                    WsdlService s = new WsdlService();

                    s.getRelatedVideoResponse(buffer.toString(),
                            StaticUtils.URL, StaticUtils.RATE_ACTION,
                            StaticUtils.RATE_METHOD, StaticUtils.NAMESPACE, "");
break;
    }
        };

download();
}
private void download() {
        Runnable r = new Runnable() {

            public void run() {
                if (StaticUtils.checkNetworkStatus(getApplicationContext()) == true) {
                    WsdlService service = new WsdlService(
                            StaticUtils.NAMESPACE,
                            StaticUtils.RELATED_METHOD_NAME, StaticUtils.URL,
                            StaticUtils.RELATED_SOAP_ACTION);
                    String str = service.getResponseById(Integer
                            .valueOf(videoId));

                    Log.e("Related videos", str);
                    RelatedParser parser = new RelatedParser(str);
                    parser.parseRelatedVideos();
                    onSuccessDownload();
                } else {
                    onFailureDownload();
                }

            }
        };
        Thread t = new Thread(r);
        t.start();

    }
public void onSuccessDownload() {
        mHandler.sendEmptyMessage(SUCCESS);
    }

Exception is:

12-05 14:55:11.604: WARN/System.err(3075): java.io.FileNotFoundException: http://192.80.62:48080/Services/v0.2.2/SampleService.svc?wsdl
12-05 14:55:11.613: WARN/System.err(3075):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:1162)
12-05 14:55:11.613: WARN/System.err(3075):     at com.utils.WsdlService.getRelatedVideoResponse(WsdlService.java:180)
12-05 14:55:11.613: WARN/System.err(3075):     at com.scopra.screens.RelatedVideos$2.handleMessage(RelatedVideos.java:146)
12-05 14:55:11.613: WARN/System.err(3075):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-05 14:55:11.613: WARN/System.err(3075):     at android.os.Looper.loop(Looper.java:123)
12-05 14:55:11.613: WARN/System.err(3075):     at android.app.ActivityThread.main(ActivityThread.java:4627)
12-05 14:55:11.613: WARN/System.err(3075):     at java.lang.reflect.Method.invokeNative(Native Method)
12-05 14:55:11.613: WARN/System.err(3075):     at java.lang.reflect.Method.invoke(Method.java:521)
12-05 14:55:11.613: WARN/System.err(3075):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-05 14:55:11.623: WARN/System.err(3075):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-05 14:55:11.623: WARN/System.err(3075):     at dalvik.system.NativeStart.main(Native Method)

Thanks,

  • 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-28T01:35:20+00:00Added an answer on May 28, 2026 at 1:35 am

    java.io.FileNotFoundException: http://192.80.62:48080/Services/v0.2.2/SampleService.svc?wsdl

    Look closely: it seems that IP address is misspelled. May be you need to change it to 192.80.62.4:8080?

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

Sidebar

Related Questions

I am facing a very strange problem where the same loop keeps giving me
I have been facing a strange problem while returning dataset through WCF service (WSHttpBinding).
I'm currently facing a strange problem in PHP. I have two scripts, index.php which
I am facing a strange problem while sorting a list of strings with integer
I am facing this strange problem while working with Generic Base Classes. I am
hello every one i am facing a strange problem i my code i am
I am facing a strange problem while running my application. I have a class
I am facing very strange and difficult problem. I am developing a web app,
I am facing one strange problem, when i run my android application on the
I am facing strange problem in opera while using cufon with dd_belatedPNG and dd_roundies.

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.