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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:58:15+00:00 2026-06-09T21:58:15+00:00

So far I have created a PHP client, and a VB.NET client which both

  • 0

So far I have created a PHP client, and a VB.NET client which both successfully call my PHP web-service. To get the latter to work I needed to use the SoapUI tool from SourceForge. It told me that my wsdl was not WS-I compliant. I did not need the Pro version to test my service interactively as it allows you to directly edit the soap request. After fixing my WSDL and getting my VB.Net client functioning android is still a problem.

I also attached the source code for ksoap2-andriod so that I could step through while debugging. It helped a little but there are bundled dependencies for which the source is not included, in particular “kxml2 v1.6”. If anyone can point me to a source zip or Jar for that I’d appreciate it.

This is the error I cant get past when calling the PHP webservice from my android client.

  org.xmlpull.v1.XmlPullParserException: expected: START_TAG   {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <definitions name='naturallyIrrationalsoapserver' targetNamespace='http://www.naturallyIrrational.com'>@10:42 in java.io.InputStreamReader@44dce560)

Its telling me it cant parse the WSDL\XML – the poistion @10.42 is the end of the opening definitions tag.

I believe that as the WSDL in now WS-I compliant that the problem is withing this service namespace definitions as interpreted by Ksoap2. Here is my android client code used to call it.

public class SoapClientActivity extends Activity {
      @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView tv = (TextView) findViewById(R.id.myText);
        String soapResponse="";
        final String METHOD_NAME = "getArrval";
        final String SOAP_ACTION = "http://www.naturallyIrrational.com/naturallyIrrationalsoapserver.wsdl";
        final String NAMESPACE = "http://www.naturallyIrrational.com";

* This next line was incorrect and should point to
http://www.naturallyIrrational.com/naturallyIrrationalsoapserver.php *

        final String URL = "http://www.naturallyIrrational.com/naturallyIrrationalsoapserver.wsdl";

        if (InternetStatus.getInstance(this).isOnline(this)) {

            try{                            
                SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);


                    PropertyInfo pi = new PropertyInfo();
            pi.setName("valname");
            pi.setValue("rt2");
            pi.setType(String.class);
            request.addProperty(pi);    

                 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);  
                    envelope.dotNet=false;
                    envelope.setOutputSoapObject(request); 
                    HttpTransportSE andHttpTransport = new HttpTransportSE(URL); 
                    andHttpTransport.debug = true;
                    andHttpTransport.call(SOAP_ACTION, envelope);

* there is something wrong with returning this value, it has been received but throws an error when passed back from ksoap *

 soapResponse = (String) envelope.getResponse();  //Exception is thrown here  
                        String strrequest = andHttpTransport.requestDump;
                        String strresponse = andHttpTransport.responseDump;

            }catch(Exception e){soapResponse = "Nope not working "+"\n\n" + e.getMessage() + "/n/n" + e.getStackTrace() ;}
            } else {soapResponse="You are not online"; }   


        tv.setText(soapResponse);    
    }
}

If I am doing something dumb and some one can point it out I’d appreciate it.

Is there a directive to not cache and reuse wsdl in Android like there is in PHP?

Maybe using net beans will help, that’s next when I have time. If anyone can please help in the interim, don’t hesitate to suggest something.

<?php
class naturallyIrrational {
  private $arrval = array("pi" => 3.1415,"e" =>  2.7183, "rt2" => 1.414, "phi" => 1.618 );  
  function getIrrationalvalue($valname) {
$myFile = "logFile.html";
$fh = fopen($myFile, 'a') or die("can't open file");
$datq = date('m/d/Y h:i:s a', time());
fwrite($fh, $datq);
if (isset($this->arrval[$valname])) {

$stringData = " ".$valname." = ".$this->arrval[$valname]."<br/>";
fwrite($fh, $stringData);
fclose($fh);      
return $this->arrval[$valname];
    } else {
    throw new SoapFault("Server","Unknown Symbol '$valname'.");
    }
  }
}
$server = new SoapServer("naturallyIrrational.wsdl");
$server->setClass("naturallyIrrational");
$server->handle();
  • 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-09T21:58:17+00:00Added an answer on June 9, 2026 at 9:58 pm

    I discovered that the URL string needs to point at the public php.

    final String URL = "http://www.naturallyIrrational.com/naturallyIrrationalsoapserver.php";

    Really a very simple thing in the end after 3 weeks. Downloading the source code was essential as it allowed me to see the service is functioning. There was/is another issue regarding passing parameters, like this:

    PropertyInfo pi = new PropertyInfo();
    pi.setName("valname");
    pi.setValue("rt2");
    pi.setType(String.class);
    

    but that is a different question.

    Thank you for your comments.

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

Sidebar

Related Questions

I have created a custom PHP script which uploads information submitted by a form
I have an events list created with php/mysql which displays up and coming events
I have created VIEWS and PartialVIEWS, but so far, i have seen that VIEWS,
I am developing a live update for my application. So far, I have created
So far I have the expression: http://[^\.]*\.mydomain\.com/((.*?)) Which matches... http://www.mydomain.com/Images/favicon.ico But I really dont
So far I have been creating Web Portal but recently I had a request
I have learned how to use classes in PHP and so far I have
I have to create a PHP SOAP client that sends leads, but I have
I have created an next and prev image link which works great. But I'd
HI i have created a content type call mycontent it has 2 fields Label:

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.