There are already exists
Common Gateway Interface (CGI)
Multipurpose Internet Mail Extension (MIME)
XML-Remote Procedure Call (XML-RPC)
Simple Object Access Protocol (SOAP)
Web Services Description Language (WSDL)
Resource Description Framework (RDF)
just bring them together.
Why not describe command line or Web interface of the services in the RDF or WSDL instead of pathing existing programs? That is UNIX way.