Default (JAX-WS) Callback implementation of webservice binding does not work.
------------------------------------------------------------------------------
Key: TUSCANY-3820
URL: https://issues.apache.org/jira/browse/TUSCANY-3820
Project: Tuscany
Issue Type: Bug
Affects Versions: Java-SCA-2.0-Beta1
Environment: Software
Reporter: Urso Wieske
Default (JAX-WS) Callback implementation of webservice binding does not work.
I have written a callback example code. A client which sends a reqest to a
webservice and it also discloses its callback address to the service provider
(webservice).
It happens to be that the callback is always null, i.e. it seems that de SCA
runtime never injects the callback instance into the service.
I have provided the member variable with the @Callback annotation.
After having discussed this issue on the Tuscany user mailinglist (with
committer Simon) it is Simon's presumption that something is wrong with
tuscany-binding-ws-runtime-jaxws.
My code will work with tuscany-binding-ws-runtime-axis2!
---- fragment from my mailcorrespondence with Simon----
Hi Urso,
This problem is caused by a bug in Tuscany. Please raise a JIRA
so that we can track and fix the problem. In the meantime, I can
suggest a partial workaround.
The injection failure only happens if Tuscany is using the
tuscany-binding-ws-runtime-jaxws module as the runtime implementation
for <binding.ws>. It doesn't happen if tuscany-binding-ws-runtime-axis2
is used instead of tuscany-binding-ws-runtime-jaxws. This implies that
the problem is caused by a bug in the -jaxws version.
By default, Tuscany uses the -jaxws version. To get Tuscany to use
the -axis2 version instead, you need to do special configuration in
the pom.xml file.
Unfortunately I couldn't find a way to make this change when using
maven-tuscany-plugin to run the application. This is because
maven-tuscany-plugin has a dependency on tuscany-base-runtime.
The tuscany-base-runtime jar contains the -jaxws version and seems
to always use it even if the -axis2 version is declared as an
additional dependency.
I did find a way to get Tuscany to use the -axis2 version when not
using maven-tuscany-plugin. If you replace this dependency:
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-base-runtime</artifactId>
<version>2.0-Beta1</version>
</dependency>
by the following four dependencies:
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
<version>2.0-Beta1</version>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-host-jetty</artifactId>
<version>2.0-Beta1</version>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-node-impl</artifactId>
<version>2.0-Beta1</version>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-implementation-java-runtime</artifactId>
<version>2.0-Beta1</version>
</dependency>
then the application runs successfully. I used a maven JUnit test
to verify this.
Simon
------------------------ end mail correspondence----------------
Kind Regards
Urso
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.