Contributions
Re: Override the port of a mock service using a global variable
I think that I answer my question when I was writing it. I have the same script, the one that builds the MockService URL and returns the response, in two places. In MockService level and in Get Currencies level (into the MockService). So maybe, the scripts were running one by one, so the first time, the port was taken. So I was receiving a connection refuse exception. I have retain the script in theGet Currencies level, I hope this is the correct level to have it. And now I am able, using command line to run the service in any port and build dynamically the URL in the MockProxy using the solution you gave me. Thank you for helping, it was the first time I am writing to such a community, I should have done it earlier.2.4KViews1like0CommentsRe: Override the port of a mock service using a global variable
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.2.4KViews0likes0CommentsRe: Override the port of a mock service using a global variable
First of all, thank you for the quick reply. Let me explain what I have and what I want: I have a project like this: and the MockProxy is working as a "proxy" and returns the response of the MockService using this script: The problem is that the MockService Port is set: So I want to override this Mock Service Port=8089 through command line or a property file, and then, in the script, instead of thehttp://localhost:8089/budg/inforeuro/api/public/monthly-ratesuse the overridden port, lets say http://localhost:<port>/budg/inforeuro/api/public/monthly-rates. I don't know if it is possible to override the Port=8089 and then pass it as parameter in the URL. Sorry if I didn't explain it in the first time, and thanks again for the quick reply!2.5KViews0likes0CommentsOverride the port of a mock service using a global variable
Hello everyone, I have created a project with two mock services. In the second mock service I am calling the first mock service using it's URL(I use the second service as a type of proxy). What I need is to "build" this URLusing the port of the first mock service, which I want to be overridden by a global variable maybe. Is that any way to do this? Please help me, as I am stuck at this step for over a week and googling din't provide me any solution. Thank you!2.5KViews0likes5CommentsOverride the port of a mock service using a global variable
Hello everyone, I have created a project with two mock services. In the second mock service I am calling the first mock service using it's url(I use the second service as a type of proxy). What I need is to "build" this url using the port of the first mock service, which I want to be overridden by a global variable maybe. Is that any way to do this? Please help me, as I am stuck at this step for over a week and googling din't provide me any solution. Thank you!596Views0likes0Comments