[ http://jira.codehaus.org/browse/XFIRE-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_127758 ]
Jorg Heymans commented on XFIRE-671: ------------------------------------ FWIW, below patch changes the behaviour to ignore operations from the wsdl that are not defined in the class. I've tested it out and it seems to work fine for our case, HTH others as well. Index: src/main/org/codehaus/xfire/wsdl11/parser/WSDLServiceConfigurator.java =================================================================== --- src/main/org/codehaus/xfire/wsdl11/parser/WSDLServiceConfigurator.java (revision 2186) +++ src/main/org/codehaus/xfire/wsdl11/parser/WSDLServiceConfigurator.java (working copy) @@ -224,34 +224,31 @@ String opName = bindingOperation.getOperation().getName(); OperationInfo opInfo = serviceInfo.getOperation(opName); - if (opInfo == null) + if (opInfo != null) { - throw new XFireRuntimeException("Could not find operation " + opName + " in the service model."); - } + ann.visit(bindingOperation, opInfo); - ann.visit(bindingOperation, opInfo); + ann.visit(bindingOperation.getBindingInput(), + bindingOperation.getOperation().getInput(), + opInfo.getInputMessage()); - ann.visit(bindingOperation.getBindingInput(), - bindingOperation.getOperation().getInput(), - opInfo.getInputMessage()); + if (opInfo.hasOutput()) + { + ann.visit(bindingOperation.getBindingOutput(), + bindingOperation.getOperation().getOutput(), + opInfo.getOutputMessage()); + } - if (opInfo.hasOutput()) - { - ann.visit(bindingOperation.getBindingOutput(), - bindingOperation.getOperation().getOutput(), - opInfo.getOutputMessage()); - } - - Collection bindingFaults = bindingOperation.getBindingFaults().values(); - for (Iterator iterator2 = bindingFaults.iterator(); iterator2.hasNext();) - { - BindingFault bindingFault = (BindingFault) iterator2.next(); - Fault fault = bindingOperation.getOperation().getFault(bindingFault.getName()); - FaultInfo faultInfo = opInfo.getFault(fault.getName()); + Collection bindingFaults = bindingOperation.getBindingFaults().values(); + for (Iterator iterator2 = bindingFaults.iterator(); iterator2.hasNext();) + { + BindingFault bindingFault = (BindingFault) iterator2.next(); + Fault fault = bindingOperation.getOperation().getFault(bindingFault.getName()); + FaultInfo faultInfo = opInfo.getFault(fault.getName()); - ann.visit(bindingFault, fault, faultInfo); - } - + ann.visit(bindingFault, fault, faultInfo); + } + } } } } > Could not find operation <operation_name> in the service model - when not all > WSDL operations are in the client Interface > ------------------------------------------------------------------------------------------------------------------------- > > Key: XFIRE-671 > URL: http://jira.codehaus.org/browse/XFIRE-671 > Project: XFire > Issue Type: Improvement > Components: Core > Affects Versions: 1.2.1 > Environment: XFire 1.2.1 > Reporter: Andres Bernasconi > Assignee: Dan Diephouse > Attachments: patch.txt > > Original Estimate: 4 hours > Remaining Estimate: 4 hours > > My application is client to a very complex Web Service (WSDL) with lots of > operations for which I only care about one or two. > My service interface in the client only defines those methods that are > important to me; not ALL the operations defined in the WSDL are in my class. > Everything worked fine until I upgraded from 1.1.2 to 1.2.1 where now it > seems mandatory to declare all WSDL operations in the interface. Since it > worked correctly in older versions I believe it could be defined as a Bug, > unless this was meant as an Improvement. > Either way hope this gets fixed. (It would be easy enough to add an if in the > WSDLServiceConfigurator.java source file) > Best Regards > Andres Bernasconi. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email