Merhaba,
Mesela göndermek istediğimiz request şu şekilde olsun
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body>
<Register xmlns="http://tempuri.org/">
<kulad>string</kulad>
<sifre>string</sifre>
<registercode>string</registercode>
</Register>
</soap:Body>
</soap:Envelope>
private final String NAMESPACE = "http://tempuri.org/";
private final String METHOD_NAME = "Register";
private final String SOAP_ACTION = "http://tempuri.org/" + METHOD_NAME;
private final String URL = "http://www.xyz.com.tr/Service.asmx"; //web servisinizin ana dizini
SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
//xmlde göndermek istediğiniz objeler
Request.addProperty("kulad", kulad);
Request.addProperty("sifre", sifre);
Request.addProperty("registercode", registercode)
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = true;
soapEnvelope.setOutputSoapObject(Request);
HttpTransportSE aht = new HttpTransportSE(URL);
try {
aht.call(SOAP_ACTION, soapEnvelope);
} catch (IOException e) {
Log.e(LOG_TAG, "io exception");
} catch (XmlPullParserException e) {
Log.e(LOG_TAG, "XmlPullParserException");
}
try {
soapResult = "" + soapEnvelope.getResponse();
} catch (Exception e) {
Log.i(LOG_TAG, "Soap Parsing Exception");
}
kod tarafımdan test edildi ve çalışıyor. Eğer lokalde test etmek isterseniz firewall ayarlarınızı kontrol edin .
İyi Çalışmalar