Ask a Question

web service complex retrun values

SOLVED
NisHera
Valued Contributor

web service complex retrun values

I have a web service response like below

<soap:Body>
      <IsEmployee_TerminatedResponse xmlns="........../">
         <IsEmployee_TerminatedResult>
            <Key>0</Key>
            <Value>False</Value>
         </IsEmployee_TerminatedResult>
      </IsEmployee_TerminatedResponse>
   </soap:Body>

I can get Key or Value simply by using ...

function test(){
  var pqr = WebServices.MySoupService.IsEmployee_Terminated(15);
  Log.Message(pqr.Value)
} 

But how could I get values below response

   <soap:Body>
      <getContactPhoneResponse xmlns="......">
         <getContactPhoneResult>
            <Key>0</Key>
            <Value>Success</Value>
         </getContactPhoneResult>
         <list/>
      </getContactPhoneResponse>
   </soap:Body>

 can not do as below since there is a List Node also in response..

function test2(){
  var ABC = WebServices.MySoupService.getContactPhone(15);
  Log.Message(ABC.Value);
} 

any help appreciate...

1 ACCEPTED SOLUTION

Accepted Solutions
NisHera
Valued Contributor

Re: web service complex retrun values

3 REPLIES 3
AlexKaras
Community Hero

Re: web service complex retrun values

Hi,

 

Can you post here a screenshot of the TestComplete's Web Service Editor that will demonstrate how the response for the getContactPhone() method is recognized by TestComplete ?

Also, have you tried to Inspect the ABC variable after the

var ABC = WebServices.MySoupService.getContactPhone(15);

call? Any hint from Inspector?

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
NisHera
Valued Contributor

Re: web service complex retrun values

Hi,

 ABC is undefined.....which mean you could not assigned to single variable 

tried to assign  to a function with two in variables no luck...! Man Frustrated

 

Capture.PNG

NisHera
Valued Contributor

Re: web service complex retrun values

cancel
Showing results for 
Search instead for 
Did you mean: