Hi Jim / Jeremy / Axis2 & Celtix binding folks

Continuing with the simple RMI Binding that I am working on... here are the
things that I have done to move it forward in steps... (from a null inbound
wire to being able to host the RMI Service.  Now I am on the path to
invoking the service).  Here is what I have done in the
RMIBindingBuilder.build method: -

- created the inbound and outbound wires
- set up anInbound and Outbound Invocations chain for these wires resp.
- set up a Java target invoker on the InboundWire (did not understand this
as I expected that this should be set onto the outbound wire)
- Now I am stuck with Interceptors... it seems like the outbound wire need
to be configured with interceptor.  This seems to be little tricky as I must
create MessageChannels and so on... any suggestions on how I could do this?

Axis2 and Celtix folks, how have you guys done this?    If this is not the
way to do this, what else is?

Here is the body of the method RMIBindingBuilder.build : -

MIService rmiService = new RMIService<Remote>(name, parent, wireService,
uri, service);

       Method aMethod = boundServiceDefinition.getServiceContract
().getInterfaceClass().getMethods()[0];

       QualifiedName targetName = new QualifiedName(
boundServiceDefinition.getTarget().getPath());
       JavaAtomicComponent target = (JavaAtomicComponent) parent.getChild(
targetName.getPartName());
       JavaTargetInvoker targetInvoker = new JavaTargetInvoker(aMethod,
target);

       InboundWire inWire = new InboundWireImpl();
       inWire.setBusinessInterface(
boundServiceDefinition.getServiceContract().getInterfaceClass());
       inWire.setServiceName(boundServiceDefinition.getName());
       InboundInvocationChain inInvChain = new
InboundInvocationChainImpl(aMethod);
       inInvChain.setTargetInvoker(targetInvoker);
       inWire.getInvocationChains().put(aMethod, inInvChain);
       rmiService.setInboundWire(inWire);

       OutboundWire outWire = new OutboundWireImpl();
       outWire.setTargetName(new QualifiedName(
boundServiceDefinition.getTarget().getPath()));
       outWire.setBusinessInterface(
boundServiceDefinition.getServiceContract().getInterfaceClass());

       rmiService.setOutboundWire(outWire);
       Interceptor intc = new RequestResponseInterceptor()

       OutboundInvocationChain outInvChain = new
OutboundInvocationChainImpl(aMethod);
       outWire.getInvocationChains().put(aMethod, outInvChain);

       return rmiService;

Thanks

- Venkat

Reply via email to