Search in sources :

Example 6 with SoapPrimitive

use of org.ksoap2.serialization.SoapPrimitive in project ETSMobile-Android2 by ApplETS.

the class SignetsMobileSoap method HelloWorld.

public String HelloWorld() throws Exception {
    return (String) execute(new IWcfMethod() {

        @Override
        public ExtendedSoapSerializationEnvelope CreateSoapEnvelope() {
            ExtendedSoapSerializationEnvelope __envelope = createEnvelope();
            SoapObject __soapReq = new SoapObject("http://etsmtl.ca/", "HelloWorld");
            __envelope.setOutputSoapObject(__soapReq);
            PropertyInfo __info = null;
            return __envelope;
        }

        @Override
        public Object ProcessResult(ExtendedSoapSerializationEnvelope __envelope, SoapObject __result) throws Exception {
            Object obj = __result.getProperty("HelloWorldResult");
            if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
                SoapPrimitive j = (SoapPrimitive) __result.getProperty("HelloWorldResult");
                return j.toString();
            }
            return null;
        }
    }, "http://etsmtl.ca/HelloWorld");
}
Also used : SoapObject(org.ksoap2.serialization.SoapObject) SoapObject(org.ksoap2.serialization.SoapObject) PropertyInfo(org.ksoap2.serialization.PropertyInfo) SoapPrimitive(org.ksoap2.serialization.SoapPrimitive)

Aggregations

SoapObject (org.ksoap2.serialization.SoapObject)6 PropertyInfo (org.ksoap2.serialization.PropertyInfo)5 SoapPrimitive (org.ksoap2.serialization.SoapPrimitive)5 JSONException (org.json.JSONException)1 JSONObject (org.json.JSONObject)1 Element (org.kxml2.kdom.Element)1