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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:58:16+00:00 2026-05-26T09:58:16+00:00

I have a HelloWorld web service deployed on a server. Now im trying to

  • 0

I have a HelloWorld web service deployed on a server. Now im trying to talk to the server. How do i do a SOAP request from within a Java application ?

Here is the XML envelope (request):

            POST /AndroidSampleApp/Test.asmx HTTP/1.1
            Host: (host)
            Content-Type: text/xml; charset=utf-8
            Content-Length: length
            SOAPAction: "http://tempuri.org/HelloWorld"

            <?xml version="1.0" encoding="utf-8"?>
            <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/">
              <soap:Body>
                <HelloWorld xmlns="http://tempuri.org/">
                  <username>string</username>
                  <password>string</password>
                </HelloWorld>
              </soap:Body>
            </soap:Envelope>

Here is the XML envelope (request):

            HTTP/1.1 200 OK
            Content-Type: text/xml; charset=utf-8
            Content-Length: length

            <?xml version="1.0" encoding="utf-8"?>
            <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/">
              <soap:Body>
                <HelloWorldResponse xmlns="http://tempuri.org/">
                  <HelloWorldResult>string</HelloWorldResult>
                </HelloWorldResponse>
              </soap:Body>
            </soap:Envelope>

How do i call this webservice from a java program and what packages do i need to import. Thanks!

Note: This is for an android application

  • 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-26T09:58:17+00:00Added an answer on May 26, 2026 at 9:58 am

    You can use the ksoap2 library to easily make your soap webservie calls.

    Ksoap is relatively easy to use, but I’ve run into some performance issues with connectivity on some networks using it.

    Instead, I’ve been using HttpUrlConnection (or AndroidHttpClient, depending on the OS version). See this post for more information. I use these in combination with any of the XML parsers and builders available on Android.

    Hope this helps!

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

Sidebar

Related Questions

I have a simple web service operation like this one: [WebMethod] public string HelloWorld()
I'm trying to consume a .Net Web Service using perl and SOAP Lite. When
I made the simple hello world NODEJS Server. I have a enyo web service
I have written a simple HelloWorld web service. Which takes an ArrayList as parameter.
I have a simple web service operation like so: @WebService(endpointInterface = soap.service.sei.HelloWorldSei) public class
I'm trying to consume a hello world AXIS2 SOAP web service using a PHP
Is it possible to call a function within an asp.net web application from outside
I have a asmx web service running on a test server that has anonymous
I have an ASP.NET web application. It has a web service, with several web
I have a Hello World c# ASP .NET web service which is automatically generated

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.