cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allard Buijze (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-870) WebService methods generated from implementation instead of interface
Date Wed, 01 Aug 2007 11:01:17 GMT
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
         Environment: CXF 2.0, Spring 2, JAX-WS
            Reporter: Allard Buijze
            Priority: Minor
             Fix For: 2.0.1


-- 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.


Mime
View raw message