Cool...it worked! Thanks Dan.
On Thu, Jul 7, 2011 at 11:48 PM, Daniel Kulp <[email protected]> wrote: > > > You'd likely need to remove it from the Binding as well. At runtime, the > BindingOperationInfo's are the stuff that are normally used (and they would > point directly back to the OperationInfo's that you removed so they are > still > holding refs to it. > > > Dan > > > On Thursday, July 07, 2011 8:00:56 PM Nguyen Minh Tuan wrote: > > Hi all, > > > > I tried to remove an operation from a service using the following code > > snippet. Unfortunately, the removed operation is still running and > clients > > still can invoke it. What did I do wrong? Did I misunderstand the > method's > > purpose? Btw, I tested with the latest version of cxf 2.4.1 and added the > > code snippet to wsdl_first sample: > > > > ----------------------------------------------------------------- > > EndpointImpl ep = (EndpointImpl)Endpoint.publish(" > > http://localhost:9090/CustomerServicePort", > > implementor); > > > > OperationInfo removeOperationInfo = null; > > > > List<ServiceInfo> serviceInfoList = > > ep.getService().getServiceInfos(); > > for (ServiceInfo serviceInfo : serviceInfoList) { > > InterfaceInfo interfaceInfo = serviceInfo.getInterface(); > > > > Collection<OperationInfo> operationInfoCollection = > > interfaceInfo.getOperations(); > > for (OperationInfo operationInfo : operationInfoCollection) { > > System.out.println(operationInfo.getName()); > > > > if > (operationInfo.getName().toString().contains("update")) > > removeOperationInfo = operationInfo; > > } > > > > if (removeOperationInfo != null) { > > System.out.println("Remove " + > > removeOperationInfo.getName()); > > interfaceInfo.removeOperation(removeOperationInfo); > > } > > } > > ----------------------------------------------------------------- > -- > Daniel Kulp > [email protected] > http://dankulp.com/blog > Talend - http://www.talend.com > -- Best regards, Tuan.
