Hi,
I try to call request from the library ksoap2 in android, but receives the 
error in android studio:

I/System: core_booster, getBoosterConfig = false
W/System.err: SoapFault - faultcode: 'soap:Client' faultstring: 'Message part 
{http://rogal.ws.pl/map/thumbnail}GetThumbnail was not recognized.  (Does it 
exist in service WSDL?)' faultactor: 'null' detail: null
W/System.err:     at 
org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEnvelope.java:136)
W/System.err:     at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:140)
W/System.err:     at 
org.ksoap2.transport.Transport.parseResponse(Transport.java:129)
W/System.err:     at 
org.ksoap2.transport.HttpTransportSE.parseResponse(HttpTransportSE.java:304)
W/System.err:     at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:276)
W/System.err:     at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:118)
W/System.err:     at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:113)
W/System.err:     at 
rogal.sieciowyws.MainActivity.requestSoap(MainActivity.java:67)
W/System.err:     at 
rogal.sieciowyws.MainActivity.testConnect(MainActivity.java:46)
W/System.err:     at 
rogal.sieciowyws.MainActivity.access$100(MainActivity.java:19)
W/System.err:     at 
rogal.sieciowyws.MainActivity$LoginTask.doInBackground(MainActivity.java:94)
W/System.err:     at 
rogal.sieciowyws.MainActivity$LoginTask.doInBackground(MainActivity.java:83)
W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:307)
W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err:     at 
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:246)
W/System.err:     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
W/System.err:     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
W/System.err:     at java.lang.Thread.run(Thread.java:833)

my android code looks like this:

public class MainActivity extends AppCompatActivity {

    public static final String SOAP_URL = 
"http://92e7a7ca.ngrok.io/api/map?wsdl";;
    public static final String NAMESPACE = "http://rogal.ws.pl/map/MapService/";;
    public static final String METHOD_NAME = "GetThumbnail";

    TextView text;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        text = (TextView) findViewById(R.id.textView);
        Button signin = (Button) findViewById(R.id.button);
        signin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                new RequestTask().execute();
            }
        });

    }

    private void req() {
        PropertyInfo propertyInfo = new PropertyInfo();
        propertyInfo.setName("Name");
        propertyInfo.setValue("hello");
        requestSoap(propertyInfo);
    }

    public void requestSoap(PropertyInfo... propertyInfos) {
        String mResponse = "";
        SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                SoapEnvelope.VER11);

        for (PropertyInfo propertyInfo : propertyInfos) {
            request.addProperty(propertyInfo);
        }

        envelope.dotNet = true;
        envelope.setOutputSoapObject(request);

        HttpTransportSE ht = new HttpTransportSE(SOAP_URL);
        ht.debug = true;
        try {
            ht.call("", envelope);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (XmlPullParserException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            mResponse = envelope.getResponse().toString();
            text.setText(mResponse);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private class RequestTask extends AsyncTask<Void, Void, Void> {

        protected void onPreExecute() {
            System.out.println();
        }

        protected Void doInBackground(final Void... unused) {

            System.out.println();
            req();
            System.out.println();

            return null;
        }

        protected void onPostExecute(Void result)
        {
            System.out.println();
        }

    }
}

I've added permissions in the manifest file:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />


web service in java: here <https://ufile.io/2ece7>

wsdl: here <https://ufile.io/ed08f>

schema xsd: here <https://ufile.io/3a4a6>

I check the operation of the web service tool SoapUI and working properly.

I did not notice a fault that could cause this exception.


i use to test app Huawei P9

I will be grateful for your help

regards,


-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/effdfe3d-8147-426c-802d-02dd8ad38a30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to