Results 1 to 10 of 10

Thread: Axis 2 vs Spring Web Service

  1. #1
    Join Date
    Sep 2008
    Location
    Mannheim,Germany
    Posts
    125

    Question Axis 2 vs Spring Web Service

    Hi,

    Im new to Spring framework. I was wondering how Spring WS is different from Axis 2?

  2. #2
    Join Date
    Apr 2008
    Posts
    25

    Default

    Axis 2 generates stubs given a WSDL. So you call web services in java just as normal methods. This is nice in theory, but in practice is hard to manage the artifacts generated.
    So I switched to Spring WS. Much better.

  3. #3
    Join Date
    Sep 2008
    Posts
    1

    Smile Axis2 Vs Spring Wev Service

    Well in Axis2 you can deploy Spring Web services , or you can deploy Axis2 in any given Spring container.

    One of the advantage using Axis2 over just Spring WS is , that in Axis2 you have support for all the WS* (Addressing , Security etc.. ) , but I am not sure whether you get those support in Spring.

    blogs.deepal.org/2008/07/spring-web-services-and-axis2.html

  4. #4
    Join Date
    Mar 2008
    Posts
    11

    Default

    My feeling is that Axis2 handles attachments and SOAP headers better as you have easier access to the message context. In Spring you need to either implement MessageEndpoint (which doesn't give you the niceties of the inbuilt payload endpoints such as marshalling, JDOM etc) or add Interceptors and inject it into your Endpoint. I find this is adding a level of complexity that I don't need or want. Axis2 has a MessageContext.getCurrentMessageContext(); method that you can call within your implementation service class which is nicer.
    However, for simple payload (SOAP body) services I think Spring is cleaner. Simply create a servlet entry in your web.xml, add a spring ws XML config file with some mappings to endpoint classes and you're done.
    Note also the Spring forums are a great help. Maybe I'm getting lost on the internet but I can't find a single point to access help on Axis2 like I can by visiting these forums. For example, did you find a place to post this question on any Axis2 forum?

  5. #5

    Default

    Quote Originally Posted by deepal View Post
    One of the advantage using Axis2 over just Spring WS is , that in Axis2 you have support for all the WS* (Addressing , Security etc.. ) , but I am not sure whether you get those support in Spring.
    Spring-WS does support WS-Addressing and WS-Security.
    http://static.springframework.org/sp...-ws-addressing
    http://static.springframework.org/sp.../security.html
    Tareq Abedrabbo

    My Twitter
    My Blog

  6. #6
    Join Date
    Sep 2008
    Location
    Mannheim,Germany
    Posts
    125

    Default

    Sorry if this question sounds dumb cos Im new to Spring as well as Web Services. Does that mean creating a web service using Spring WS is different from creating a Spring bean and exposing that as Web Service using Axis 2??
    Last edited by ashleyvijay; Sep 17th, 2008 at 06:16 AM.

  7. #7
    Join Date
    Apr 2008
    Location
    Colombo
    Posts
    35

    Default

    It is actually depends on your requirements Spring –WS supports for contact first but Axis2 supports for both contact –first and code –first approaches. Spring –WS basically concern about XML messaging not much deal with WSDL. With Spring-WS you can expose your services very easily. If you want to expose WSDLs, you just want to write XSD for the messages.

    Spring –WS supports many WS* specification but still does not supports for some spec like WS- ReliableMessaging , but axis2 supports most of the WS* specs. Like spring forum there is a good mailing list for Axis2 where you can post your problems and with both Axis2 and Spring-WS you can expose your Spring beans as web services.

  8. #8
    Join Date
    May 2006
    Posts
    18

    Default

    Does Spring support REST?

    I'm currently testing REST in Axis2.

  9. #9
    Join Date
    Jan 2008
    Posts
    13

    Default

    One of major difference is that Spring WS still not handle real streaming.
    I'm sure of that, after have a look at the recent code itself. Axiom is not well used.

    The main problem comes from the Source/Result mecanism, instead of a XMLStreamReader / XMLStreamWriterCallback.

    I have few experience with Mule ESB, and they solve this problem with a callback class (DelayedResult).

    Same thing for CXF, it uses a callback : XMLStreamWriterCallback.
    Last edited by bugsan; Mar 20th, 2009 at 02:23 PM.

  10. #10
    Join Date
    Feb 2009
    Posts
    17

    Default

    I would recommed to use Apache CXF 2.1.x over Spring web services or Axis2. It's built on spring, integrates with spring easily (dependency injection into web service bean, security of web services with spring security with JSR250 annotations - not provided by all JAX-WS implementors since its not part of spec). It also supports JAX-RS (Restful web services).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •