2013-08-01 30 views
-1

我正在開發一個包含不同圖層的項目。我使用Maven,JAX-WS,Spring框架和Hibernate。我試圖用jax ws maven插件生成WSDL文件。首先我使用了JRE 7,但沒有奏效。當我使用JDK 1.7此消息出現了:如何在成功構建之後找到WSDL文件?

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 
SLF4J: Defaulting to no-operation (NOP) logger implementation 
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 
[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building BSCSwebservices Maven Webapp 0.0.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[WARNING] The POM for bsh:bsh:jar:1.2b3 is missing, no dependency information available 
[WARNING] The POM for com.sun.xml.stream.buffer:streambuffer:jar:0.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 
[WARNING] The POM for org.jvnet.staxex:stax-ex:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 
[WARNING] The artifact woodstox:wstx-asl:jar:3.2.0 has been relocated to org.codehaus.woodstox:wstx-asl:jar:3.2.0 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ BSCSwebservices --- 
[debug] execute contextualize 
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] Copying 6 resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.1:compile (default-compile) @ BSCSwebservices --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ BSCSwebservices --- 
[debug] execute contextualize 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] skip non existing resourceDirectory C:\Users\sayed\workspace\BSCSwebservices1\src\test\resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.1:testCompile (default-testCompile) @ BSCSwebservices --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ BSCSwebservices --- 
[INFO] No tests to run. 
[INFO] Surefire report directory: C:\Users\sayed\workspace\BSCSwebservices1\target\surefire-reports 

------------------------------------------------------- 
    T E S T S 
------------------------------------------------------- 

Results : 

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 

[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ BSCSwebservices --- 
[INFO] Packaging webapp 
[INFO] Assembling webapp [BSCSwebservices] in [C:\Users\sayed\workspace\BSCSwebservices1\target\BSCSwebservices] 
[INFO] Processing war project 
[INFO] Copying webapp resources [C:\Users\sayed\workspace\BSCSwebservices1\src\main\webapp] 
    [INFO] Webapp assembled in [607 msecs] 
    [INFO] Building war: C:\Users\sayed\workspace\BSCSwebservices1\target\BSCSwebservices.war 
    [WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored 
    (webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true') 
    [INFO] 
    [INFO] --- jaxws-maven-plugin:1.11:wsgen (service_BillingAccountRead) @ BSCSwebservices --- 
    [WARNING] The POM for woodstox:wstx-asl:jar:3.2.3 is missing, no dependency information available 

warning: The apt tool and its associated API are planned to be 
removed in the next major JDK release. These features have been 
superseded by javac and the standardized annotation processing API, 
javax.annotation.processing and javax.lang.model. Users are 
recommended to migrate to the annotation processing features of 
javac; see the javac man page for more information. 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 11.635s 
[INFO] Finished at: Thu Aug 01 20:38:29 WAT 2013 
[INFO] Final Memory: 16M/38M 
[INFO] ------------------------------------------------------------------------ 

這pom.xml的

<plugins> 

    <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>jaxws-maven-plugin</artifactId> 
     <version>1.11</version> 
     <executions> 
       <execution> 
        <id>service_BillingAccountRead</id> 
        <phase>package</phase> 
        <goals> 
         <goal>wsgen</goal> 
        </goals> 
        <configuration> 
         <sei>com.ws.BillingAccountRead</sei> 
         <genwsdl>true</genwsdl> 
         <keep>true</keep> 

        </configuration> 
       </execution> 
      </executions> 
    </plugin> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <version>2.3.1</version> 
    </plugin> 
</plugins> 

構建成功,但我沒有找到WSDL文件的一部分?那是在我完成另一層之後有效的警告嗎?

我添加了所有出現在警告中的所有罐子的依賴關係,但警告仍然顯示。

+0

你在找什麼WSDL? – saurav

回答

0

WSDL的獲取{module_root} \目標\產生的來源\ WSDL

你真的需要開始,包括你的問題的相關信息放置在默認情況下。你甚至沒有發佈你的pom的相關部分。你甚至告訴jax-ws生成一個wsdl嗎?

另外,修復當你運行你的maven構建時警告噸吐出。這隻會增加你發佈信息的混亂。

編輯:

請查閱文檔。您可以明確指出wsdls最終會在哪裏。你所有的問題都有簡單的答案,你可以用最少的努力找到自己的答案。

0

通常,當您構建項目時,WSDL文檔文件和模式文檔文件不會自動生成。這些文件是由應用程序服務器在部署時生成的。在內部,服務器執行wsgen工具來生成文件。接下來,當您請求WSLD文檔文件(在服務端點上添加?wsdl)時,應用程序服務器正在運行更新文件中的服務url並提供服務。

如果你想包括這個文件的生成,你可以在你的pom.xml中加入JAX-WS commons。請參閱this question中的示例。

相關問題