Announcement Announcement Module
Collapse
No announcement yet.
Axis 2 vs Spring Web Service Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Axis 2 vs Spring Web Service

    Hi,

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

  • #2
    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.

    Comment


    • #3
      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

      Comment


      • #4
        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?

        Comment


        • #5
          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

          Comment


          • #6
            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, 07:16 AM.

            Comment


            • #7
              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.

              Comment


              • #8
                Does Spring support REST?

                I'm currently testing REST in Axis2.

                Comment


                • #9
                  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, 03:23 PM.

                  Comment


                  • #10
                    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).

                    Comment

                    Working...
                    X