Hi all,

I'm working with a product that offers multiple Web Services (around 180 in
fact) that have been developed with CXF. My requirement is to geenrate
JAX-WS bindings for a subset of those 180 services.

The WSDL for each of the services embeds 3 schemas with the following
targetnamespaces:
- XXXService
- com.company.product.data
- com.company.product.exceptions

When I retrieve the WSDL for each service using
http://182.168.1.1:8080/WebServices/XXXService?wsdl, the schema parts for
the "data" and "exceptions" schemas only contain those elements/types that
are actually used by the specific service. So each WSDL contains only a
sub-set of the "total schema".

I'm currently having trouble when I need to create bindings for multiple
services. Example:

wsdl2java -frontend jaxws21 XXXService.wsdl
wsdl2java -frontend jaxws21 YYYService.wsdl

Both runs will generate JAXB bindings for the elements inside the 3 schema
parts. But the second run *overwrites* the ObjectFactory class inside the
data and exceptions packages, which means that when I generate the bindings
for YYYService, I lose the factory methods for those elements that are only
used by the XXXService but not by the YYYService.

I could of course just use "-p
http://data.product.company.com=com.company.product.xxxservice"; to generate
separate copies of these jaxb bindings for each service, but that will
result in a massive duplication of code/classes when I need to do this for a
number of services. I don't like duplicate code.

These web services are provided by a *product*, and I do not have access to
the code of that product. So my only option is to solve this on my side, I
don't have the luxury of being able to modify the services or use the source
code of the product.

Is there any way to generate JAX-WS bindings for these services so that I do
not end up with duplicate code/classes for the 2 data and exceptions
namespaces?

Kind regards, Maarten

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Generate-JAX-WS-bindings-from-existing-Web-Services-problems-with-schemas-tp4250617p4250617.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to