SimpleTargetedChain stc = new SimpleTargetedChain();
V2DDProvider prov = service.getProvider();
String[] methods = prov.getMethods();
BasicProvider provider = null;
if (prov instanceof V2DDComProvider) provider = new ComProvider();
if (prov instanceof V2DDScriptProvider) provider = new BSFProvider();
// ROBJ 911 -- this will need to be fixed now that JavaProvider really
// exists! But I am not sure of the intended semantics here. Nor am
// I sure whether any test code exists for this...?!?!
if (provider == null) provider = new RPCProvider();
provider.setOptions(prov.getOptionsTable());
prov.newInstance(provider);
for (int n = 0; n < methods.length; n++) {
provider.addOperation(methods[n],
new QName(V2DDConstants.V2DD_NS,
methods[n]));
}
return provider;