Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Problem in larger xml parsing with SOAP web service
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rajan Thakrar  
View profile   Translate to Translated (View Original)
 More options Aug 17 2012, 1:44 am
From: Rajan Thakrar <r.d.thak...@gmail.com>
Date: Fri, 17 Aug 2012 11:14:55 +0530
Local: Fri, Aug 17 2012 1:44 am
Subject: Re: [android-developers] Re: Problem in larger xml parsing with SOAP web service

hi  Krishna, so i am going on wrong track, is it so ??

B'cos i am also trying this code with small xml response at that time it
will be worked fine, but when i get that the larger xml at that time i am
facing the problem.

And yes i have already tried out your code before creating this post, but i
didn't get the success that is why i am using this code.

Thank you for reply.

On Thu, Aug 16, 2012 at 10:30 PM, Krishna Mahadik <krishna.maha...@gmail.com

> wrote:
> Hi Rajan,

> If your are looking for hitting .net web service from android application,
> you need to use an external jar file KSOAP2 at Android end.

>        public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>         setContentView(R.layout.login);
>         final String NAMESPACE = "http://tempuri.org/";
>         final String METHOD_NAME = "Login";
>         final String SOAP_ACTION = "http://tempuri.org/Login";
>         final String URL = "
> http://ipaddressofwebserver/Dashboard/Service.asmx";

>         Button login = (Button)this.findViewById(R.id.btnLogin);

>         login.setOnClickListener(new View.OnClickListener()
>         {
>  public void onClick(View arg0)
> {
>  String [] data = {};
> String x = " ";
>          String username=null;
>          String password=null;

> EditText id = (EditText)findViewById(R.id.txt_username);
>         EditText passkey = (EditText)findViewById(R.id.txt_password);

>  try {
>          username=id.getText().toString();
>          password=passkey.getText().toString();
>          SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

>                 SoapSerializationEnvelope envelope = new
> SoapSerializationEnvelope(SoapEnvelope.VER11);
>                envelope.dotNet = true;
>                 request.addProperty("uname", username);
>       request.addProperty("pass", password);
>                envelope.setOutputSoapObject(request);

>             HttpTransportSE androidHttpTransport = new
> HttpTransportSE(URL);
>             androidHttpTransport.call(SOAP_ACTION, envelope);
>             SoapObject response = (SoapObject)envelope.getResponse();      //we
> get soap object as response...
>             data = getarray(response);

>             x = data[0].toString();  //u can convert object to string
> also, but i have passed array object in soap response

>             if(data[0].toString().equalsIgnoreCase("true"))
>                  {
>               Toast.makeText(Login.this, "Login in
> successful",Toast.LENGTH_LONG).show();
>     }
>            else
>   {
>  Toast.makeText(Login.this, data[1].toString(),Toast.LENGTH_LONG).show();
>   }

>          }
>    catch (Exception e)
>         {
>  Toast.makeText(Login.this,"error",Toast.LENGTH_LONG).show();
> }
>  }
> });

> }

>  public static String[] getarray(SoapObject soap)
>     {
>         String[] categories = new String[soap.getPropertyCount()];
>         for (int i = 0; i < categories.length; i++)
>         {
>         categories [i] = soap.getProperty(i).toString();
>          }
>         return categories;
>     }

> }

> On Thu, Aug 16, 2012 at 8:09 PM, JP <Joachim.Pfeif...@gmail.com> wrote:

>> This looks to me like you're trying to skin existing code over the
>> Android platform?
>> In my experience, DOM (tree parsing in general) isn't so great in the
>> mobile environment as you have to load the tree structure up front to get
>> to that last piece of data that you actually might be interested in.
>> In an ideal world, you would probably want to break this down and
>> implement the web services and SOAP elements on a web server. Your mobile
>> app then queries this web server through small interactions. Using stream
>> parsing and perhaps JSON in place of XML.

>> On Thursday, August 16, 2012 3:46:32 PM UTC+2, Rajan wrote:

>>> i am trying to fetch the record from the SOAP web service but due to
>>> larger xml size i didn't get the proper output,
>>> here i'm putting my code as well as logcat entry.

>>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en

> --
> --
> .                 \\\///
> .               /        \
> .               | \\   // |
> .             ( | (.) (.) |)
> ----------o00o--(_)--o00o-----------------

> "Yesterday is not ours to recover, but
> tomorrow is ours to win or to lose."

> -----------ooo0-------------------------------
> .           (   )   0ooo
> .            \ (      (   )
> .             \_)     ) /
> .                    (_/

> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.