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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:38:52+00:00 2026-06-10T08:38:52+00:00

I am very new Android Soap Web-services I have some knowledge on consuming soap

  • 0

I am very new Android Soap Web-services I have some knowledge on consuming soap web-services in Android using Ksoap2 for that I write the following Code :by using ksoap2.jar I got the namespace and method name from The WSDL File.

package com.soapwebservices.pack;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class SampleWSExampleActivity extends Activity {
    private static final String TAG = null;
    /** Called when the activity is first created. */
      final String NAMESPACE = "urn:sap-com:document:sap:soap:functions:mc-style";
         final String URL = "http://***************:8000/sap/bc/srt/wsdl/srvc_14DAE9C8D79F1EE196F1FC6C6518A345/wsdl11/allinone/ws_policy/document?sap-client=800&sap-user=********&sap-password=*******";
          final String METHOD_NAME = "Z_GET_CUST_GEN";
         final String SOAP_ACTION = "urn:sap-com:document:sap:soap:functions:mc-style/Z_GET_CUST_GEN";
      //    private static final String[] sampleACTV = new String[];
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);        
        SoapSerializationEnvelope envelope = 
            new SoapSerializationEnvelope(SoapEnvelope.VER11);

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

        try {
            androidHttpTransport.call(SOAP_ACTION, envelope);
            SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;

            System.out.println("THE SOAP RESPONSE"+resultsRequestSOAP);

            //ACTV.setHint("Received :" + resultsRequestSOAP.toString());
        } catch (Exception e) {


            e.printStackTrace();
        }
    }
}  

when i run this program i got the following Exception but in some examples i got the success please see once and let me know where i am doing the mistake 


08-20 15:21:40.296: WARN/System.err(1668): org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <{http://schemas.xmlsoap.org/wsdl/}wsdl:definitions targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style'>@1:686 in java.io.InputStreamReader@4052f658) 

How can handle that exc
  • 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-10T08:38:54+00:00Added an answer on June 10, 2026 at 8:38 am

    Maybe nothing is wrong with your code…

    I solved my XMLPullParser exception after realizing that I was not pointing my client at my service. It expected to be able to use SOAP response and requests but was seeing wsdl. it was tricky to figure out. I’m not sure what your System.err(1668) is but here is what I suggest you do.

    Download and attach the android-ksoap2 source code, so that you may step into the call (F5) to see while debugging where the error is raised in the ksoap2 package.

    https://github.com/mosabua/ksoap2-android/downloads

    and

    Install and run the free SoapUI to test the webservice, and figure out exactly the correct Action, method, URL and namespace are, as it is most likely a problem with them if your code is ok. The first 2 mins of this intro video was all I needed to test my service.

    Finally write a simple client in a different language – I found it easy to do in VB.NET express once I added a web reference to my project for the web-service. (That taught me with the help of SoapUI to make my wsdl WS-I compliant)

    Good luck finding your solution.

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

Sidebar

Related Questions

Ok, so I am very new to android but I have some experience with
I'm very new to Android and I have the following layout xml code: <?xml
Im very new to android/java and have been following a few youtube tutorials and
I am very new to Android rest web-services I want connect Rest web-services from
I am very new to Android development and Java. Have read around but I'm
I'm following the android developer tutorials on tab layouts. (im very very new to
I am very new to android development and have been trying to draw a
I am very new to Android development. I have this code: Button btnLaunch; btnLaunch=(Button)findViewById(R.id.btnLaunch);
I am very new to Android and OpenGL. I was asked to write an
I am very new to Android programming, and I have read everywhere and I

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.