Suggestion for a web service framework for Java

后端 未结 6 1062
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 07:28

I want a web service framework which is open source & free for commercial use, also security is a main concern too. Please suggest a web service framework for Java using SOA

相关标签:
6条回答
  • 2021-02-06 08:09

    I agree with the Spring-WS option. I've used it at various times and it quickly become my web service choice unless there are other factors that specifically rule it out.

    Although this is slightly off topic, if you're in the planning stage I'd make the following recommendations.

    1. Choose a topdown approach. Spring-WS definately supports this (it is the preferred method). That way if you make changes to the underlying code you won't need to worry about accidentally updating your WSDL. Also at design time you can consider the WSDL the interface point and not go through other elaborate documents as much.

    2. Use JAXB to generate your request/response objects. This is much easier in the long run and definately helps to make sure that you are coding as required by your WSDL (quite a few times I looked at generated objects and saw that they didn't look right only to find out that I had modified the WSDL incorrectly).

    3. Use annotations in your endpoints.

    Those are the main points. Good luck :-).

    0 讨论(0)
  • 2021-02-06 08:12

    I'd suggest a JAX-WS implementation: JAX-WS RI (which is part of Metro) or Apache CXF. Both are very close from a runtime perspective but many people find that CXF has a better documentation (might be an important criteria). Both provide integration with Spring if this matters to you (actually, decent frameworks just can't ignore Spring so this is not a surprise).

    Spring-WS is another option but is not JAX-WS compliant, supports only a contract-first approach (from XSD) - that's a philosophical choice - and doesn't support many WS-* standards (that you may not need though).

    In any case, I'd stay away from Axis 2 and its horrible deployment architecture and packaging hell (the Axis 2 webapp itself is a container for web services which need to be packaged in specific archives). I find it totally counter productive. On top of that, it doesn't even perform really well.

    0 讨论(0)
  • 2021-02-06 08:12

    I'd use the one provided with Java.

    http://java.sun.com/webservices/docs/2.0/tutorial/doc/

    0 讨论(0)
  • 2021-02-06 08:18

    Spring framework will be the definite winner for this kind of requirement. Spring and its modules including spring security, spring webservices makes it a right fit for this one.

    0 讨论(0)
  • 2021-02-06 08:22

    Here are the common frameworks, all are rather mature:

    • Apache CXF
    • Apache Axis2
    • Spring Web Services
    • JAX-WS RI

    All support SOAP.

    I've used both CXF and Spring-WS. Both are easy to configure and use.

    0 讨论(0)
  • 2021-02-06 08:23

    Take a look at Axis. It's quite simple and easy to use. http://ws.apache.org/axis/

    0 讨论(0)
提交回复
热议问题