You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by kongar <ak...@5amsolutions.com> on 2012/08/11 06:12:57 UTC
Overloaded webservice methods
Hello,
I have a question about this stacktrace that I'm encountering when I'm
trying to standup my CXF webservice endpoints:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'AdapterComponentMpiSecuredService': Invocation of init method
failed; nested exception is javax.xml.ws.WebServiceException:
java.lang.IllegalArgumentException: An operation with name
[{urn:gov:hhs:fha:nhinc:adaptercomponentmpi}FindCandidates] already exists
in this service
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
>From what I can gather, CXF throws this exception if there is a wsdl
operation with the same name that is already defined (i.e. it is being
overloaded), and even though I do, those two operations are under different
ports, and according to the WS-I Basic Profile 1.1, this is valid:
"A wsdl:portType may have wsdl:operations with names that are the same as
those found in other wsdl:portTypes."
which is copied from here:
http://www.ws-i.org/profiles/basicprofile-1.1-2004-08-24.html#Distinctive_Operations
So am I correct in thinking that CXF should be allowing me to standup those
endpoints? Am I missing something?
As a reference, here is how I'm defining the operation (both have the same
target namespace):
First WSDL:
<portType name="AdapterComponentMpiSecuredPortType">
<operation name="FindCandidates">
<input name="FindCandidatesSecuredRequest"
message="tns:FindCandidatesSecuredRequest"/>
<output name="FindCandidatesSecuredResponse"
message="tns:FindCandidatesSecuredResponse"/>
<fault name="FindCandidatesSecuredFault"
message="tns:FindCandidatesSecuredFault" />
</operation>
</portType>
Second WSDL:
<portType name="AdapterComponentMpiPortType">
<operation name="FindCandidates">
<input name="FindCandidatesRequest"
message="tns:FindCandidatesRequest"/>
<output name="FindCandidatesResponse"
message="tns:FindCandidatesResponse"/>
</operation>
</portType>
Thanks!
--
View this message in context: http://cxf.547215.n5.nabble.com/Overloaded-webservice-methods-tp5712325.html
Sent from the cxf-user mailing list archive at Nabble.com.