[ 
https://issues.apache.org/jira/browse/CXF-4850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13626368#comment-13626368
 ] 

Freeman Fang commented on CXF-4850:
-----------------------------------

@load, your change for the description make things much clear, and the 
commit[1] actually same as your scenario.

Per the JAXWS spec

3.4.1 Inheritance
WSDL 1.1 does not define a standard representation for the inheritance of 
wsdl:portType elements. When mapping an SEI that inherits from another 
interface, the SEI is treated as if all methods of the inherited interface were 
defined within the SEI.
♦ Conformance (Inheritance flattening): A mapped wsdl:portType element MUST 
contain WSDL def- initions for all the methods of the corresponding Java SEI 
including all inherited methods.
♦ Conformance (Inherited interface mapping): An implementation MAY map 
inherited interfaces to addi- tional wsdl:portType elements within the 
wsdl:definitions element.

So all methods in inherited interface should be also mapped to the WSDL, no 
matter it has @WebMethod or not.

So if  EntityService interface has method with same name, you should add  
@WebMethod(operationName="what_ever_you_want")  to those methods to avoid the 
name conflict in WSDL.

Before CXF 2.7.1, CXF simply ignore the method from inherited interface, which 
is incorrect per JAXWS spec.

Hope this helps

[1]http://svn.apache.org/r1465874

Freeman
                
> Inheritance problem : An operation with name {} already exists 
> ---------------------------------------------------------------
>
>                 Key: CXF-4850
>                 URL: https://issues.apache.org/jira/browse/CXF-4850
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.7.2, 2.7.3
>            Reporter: lord
>             Fix For: NeedMoreInfo
>
>         Attachments: cxf-test.zip
>
>
> We have got a @WebService Interface A wich extends an Interface B. Only 
> methods from Interface A are @WebMethod. Interface B contains some other 
> methods which are not @WebMethod, and some of those methods get the same name.
> We receive a "An operation with name already exists". 
> Everything was working fine from 2.x to 2.7.1. Something has changed... 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to