Write your new service as a stand-alone script using node type Script.
Within your script, retrieve the request application attribute. This is an XPath Evaluator object that you can use to read the service parameters. Use the application.newServiceResponse() method to return a response.
See Scripting services for more details.