Unable to get response for Rest service in Soap UI

Hi All,

There is a requirement in our project to create restful services and currently i have developed a sample service to test the working as I am new to REST. The version of wM is 9.12 and we are using SOAP UI version 5.2.1 to test the service.I am able to get the result using the REST client but unable to get the result in SOAP UI.I have used ‘get’ method when developing .But in SOAP UI when i try to give method as GET, i get the below error response:’

Wed Dec 07 15:42:07 IST 2016:INFO:Error getting response for [http://localhost:5555.Sample:Request 1]; org.apache.http.client.ClientProtocolException

When i put the method as ‘POST’

it shows as Wed Dec 07 15:50:53 IST 2016:INFO:Got response for [http://localhost:5555.Sample:Request 1] in 14ms (0 bytes).

But i am unable to see any response in the console.When i try a simple add integer service i am able to see the result but we require the JSON as well in the output.I have used the service inbuilt servuce document to json string to convert the result to json and have added the response codes as well.

Can someone please let me know if there is any other configuration that needs to be done for SOAP UI because i am able to get the result as well the JSON output in REST client,but require the output in SOAP UI for project need.

Thanks.
Swaathi

Please paste the “RAW” request and response from SOAP UI.It may help in identifying the issue.

Hi Prasad,

Thanks ,but now i am able to get the response in SOAP UI.The Response code hardcoded was the problem ,when it was changed was able to get the proper response.