Soap 使用Enounciate生成API文档时出错

Soap 使用Enounciate生成API文档时出错,soap,wsdl,documentation-generation,enunciate,Soap,Wsdl,Documentation Generation,Enunciate,我创建了一个Web服务,并希望为API生成文档。所以我研究了下载的maven Enounciate插件。但是,我在编译时遇到以下错误,因为webservice注释位于POJO实现的接口类上,而不是POJO本身 I don't want to clutter the POJO by adding the annotations to it. artifact org.mortbay.jetty:maven-jetty-plugin: checking for updates from

我创建了一个Web服务,并希望为API生成文档。所以我研究了下载的maven Enounciate插件。但是,我在编译时遇到以下错误,因为webservice注释位于POJO实现的接口类上,而不是POJO本身

I don't want to clutter the POJO by adding the annotations to it. artifact org.mortbay.jetty:maven-jetty-plugin: checking for updates from central [INFO] [enunciate:docs {execution: default}] [INFO] initializing enunciate. [INFO] invoking enunciate:generate step... [WARNING] Validation result has errors. /Users/vkumar/IdeaProjects/identity-service/trunk/src/main/java/com/foobar/ids/service/IDService.java:17: [jersey] Jersey doesn't support interfaces as root resources. The @Path parameter will need to be applied to the implementation class. public interface IDService { ^ 1 error [INFO] ------------------------------------------------------------------------ 我不想在POJO中添加注释,从而使其变得杂乱无章。 artifact org.mortbay.jetty:maven jetty插件:检查来自central的更新 [信息][声明:文档{执行:默认值}] [信息]初始化发音。 [INFO]调用阐明:生成步骤。。。 [警告]验证结果有错误。 /Users/vkumar/IdeaProjects/identity service/trunk/src/main/java/com/foobar/ids/service/IDService.java:17:[jersey]jersey不支持将接口作为根资源。 @Path参数需要应用于实现类。 公共接口IDService{ ^ 1错误 [信息]------------------------------------------------------------------------ 这里有pom.xml代码段

        <plugin>
          <groupId>org.codehaus.enunciate</groupId>
          <artifactId>maven-enunciate-plugin</artifactId>
          <!-- check for the latest version -->
          <version>1.20</version>
          <executions>
            <execution>
              <goals>
                <goal>docs</goal>
              </goals>
              <configuration>

                <!-- the directory where to put the docs -->
                <docsDir>${project.build}/docs </docsDir>

              </configuration>
            </execution>
          </executions>
        </plugin>

org.codehaus.expunciate
maven发音插件
1.20
文件
${project.build}/docs

这是Jersey的一个限制。您必须对实现类进行注释

CXF,但没有达到同样的要求,所以您可能想考虑使用JAX-RS的CXF实现而不是JeSee实现:

    <plugin>
      <groupId>org.codehaus.enunciate</groupId>
      <artifactId>maven-enunciate-cxf-plugin</artifactId>
      <!-- check for the latest version -->
      <version>1.20</version>
      <executions>
        <execution>
          <goals>
            <goal>docs</goal>
          </goals>
          <configuration>

            <!-- the directory where to put the docs -->
            <docsDir>${project.build}/docs </docsDir>

          </configuration>
        </execution>
      </executions>
    </plugin>

org.codehaus.expunciate
maven阐明cxf插件
1.20
文件
${project.build}/docs