In addition to referring you to the thread Ed just referred you to,
I'll specifically highlight:

toString() does not do what you think it does. Yes, it returns a
string. No, it does not extract some string (just which string,
anyway???) from the response.

SOAP responses are complex XML structures. You are going to need to
study the KSOAP2 API, and the web service in question, and figure out
how you will obtain the specific information from the response that
represents 'hazards'.

It's not terribly difficult, but you're asking for it to magically
guess which string out of possibly many. And you're using
Object.toString() to do it.

On Aug 13, 9:39 am, "Tommy" <droi...@gmail.com> wrote:
> Hi everyone,
>
>   I have a strange issue. I am using KSOAP2 to create a soap request
> to a .net webservice. I do this in a few other places and everything
> works fine.
>
> The webservice basically queries a data base and takes the values from
> the data reader and creates a string. This string is then returned.
> When I run the webservice on my local machine(Without using android)
> it works fine. When I run it from the webserver (still not android) it
> works fine. When I call it from my phone however the line:
>
> String hazards = (String)envelope.getResponse().toString(); //Get
> response from .net Web service
>
> Simply is filled with anyType{}.
>
> Now if I go to the webservice and I manually type in the contents from
> the database to represent what the string concatenation should be it
> works perfectly. The line:
>
> String hazards = (String)envelope.getResponse().toString(); //Get
> response from .net Web service
>
> Now returns the string value i need.
>
> Does anyone have any idea why this is happening or know a better place
> to ask this question?
>
> As always thanks for your time and help
>
> --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to