Forum Discussion

dpayne1's avatar
14 years ago

-b option does not work in mockservicerunner.bat

When I run mockservicerunner.bat with the -b option, it starts the service, but then exits immediately (mockservicerunner.bat -b -m "mockservicename" projectname.xml). It did this in soapui 3.6.1 and now it also does the same thing in soapui 4.0.0.

I would expect the -b option to remove the prompt, but let the mock service keep running.

15:47:50,448 DEBUG [AbstractDefinitionContext] Loaded Definition: ok
15:47:50,480 INFO [WsdlMockRunner] Mounted WSDL for interface [AssemblyPlantBui
ldSchedule_ControlsSOAP] at [/mockAssemblyPlantBuildSchedule_ControlsSOAP?WSDL]
15:47:50,573 INFO [JettyMockEngine] Started mockService [AssemblyPlantBuildSche
dule_ControlsSOAP MockService] on port [8088] at path [/mockAssemblyPlantBuildSc
hedule_ControlsSOAP]
15:47:50,573 INFO [SoapUIMockServiceRunner] MockService started on port 8088 at
path [/mockAssemblyPlantBuildSchedule_ControlsSOAP]
15:47:50,573 INFO [SoapUIMockServiceRunner] Started 1 runner
<<<<<<<<<<<<<<<<<<<<<<<<<< Note: Normally, the "Press any key" text goes here when -b is not used.
15:47:50,573 INFO [SoapUIMockServiceRunner] time taken: 571ms
  • jlee49's avatar
    jlee49
    New Contributor
    I'd like to confirm this is still an issue in SoapUI 4.5.1 Pro.

    The process is as follows:

    1. Create and save a MockService in SoapUI.
    2. Attempt to run from the command line:
    mockservicerunner.bat -m"SERVICE" -b "soapui-project.xml"

    Result:

    14:27:44,479 INFO [WsdlMockRunner] Mounted WSDL for interface [INTERFACE] at [WSDL]
    14:27:44,808 INFO [JettyMockEngine] Started mockService [SERVICE] on
    port [8088] at path [PATH]
    14:27:44,812 INFO [SoapUIProMockServiceRunner] MockService started on port 8088
    at path [PATH]
    14:27:44,813 INFO [SoapUIProMockServiceRunner] Started 1 runner
    14:27:44,814 INFO [SoapUIProMockServiceRunner] time taken: 5407ms

    netstat confirms:
    TCP 0.0.0.0:1198 0.0.0.0:0 LISTENING
    TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<--------NO ENTRY HERE--------
    TCP 0.0.0.0:42599 0.0.0.0:0 LISTENING

    If I run mockservicerunner like so:
    mockservicerunner.bat -m"SERVICE" "soapui-project.xml", there are no problems.

    netstat confirms:
    TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING
    TCP 0.0.0.0:8088 0.0.0.0:0 LISTENING
    TCP 0.0.0.0:42599 0.0.0.0:0 LISTENING

    I am attempting to run multiple MockServices through the mockservicerunner.bat by executing the .bat multiple times in the same command window. These MockServices share the same SSL port through SoapUI's preferences. For the record, using mockservicerunner without the -b also works for the SSL MockService, but with -b still doesn't. Please advise.