I generate WSDL files for several web services (from the server service definitions) where I have already XML schemas (*.XSD) for the beans used as parameters. How do I tell java2ws to reference these (include the external XSD) and not generate its own into the WSDL?
I have tried the -createxsdimports, but that does generate its own XSD files.
Is there a Java Annotation that I can use to let CXF know where the XSD for each file/package is?
Try the @XmlSchema
annotation. It includes a location
parameter that is used to tell JAXB that a real schema exists:
@XmlSchema(location="http://www.example.com/xsds/foo.xsd")
package com.example.foo;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With