Forum Discussion

Nagesh's avatar
Nagesh
New Contributor
13 years ago

How to call rest web service using groovy script in Soap UI

Hi,

I am new to groovy script and i want to call rest web service using groovy script in Soap UI, can you please help me on this.

if you have sample code, please send me

Thanks in advance.

Nagesh.

4 Replies

  • kamahade's avatar
    kamahade
    Regular Contributor
    Why do you want to call a REST service in SOAPUI ?

    Do you mean you want to run a REST test ?

    Do you have a WADL file for your REST services ?

    SOAPUI.org have many tutorials to start with..
  • The answers to the questions is Yes.

    I have a similar problem.

    Soapui.org does not provide tutorials for calling REST services by groovy script.

    Can you please let us know.
  • The question why do you want to send HTTP request via Groovy but not REST/HTTP step?

    Is there a specific reason?
  • r3nrut's avatar
    r3nrut
    Occasional Contributor
    I have a SOAP based service that makes a call to a third party REST endpoint. I want to be able to call to the SOAP service, get results and compare the results to results from the REST response as well. Seems that the only way to do this is by making a call to the REST endpoint through a Groovy script unless I'm missing something. When trying to add a REST test step to a SOAP test case I get the following error:

    Wed Aug 08 10:09:08 CDT 2012:ERROR:An error occured [com.eviware.soapui.impl.rest.RestResource cannot be cast to com.eviware.soapui.impl.wsdl.WsdlOperation], see error log for details