Invoke

An Invoke request/response document executes an IDO method. This method can be code in a custom assembly, or it can be a stored procedure.

Request data

An Invoke request document has this payload structure and contains data such as the collection name, method name, and the method parameter values, which are required to complete the request.

<RequestData>
  <Name>collection</Name>
  <Method>methodname</Method>
  <Parameters>
    <Parameter>parametervalue</Parameter>
    <Parameter>parametervalue</Parameter>
    <Parameter ByRef="Y" />
  </Parameters>
</RequestData>

Response data

An Invoke response document has this payload structure and includes requested data and return values.

<ResponseData>
  <Name>collection</Name>
  <Method>methodname</Method>
  <Parameters>
    <Parameter>parametervalue</Parameter>
    <Parameter>parametervalue</Parameter>
    <Parameter ByRef="Y">parametervalue</Parameter>
  </Parameters>
  <ReturnValue>returnvalue</ReturnValue>
</ResponseData>

Element descriptions

Element Description
Method This is the name of the IDO that contains the method.
Name This is the name of the method being invoked.
Parameter This is the name of a parameter for the method.

This element can contain the ByRef attribute. This attribute is optional. When used, parameters that are marked as ByRef in the IDO metadata are returned in the response, regardless of the ByRef value in the request. If set to Y, the parameter is input/output. If set to N, or if this attribute is omitted, the parameter is input-only.

Note: Parameters should be listed in the order that the method is expecting them. If you use the obsolete Seq attribute, it is ignored.
ReturnValue Used only in the response document, this element contains the return value from the method.

Examples for Invoke

This example request determines the user attributes of user jdoe using the IDO method GetUserAttributes.

<IDORequest ProtocolVersion="6.03" SessionID="bde8caa4-1343-4808-9bca-ed844ffe7129">
  <RequestHeader Type="Invoke">
    <InitiatorType />
    <InitiatorName />
    <SourceName />
    <SourceConfig />
    <TargetName />
    <TargetConfig />
    <RequestData>
      <Name>UserNames</Name>
      <Method>GetUserAttributes</Method>
      <Parameters>
        <Parameter>jdoe</Parameter>
        <Parameter ByRef="Y" />
        <Parameter ByRef="Y" />
        <Parameter ByRef="Y" />
        <Parameter ByRef="Y" />
      </Parameters>
    </RequestData>
  </RequestHeader>
</IDORequest>

This example response contains the user attributes of the user jdoe.

<IDOResponse ProtocolVersion="6.03" SessionID="bde8caa4-1343-4808-9bca-ed844ffe7129">
  <ResponseHeader Type="Invoke">
    <InitiatorType />
    <InitiatorName />
    <SourceName />
    <SourceConfig />
    <TargetName />
    <TargetConfig />
    <ResponseData>
      <Name>UserNames</Name>
      <Method>GetUserAttributes</Method>
      <Parameters>
        <Parameter>jdoe</Parameter>
        <Parameter ByRef="Y">2</Parameter>
        <Parameter ByRef="Y">1</Parameter>
        <Parameter ByRef="Y" />
        <Parameter ByRef="Y" />
      </Parameters>
      <ReturnValue>0</ReturnValue>
    </ResponseData>
  </ResponseHeader>
</IDOResponse>