SOAPUI MockServiceRunner on Linux Without X Config

- - posted in Technical | Tagged as Soapui,XServer,Xming | Comments


After I struggled for this problem, I am going to keep it for my refrence. As the title says, We will see in the post how to run a SoapUI MockService on a (X)nix box without needing to start the X Server Configuration .

SOAPUI - Installing on Linux/Unix


64-bit systems - prerequisite

Make sure that you have Java (JRE) installed on your system


  1. Download the Linux binary zip (no JRE) from
  2. Unzip it into a preferable directory such as your home folder or /opt
  3. Make sure that you have proper permissions on the unziped soapUI folder
  4. Go into the folder and run $bin/ (open source) or $bin/ (Pro)

Mock Services


Running your MockServices from the command-line is equally simple; use the bundled mockrunner.bat/.sh file with the following arguments:

   m : The name of the MockService to run  
   p : The local port to listen on, overrides the port configured for the MockService  
   a : The local path to listen on, overrides the path configured for the MockService  
   b : Turns off blocking when mockRunner has been started, which is required when wanting to run the MockServiceRunner with (for example) nohup or as a Windows Service  
   s : The soapui-settings.xml file to use  
   x : Sets project password for decryption if project is encrypted  
   v : Sets password for soapui-settings.xml file   
   D : Sets system property with name=value  
   G : Sets global property with name=value  
   P : Sets project property with name=value  
   S : Saves the project after running the mockService(s)  
   f : Sets the output folder to export results to ( soapUI Pro only )  
   o : Opens the Coverage Report in a browser (with the -g option) ( soapUI Pro only )  
   g : Sets the output to include Coverage HTML reports ( soapUI Pro only )  

The distribution contains a mockservicerunner.bat script for running MockServices in the bin directory, for example;

mockservicerunner.bat -m"IOrderService MockService" "C:\demo2-soapui-project.xml"

Runs the specified MockService as follows: alt

Which can now be invoked from soapUI or any other client. Terminate the runner by pressing the return key in the console, which will shutdown as follows:


MockServiceRunner without X configuration


When trying to use in Linux/Solaris, you may get an error because of the X windows configuration.

alt Can\'t connect to X11 window server using \'\' as the value of the DISPLAY variable.


alt X connection to localhost:10.0 broken(explicit kill or server shutdown)

If you want to know is how to use the in a manner that it does not need an X configuration. After all, why does need an X configuration ? The main reason for executing it in a command line is to avoid that.

If you find any of the errors above adding the java.awt.headless

i.e ../soapui-project.xml -Djava.awt.headless=true   

alt mockservice-sucess

Use xming, xshell to display linux gui to windows desktop (x11 forwarding)


Download xming, install it on your windows pc system. You can go to to download.

After installation xming on your windows, log in linux/solaris server Set environment variable DISPLAY to the ip address of your windows, and append a :0 to it:

export DISPLAY=

Then you must allow X11 forwarding in sshd configuration file. That is, set X11Forwarding to yes in /etc/ssh/sshd_config and restart your sshd daemon.

After this, you need set to the allowed server list on your windows. Edit X0.hosts which locates at the installation directory of xming(For example, C:\Program Files\Xming\X0.hosts), add a new entry in it:, the ip address of linux/solaris that you want to run x11 utility from.

Then, restart xming on your windows. And on solaris/linux server(, run a X11 programe, like

/usr/openwin/bin/xclock &

You will then see a clock gui pop up in your windows pc.

Voila, You are done.

"All credits & kudos to the concerned websites and the users who have documented these resolutions."

Gravatar of Ashwani Kumar

Recent posts


Your Feedback encourages me

Learning and Developments

One Month Rails

, 2FA, AWS AWS, Active Authenticator Directory, Facebook Flash, Forwarding, GOD,Chat,Coffee Github,Feedback,Repo Google Google,Search HAProxy, IOT, IP-block JQuery LetsEncrypt Load MQ MQTT, Messaging Octopress Octopress, OpenVpn OpenVpn, PI, Plugin Plugin, Port Raspberry, S3, SSH, Shell,Commands Soapui, Tag Tag, Tree, Tunneling XML XML, XServer, Xming ajax, angular, animated architecture architecture, azure balancing cloud, commenting, connectivity datapower datatables diagrams diaspora dropdown geocoding grep, hashicorp, ipaddress, ipv6, java, java,python mysql nokogiri, octopress-migration octopress-plugin openapi, openssl powershell proxy rails, repo reviews ruby, script scripts, security, sharepoint shell spring springboot, ssh, swagger, telnet, vault vi, vieditor vim, visualblock, webattacks windows,cleanup windowsxp