Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
LinkBack Thread Tools
Old May 15th, 2012, 12:06 AM   #1 (permalink)
New Member
Thread Author (OP)
Join Date: Nov 2011
Posts: 4
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Sad android to .net webservice

i have done the java class for android and .net, but seems like got a minor problem with the layout
package com.webservice.test;

import android.app.Activity;
import android.os.Bundle;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import android.widget.TextView;

public class mainScreen extends Activity {
	private static final String SOAP_ACTION = "http://tempuri.org/GetAllEmployees";
	private static final String METHOD_NAME = "GetAllEmployees";
	private static final String NAMESPACE = "http://tempuri.org/";
	private static final String URL = "http://max-5.com.my/EmployeeWebService.asmx";
	TextView tv;
	TextView tvValue;
    public void onCreate(Bundle savedInstanceState) {
        tv = (TextView)findViewById(R.id.textView1);
        SoapObject Request = new SoapObject (NAMESPACE, METHOD_NAME);
        SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        soapEnvelope.dotNet = true;
        AndroidHttpTransport aht = new AndroidHttpTransport(URL);
        	aht.call(SOAP_ACTION, soapEnvelope);
        	SoapObject resultString = (SoapObject) soapEnvelope.getResponse();                 	        	
        catch(Exception e)
i got this result
i want the data only, i dun want those 'anyType' 'id' 'name' ...etc text
i want to have a data something like this:

.... continues...

melvintcs is offline  
Reply With Quote
sponsored links
Old January 10th, 2013, 09:11 PM   #2 (permalink)
New Member
Join Date: Jan 2013
Posts: 2
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts

I do not quite understand your question. Can you be clear?
sfdfesfs is offline  
Reply With Quote
Old January 11th, 2013, 03:44 AM   #3 (permalink)
New Member
Zpecter's Avatar
Join Date: Sep 2012
Location: Málaga (Spain)
Gender: Male
Posts: 4
Device(s): Apple iPhone 4S Samsung Galaxy S I9000 Samsumng Omnia 7 I8700
Carrier: Yoigo

Thanks: 0
Thanked 0 Times in 0 Posts

Hello, when you call a webservice, it can return data as xml or json, so you can't modify this behaviour unless the webservice was yours, and it shouldn't be recommended to modify this behaviour after all.

It's your responsability to parse the data you receive from the webservice and map your own objects with those values.
Zpecter is offline  
Reply With Quote
android java, soap, web services

Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 07:15 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.