[
https://issues.apache.org/jira/browse/CXF-870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Allard Buijze updated CXF-870:
------------------------------
Fix Version/s: (was: 2.0.1)
2.0.2
Priority: Major (was: Minor)
Affects Version/s: 2.0.1
> WebService methods generated from implementation instead of interface
> ---------------------------------------------------------------------
>
> Key: CXF-870
> URL: https://issues.apache.org/jira/browse/CXF-870
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.0, 2.0.1
> Environment: CXF 2.0, Spring 2, JAX-WS
> Reporter: Allard Buijze
> Assignee: Daniel Kulp
> Fix For: 2.0.2
>
>
> -- Description of problem --
> When CXF creates a service provider for a given JAX-WS-annotated
> (implementation) class, it tries to create a WebService operation for each
> method in that implementation class.
> In the case of a spring bean, there could be getter and setter methods. CXF
> will fail in creating WS operations from these methods and fail to publish
> the service.
> -- Suggested solution --
> The solution to this problem would be to only generate WS operations from the
> methods in the interface(s) the class implements.
> An example of a spring context that will cause CXF to fail is as follows:
> <jaxws:endpoint id="helloWorld" implementor="#serverBean"
> address="/HelloWorld" />
> <bean id="serverBean" class="com.company.services.ServiceProviderImpl">
> <property name="myPropetry" value="MyValue" />
> </bean>
> -- Workaround --
> A workaround to the problem can be to use constructor injection. This removes
> the need for setter methods.
> The following spring context shows how this can be done:
> <jaxws:endpoint id="helloWorld" implementor="#serverBean"
> address="/HelloWorld" />
> <bean id="serverBean" class="com.company.services.ServiceProviderImpl">
> <<constructor-arg index="0" value="MyValue" />
> </bean>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.