Hi
On 08/12/16 00:46, Allan C. wrote:
Hi all,

I would like to delve deeper into CXF cxf-rt-rs-service-description and
java2wadl-plugin (upgraded from some-version-I-cant-remember to 3.1.7), and
have a few questions:

1. I noticed that if my service does not have any SOAP APIs, the SOAP
section is not generated. Just wondering if the SOAP section will be
generated if one of my services is a SOAP.

Yes
2. The service endpoint address is not a link anymore, so I wouldn't able
to navigate to the WADL unless I manually change the URL address to include
_wadl parameter. Would there be an option anywhere to get the link to
appear?

Can you try CXF 3.1.8 please ?

3. My REST API resources are consuming and producing application/json. When
I compare the wadl type=json and type=xml, the json wadl describes the
representation by class name (e.g.
{"representation":{"@element":"ThirdPartyElement","@mediaType":"application/json"}),
while the xml wadl describes the element <representation
mediaType="application/json">.
WADL in JSON format is an experiment - WADL XML is converted into JSON and that is all about WADL in JSON, as opposed to it having some specific treatment of the JSON representations.

WADLGenerator has a property, 'linkAnyMediaTypeToXmlSchema' - if you configure the generator as a jaxrs:provider with this property set to true then an application/json when possible


Correct me if I am wrong, I understand that if the resource parameter is
annotated with JAXB, the fragments will be generated. But if it is a third
party class that I have no control of, is there a way to generate the
fragments too?
No, if a given class has no JAXB annotations then no XML schema fragments will be generated - but one can configure the generator to refer to the external schemas.

Have you considered using Swagger2 for describing JSON services ?


4. I would also like to delve into Support for Javadoc
<http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-SupportforJavadoc>.
I experimented with it by writing a javadoc for a resource method but
there's no visible changes in the wadl / services list page.
WADLGenerator needs to be configured with a doc provider which will load the generated javadocs. java2wadl can collect them at the build time...

Thanks, Sergey

I appreciate your time and many thanks in advance. Cheers.

Regards,
Allan C.



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Reply via email to