public function resolve(Request $request, Response $response)
 {
     if (!$this->canResolve($request)) {
         throw new MethodNotFoundException($request->getMethodOwner() . '.' . $request->getMethodName());
     }
     $solution = $this->target->getSolution($request->getMethodParams());
     $response->setReturnValue(new ReturnValue($solution, Types::STRING));
 }
 public function resolve(Request $request, Response $response)
 {
     if (!$this->canResolve($request)) {
         throw new MethodNotFoundException($request->getMethodOwner() . '.' . $request->getMethodName());
     }
     $methodName = $request->getMethodName();
     try {
         $result = $this->target->{$methodName}($request);
         if ($result != null) {
             $response->setReturnValue($result);
         }
     } catch (InvalidSignatureException $e) {
         $response->setFault(FaultCodes::INVALID_METHOD_PARAMS, $e->getMessage());
     } catch (InvalidParameterException $e) {
         $response->setFault(FaultCodes::INVALID_METHOD_PARAMS, $e->getMessage());
     }
 }
 public function resolve(Request $request, Response $response)
 {
     if (!$this->canResolve($request)) {
         throw new MethodNotFoundException($request->getMethodOwner() . '.' . $request->getMethodName());
     }
     $methodName = $request->getMethodName();
     $params = $request->getMethodParams();
     try {
         MethodUtils::checkSignature($this->methodInfo[$methodName], $params);
         $result = call_user_func_array(array($this->target, $methodName), $params);
         if ($result != null) {
             $response->setReturnValue(new ReturnValue($result));
         }
     } catch (InvalidSignatureException $e) {
         $response->setFault(FaultCodes::INVALID_METHOD_PARAMS, $e->getMessage());
     } catch (InvalidParameterException $e) {
         $response->setFault(FaultCodes::INVALID_METHOD_PARAMS, $e->getMessage());
     }
 }