public void addMessageContext(MessageContext msgContext, OperationContext opContext) throws AxisFault { if (!opContext.isComplete()) { opContext.getMessageContexts().put(MESSAGE_LABEL_IN_VALUE, msgContext); opContext.setComplete(true); } else { throw new AxisFault(Messages.getMessage("mepcompleted")); } }
public void addFaultMessageContext(MessageContext msgContext, OperationContext opContext) throws AxisFault { HashMap<String, MessageContext> mep = opContext.getMessageContexts(); MessageContext faultMessageCtxt = (MessageContext) mep.get(MESSAGE_LABEL_FAULT_VALUE); if (faultMessageCtxt != null) { throw new AxisFault(Messages.getMessage("mepcompleted")); } else { mep.put(MESSAGE_LABEL_FAULT_VALUE, msgContext); opContext.setComplete(true); opContext.cleanup(); } }