Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 14
Registered: ‎05-28-2014
My Device: No Device
My Carrier: Idea
Accepted Solution

How to parse object in the soap response in Blackberry

[ Edited ]

I am New to blackberry Develipment.I am developing using Momentics IDE. Now I am working on Soap webservice integration. Now my webservice function call is working. I am getting response also. My webservice response is like,

 

<SignupResponsexmlns="http://shidhints.com/"><SignupResult>
<Success>boolean</Success>
<ErrorOnFailure>string</ErrorOnFailure>
<Token>string</Token>
<NumberofReferral>int</NumberofReferral>
<ListEmails>
<string>string</string>
<string>string</string>
</ListEmails>
</SignupResult>
</SignupResponse>

While parese the responce, Now I can parse and get the Token, NumberofReferral But I cannot parse the ListEmails object. How I can parse this ListEmails, pleasehelp me,

 

const QtSoapMessage& response = m_soap.getResponse();
const QtSoapType& responseValue = response.returnValue();

m_Token
= responseValue["Token"].value().toString(); m_NumberofReferral = responseValue["NumberofReferral"].value().toString();

 

 

Here is my Blogs About Android Development. Please read and share it. http://startandroiddevelopment.blogspot.in/2013/08/how-to-start-android-development.html
Developer
Posts: 16,687
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to parse object in the soap response in Blackberry

use QtSoapArray for that.

i think this could work:
QtSoapArray &emails = (QtSoapArray &) responseValue["ListEmails"];
work with count() and iterate over the array to retrieve the values.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Posts: 14
Registered: ‎05-28-2014
My Device: No Device
My Carrier: Idea

Re: How to parse object in the soap response in Blackberry

the count is the m_NumberofReferral
Here is my Blogs About Android Development. Please read and share it. http://startandroiddevelopment.blogspot.in/2013/08/how-to-start-android-development.html