2
private static final String SOAP_ACTION = "http://tempuri.org/IService1/HelloTest";
private static final String METHOD_NAME = "HelloTest";
private static final String NAMESPACE = "http://tempuri.org/";
private static final String URL = ""; //blank for privacy
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
//request.addProperty("Celsius", "32");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpTransportSE ht = new HttpTransportSE(URL);
try {
ht.call(SOAP_ACTION, envelope);
final SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
final String str = response.toString();
Toast.makeText(MainActivity.this, str, 5000).show();
fetch_service.setText(str);
}
catch (Exception e) {
e.printStackTrace();
}
내 메소드 (Hello Test)를 호출하려고합니다. 결과는 안녕하세요 테스트 반환됩니다. 그러나이 샘플은 기본 http 바인딩을 위해 작동하지만 wshttpbinding을 위해 작동하지 않습니다.안드로이드에서 WSHTTPBINDING을 호출 할 수 있습니까?
나는 사람을 시험해 봅시다. 많은 사람을 압니다. – Nirmal
마침내 나는 귀중한 답을 @Tarsem에서 찾았습니다. – Nirmal