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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:08:39+00:00 2026-06-15T10:08:39+00:00

I’m having problems connecting to my web service. I’ve followed a couple of tutorials,

  • 0

I’m having problems connecting to my web service. I’ve followed a couple of tutorials, especially http://drclawx.wordpress.com/2011/06/24/77/ and created a simple Wcf Hello World web service. I’ve downloaded the ksoap2 jar recommended on the site, but I had a couple of problems. I’ve downloaded a couple of later versions but the one that I can get to work is version 2.5.8. When I go to call my own web service I’m getting an XMLPullParserException. My web service will be used to check login credentials, it has a method called ‘UploadLogin’ which takes a username and password. The following is my code

private class webService extends AsyncTask<String, Void, Void> {

    final String METHOD_NAME = "UploadLogin";
    final String NAMESPACE = "http://tempuri.org/";     
    final String URL = "http://10.0.2.2:52762/UploadService.svc";
    final String SOAP_ACTION = "http://tempuri.org/IUploadService/UploadLogin";

    // For the web service method: public String getLocations(String inputLocation))
    @Override
    protected Void doInBackground(String... entry) {

        SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
        request.addProperty("username", "a");
        request.addProperty("password", "a");
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

        envelope.dotNet = true;
        envelope.setOutputSoapObject(request);
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

        try {
            androidHttpTransport.call(SOAP_ACTION, envelope);

            Object response = (Object) envelope.getResponse();
            System.out.println("Login - " + response.toString());
        } 
        catch (Exception exception) {
            exception.printStackTrace();   
        }

        return null;
    } 
}

The error that I’m getting is the following. Can someone please help or suggest how I might go about fixing this issue.

12-04 18:50:44.317: W/System.err(1704): org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT 
12-04 18:50:44.317: W/System.err(1704): --uuid:e537e5f2...@3:13 in java.io.InputStreamReader@41325c88) 
12-04 18:50:44.326: W/System.err(1704):     at org.kxml2.io.KXmlParser.next(KXmlParser.java:426)
12-04 18:50:44.336: W/System.err(1704):     at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)
12-04 18:50:44.336: W/System.err(1704):     at org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:2029)
12-04 18:50:44.346: W/System.err(1704):     at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:126)
12-04 18:50:44.356: W/System.err(1704):     at org.ksoap2.transport.Transport.parseResponse(Transport.java:96)
12-04 18:50:44.356: W/System.err(1704):     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:189)
12-04 18:50:44.366: W/System.err(1704):     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:95)
12-04 18:50:44.376: W/System.err(1704):     at prometric.myitemwriter.ViewItemBankActivity$ws_MIR.doInBackground(ViewItemBankActivity.java:538)
12-04 18:50:44.376: W/System.err(1704):     at prometric.myitemwriter.ViewItemBankActivity$ws_MIR.doInBackground(ViewItemBankActivity.java:1)
12-04 18:50:44.396: W/System.err(1704):     at android.os.AsyncTask$2.call(AsyncTask.java:287)
12-04 18:50:44.426: W/System.err(1704):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
12-04 18:50:44.436: W/System.err(1704):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
12-04 18:50:44.516: W/System.err(1704):     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
12-04 18:50:44.516: W/System.err(1704):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
12-04 18:50:44.526: W/System.err(1704):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
12-04 18:50:44.536: W/System.err(1704):     at java.lang.Thread.run(Thread.java:856)
  • 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-06-15T10:08:40+00:00Added an answer on June 15, 2026 at 10:08 am

    For anyone that’s interested, the reason I was getting this error was because the messageEncoding was using MTOM, so I changed this to Text and it work – messageEncoding=”Text”

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.

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.