Error Querying Web Wervice

4

I am doing a client query in a web service, I pass the key to see what it returns me saying that I did not pass the key, what can I be doing wrong in the method?

This is .xml of the query

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="ConsultaClientes">
       <soapenv:Header/>
       <soapenv:Body>
          <con:ConsultaClientes soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <Autenticacao xsi:type="urn:Autenticacao" xmlns:urn="urn:RouterBoxConsultas">
                <ChaveIntegracao xsi:type="xsd:string">?</ChaveIntegracao>
             </Autenticacao>
          </con:ConsultaClientes>
       </soapenv:Body>
    </soapenv:Envelope>


private void consultaClientes() {
        SoapObject soap = new SoapObject("urn:RouterBoxConsultas", "ConsultaClientes"); 

        soap.addProperty("ChaveIntegracao", this.chaveDeIntegracao);

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.setOutputSoapObject(soap);

        Log.i("RouterBox", "Chamando WebService para consulta de Clientes");

        String url ="https://############################################";


        HttpTransportSE httpTransport = new HttpTransportSE(url);

        try {

            httpTransport.call("ConsultaClientes", envelope);
            Object msg = envelope.getResponse();

            Log.d("RouterBox", "Clientes: " + msg);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (XmlPullParserException e) {
            e.printStackTrace();
        }


    }


[ 09-28 08:59:50.339 14659:14685 D/         ]
      HostConnection::get() New Host Connection established 0xec60cc00, tid 14685
    09-28 08:59:50.348 14659-14685/br.com.testes.consultaclientes I/OpenGLRenderer: Initialized EGL, version 1.4
    09-28 08:59:50.383 14659-14695/br.com.testes.consultaclientes W/System.err: SoapFault - faultcode: '96' faultstring: 'Chave de Integracao nao informada' faultactor: '' detail: org.kxml2.kdom.Node@fa9adea
    09-28 08:59:50.383 14659-14695/br.com.testes.consultaclientes W/System.err:     at org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(Unknown Source)
    09-28 08:59:50.383 14659-14695/br.com.testes.consultaclientes W/System.err:     at org.ksoap2.SoapEnvelope.parse(Unknown Source)
    09-28 08:59:50.383 14659-14695/br.com.testes.consultaclientes W/System.err:     at org.ksoap2.transport.Transport.parseResponse(Unknown Source)
    09-28 08:59:50.383 14659-14695/br.com.testes.consultaclientes W/System.err:     at org.ksoap2.transport.HttpTransportSE.call(Unknown Source)
    09-28 08:59:50.383 14659-14695/br.com.testes.consultaclientes W/System.err:     at br.com.testes.consultaclientes.MainActivity.consultaClientes(MainActivity.java:57)
    09-28 08:59:50.383 14659-14695/br.com.testes.consultaclientes W/System.err:     at br.com.testes.consultaclientes.MainActivity.run(MainActivity.java:36)
    09-28 08:59:50.383 14659-14695/br.com.testes.consultaclientes W/System.err:     at java.lang.Thread.run(Thread.java:818)
    09-28 08:59:50.423 14659-14685/br.com.testes.consultaclientes W/EGL_emulation: eglSurfaceAttrib not implemented
    
asked by anonymous 28.09.2016 / 15:05

1 answer

0

problem solved with code below;

SoapObject request = new SoapObject("urn:RouterBoxMobile","LoginCentral");

        SoapObject chaveIntegracao = new SoapObject("urn:RouterBoxMobile","LoginCentral");
        chaveIntegracao.addProperty("ChaveIntegracao",chaveDeIntegracao);


        request.addProperty("Autenticacao",chaveIntegracao);
    
26.10.2016 / 18:35