简体   繁体   中英

What is purpose of CXF or Spring WS

I am new to consuming web services. I am trying to consume a SOAP service. This is currently in the test environment. What I have done is

  1. Use wsdl2java to generate a wsdl that I have copied to my domain folder.
  2. Use the API to send requests and receive responses.

What concerns me is do I need CXF or Spring WS to wire the service or is what I have sufficient. I am asking this because I have seen elsewhere like

What I don't get is where I would generate property when environments are switching from development to QA to production. And do I need to use CXF or Spring WS or are the annotated classes (@WebServiceClient sufficient) to consume the SOAP service. Basically, how to connect to different endpoints.

I apologize if this is rudimentary question. Thanks.

Spring-WS and Apache CXF are primarily useful for creating web-services. They are alternative web service implementations to the one that ships with Java6.

You can use them for writing clients, but there's not really much point, unless you're really keen on the alternative API that those provide.

The standard JAX-WS artifacts generated by wsdl2java should be perfectly sufficient for what you need.

As for your second question regarding how to target different prod/QA endpoints, you should ask a separate question for that, with full examples of what you have.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM