Android コードから wcf サービスにアクセスしています
Web サービスはhttp://www.nbrm.mk/klservice/kurs.asmxです
私の質問は、SoapObject コンストラクターと HttpTransportSE オブジェクトからの call メソッドの引数は何ですか??
ここにコードがあります
public class ExchangeMoneyMKActivity extends Activity {
private static final String SOAP_ACTION = "http://nbrm.mk/callService";
private static final String METHOD_NAME = "callService";
private static final String NAMESPACE = "http://nbrm.mk/";
private static final String URL = "http://www.nbrm.mk/klservice";
TextView txt;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
txt=(TextView)findViewById(R.id.txtView1);
callService();
}
private void callService() {
// TODO Auto-generated method stub
try{
SoapObject request=new SoapObject(NAMESPACE,METHOD_NAME);
SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
Object result = (Object)envelope.getResponse();
txt.setText(result.toString());
}
}