The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » Metro and JAXB

Thread: Using spring-ws with metro components

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 6 - Last Post: Oct 21, 2008 8:45 AM by: Martin Grebac
Farrukh Najmi
Using spring-ws with metro components
Posted: Oct 20, 2008 10:32 AM
  Click to reply to this thread Reply

Dear colleagues,

Recall that I have had considerable difficulty using WSIT to secure my
web service and client due to lack of maven support and dependency on
ant project for NetBeans wizards related to WSIT.

I have found a simple and elegant solution to my problem is to use
spring-ws:

<http://

spring-ws allows full use of my JAXB RI based bindings and allows me to
use sun XWS and SAAJ libraries. It also very easily provides support for
numerous transports for the web service communication. All of this is
very spring and maven friendly which is important to my project.

So my question is, what do I lose if I do not use JAX-WS RI and instead
use spring-ws? I know that I will not be able to use WSIT support for
WSDL based policy declarations for WSS etc. The alternative would be to
use the old XWS policy file instead.

What else would I be losing? Thanks for your insights.

--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


Fabian Ritzmann
Re: Using spring-ws with metro components
Posted: Oct 21, 2008 4:12 AM   in response to: Farrukh Najmi
  Click to reply to this thread Reply

On 20. Oct 2008, at 20:32, Farrukh Najmi wrote:

> So my question is, what do I lose if I do not use JAX-WS RI and
> instead use spring-ws? I know that I will not be able to use WSIT
> support for WSDL based policy declarations for WSS etc. The
> alternative would be to use the old XWS policy file instead.

WSIT support is still there:
https://metro.dev.java.net/guide/Using_WSIT_Functionality_With_Spring.html

It is a little tricky (and not well documented) to create a web
service from WSDL including policies but that is possible nevertheless.

> What else would I be losing? Thanks for your insights.

You wouldn't have JSR 109 support (web services for EJBs). Some
security options might depend on a servlet or EJB container but I
can't say for sure which. WS-AT support will not work. Generally,
Spring support is a community supported add-on, we don't do any
testing for it.

Fabian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


Andreas Loew
Re: Using spring-ws with metro components
Posted: Oct 21, 2008 5:25 AM   in response to: Fabian Ritzmann
  Click to reply to this thread Reply

Hi Fabian, hi Farrukh,

Fabian Ritzmann schrieb:
> On 20. Oct 2008, at 20:32, Farrukh Najmi wrote:
>
>> So my question is, what do I lose if I do not use JAX-WS RI and
>> instead use spring-ws? I know that I will not be able to use WSIT
>> support for WSDL based policy declarations for WSS etc. The
>> alternative would be to use the old XWS policy file instead.
>
> WSIT support is still there:
> https://metro.dev.java.net/guide/Using_WSIT_Functionality_With_Spring.html
>
> It is a little tricky (and not well documented) to create a web service
> from WSDL including policies but that is possible nevertheless.
>
>> What else would I be losing? Thanks for your insights.
>
> You wouldn't have JSR 109 support (web services for EJBs). Some security
> options might depend on a servlet or EJB container but I can't say for
> sure which. WS-AT support will not work. Generally, Spring support is a
> community supported add-on, we don't do any testing for it.

there seems to be a misunderstanding here.

If I have understood Farrukh correctly, he was thinking about Spring-WS

http://www.springframework.org/spring-ws

and not the JAX-WS RI Commons Spring integration feature.

I think the number of features that you one would be missing with
Spring-WS is much larger:

- Spring-WS allows contract (WSDL)-first only
- Spring-WS provides support for WS-Security through old-style
proprietary XWSS 2.0 interface
- Spring-WS provides no support for any other more sophisticated WS-*

Don't know whether you know for sure that you won't need any of those
features provided by Metro (see
http://wiki.apache.org/ws/StackComparison) in the foreseeable future...!?


@Farrukh:
Did I get you correctly that the main reason why you are thinking about
moving away from Metro only is because it's not officially availability
from an official repository, and only provided in bundled form (i.e.
webservices-rt as opposed to a custom combination of JAX-WS, SAAJ, StAX,
and so on?

Regarding the latter, I would not even think that unbundling Metro would
be helpful: How could you feel comfortable that any arbitrary
combination of dependency JAR builds as "bundled" by you un your POM
would work fine together? You would have to run all of Metro's
integration testing on any such combination to know for sure...


Best regards,

Andreas

--
Andreas Loew
Java Architect
Sun Microsystems (Germany)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


Farrukh Najmi
Re: Using spring-ws with metro components
Posted: Oct 21, 2008 5:47 AM   in response to: Andreas Loew
  Click to reply to this thread Reply

Hi Andreas / Fabian,

Thanks for your helpful messages. Please see inline below.

Andreas Loew wrote:
> Hi Fabian, hi Farrukh,
>
> Fabian Ritzmann schrieb:
>> On 20. Oct 2008, at 20:32, Farrukh Najmi wrote:
>>
>>> So my question is, what do I lose if I do not use JAX-WS RI and
>>> instead use spring-ws? I know that I will not be able to use WSIT
>>> support for WSDL based policy declarations for WSS etc. The
>>> alternative would be to use the old XWS policy file instead.
>>
>> WSIT support is still there:
>> https://metro.dev.java.net/guide/Using_WSIT_Functionality_With_Spring.html
>>
>>
>> It is a little tricky (and not well documented) to create a web
>> service from WSDL including policies but that is possible nevertheless.
>>
>>> What else would I be losing? Thanks for your insights.
>>
>> You wouldn't have JSR 109 support (web services for EJBs). Some
>> security options might depend on a servlet or EJB container but I
>> can't say for sure which. WS-AT support will not work. Generally,
>> Spring support is a community supported add-on, we don't do any
>> testing for it.
>
> there seems to be a misunderstanding here.
>
> If I have understood Farrukh correctly, he was thinking about Spring-WS
>
> http://www.springframework.org/spring-ws
>
> and not the JAX-WS RI Commons Spring integration feature.

That is correct. Thanks for the clarification.

>
> I think the number of features that you one would be missing with
> Spring-WS is much larger:
>
> - Spring-WS allows contract (WSDL)-first only

In my universe I only imagine every doing contract (WSDL)-first.

> - Spring-WS provides support for WS-Security through old-style
> proprietary XWSS 2.0 interface

Yes. Thats a pity but AFAIK it gives the same end result.

>
> - Spring-WS provides no support for any other more sophisticated WS-*

Thats where I need more detailed info.

>
> Don't know whether you know for sure that you won't need any of those
> features provided by Metro (see
> http://wiki.apache.org/ws/StackComparison) in the foreseeable future...!?

The above link does not address the "support for any other more
sophisticated WS-*" very well.

However, it seem that spring-ws meets all the needs I care about.

>
>
> @Farrukh:
> Did I get you correctly that the main reason why you are thinking
> about moving away from Metro only is because it's not officially
> availability from an official repository, and only provided in bundled
> form (i.e. webservices-rt as opposed to a custom combination of
> JAX-WS, SAAJ, StAX, and so on?

That is an issue but the bigger issue was the inability to use NetBeans
wizards for WSS etc. to only be available to ant projects. I am
considering using spring-ws because I have spent a lot of time and still
unable to get WSIT support for WSS to work for my project.
I have been using metro stack for several years now so its not because I
am a newbie.

> Regarding the latter, I would not even think that unbundling Metro
> would be helpful: How could you feel comfortable that any arbitrary
> combination of dependency JAR builds as "bundled" by you un your POM
> would work fine together? You would have to run all of Metro's
> integration testing on any such combination to know for sure...

Maven poms provide decalred dependencies between specific versions of
modules. Thus the end result would still be the same if the jars were
unbundled but the poms had correct version dependencies specified. You
could still opt to provide bundles for ant users.

I wish metro projects all were based on maven 2 and distributed via a
maven repository. For ant users the jars could easily be bundled. This
model would work for *all* developers. With metro projects often being
ant based it is difficult for metro team to well support maven user
community.

In similar way, Netbeans project wizards being ant based really means
they do not exist for maven developer community.

I reluctantly looked at spring-ws due to these issues. What I like about
their approach is that it works with the "crown jewel" of the Metro
stack - JAXB RI and fits well into the most diverse development
environments.

I would be grateful if metro team can provide some details on "support
for any other more sophisticated WS-*" item so I can make my final
decision. In any event I am committed to using JAXB RI and its
dependencies and will continue to use parts of metro in my project.

Thanks again.

--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


Andreas Loew
Re: Using spring-ws with metro components
Posted: Oct 21, 2008 7:05 AM   in response to: Farrukh Najmi
  Click to reply to this thread Reply

Hi Farrukh,

please find my comments inline.

Farrukh Najmi schrieb:

>> - Spring-WS provides no support for any other more sophisticated WS-*
>
> Thats where I need more detailed info.

> The above link does not address the "support for any other more
> sophisticated WS-*" very well.

Regarding Spring-WS, to the best of my knowledge, it currently only
supports WS-Security through XWSS, and that's it. No other WS-* on top,
and also no WS-Policy to configure the policies in a standard way!

Metro provides the whole list of WS-* als laid out in the link provided.

> That is an issue but the bigger issue was the inability to use NetBeans
> wizards for WSS etc. to only be available to ant projects. I am
> considering using spring-ws because I have spent a lot of time and still
> unable to get WSIT support for WSS to work for my project.
> I have been using metro stack for several years now so its not because I
> am a newbie.

Regarding setting up a Maven-based project that uses Metro:

Have you already seen my "good old" sample project
"as81-wsit-addnumbers" available as an attachment at

http://forums.java.net/jive/message.jspa?messageID=283889

This was initially intended to demonstrate how to deploy a Maven-based
project using Metro 1.0.x and the JAX-WS Spring integration on Sun App
Server 8.1, but it also happens to show how to set up a simple
WS-Security policy using Metro.

I also have the same scenario working based on more recent Metro
releases, so you should simply be able to update the POM to use more
recent Metro builds.

Please remember to modify the POM provided with the sample in order to
stop Metro JARs from being bundled into the Web App WAR in case you are
using Metro as bundled with (or globally installed into) Glassfish.

> I wish metro projects all were based on maven 2 and distributed via a
> maven repository. For ant users the jars could easily be bundled. This
> model would work for *all* developers. With metro projects often being
> ant based it is difficult for metro team to well support maven user
> community.

I agree. I hope that my sample project will be of some help to you when
doing so. If you have any questions regarding its setup, feel free to
get back here/to me (but please be aware that I am only a field guy, so
I have only limited time to help you with this...).

> In similar way, Netbeans project wizards being ant based really means
> they do not exist for maven developer community.

It is on the feature list for 6.5 to enable NB Metro wizards to be used
from Maven-based projects (Fabian should know more details).

The way I did it was: Created an Ant-based Netbeans project in parallel,
imported my WSDL into this project, used the Wizard over there to
configure Metro and copied the resulting WSDL and Metro configs back
into my Maven-based project.

Not the most elegant thing to do, but it turned out to work fine...

Hope this helps & best regards,

Andreas

--
Andreas Loew
Java Architect
Sun Microsystems (Germany)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


Fabian Ritzmann
Re: Using spring-ws with metro components
Posted: Oct 21, 2008 8:35 AM   in response to: Andreas Loew
  Click to reply to this thread Reply

On 21. Oct 2008, at 17:05, Andreas Loew wrote:
> Farrukh Najmi schrieb:
>>
>>
>> I wish metro projects all were based on maven 2 and distributed via
>> a maven repository. For ant users the jars could easily be bundled.
>> This model would work for *all* developers. With metro projects
>> often being ant based it is difficult for metro team to well
>> support maven user community.
>
> I agree. I hope that my sample project will be of some help to you
> when doing so. If you have any questions regarding its setup, feel
> free to get back here/to me (but please be aware that I am only a
> field guy, so I have only limited time to help you with this...).

We wouldn't mind switching over to Maven, it's just that me and others
have looked at it a couple of times and it looks like a very sizable
piece of work, even if we had a heterogenous system where Maven
invoked existing Ant routines.

>> In similar way, Netbeans project wizards being ant based really
>> means they do not exist for maven developer community.
>
> It is on the feature list for 6.5 to enable NB Metro wizards to be
> used from Maven-based projects (Fabian should know more details).

Last time I checked that was not going to be in NB 6.5. Martin, do you
know more?

Fabian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


Martin Grebac
Re: Using spring-ws with metro components
Posted: Oct 21, 2008 8:45 AM   in response to: Fabian Ritzmann
  Click to reply to this thread Reply

Fabian Ritzmann wrote:
> Last time I checked that was not going to be in NB 6.5. Martin, do you
> know more?
6.5 is already in RC and frozen, and web services support for Maven is
not there. It is not officially on the feature list for NB 7.0 as well.
I'd like to enable QoS settings for Maven for NB7, but that's just a
plan so far. Also, it depends on underlying web services support, so it
might happen it won't be technically achievable in NB7.
MartinG

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net





 XML java.net RSS