I can only help you this much.. have done some CGI programming with PERL looong time ago..
assuming there is already a request originating from your provisioning system.. you can write a gateway program on the "other side" (server side)
check
here and
here
to give an overview on this.. when a request comes to the web server on the server side the web server would invoke some script based on the url
pattern usually
containing the part cgi-bin..
the script in turn would invoke your java program.. has a multi process model in contrast to modern request handling methods such as
servlets which operate on a multi threading model...
and for each process spawned, environment variables would be set and the program would operate using these environment variables..