Skip to Content
Jan 11, 2018 at 11:46 AM

Consuming SAP business by design SOAP webservice from android app



I am SAP Business by design developer, i created a custom BO holding users and passwords. then i created a webservice based on this custom BO. it is working fine when testing from SOAP UI but when consuming from my Android app the following error appears "soap-env:client" " web service processing error"

when i check the tenant only find this vague message "System error during SOAP processing" Please help this is very urgent matter.

wsdl file :

find below my android code

private static final String MAIN_REQUEST_URL = "";
static String NAMESPACE = "";
static String SOAP_ACTION = "";

static SoapSerializationEnvelope getSoapSerializationEnvelope(SoapObject request) {
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;
    envelope.implicitTypes = true;

    //envelope.headerOut = new Element[1];
    //envelope.headerOut[0] = buildAuthHeader();

    return envelope;

static HttpTransportSE getHttpTransportSE() {
    HttpTransportSE ht = new HttpTransportSE(Proxy.NO_PROXY,MAIN_REQUEST_URL,60000);
    //HttpTransportSE ht = new HttpTransportSE(MAIN_REQUEST_URL);
    //ht.debug = true;
    //ht.setXmlVersionTag("<!--?xml version=\"1.0\" encoding= \"UTF-8\" ?-->");
    return ht;

   static String getUser(String fValue) {
    String data = null;
    String methodname = "Read";

    SoapObject request = new SoapObject(NAMESPACE, methodname);
    request.addProperty("userName", fValue);

    SoapSerializationEnvelope envelope = getSoapSerializationEnvelope(request);

    HttpTransportSE  ht = getHttpTransportSE();
    try {
        List<HeaderProperty> headerList = new ArrayList<>();
        headerList.add(new HeaderProperty("Authorization", "Basic " + org.kobjects.base64.Base64.encode("xhitham:********".getBytes())));, envelope,headerList);
        SoapObject resultsString = (SoapObject)envelope.getResponse();
        data = resultsString.toString();

    } catch (SocketTimeoutException t) {
    } catch (IOException i) {
    } catch (Exception q) {
    return data;