안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요
안드로이드로 닷넷 wcf 웹서비스 적용중인데요..
DB는 테스트로 mssql 사용중이구요.
데이타셋 가져오는건 성공을 했어요
근데 가져오는게 필요없는것들도 다 가져와지더라구요 xml로..
이런식으로여..
이걸 좀 깔끔하게 원하는 값만 호출해서 뜨게하고싶은데
어떻게 해야될까요..
초보라 뭘 어케 해야될지 구글링에도 검색을 어케해야될지 모르겠네요.
밑에가 소스입니다..
public class Soap extends Activity {
//private static final String METHOD_NAME = "LargeStringTest";
private static final String METHOD_NAME = "LargeDataSetTest";
private static final String NAMESPACE = "http://tempuri.org/";
private static final String URL = "http://192.168.2.122/wcfservice";
//final String SOAP_ACTION = "http://tempuri.org/ISecureService/LargeStringTest";
final String SOAP_ACTION = "http://tempuri.org/ISecureService/LargeDataSetTest";
TextView tv;
StringBuilder sb;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
tv = new TextView(this);
sb = new StringBuilder();
call();
tv.setText(sb.toString());
setContentView(tv);
}
public void call() {
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);
sb.append(envelope.toString() + "\n");
SoapObject result = (SoapObject) envelope.getResponse();
String resultData = result.toString();
sb.append(resultData + "\n");
} catch (Exception e) {
sb.append("Error:\n" + e.getMessage() + "\n");
}
}
}
도와주세요...



