You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Simon Laws <si...@googlemail.com> on 2010/03/08 18:54:23 UTC

[2.x] binding.ws as a JAX-WS provider/client

Hi

As part of tidying up the web service binding I've been looking at
ways we can more cleanly use Axis APIs/SPs to try and:

1/ insulate ourselves more effectively from future Axis changes
2/ make it easier to plug in other ws stacks

Haven't got very far but am looking at making the Tuscany chain a
JAX-WS service provider on the service side. The extent of this
exercise to date is limited to pulling the head of the service chain
into a javax.xml.ws.Provider [1] in order to understand the existing
code. The invoke() operation isn't active yet as this is where we jump
off and re-factor the way that the Axis integration is done. I haven't
done anything with the reference side yet.

I notice Raymond was doing some sandbox stuff in this area so it seems
like a good point to pull a design together. Before we start on
technical details can people chime in with what's been done already?

Regards

Simon

[1] http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ServiceProvider.java
-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Re: [2.x] binding.ws as a JAX-WS provider/client

Posted by Raymond Feng <en...@gmail.com>.
Sure, we can move the code into trunk.

As you pointed out, with JAX-WS, we now have two sets of "pipeline": the 
Tuscany invocation chain and JAX-WS handler chain. I assume some of the 
binding specific processing with go into the JAX-WS handler. But there is a 
possibility that we configure JAX-WS with a generic Tuscany handler that can 
delegates processing to our binding invocation chain.

FYI: I found a good article which describes the JAX-WS handlers.

http://www.javaworld.com/javaworld/jw-02-2007/jw-02-handler.html

Thanks,
Raymond

--------------------------------------------------
From: "Simon Laws" <si...@googlemail.com>
Sent: Friday, March 12, 2010 9:28 AM
To: <de...@tuscany.apache.org>
Subject: Re: [2.x] binding.ws as a JAX-WS provider/client

> On Tue, Mar 9, 2010 at 1:00 PM, Simon Laws <si...@googlemail.com> 
> wrote:
>> On Mon, Mar 8, 2010 at 6:01 PM, Raymond Feng <en...@gmail.com> wrote:
>>> Hi,
>>>
>>> +1 to explore the idea further. IMO, it will allows any JAX-WS compliant
>>> stack to be plugged into Tuscany for binding.ws. We can support the 
>>> JAX-WS
>>> from JDK6, CXF, Axis2 without too much tweaks between the different
>>> implementations.
>>>
>>> I reactivated the work to use JAX-WS APIs to implement binding.ws in my
>>> sandbox [1] recently. The reference binding is working for a basic 
>>> sample. I
>>> recently added some code on the service binding side, but I didn't have
>>> chance to bring it up yet.
>>>
>>> [1] 
>>> http://svn.apache.org/repos/asf/tuscany/sandbox/rfeng/binding-ws-jaxws/
>>
>> Just took a look at the code in your sandbox. On the service side
>> there is a JAX-WS provider similar to the one a referenced earlier in
>> the thread. You've taken it further and registered the provider as a
>> JAX-WS endpoint. I'd like to try this in trunk by adding a new service
>> binding provider to effect this registration.
>>
>> I'm particularly interested in whether this approach presents any
>> restrictions on our ability to configure the binding in terms of
>> transports or policy. Only way to really find out is to try it;-)
>>
>> Haven't looked at the client side yet.
>>
>> Regards
>>
>> Simon
>>
>
> Hi
>
> Have been playing with JAXWS support in the JVM and in Axis2 today to
> improve my understanding. I'd certainly like to get your code into
> trunk. Maybe we should take it as is as it's nicely encapsulated. Or
> would you rather I played with it in your sandbox (or even took a copy
> of it).
>
> I'm particularly interested in the various layers involved here. This
> it motivated by thinking about how to get policy working with this
> kind of integration. On the service side a message arrives and passes
> through various pieces.
>
> Axis (or CxF, or JVM etc)
> ======>
>              Jaxws Provider
>             ===========>
>                                     Tuscany operation chain
>                                     =================>
>
> If we are to use JAXWS only then I guess we have to push policy in
> through the service WSDL. However reading the mail lists it seems
> that, if we want to use Axis, there are various limitations in relying
> on this approach.
>
> Some of our processing for ws has, to date, relied on variously
>
> - conditionally configuring the Axis2 configuration context - for
> example, turning on the security modules/configuration
> - manipulating the axis transport configuration - for example, to get
> at HTTP security credentials
> - processing messages in the binding wire - copying out callback IDs
>
> Message processing sits nicely on the Tuscany side of the Jaxws
> provider but it's difficult to tell what Axis specific processing or
> Jaxws handlers we need, if any, without trying to implement some of
> this.
>
> Simon 


Re: [2.x] binding.ws as a JAX-WS provider/client

Posted by Simon Laws <si...@googlemail.com>.
On Tue, Mar 9, 2010 at 1:00 PM, Simon Laws <si...@googlemail.com> wrote:
> On Mon, Mar 8, 2010 at 6:01 PM, Raymond Feng <en...@gmail.com> wrote:
>> Hi,
>>
>> +1 to explore the idea further. IMO, it will allows any JAX-WS compliant
>> stack to be plugged into Tuscany for binding.ws. We can support the JAX-WS
>> from JDK6, CXF, Axis2 without too much tweaks between the different
>> implementations.
>>
>> I reactivated the work to use JAX-WS APIs to implement binding.ws in my
>> sandbox [1] recently. The reference binding is working for a basic sample. I
>> recently added some code on the service binding side, but I didn't have
>> chance to bring it up yet.
>>
>> [1] http://svn.apache.org/repos/asf/tuscany/sandbox/rfeng/binding-ws-jaxws/
>
> Just took a look at the code in your sandbox. On the service side
> there is a JAX-WS provider similar to the one a referenced earlier in
> the thread. You've taken it further and registered the provider as a
> JAX-WS endpoint. I'd like to try this in trunk by adding a new service
> binding provider to effect this registration.
>
> I'm particularly interested in whether this approach presents any
> restrictions on our ability to configure the binding in terms of
> transports or policy. Only way to really find out is to try it;-)
>
> Haven't looked at the client side yet.
>
> Regards
>
> Simon
>

Hi

Have been playing with JAXWS support in the JVM and in Axis2 today to
improve my understanding. I'd certainly like to get your code into
trunk. Maybe we should take it as is as it's nicely encapsulated. Or
would you rather I played with it in your sandbox (or even took a copy
of it).

I'm particularly interested in the various layers involved here. This
it motivated by thinking about how to get policy working with this
kind of integration. On the service side a message arrives and passes
through various pieces.

Axis (or CxF, or JVM etc)
======>
              Jaxws Provider
             ===========>
                                     Tuscany operation chain
                                     =================>

If we are to use JAXWS only then I guess we have to push policy in
through the service WSDL. However reading the mail lists it seems
that, if we want to use Axis, there are various limitations in relying
on this approach.

Some of our processing for ws has, to date, relied on variously

- conditionally configuring the Axis2 configuration context - for
example, turning on the security modules/configuration
- manipulating the axis transport configuration - for example, to get
at HTTP security credentials
- processing messages in the binding wire - copying out callback IDs

Message processing sits nicely on the Tuscany side of the Jaxws
provider but it's difficult to tell what Axis specific processing or
Jaxws handlers we need, if any, without trying to implement some of
this.

Simon

Re: [2.x] binding.ws as a JAX-WS provider/client

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Mar 8, 2010 at 6:01 PM, Raymond Feng <en...@gmail.com> wrote:
> Hi,
>
> +1 to explore the idea further. IMO, it will allows any JAX-WS compliant
> stack to be plugged into Tuscany for binding.ws. We can support the JAX-WS
> from JDK6, CXF, Axis2 without too much tweaks between the different
> implementations.
>
> I reactivated the work to use JAX-WS APIs to implement binding.ws in my
> sandbox [1] recently. The reference binding is working for a basic sample. I
> recently added some code on the service binding side, but I didn't have
> chance to bring it up yet.
>
> [1] http://svn.apache.org/repos/asf/tuscany/sandbox/rfeng/binding-ws-jaxws/

Just took a look at the code in your sandbox. On the service side
there is a JAX-WS provider similar to the one a referenced earlier in
the thread. You've taken it further and registered the provider as a
JAX-WS endpoint. I'd like to try this in trunk by adding a new service
binding provider to effect this registration.

I'm particularly interested in whether this approach presents any
restrictions on our ability to configure the binding in terms of
transports or policy. Only way to really find out is to try it;-)

Haven't looked at the client side yet.

Regards

Simon

Re: [2.x] binding.ws as a JAX-WS provider/client

Posted by Raymond Feng <en...@gmail.com>.
Hi,

+1 to explore the idea further. IMO, it will allows any JAX-WS compliant 
stack to be plugged into Tuscany for binding.ws. We can support the JAX-WS 
from JDK6, CXF, Axis2 without too much tweaks between the different 
implementations.

I reactivated the work to use JAX-WS APIs to implement binding.ws in my 
sandbox [1] recently. The reference binding is working for a basic sample. I 
recently added some code on the service binding side, but I didn't have 
chance to bring it up yet.

[1] http://svn.apache.org/repos/asf/tuscany/sandbox/rfeng/binding-ws-jaxws/

Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws" <si...@googlemail.com>
Sent: Monday, March 08, 2010 9:54 AM
To: "tuscany-dev" <de...@tuscany.apache.org>
Subject: [2.x] binding.ws as a JAX-WS provider/client

> Hi
>
> As part of tidying up the web service binding I've been looking at
> ways we can more cleanly use Axis APIs/SPs to try and:
>
> 1/ insulate ourselves more effectively from future Axis changes
> 2/ make it easier to plug in other ws stacks
>
> Haven't got very far but am looking at making the Tuscany chain a
> JAX-WS service provider on the service side. The extent of this
> exercise to date is limited to pulling the head of the service chain
> into a javax.xml.ws.Provider [1] in order to understand the existing
> code. The invoke() operation isn't active yet as this is where we jump
> off and re-factor the way that the Axis integration is done. I haven't
> done anything with the reference side yet.
>
> I notice Raymond was doing some sandbox stuff in this area so it seems
> like a good point to pull a design together. Before we start on
> technical details can people chime in with what's been done already?
>
> Regards
>
> Simon
>
> [1] 
> http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ServiceProvider.java
> -- 
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com