IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Building a message for the CORBARequest node

You can use an XML message for the CORBARequest node, or you can build a message by using another message flow node.

Before you start:

Ensure that you have created and configured a message flow with a CORBARequest node, as described in Developing a message flow with a CORBARequest node.

The CORBARequest node requires an input message. The node can use an XML message from another node, or you can build a message by using a Compute, JavaCompute, or PHPCompute node. If the incoming message has a message model, you can use a Mapping node to build the message to send to the CORBARequest node. The incoming message tree must be in the DataObject domain, and the elements in the tree must match the IDL interface that you are calling. The physical representation of a message in the DataObject domain is XML; therefore, your application constructs message bodies like the following examples.

You can specify the location in the incoming message tree from which data is retrieved to form the request that is sent by the CORBARequest node. Specify this location by using the Data location property on the Request tab. The default value is $Body.

  1. Find out what data needs to be in the body of the message to send to the CORBARequest node.
  2. Specify the top-level element (interface.operationName) for the message that you need to send to the CORBARequest node.
  3. Specify a child for each in and inout parameter. You do not have to pass in a value for out parameters.

The following examples show the XML and ESQL that could be received by a message flow.

A mixture of in inout and out parameters

Here is an example IDL file:
interface 

ExampleOne {
	enum completion{YES, NO, MAYBE};
 	typedef sequence<string> stringlist;
	struct stringobject {string member;};

	string exampleOneOperation(in string inparamA, inout string inoutparamA, out string outparamA);
	completion exampleOneOperationB(in stringlist inparamB, inout stringobject inoutparamB, out completion outparamB);
}
This IDL file contains an interface with two operations, which have an in parameter, an inout parameter, and an out parameter.

For the first operation, exampleOneOperationA, you must pass in the parameters inparamA and inoutparamA under the top-level type ExampleOne.exampleOneOperationA. You do not need to pass in the outparamA parameter.

Here is an XML example:
<ExampleOne.exampleOneOperationA>
	<inparamA>your value</inparamA>
	<inoutparamA>your value</inoutparamA>
</ExampleOne.exampleOneOperationA>
Here is an ESQL example:
SET  
OutputRoot.DataObject."ExampleOne.exampleOneOperationA".inparamA = 'yourvalue';

SET  
OutputRoot.DataObject."ExampleOne.exampleOneOperationA".inoutparamA = 'yourvalue'; 
For the second operation, exampleOneOperationB, you must pass in the parameters inparamB and inoutparamB under the top-level type ExampleOne.exampleOneOperationB. You do not need to pass in the outparamB parameter.
Here is an XML example:
<ExampleOne.exampleOneOperationB>
	<inparamB><item>your value</item></inparamB>
	<inoutparamB><member>your value</member></inoutparamB>
</ExampleOne.exampleOneOperationB>
Here is an ESQL example:
SET  
OutputRoot.DataObject."ExampleOne.exampleOneOperationB".inparamB.item = 'your value';

SET  
OutputRoot.DataObject."ExampleOne.exampleOneOperationB".inoutparamB.member = 'your value'

In and inout parameters only

Here is an example IDL file:
interface 

ExampleTwo {
	enum completion{YES, NO, MAYBE};
	typedef sequence<string> stringlist;
	struct stringobject {string member;};

	string exampleTwoOperationA(in string inparamA, inout string inoutparamA);
	completion exampleTwoOperationB(in stringlist inparamB, inout stringobject inoutparamB);

}
This IDL file contains two operations with an in and inout parameter only. The removal of the out parameter and the existence of only in and inout parameters does not change the parameters that you need to pass in.

To call the first operation, exampleTwoOperationA, pass in inparamA and inoutparamA under the top-level type ExampleTwo.exampleTwoOperationA.

Here is an XML example:
<ExampleTwo.exampleTwoOperationA> 
	<inparamA>your value</inparamA>
	<inoutparamA>your value</inoutparamA>
</ExampleTwo.exampleTwoOperationA>
Here is an ESQL example:
SET  
OutputRoot.DataObject."ExampleTwo.exampleTwoOperationA".inparamA = 'yourvalue';

SET  
OutputRoot.DataObject."ExampleTwo.exampleTwoOperationA".inoutparamA = 'yourvalue'; 
To call the second operation, exampleTwoOperationB, pass in inparamB and inoutparamB under the top-level type ExampleTwo.exampleTwoOperationB.
Here is an XML example:
<ExampleTwo.exampleTwoOperationB>
	<inparamB><item>your value</item></inparamB>
	<inoutparamB><member>your value</member></inoutparamB>
</ExampleTwo.exampleTwoOperationB>
Here is an ESQL example:
SET  
OutputRoot.DataObject."ExampleTwo.exampleTwoOperationB".inparamB.item = 'your value';

SET  
OutputRoot.DataObject."ExampleTwo.exampleTwoOperationB".inoutparamB.member = 'your value';

No parameters or out parameters only

If the operation contains no parameters, or out parameters only, you do not need to put anything in the body of the message. The CORBARequest node does not look at the incoming message.

Next: Process the responses from the CORBARequest, as described in Processing responses from a CORBARequest node.

bc22450_.htm | Last updated Friday, 21 July 2017