handling SOAP and REST requests