Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
16 years ago

How to create a mock service for testing with WADL

Hey there,
I have a bunch of REST test cases and I would like to have a mock service to test.

After I created a Mockservices from the Project popup menu,
I tried to select "add Endpoint to Interface.
I always got a empty list  and unable to select a endpoint I have.
Can you help me with that please?
  • Hi Ali,

    Mock Services are currently for SOAP interfaces only, if you want to mock REST responses you would have to resort to the docroot feature of the MockService (ie by specifying a folder containing static responses) or alternatively by implementing an onRequest script that returns the desired response.

    Hope this helps,

    regards!

    /Ole
    eviware.com
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    I managed this by creating a dummy WSDL, then a Mock Service which wraps the REST request in the appropriate SOAP envelope. A bit of a chore but it works.

    I would like to see Mock Services that will support REST and also simple HTTP requests, but one can't have everything
  • Hi!

    Proper REST mocking (and recording) is very high on our list.. any year now..

    regards!

    /Ole
    eviware.com
  • Beno_Iskratel's avatar
    Beno_Iskratel
    Frequent Contributor
    eviware support wrote:
    Hi!

    Proper REST mocking (and recording) is very high on our list.. any year now..

    regards!

    /Ole
    eviware.com



    still just on a list, heh?