java - Retrieve Class Object from SOAP envelope? -


i have web service returns single class object me database query.. know how retrieve property soapobject but, property contains object. so, example if use:

soapobject resultsrequestsoap = (soapobject) envelope.bodyin;         object obj = resultsrequestsoap.getproperty("return"); 

the objects entire value is: "contacts{ id=value, username=value, location=value, date=value}"

the problem is: can't unless want break string using "split". need know how object out of envelope or soapobject types , values can work with. appreciated. can post source code if needed, don't think it's necessary such small problem.

edit: when "watch" soapobject breakdown is: object has property named "return" property has value named "contacts". value 4 properties values need. hope helps.

it sounds return nested soap object? i'm not familiar particular library, work?

soapobject resultsrequestsoap = (soapobject) envelope.bodyin; soapobject returnobj = (soapobject)resultsrequestsoap.getproperty("return"); integer id = integer.valueof(returnobj.getproperty("id"); string username = (string)returnobj.getproperty("value"); ... 

if put breakpoint there somewhere, should able inspect objects figure out type are, , casting necessary.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -