Forum Discussion
Sure, you can just use Groovy Strings to do that:
String port = "8089" def get = new URL("http://localhost:${port}/budg/inforeuro/api/public/monthly-rates").openConnection()
As for where to set the value for 'port', why not read it directly from the MockService itself?
String port = context.expand('${=project.getRestMockServiceByName("MockService").port}') def get = new URL("http://localhost:${port}/budg/inforeuro/api/public/monthly-rates").openConnection()
Nice, thank you for the reply! I din't know how to pass this variable from one service to another.
From SoapUI seems to working, when I change from MockService Preferences the Port to "5555" then the MockProxy is running successfully.
But, is there any reason why this is not working from command line? I use this:
./mockservicerunner.sh -m "MockService" -p "5555" "/home/oracle/InfoEuro_WS_Mock.xml"
and after that, in a different command line tab, I use this:
./mockservicerunner.sh -m "MockProxy" "/home/oracle/InfoEuro_WS_Mock.xml"
but I am getting a connection refuse exception.
If I do not change the port of the service (-p "5555"), both services work fine.
Related Content
- 12 years ago
- 10 months ago
Recent Discussions
- 2 days ago
- 2 days ago