same problem with me, if u have any solution then plz send to me..
mail id:[email protected]
thanks
On Friday, August 17, 2012 2:15:12 PM UTC+5:30, Rajan wrote:
>
> I am getting this kind of response
> *
> -----------------------------------------------------------------------------------------------------------------------------
> *
> anyType{NewDataSet=anyType{Table=anyType{AdSpaceID=423;
> AdspaceName=Hoarding at football, (Amul);
> Address=football,(Amul)-Ahmedabad; }; Table=anyType{AdSpaceID=424;
> AdspaceName=Hoarding at football, tow. Bhulabhai.(Amul); Address=football,
> tow. Bhulabhai.(Amul)-Ahmedabad; }; Table=anyType{AdSpaceID=425;
> AdspaceName=Hoarding at Bhulabhai 4 Road Junction; Address=Bhulabhai 4 Road
> Junction-Ahmedabad; }; Table=anyType{AdSpaceID=426; AdspaceName=Hoarding at
> Bhulabhai Park, Tow. S.T. Stand; Address=Bhulabhai Park, Tow. S.T.
> Stand-Ahmedabad; }; Table=anyType{AdSpaceID=427; AdspaceName=Hoarding at
> Bhulabhai Park,Tow. Maninagar & Shah- Alam; Address=Bhulabhai
> Park,-Ahmedabad; }; Table=anyType{AdSpaceID=428; AdspaceName=Hoarding at
> Foot-ball Ground, Tow. Apsara Aradhana Cinema & tow. Bhulabhai;
> Address=Foot-ball Ground, Tow. Apsara Aradhana Cinema & tow.
> Bhulabhai-Ahmedabad; }; Table=anyType{AdSpaceID=429; AdspaceName=Hoarding
> at Khokhra circle.Shivam foot; Address=Khokhra circle,Shivam
> foot-Ahmedabad; }; Table=anyType{AdSpaceID=430; AdspaceName=Hoarding at
> Khokhra circle,Shivam foot; Address=Khokhra circle,Shivam foot-Ahmedabad;
> }; Table=anyType{AdSpaceID=431; AdspaceName=Hoarding at Khokhra circle;
> Address=Khokhra circle-Ahmedabad; }; Table=anyType{AdSpaceID=432;
> AdspaceName=Hoarding at Khokhra Bridge, Rly. Yard,; Address=Khokhra Bridge,
> Rly. Yard,-Ahmedabad; }; Table=anyType{AdSpaceID=433; AdspaceName=Hoarding
> at Rly. Yard,; Address=Khokhra Bridge, Rly. Yard,-Ahmedabad; };
> Table=anyType{AdSpaceID=434; AdspaceName=Hoarding at O/B Tow.Sraspur;
> Address=O/B Tow.Sraspur-Ahmedabad; }; Table=anyType{AdSpaceID=435;
> AdspaceName=Hoarding at Nr. Six road junction,near kalupur darwaja;
> Address=Nr. Six road junction,near kalupur darwaja-Ahmedabad; };
> Table=anyType{AdSpaceID=436; AdspaceName=Hoarding at kalupur circle,;
> Address=kalupur circle,-Ahmedabad; }; Table=anyType{AdSpaceID=437;
> AdspaceName=Hoarding at near prem darwaja; Address=near prem
> darwaja-Ahmedabad; }; Table=anyType{AdSpaceID=438; AdspaceName=Hoarding at
> law garden circle; Address=law garden circle-Ahmedabad; };
> Table=anyType{AdSpaceID=439; AdspaceName=Hoarding at law garden circle;
> Address=law garden circle-Ahmedabad; }; Table=anyType{AdSpaceID=440;
> AdspaceName=Hoarding at ritz hotel; Address=opp ritz hotel-Ahmedabad; };
> Table=anyType{AdSpaceID=441; AdspaceName=Hoarding at Jawahar chowk;
> Address=Jawahar chowk-Ahmedabad; }; Table=anyType{AdSpaceID=442;
> AdspaceName=Hoarding at Jawahar chowk; Address=Jawahar chowk-Ahmedabad; };
> Table=anyType{AdSpaceID=443; AdspaceName=Hoarding at Nr. Rambaug;
> Address=Nr. Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=444;
> AdspaceName=Hoarding at Rambaug; Address=Nr. Rambaug-Ahmedabad; };
> Table=anyType{AdSpaceID=445; AdspaceName=Hoarding at Rambaug;
> Address=Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=446;
> AdspaceName=Hoarding at Nr. Rambaug; Address=Nr. Rambaug-Ahmedabad; };
> Table=anyType{AdSpaceID=447; AdspaceName=Hoarding at Nr. Bhulabhai
> Park,Above Chaitanya Medical Stores; Address=Nr. Bhulabhai Park,Above
> Chaitanya Medical Stores-Ahmedabad; }; Table=anyType{AdSpaceID=448;
> AdspaceName=Hoarding at Railway colony; Address=Railway colony-Ahmedabad;
> }; Table=anyType{AdSpaceID=449; AdspaceName=Hoarding at gautam nagar;
> Address=gautam nagar-Ahmedabad; }; Table=anyType{AdSpaceID=450;
> AdspaceName=Hoarding at gautam nagar; Address=gautam nagar-Ahmedabad; };
> Table=anyType{AdSpaceID=451; AdspaceName=Hoarding at pushp kunj;
> Address=pushp kunj-Ahmedabad; }; Table=anyType{AdSpaceID=452;
> AdspaceName=Hoarding at Maninagar o/b; Address=Maninagar o/b-Ahmedabad;
> }; Table=anyType{AdSpaceID=453; AdspaceName=Hoarding at gor no kuva;
> Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=454;
> AdspaceName=Hoarding at gor no kuva; Address=gor no kuva-Ahmedabad; };
> Table=anyType{AdSpaceID=455; AdspaceName=Hoarding at gor no kuva;
> Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=456;
> AdspaceName=Hoarding at 4 road jnc.; Address=4 road jnc.-Ahmedabad; };
> *
> -----------------------------------------------------------------------------------------------------------------------------
> *
> *
> *
> *so how can i parse it...*
> *===============================================================*
> *
> *
> On Fri, Aug 17, 2012 at 12:42 PM, Rajan Thakrar
> <[email protected]<javascript:>
> > wrote:
>
>> Ohh! I am so sorry krishana, i have tried your code and it is working
>> perfectly, but now i got the output that is neither XML nor JSON (output
>> is available in Dataset). so what can i do ? How can i parse the response
>> data.
>>
>>
>> On Fri, Aug 17, 2012 at 11:14 AM, Rajan Thakrar
>> <[email protected]<javascript:>
>> > wrote:
>>
>>> 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
>>> <[email protected]<javascript:>
>>> > 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 <[email protected]<javascript:>
>>>> > 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
>>>>> [email protected]<javascript:>
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected] <javascript:>
>>>>> 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
>>>> [email protected]<javascript:>
>>>> To unsubscribe from this group, send email to
>>>> [email protected] <javascript:>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/android-developers?hl=en
>>>>
>>>
>>>
>>>
>>> --
>>> .
>>>
>>
>>
>>
>> --
>> .
>>
>
>
>
> --
> .
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en