AndroidアプリケーションからC#Webサービスを利用したい..私のプロジェクトでは、kSOAP 2ライブラリを使用して、データを取り戻すリクエストでSOAPを使用していますが、自分で「呼び出し」を行っているとき...... asmx 、C# バックエンド、このコード
SoapObject getWeather(String customerNumber) throws Exception {
PropertyInfo property = new PropertyInfo();
property.setName("LicenseId");
property.setValue("8BEBFB9F-D9C9-4880-9225-AB50976F2975");
property.setType(String.class);
SoapObject request = new SoapObject("http://mobilesuite365.com",
"GetCustomers");
request.addProperty(property);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
// It seems that it is a .NET Web service because it doesn't work
// without next line
HttpTransportSE transport = new HttpTransportSE(
"http://www.mobilesuite365.net/app2/getdata.asmx");
transport.debug = true;
transport.call("http://mobilesuite365.com/GetCustomers", envelope);
return (SoapObject) envelope.getResponse();
このエラー "XmlPullParserException: Unexpected token (position:TEXT") が表示されます。応答は JSON のようになりますが、ksoap は xml 形式を処理できるためです。
応答を取得して応答から情報を処理し、アプリで使用する方法は?
手伝ってくれてありがとう