Hi Benson,
Please see the comments in the mail.
Benson Margulies wrote:
I've just used wsdl2java in CXF for the first time. My goal here is to
migrate an existing service from a C++ web service toolkit to CXF. While
I'm starting with an existing WSDL, from here I'd like to treat the
generated JAXB/JAX-WS code as normative.
So, I'd like to ensure that the usual ?wsdl URL behaves itself via the
usual mechanism.
Question 1: If I just change the generated @javax.jws.WebService to take
out the wsdl location option, will the default collapse to the standard
?wsdl location?
If you specify the wsdl location in the WebService annotation , CXF will
load the wsdl to build up the service model.
If you do not specify the wsdl location in the WebService annotation.
CXF will build the service model from Java class (SEI).
And CXF's ?wsdl function is based on the service model to wsdl file.
If we can make sure the service models which we build from the wsdl and
which we build from the java class are same to each other,
there should be no difference whether you set the wsdl location in the
WebService annotation or not.
In most case , I can say it is true in CXF and I prefer the wsdl first
approach if you are jump between C++ and Java.
Question 2: Does CXF has a side-door so that I can put a WSDL file on
classpath and have its contents served up as the response to ?wsdl?
Obviously, if I avail myself of this, I'm continuing to treat the wsdl
as normative, but I'm avoiding having to make my own arrangements to
serve it up.
As I had said , we just do not support to response the ?wsdl with your
specified wsdl file now.
But we have a JIRA [1]task for it . Maybe you can monitor it to see if
it is ready to use.
[1] https://issues.apache.org/jira/browse/CXF-341
Willem.