// need to fix removing mock response and test cases. private void replace(WsdlOperation wsdlOperation, OperationConfig reloadedOperation) { int index = operations.indexOf(wsdlOperation); int c = operations.indexOf(wsdlOperation); if (c < 0) throw new IllegalArgumentException(wsdlOperation.getName() + " not found"); log.info("deleting operation [" + wsdlOperation.getName() + "]"); // remove requests first (should this be done by some listener?) while (wsdlOperation.getRequestCount() > 0) wsdlOperation.removeRequest(wsdlOperation.getRequestAt(0)); operations.remove(c); try { fireOperationRemoved(wsdlOperation); } finally { wsdlOperation.release(); getConfig().removeOperation(c); } OperationConfig newConfig = (OperationConfig) getConfig().addNewOperation().set(reloadedOperation).changeType(OperationConfig.type); WsdlOperation newOperation = new WsdlOperation(this, newConfig); operations.add(index, newOperation); newOperation.afterLoad(); fireOperationAdded(newOperation); }
@Override public void release() { super.release(); for (WsdlOperation operation : operations) operation.release(); if (wsdlContext != null) wsdlContext.release(); }
public void removeOperation(WsdlOperation wsdlOperation) { int c = operations.indexOf(wsdlOperation); if (c < 0) throw new IllegalArgumentException(wsdlOperation.getName() + " not found"); log.info("deleting operation [" + wsdlOperation.getName() + "]"); // remove requests first (should this be done by some listener?) while (wsdlOperation.getRequestCount() > 0) wsdlOperation.removeRequest(wsdlOperation.getRequestAt(0)); operations.remove(c); try { fireOperationRemoved(wsdlOperation); } finally { wsdlOperation.release(); getConfig().removeOperation(c); } }
public void deleteOperation(String bindingOperationName) { for (int c = 0; c < operations.size(); c++) { WsdlOperation wsdlOperation = operations.get(c); if (wsdlOperation.getBindingOperationName().equals(bindingOperationName)) { log.info("deleting operation [" + bindingOperationName + "]"); // remove requests first (should this be done by some listener?) while (wsdlOperation.getRequestCount() > 0) wsdlOperation.removeRequest(wsdlOperation.getRequestAt(0)); operations.remove(c); try { fireOperationRemoved(wsdlOperation); } finally { wsdlOperation.release(); getConfig().removeOperation(c); } return; } } }