I'm currently learning Apache CXF.
When CXF is generating a WSDL file from a Pojo, is there a way (a java annotation ?) to add a custom documentation to the WSDL file ? to describe a service or a parameter ?
I've already used @WebParam to set some descriptive names but I'd like to add a longer documentation. Something like...
@WebService
@Documentation("This service say hello. See http://say.hello")
public interface MyService
{
@WebResult(name="helloMessage")
@Documentation("Returns the hello message")
public String sayHello();
}
Thanks in advance,
Pierre
CXF includes a Maven plugin which can generate java artifacts from WSDL. Here is a simple example: < plugin > < groupId >org.apache.cxf</ groupId > < artifactId >cxf-codegen-plugin</ artifactId >
You will have to make sure that you create an appropriate directory structure for your project and add the earlier shown hello. wsdl file to the specified folder. The wsdl2java plugin will compile this wsdl and create Apache CXF classes in a pre-defined folder.
Apache CXF™ is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI.
Apache CXF 2.3.0 supports this.
@WSDLDocumentation
annotation to add documentation nodes to generated wsdl
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