This week I had to look into a Java WebService project which was using SOAP packages javax.xml.soap.*.
I have not used this before but the Apache CXF library to create a SOAP webservice.
I have a question on javax.xml.soap.*
Is it better than CXF in terms of performance?
In terms of coding I see CXF is amazing as no need to worry about SOAP API at all and simply by using annotations can create a service in minutes.
Also is MessageFactory and SOAPConnection are threadsafe? I am asking this to save the creation of these objects every time. If the creation is not a overhead then no problems, but if it is then I want to create them only once. I couldn’t find in the javadoc about thread safety.
javax.xml.soap is a low-level API, CXF is an implementation of that API, one of many implementations. CXF uses javax.xml.soap underneath, as do all of the implementations.
A more meaningful comparison is between JAX-WS implementations, such as JAX-WS-RI and CXF.