Spec-Zone.ru › ColdFusion

cfinvoke

Does either of the following: * Invokes a component method from within a CFML page or component. * Invokes a web service. Different attribute combinations make some attributes required at sometimes and not at others.

<cfinvoke method="">

cfinvoke(method="");

  • CF6+
  • Lucee
  • BL 1.0.0+
  • See Also: cfinvokeargument createObject cfobject

    Attribute Reference

    component string

    String or component object; a reference to a component, or component to instantiate.

    method string
    Required

    Name of a method. For a web service, the name of an operation.

    returnvariable variableName

    Name of a variable for the invocation result.

    argumentcollection string

    Name of a structure; associative array of arguments to pass to the method.

    username string

    Overrides username specified in Administrator > Web Services

    password string

    Overrides password specified in Administrator > Web Services

    webservice string

    The URL of the WSDL file for the web service.

    timeout numeric

    The timeout for the web service request, in seconds

    proxyserver string

    The proxy server required to access the webservice URL.

    proxyport numeric

    The port to use on the proxy server.

    proxyuser string

    The user ID to send to the proxy server.

    proxypassword string

    The user's password on the proxy server.

    serviceport string

    CF 7+ The port name for the web service. This value is case-sensitive and corresponds to the port element's name attribute under the service element. Specify this attribute if the web service contains multiple ports. Default: first port found in the WSDL.

    refreshwsdl boolean
    Default: false

    CF 8+ * yes: reload the WSDL file and regenerate the artifacts used to consume the web service * no
    Values:
    • true
    • false

    wsdl2javaargs string

    CF 8+ A string that contains a space-delimited list of arguments to pass to the WSDL2Java tool that generates Java stubs for the web services.

    wsVersion string

    CF 10+ Used to specify the version of Apache Axis (web service engine used by CF) to use. Specify 1 for Axis Version 1 or 2 for Axis 2.
    Values:
    • 1
    • 2

    Compatibility

    BoxLang:

    Version 1.0.0+ <bx:invoke> in BoxLang

    Examples
    Sample code using the cfinvoke tag

    Invoke a SOAP webservice using cfinvoke

    Calls a remote web service to perform an addition, uses cfinvokeargument to pass the arguments to the method.

    <cfinvoke webservice="http://soaptest.parasoft.com/calculator.wsdl" method="add" returnvariable="answer">
        <cfinvokeargument name="x" value="2">
        <cfinvokeargument name="y" value="3">
    </cfinvoke>
    <cfoutput>#answer#</cfoutput>

    Expected Result: 5.0

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/cfinvoke

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API