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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:54:50+00:00 2026-06-17T06:54:50+00:00

I am trying to get this http://www.apniurdu.com/Soap.html web service running on Android. private static

  • 0

I am trying to get this http://www.apniurdu.com/Soap.html web service running on Android.

 private static final String cMETHOD_NAME = "Translate";
 private static final String cSOAP_ACTION = "http://apniurdu.com/SOAP/Urdu2.wsdl/Translate&quot";
 private static final String cNAMESPACE = "http://apniurdu.com/SOAP/Urdu2.wsdl";
 private static final String cURL = "http://apniurdu.com/SOAP/SOAP.pl";


 public SoapObject Translatesoap(String METHOD_NAME, String SOAP_ACTION, String NAMESPACE, String URL) throws IOException, XmlPullParserException {
        SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); //set up request
        java.lang.String symbol="hello world, good morning";
        request.addProperty("symbol", symbol); //variable name, value. I got the variable name, from the wsdl file!
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); //put all required data into a soap envelope
        envelope.setOutputSoapObject(request);  //prepare request
        AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL);  
        httpTransport.debug = true;  //this is optional, use it if you don't want to use a packet sniffer to check what the sent message was (httpTransport.requestDump)
        httpTransport.call(SOAP_ACTION, envelope); //send request
        SoapObject result=(SoapObject)envelope.getResponse(); //get response
        return result;
     }

    try {
                        SoapObject result=Translatesoap(cMETHOD_NAME, cSOAP_ACTION, cNAMESPACE, cURL);
                //      Log.v("ergebnis", result.getProperty(1).toString());
                    } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    } catch (XmlPullParserException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }

                    Log.v("next", "try");

This is basically my code. 1st variables; 2nd the procedure, 3rd the calling of the procedure.
When running I am getting an XMLpullparser exception:

01-07 12:06:32.858: W/System.err(969): org.xmlpull.v1.XmlPullParserException: Expected a quoted string (position:DOCDECL @1:50 in java.io.InputStreamReader@412d9088) 
01-07 12:06:32.858: W/System.err(969):  at org.kxml2.io.KXmlParser.readQuotedId(KXmlParser.java:664)
01-07 12:06:32.868: W/System.err(969):  at org.kxml2.io.KXmlParser.readExternalId(KXmlParser.java:643)
01-07 12:06:32.868: W/System.err(969):  at org.kxml2.io.KXmlParser.readDoctype(KXmlParser.java:585)
01-07 12:06:32.868: W/System.err(969):  at org.kxml2.io.KXmlParser.next(KXmlParser.java:418)
01-07 12:06:32.868: W/System.err(969):  at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)
01-07 12:06:32.868: W/System.err(969):  at org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:2029)
01-07 12:06:32.878: W/System.err(969):  at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:126)
01-07 12:06:32.878: W/System.err(969):  at org.ksoap2.transport.Transport.parseResponse(Transport.java:63)
01-07 12:06:32.878: W/System.err(969):  at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:100)
01-07 12:06:32.878: W/System.err(969):  at com.example.c_f_converter_ksoap2.ManuelleSOAP.Translatesoap(ManuelleSOAP.java:64)
01-07 12:06:32.889: W/System.err(969):  at com.example.c_f_converter_ksoap2.ManuelleSOAP$2.onClick(ManuelleSOAP.java:102)
01-07 12:06:32.889: W/System.err(969):  at android.view.View.performClick(View.java:3511)
01-07 12:06:32.898: W/System.err(969):  at android.view.View$PerformClick.run(View.java:14105)
01-07 12:06:32.898: W/System.err(969):  at android.os.Handler.handleCallback(Handler.java:605)
01-07 12:06:32.898: W/System.err(969):  at android.os.Handler.dispatchMessage(Handler.java:92)
01-07 12:06:32.898: W/System.err(969):  at android.os.Looper.loop(Looper.java:137)
01-07 12:06:32.908: W/System.err(969):  at android.app.ActivityThread.main(ActivityThread.java:4424)
01-07 12:06:32.908: W/System.err(969):  at java.lang.reflect.Method.invokeNative(Native Method)
01-07 12:06:32.918: W/System.err(969):  at java.lang.reflect.Method.invoke(Method.java:511)
01-07 12:06:32.927: W/System.err(969):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-07 12:06:32.927: W/System.err(969):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-07 12:06:32.927: W/System.err(969):  at dalvik.system.NativeStart.main(Native Method)
01-07 12:06:32.927: V/next(969): try

in short: expected a quoted string at parse response – as far as I know.
Any clues how to solve that? Many thanks in advance!

update:
i think i used the wrong URL.. now i changed the URL into the wsdl URL “http://apniurdu.com/SOAP/Urdu2.wsdl” and get an error “unexpected start token”

01-07 13:09:23.527: W/System.err(1149): org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <definitions name='UrduSOAP' targetNamespace='http://apniurdu.com/SOAP/Urdu2.wsdl'>@10:43 in java.io.InputStreamReader@412dbf58) 

so is the wsdl not compatible with ksoap2? or am I doing something wrong? 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-06-17T06:54:51+00:00Added an answer on June 17, 2026 at 6:54 am

    I think your problem is this line

    private static final String cSOAP_ACTION = "http://apniurdu.com/SOAP/Urdu2.wsdl/Translate&quot";
    

    maybe you have to remove the &quot, so you should write this:

    private static final String cSOAP_ACTION = "http://apniurdu.com/SOAP/Urdu2.wsdl/Translate";
    

    EDIT

    It’s not for the question, but for the OP, a little help to get started with ksoap2

    public SoapObject testMethod(String METHOD_NAME, String SOAP_ACTION, String NAMESPACE,   String URL, String parameter) throws IOException, XmlPullParserException
        {
            List<HeaderProperty> headers = new ArrayList<HeaderProperty>();
    
            SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
            request.addProperty("variablename", parameter);
    
            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
            //envelope.dotNet = true; for .net services
            envelope.setOutputSoapObject(request);
    
            HttpTransportSE httpTransport = new HttpTransportSE(URL);
    
            httpTransport.call(SOAP_ACTION, envelope, headers);
    
            return (SoapObject) envelope.getResponse();
        }
    

    So this is a basic call with ksoap2 and with a string parameter.

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

Sidebar

Related Questions

I'm trying to get information from this site: http://www.gocrimson.com/sports/mbkb/2011-12/roster If you look at that
Hey. I'm trying to get this code http://www.codeguru.com/Cpp/W-P/files/inifiles/article.php/c4455/#more to compile under a CLR WinForms
I'm trying to get something like this http://www.fotosearch.com/CSV008/k6834584/ But I have a trouble with
Hey, I'm trying to get this nav working nicely: http://www.moreheadplanetarium.org/redesign/nav.html I can't figure out
I'm trying to get this loading bar: http://www.webfroze.com/css/loading-animation-circle-style to repeat indefinitely. I tried -moz-animation:loading
I'm trying to get the content of a url with file_get_contents() like this: file_get_contents('http://www.website.com');
I am trying to get this simple example working from http://www.dotnetperls.com/ashx . When I
Why isn't this working? RewriteEngine on RewriteRule ^/filter/([A-Za-z0-9])*$ /index.php?filter=$1 Trying to get this: http://www.site.com/filter/whatever-is-here
Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
I'm trying to get GeoIP working with hive. I found this: http://www.jointhegrid.com/hive-udf-geo-ip-jtg/index.jsp , which

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.