Boa noite amigos(as)
Estou estudando web service com SOAP + Android Studio, porém estou tendo dificuldade em fazer um Crud.
Por gentileza, alguém poderia me ajudar?
Quando finalizar irei postar o código para ajudar outros estudantes.
Desde já agradeço pela atenção!!!
//Cadastro de novo Instrutor
public boolean adicionarInstrutor(String nomeInstrutor, String instituicaoInstrutor, String enderecoInstrutor, int foneInstrutor, String emailInstrutor, String loginInstrutor, String senhaInstrutor) throws IOException, XmlPullParserException {
SoapObject soap = new SoapObject(“<a href="http://WebService">http://WebService</a>”,“adicionarInstrutor”);
soap.addProperty(“nomeInstrutor”,nomeInstrutor);
soap.addProperty(“instituicaoInstrutor”,instituicaoInstrutor);
soap.addProperty(“enderecoInstrutor”,enderecoInstrutor);
soap.addProperty(“foneInstrutor”,foneInstrutor);
soap.addProperty(“emailInstrutor”,emailInstrutor);
soap.addProperty(“senhaInstrutor”,loginInstrutor);
soap.addProperty(“senhaInstrutor”,senhaInstrutor);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(soap);
HttpTransportSE http = new HttpTransportSE("http://10.21.0.38:8080/ProjetoWebService/services/WebService?wsdl");
http.call("adicionarInstrutor",envelope);
Object resposta = envelope.getResponse();
return true;
}
}//fim class