Any way to generate WSDL documentation from Javadoc with JAX-WS?

后端 未结 3 1952
-上瘾入骨i
-上瘾入骨i 2020-12-31 02:27

I\'m hoping that an extension of some kind is available that does this (although I suppose that my hope is foolishly optimistic).

   /**
     * 

相关标签:
3条回答
  • 2020-12-31 03:08

    You're not the only one looking for a way to generate WSDL documentation (see the Generating WSDL documentation from Javadoc thread) but, AFAIK, there is no standard JAX-WS way for doing this.

    Now, maybe have a look at JBoss proprietary annotation @Documentation mentioned in JBWS-1850 that generates jaxws:binding artifacts described in section 2.9 Javadoc Customization when using Java->WSDL approach as well. It's not exactly what you asked for but it might give you some ideas.

    In any case, I guess that this would require providing your own WSDLGeneratorExtension to extend wsgen and generate the desired WSDL.

    0 讨论(0)
  • 2020-12-31 03:10

    You may look at Enunciate. It's possible to use it's Maven plugin to generate static HTML files from Javadoc comments. This works for SOAP (i.e. JAX-WS) and REST (i.e. JAX-RS) endpoints.

    Interesting reads:

    • https://github.com/stoicflame/enunciate/wiki/Documentation-Only
    • http://raibledesigns.com/rd/entry/my_experience_with_java_rest

    Production Examples:

    • http://www.realtybaron.com/api/
    • http://www.agentrank.com/api/
    • http://api.setlist.fm/docs/index.html
    0 讨论(0)
  • 2020-12-31 03:12

    In one project we published a lot of WSDLs. For every Web Service we have exposed a WS method "getDocumentationURL()". This method deliver back a link to the JavaDoc generated from the SEI. The JavaDoc was place on a accessible intranet server.

    0 讨论(0)
提交回复
热议问题