Forum Discussion
Hi,
Can you describe your desired scenarion with more details step by step to make it more clear?
> http post request for another service should come
By definition, request is issued by the client to the server. Thus, request cannot be returned. Also note, that http is based on the 'request-response' scheme and they are in the one-to-one relation. I.e. only one response can and must be returned for the given request.
- PriyankaP7 years agoContributor
Hi Alex,
Thanks for your reply,
I need to send a http post request along with the url from SERVICEV PRO. I need groovy script for this requirement.
- AlexKaras7 years agoChampion Level 3
HI,
I am still not sure what you are looking for.
ServiceV is a piece of software that makes it possible to intelligently emulate a web service (web API) and acts as a web server. Which means that it waits for the request from the client, dispatches obtained request according to the designed dispathing scheme and replies with the specified response. I.e. like the regular web server, ServiceV does not send requests but responds to the obtained ones.
You may use any software that is capable to send appropriate requests as a client that sends requests to the service emulated using ServiceV. For example: SoapUI, regular web browser, Swagger Inspector (https://inspector.swagger.io/builder), etc.
- PriyankaP7 years agoContributor
There are my Requirement
Step 1 : Created virtual service for service1
step 2: When hitting from client(soapui) getting response
Step3 : After 5 min from response of Service 1 ,I should get http post request xml for a a service 2 from serviceV PRO
Have tried some scripts in After request script option in ServiceV PRO
EX:
def doGET() {
try {
def http = new HTTPBuilder('http://soundly.me')
http.get( path : '/endpoint', query : [helowrld:'hi!'] )
{ resp ->
return resp.entity.content.text
}
}
catch(groovyx.net.http.HttpResponseException e)
{
println e.toString()
}
}
println 'doGET(): ' + doGET()
But no luck on this
Related Content
Recent Discussions
- 3 days ago