Well, copy stuff out of the wsdl:documention tags into javadoc isn't something
we've ever done. It's not something that is part of the specs. The jaxws
spec calls for special jaxws:javadoc binding extension things to add javadocs
to the generated classes and we went down that route since we had to support
it for compliance. We never went back and added the other ways to add
javadoc.
Thus, it's not really a "bug", but a missing feature. Feel free to log it.
If you're interested in tackling it, I can provide some pointers of where to
look. Mostly, in the WSDLServiceBuilder thing, when processing the wsdl, you
would need to copy the documentation stuff out of the wsdl and into the new
documentation things I added into the service model to support the
@WSDLDocumentation things. From there, just updating the jaxws processor
things in tools and maybe the velocity templates may be enough.
Dan
On Sat October 10 2009 11:39:05 am Christian Schneider wrote:
> I have just added the @WSDLDocumentation annotation to the wsdl_maven
> systest. The WSDL generation works well but the codegen plugin does not
> add comments to the generated classes.
>
> I have attached the relevant files.
>
> Greetings
>
> Christian
>
> --------------------------------------
> Source interface:
> package org.apache.cxf.systests.java2ws;
>
> import javax.jws.WebParam;
> import javax.jws.WebService;
>
> import org.apache.cxf.annotations.WSDLDocumentation;
>
> @WebService
> @WSDLDocumentation(value = "A simple service with only one method")
> public interface HelloWorld {
> @WSDLDocumentation(value = "Simply return the given text")
> String sayHi(@WebParam(name = "text") String text);
> }
>
>
> --------------------------------------
> WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="HelloWorld"
> targetNamespace="http://java2wstest.lr.net/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:tns="http://java2wstest.lr.net/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:tns="http://java2wstest.lr.net/"
> attributeFormDefault="unqualified" elementFormDefault="qualified"
> targetNamespace="http://java2wstest.lr.net/">
> <xsd:element name="sayHi" type="tns:sayHi"/>
> <xsd:complexType name="sayHi">
> <xsd:sequence>
> <xsd:element minOccurs="0" name="arg0" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:element name="sayHiResponse" type="tns:sayHiResponse"/>
> <xsd:complexType name="sayHiResponse">
> <xsd:sequence>
> <xsd:element minOccurs="0" name="return" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="sayHi">
> <wsdl:part name="parameters" element="tns:sayHi">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="sayHiResponse">
> <wsdl:part name="parameters" element="tns:sayHiResponse">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="HelloWorldPortType">
> <wsdl:documentation>A simply service that has only a sayHi
> method</wsdl:documentation>
> <wsdl:operation name="sayHi">
> <wsdl:documentation>Simply return the text</wsdl:documentation>
> <wsdl:input name="sayHi" message="tns:sayHi">
> </wsdl:input>
> <wsdl:output name="sayHiResponse" message="tns:sayHiResponse">
> </wsdl:output>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorldPortType">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="sayHi">
> <soap:operation soapAction="" style="document"/>
> <wsdl:input name="sayHi">
> <soap:body use="literal"/>
> </wsdl:input>
> <wsdl:output name="sayHiResponse">
> <soap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="HelloWorld">
> <wsdl:port name="HelloWorldPort" binding="tns:HelloWorldSoapBinding">
> <soap:address location="http://localhost:9090/HelloWorldPort"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
> ------------------------------------------
> Generated interface:
> package org.apache.cxf.systests.java2ws;
>
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebResult;
> import javax.jws.WebService;
> import javax.xml.bind.annotation.XmlSeeAlso;
> import javax.xml.ws.RequestWrapper;
> import javax.xml.ws.ResponseWrapper;
>
> /**
> * This class was generated by Apache CXF 2.3.0-SNAPSHOT
> * Sat Oct 10 17:21:56 CEST 2009
> * Generated source version: 2.3.0-SNAPSHOT
> *
> */
>
> @WebService(targetNamespace = "http://java2ws.systests.cxf.apache.org/",
> name = "HelloWorld")
> @XmlSeeAlso({ObjectFactory.class})
> public interface HelloWorld {
>
> @WebResult(name = "return", targetNamespace = "")
> @RequestWrapper(localName = "sayHi", targetNamespace =
> "http://java2ws.systests.cxf.apache.org/", className =
> "org.apache.cxf.systests.java2ws.SayHi")
> @ResponseWrapper(localName = "sayHiResponse", targetNamespace =
> "http://java2ws.systests.cxf.apache.org/", className =
> "org.apache.cxf.systests.java2ws.SayHiResponse")
> @WebMethod
> public java.lang.String sayHi(
> @WebParam(name = "text", targetNamespace = "")
> java.lang.String text
> );
> }
>
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog