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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:03:11+00:00 2026-05-24T09:03:11+00:00

I am using the follwing code to send SOAP request. String str = new

  • 0

I am using the follwing code to send SOAP request.

 String str = new StringBuilder("POST /WrenchTelLink/WrenchENTService.asmx HTTP/1.1\n")
              .append("Host: 59.160.183.14\n")
              .append("Content-Type: text/xml; charset=utf-8\n")
              .append("Content-Length: LLLLLL\n")
              .append("SOAPAction: \"http://WrenchGlobal/GetToDoList\"\n ")
              .append("<?xml version=\"1.0\" encoding=\"utf-8\"?>")
              .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/\">\n")
              .append("<soap:Body>\n")
              .append("<GetToDoList xmlns=\"http://WrenchGlobal/\">\n")
              .append("<viPeriod>IIIIII</viPeriod>\n")
              .append("<vsUserID>SSSSSS</vsUserID>\n")
              .append("</GetToDoList>\n")
              .append("</soap:Body>\n")
              .append("</soap:Envelope>\n").toString();
 String temp = str.replaceAll("LLLLLL",Integer.toString(str.length()))
   .replaceAll("SSSSSS",ph).replaceAll("IIIIII",Integer.toString(period));
  HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(url);

  try
   {
      StringEntity se = new StringEntity(temp,HTTP.UTF_8);

      se.setContentType("text/xml");  
      httppost.setHeader("Content-Type","application/soap+xml;charset=UTF-8");

      httppost.setEntity(se);  
      BasicHttpResponse httpResponse = (BasicHttpResponse)httpclient.execute(httppost);

      if(httpResponse.getStatusLine().toString()!="") 
         Toast.makeText(TelLinkActivity.this, httpResponse.getStatusLine().toString()
                    , Toast.LENGTH_SHORT).show();
      else
          Toast.makeText(TelLinkActivity.this,"Failed", Toast.LENGTH_SHORT).show();

     }
    catch(ClientProtocolException e)
    {
      e.printStackTrace();
    }
    catch(IOException e)
    {
      e.printStackTrace();  
    }    

Its not showing any of the TOAST messages. I am not getting what i am supposed understand from this. Its not working at all. Could anyone tell me if there is something wrong with the code..?

  • 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-24T09:03:13+00:00Added an answer on May 24, 2026 at 9:03 am

    show Toast in ui thread, by runOnUiThread for example

    runOnUiThread(new Runnable() {
        public void run() {
          Toast.makeText(TelLinkActivity.this,"Failed", Toast.LENGTH_SHORT).show();
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

when I'm using following Python code to send a POST request to my Django
I'm using this following code to send simple HTTP Request : try { Socket
Using the following code I get a nice formatted string: Request.QueryString.ToString Gives me something
I am using the following code to send a get request to my controller
I need to send a soap-request that looks like this: <v:Envelope xmlns:i=http://www.w3.org/2001/XMLSchema-instance xmlns:v=http://schemas.xmlsoap.org/soap/envelope/> <v:Header/>
I tried to send an email using the following code: MailMessage message = new
I am new to C/C++. I am using the following code to send multiple
Using the following code: Private Sub MakeMeSomeXmlBeforeRyanGetsAngry() Dim db As New MyDBDataContext Dim customer
I want to send an email with an attachment using the following code (Python
HI, I am using the following code request.js var request; function runAjax(JSONstring) { //

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.