Is javax.xml.soap better than apache cxf?

This week I had to learn a Java WebService project that used javax.xml.soap SOAP packages. *.

I have not used this before, but the Apache CXF library has created a SOAP web service.

I have a question about javax.xml.soap. *

Is it better than CXF in terms of performance?

In terms of coding, I see that CXF is amazing, since you don’t have to worry about the SOAP API at all, and just using annotations you can create a service in minutes.

Also are MessageFactory and SOAPConnection thread safe? I ask you to keep creating these objects every time. If the creation is not overhead, then no problem, but if so, I want to create them only once. I could not find thread safety information in javadoc.

+3
source share
2 answers

javax.xml.soap is a low-level API, CXF is an implementation of this API, one of many implementations. CXF uses javax.xml.soap at the bottom, like all implementations.

A more meaningful comparison between JAX-WS implementations such as JAX-WS-RI and CXF.

+6
source

Actually, CXF does NOT use javax.xml.soap (SAAJ) below if it is not required for this (there are JAX-WS handlers, things like provider, etc.).

SAAJ , CXF, , CXF . SAAJ SOAP DOM. , / DOM, , .

+5

Source: https://habr.com/ru/post/1710328/


All Articles