Sun POJO Service Engine User's Guide

Getting the Consumer Instance Dynamically

Use a Context method to retrieve the instance of ServiceEndpoint, and use it again to retrieve the instance of Consumer from the Context instance.


QName svc2use = ....;
String endpointName = ....;

ServiceEndpoint se = this.ctx.getEndpoint(svc2use, endpointName);
Consumer cons = this.ctx.getConsumer(se, this.consOpName, this.consInMsgType);
outputMsg = (Node) cons.sendSynchInOut(input, MessageObjectType.Node);