Dear Wiki user, You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.
The following page has been changed by NickGallardo: http://wiki.apache.org/ws/FrontPage/Axis2/JAX-WS/JSR-181 ------------------------------------------------------------------------------ - The issue of supporting a JSR-181-based programming model for Axis2 endpoints was first addressed by Rajith under JIRA issue 883 (http://issues.apache.org/jira/browse/AXIS2-883). This provides support for annotating an existing Java bean and deploying it as an Axis2 Web service. + The issue of supporting a JSR-181-based programming model for Axis2 endpoints was first addressed by Rajith under JIRA issue 883 (http://issues.apache.org/jira/browse/AXIS2-883). The goal is to provide support for annotating an existing Java bean and deploying it as an Axis2 Web service. JAX-WS 2.0 also includes support for JSR-181 annotations as a way to simplify web service development. - The approach used is to read the annotation info from the classes using WSM. For a given annotated Java bean, WSM can create an instance of a [http://svn.apache.org/viewvc/beehive/wsm/trunk/src/core/org/apache/beehive/wsm/model/WsmService.java?view=markup WSMService] class. The data from this WSMService instance is then used to create an AxisService object. With the configured AxisService, the Axis2 engine can then serve requests for that new service. - Because of the fact that the Axis2 implementation is also going to support JAX-WS, there is are a few issues that need to be resolved. The discussion started via email (http://marc.theaimsgroup.com/?t=115250120500001&r=1&w=2) but has since been moved here. + '''Targeting a Programming Model''' @@ -25, +24 @@ } }}} - When processing this class, what marker can we use to determine whether or not this endpoint uses the native Axis2 programming model, or whether it should be using JAX-WS? One of the goals of providing an annotations-based programming model is the removal of the required deployment descriptor (services.xml). The hope is that the service can be configured using just the information that exists in the Java. In this case though, the class is generic enough that it appears too ambiguous to determine just by looking at the Java information. + When processing this class, what marker can we use to determine whether or not this endpoint uses the native Axis2 programming model, or whether it should be using JAX-WS? One of the goals of providing an annotations-based programming model is the removal of the required deployment descriptor (services.xml in the Axis2 case and webservices.xml in the JAX-WS/JSR-109 case). The requirement is that the service can be configured using just the information that exists in the Java. In this case though, the class is generic enough that it appears too ambiguous to determine the target runtime just by looking at the Java information. One of the proposed methods for solving this was to expose every JSR-181 annotated Java bean as an Axis2 endpoint as well as a JAX-WS endpoint. This just moves the problem from a deploy time issue to a runtime issue. Since both services would be configured based on the same endpoint information, the burden of determining which endpoint/operation should be invoked would be placed on one of the Dispatchers. Since the same operations exist on both endpoints, there is again a situation where it's ambiguous as to which one is correct. So it seems like making the decision at deploy time is the correct one. But to achieve this, there will need to be some metadata beyond what exists today. One proposal was to allow a services.xml approach where the MessageReceiver could be specified explicitly. This is a simple way to solve the problem, but then negates one of the goals of not having a deployment descriptor in lieu of annotations data. - A third proposal that was suggested was to allow for an additional annotation to be included on the class that would denote what the target programming model is: + A third proposal that was suggested was to allow for an additional annotation to be included on the class that would denote what the target programming model is. Here's a definition of an annotation, @RuntimeBinding, that could be included on a class to trigger which runtime was to be used. {{{ - @Axis2ServiceBinding(types={ServiceBindingType.NATIVE , ServiceBindingType.JAXWS}) + package org.apache.axis2.annotation; + + @Target (ElementType.TYPE) + @Retention (RetentionPolicy.RUNTIME) + public @interface RuntimeBinding { + + public enum Runtime {AXIS2, JAXWS}; + + public Runtime target(); + } }}} Of the three approaches provided, this seems like the one closest to the goal. If this approach were chosen though, there would need to be a default chosen for the cases in which this annotation was not specified on the endpoint. To pass the JAX-WS TCK, we cannot require the presence of an additional annotation, so the default should be JAX-WS. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
