Great solution. I implemented it with no problem and have pasted the code below for the rest of the user community.
Thanks for your help!
[begin code]
// This service calls a customer’s outbound mapping service by using the customer’s name to build the namespace of the flow.
// IMPORTS
// com.wm.app.b2b.server.Service
// INPUTS
// customerName – the name of the customer
// OUTPUTS
// errorMessage – used only when the service fails, the exception message is written to this string
// pipeline
IDataHashCursor pipelineCursor = pipeline.getHashCursor();
pipelineCursor.first( “customerName” );
String customerName = (String) pipelineCursor.getValue();
// Set the interface namespace
String intf = customerName;
// Build the flow namespace
String srv = “manage” + customerName + “OutboundMap”;
try {
Service.doInvoke(intf, srv, pipeline);
}
catch (Exception e) {
String err = e.getMessage();
IDataHashCursor pipelineCursor2 = pipeline.getHashCursor();
pipelineCursor2.last();
pipelineCursor2.insertAfter( “errorMessage”, err );
pipelineCursor2.destroy();
}
[end code]
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services