ServiceGroupContext sgc = cc.createServiceGroupContext(as1.getAxisServiceGroup());
ServiceContext serviceContext = sgc.getServiceContext(as1);
OperationContext oc1 = serviceContext.createOperationContext(operation1);
OperationContext oc2 = serviceContext.createOperationContext(operation2);
cc.registerOperationContext("urn:org.apache.axis2.dispatchers.messageid:123", oc1);
cc.registerOperationContext("urn:org.apache.axis2.dispatchers.messageid:456", oc2);
messageContext = cc.createMessageContext();
messageContext
.addRelatesTo(new RelatesTo("urn:org.apache.axis2.dispatchers.messageid:456"));
messageContext.setAxisService(as1);