Turns method calls on this object into remote SOAP calls.
336415
def method_missing(method, *args)
      unless args.size == 1 && [Hash, Array].include?(args[0].class)
        raise 'Expected 1 Hash or Array argument'
      end

      call_remote method, args[0]
    end
355164
def method_call(receiver, message, args, pseudo_type=None):
    ''''''

    if not isinstance(receiver, Node):
        receiver = local(receiver)
    return Node('method_call', receiver=receiver, message=message, args=args, pseudo_type=pseudo_type)
578138
def setUpMethods(self, port):
        '''
        '''
        assert isinstance(port, WSDLTools.Port), \
            'expecting WSDLTools.Port not: ' %type(port)

        binding = port.getBinding()
        portType = port.getPortType()
        service = port.getService()
        s = self._services[service.name]
        for bop in binding.operations:
            try:
                op = portType.operations[bop.name]
            except KeyError, ex:
                raise WsdlGeneratorError,\
                    'Port(%s) PortType(%s) missing operation(%s) defined in Binding(%s)' \
                    %(port.name, portType.name, op.name, binding.name)

            soap_action = wsaction_in = wsaction_out = None
            if op.input is not None:
                wsaction_in = op.getInputAction()
            if op.output is not None:
                wsaction_out = op.getOutputAction()

            for ext in bop.extensions:
                if isinstance(ext, WSDLTools.SoapOperationBinding) is False: continue
                soap_action = ext.soapAction
                if not soap_action: break
                if wsaction_in is None: break
                if wsaction_in == soap_action: break
                if self.strict is False:
                    warnings.warn(\
                        'Port(%s) operation(%s) in Binding(%s) soapAction(%s) != WS-Action(%s)' \
                         %(port.name, op.name, binding.name, soap_action, wsaction_in),
                    )
                    break
                raise WsdlGeneratorError,\
                    'Port(%s) operation(%s) in Binding(%s) soapAction(%s) MUST match WS-Action(%s)' \
                     %(port.name, op.name, binding.name, soap_action, wsaction_in)

            method_name = self.getMethodName(op.name)

            m = s.newMethod()
            print >>m, '%sdef %s(self, ps, address):' %(self.getIndent(level=1), method_name)
            
            msgin_name = msgout_name = None
            msgin,msgout = op.getInputMessage(),op.getOutputMessage()
            if msgin is not None: 
                msgin_name = TextProtect(msgin.name)
            if msgout is not None: 
                msgout_name = TextProtect(msgout.name)
        
            indent = self.getIndent(level=2)
            for l in self.createMethodBody(msgin_name, msgout_name):
                print >>m, indent + l

            print >>m, ''
            print >>m, '%ssoapAction[\'%s\'] = \'%s\'' %(self.getIndent(level=1), wsaction_in, method_name)
            print >>m, '%swsAction[\'%s\'] = \'%s\'' %(self.getIndent(level=1), method_name, wsaction_out)
            print >>m, '%sroot[(%s.typecode.nspname,%s.typecode.pname)] = \'%s\'' \
                     %(self.getIndent(level=1), msgin_name, msgin_name, method_name)
1156245
public SoapClient setMethod(String methodName) {
		return setMethod(methodName, ObjectUtil.defaultIfNull(this.namespaceURI, XMLConstants.NULL_NS_URI));
	}
1211381
def call(method, *args, **kwargs):
    '''
    
    '''
    kwargs = clean_kwargs(**kwargs)
    if not netmiko_device['always_alive']:
        connection = ConnectHandler(**netmiko_device['args'])
        ret = getattr(connection, method)(*args, **kwargs)
        connection.disconnect()
        return ret
    return getattr(netmiko_device['connection'], method)(*args, **kwargs)
164763
def call(self, callname, arguments=None):
        """"""
        # See if a method override exists
        action = getattr(self.api, callname, None)
        if action is None:
            try:
                action = self.api.ENDPOINT_OVERRIDES.get(callname, None)
            except AttributeError:
                action = callname

        if not callable(action):
            request = self._generate_request(action, arguments)
            if action is None:
                return self._generate_result(
                    callname, self.api.call(*call_args(callname, arguments)))
            return self._generate_result(
                callname, self.api.call(*call_args(action, arguments)))

        request = self._generate_request(callname, arguments)
        return self._generate_result(callname, action(request))
1254097
def build_request(method, options)
      builder  = underscore("build_#{method}")
      self.respond_to?(builder) ? self.send(builder, options) :
                                  soap_envelope(options).target!
    end
1128633
def BuildService(self, cls):
    

    # CallMethod needs to operate with an instance of the Service class. This
    # internal wrapper function exists only to be able to pass the service
    # instance to the method that does the real CallMethod work.
    def _WrapCallMethod(srvc, method_descriptor,
                        rpc_controller, request, callback):
      return self._CallMethod(srvc, method_descriptor,
                       rpc_controller, request, callback)
    self.cls = cls
    cls.CallMethod = _WrapCallMethod
    cls.GetDescriptor = staticmethod(lambda: self.descriptor)
    cls.GetDescriptor.__doc__ = "Returns the service descriptor."
    cls.GetRequestClass = self._GetRequestClass
    cls.GetResponseClass = self._GetResponseClass
    for method in self.descriptor.methods:
      setattr(cls, method.name, self._GenerateNonImplementedMethod(method))
1337205
public static Object[] call(Method method, Object[][] params,
                              InetSocketAddress[] addrs, Configuration conf)
    throws IOException {
    return call(method, params, addrs, null, conf);
  }
534517
def rpc(method):
    
    @wraps(method)
    def rpc_wrapper(*args, **kwargs):
        controller_instance = args[0]

        if not isinstance(controller_instance, RemoteControllerDeamon):
            raise Exception("'rpc' decorator must use in a RemoteControllerDeamon (-derived) class method!")

        # Decide the call origin: if the current pid is the daemon pid, this is server side,
        # so call registered method. If not, start a jsonrpc request.
        call_from_server = os.getpid() == controller_instance.get_pid()

        logger.debug("Initiate RPC method '%s' in '%s'", method.__name__, 'daemon' if call_from_server else 'cli')

        if call_from_server:
            return method(*args, **kwargs)
        else:
            url = "http://{}:{}/jsonrpc".format(controller_instance.host, controller_instance.port)
            headers = {'content-type': 'application/json'}

            payload = {
                "method": method.__name__,
                "params": kwargs,
                "jsonrpc": "2.0",
                "id": 0,
            }
            try:
                response = requests.post(url, data=json.dumps(payload), headers=headers).json()
                if 'result' in response:
                    return response['result']
                else:
                    logger.error("There is an error during rpc call. Response:\n%s", json.dumps(response, indent=4))
                    return "Error: {}. (see logs for details)".format(response['error']['message'])
            except requests.exceptions.ConnectionError as e:
                logger.error("Command server not runnning (%s), args: %s, kwargs: %s", e, args, kwargs)
                return None

    rpc_wrapper.registered_for_rpc = method
    return rpc_wrapper
1085386
private void invoke(Method method, Object instance, Object[] params) throws SlickXMLException {
		try {
			method.setAccessible(true);
			method.invoke(instance, params);
		} catch (IllegalArgumentException e) {
			throw new SlickXMLException("Failed to invoke: "+method+" for an XML attribute, is it valid?", e);
		} catch (IllegalAccessException e) {
			throw new SlickXMLException("Failed to invoke: "+method+" for an XML attribute, is it valid?", e);
		} catch (InvocationTargetException e) {
			throw new SlickXMLException("Failed to invoke: "+method+" for an XML attribute, is it valid?", e);
		} finally {
			method.setAccessible(false);
		}
	}
1174931
def call_webservice(method_name, arguments, schema_url, service_path)

      # Perform the call to the webservice and returns the result
      Operations::WebserviceCall.new(@rforce_binding, method_name, arguments, schema_url, service_path).run()

    end
90363
public void call(final T request, final Functor<String, RemoteService.Response> process) {
        call(request, process, null);
    }
886860
public Object call(Map<String, ?> params) throws Throwable {
    return AnnotatedExtensions.exec(getCallMethod(), getParameterNames(), params, this);
  }
1345466
public function __soapCall($methodName, $arguments, $options = null, $inputHeaders = null, &$outputHeaders = null)
    {
        if ($this->isFinancialMethod($methodName, $arguments)) {
            $usedMethod = $methodName;

            if ($methodName === 'AccountManagement') {
                $usedMethod .= $arguments[0]->getAction();
            }

            $operationNum = time();
            $financeToken = $this->user->createFinanceToken($usedMethod, $operationNum);

            if (!is_array($inputHeaders)) {
                $inputHeaders = [];
            }

            $inputHeaders[] = new \SoapHeader('API', 'finance_token', $financeToken);
            $inputHeaders[] = new \SoapHeader('API', 'operation_num', $operationNum);
        }

        return parent::__soapCall($methodName, $arguments, $options, $inputHeaders, $outputHeaders);
    }
413484
function Requester() {
		// setup abstract layer
		core.RequesterAbstract.apply(this, arguments);

		// in case the process die, the connection will be severed
		this.object.on('exit', function () {
			if (self.online === true) {
				this.emit('close');
			}
		});

		// just relay message object they do not need to be parsed
		this.object.on('message', this.emit.bind(this, 'message'));

		// when the remote request a method, the methods should exists in .handlers
		var self = this;
		this.handlers.close = function () {
			this.callback();
			self.emit('close');
		};
	}
1337495
public static void callMethod(final Object obj, final String methodName, final boolean includePrivateMehtods, final Object... args)
			throws InvocationTargetException {
		final Class[] intArgsClass = initParamsClasses(args);
		try {
			Class<?> current = obj.getClass();
			Method method = null;
			while (current != Object.class) {
				try {
					method = current.getDeclaredMethod(methodName, intArgsClass);
					break;
				} catch (final NoSuchMethodException ex) {
					current = current.getSuperclass();
				}
			}
			if (method == null) {
				throw new NoSuchMethodException("Mehtod is not found in " + current);
			}
			method.setAccessible(true);
			method.invoke(obj, args);
		} catch (final InvocationTargetException e) {
			throw new InvocationTargetException(e.getCause());
		} catch (final Exception e) {
			throw new InvocationTargetException(e);
		}
	}