springboot集成apache.cxf实现wsdl webservice接口服务及客户端,使用maven打包是遇到乱码问题

springboot集成apache.cxf实现wsdl webservice接口服务及客户端,使用的工具是idea。在工具内直接启动时没有问题,但使用maven打包时报错
pom文件如下

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.hls</groupId>
    <artifactId>hisapi</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>hisapi</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
        <projcet.build.sourceEncoding>UTF-8</projcet.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>11.2.0.1.0</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- http所需包 -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
        </dependency>
        <!-- /http所需包 -->

        <!-- 数据解析所需包 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
            <version>3.2.6</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.20</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

执行mav install提示错误信息如下

C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:11: 错误: 编码GBK的不可映射字符
 * <p>abstractJSON complex type鐨? Java 绫汇??
                                ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:11: 错误: 编码GBK的不可映射字符
 * <p>abstractJSON complex type鐨? Java 绫汇??
                                         ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:11: 错误: 编码GBK的不可映射字符
 * <p>abstractJSON complex type鐨? Java 绫汇??
                                          ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:13: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                   ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:13: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                    ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:10: 错误: 编码GBK的不可映射字符
 * <p>addAndUpdate complex type鐨? Java 绫汇??
                                ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:10: 错误: 编码GBK的不可映射字符
 * <p>addAndUpdate complex type鐨? Java 绫汇??
                                         ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:10: 错误: 编码GBK的不可映射字符
 * <p>addAndUpdate complex type鐨? Java 绫汇??
                                          ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:12: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                   ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:12: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                    ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:37: 错误: 编码GBK的不可映射字符
     * 鑾峰彇arg0灞炴?х殑鍊笺??
                ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:37: 错误: 编码GBK的不可映射字符
     * 鑾峰彇arg0灞炴?х殑鍊笺??
                     ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:37: 错误: 编码GBK的不可映射字符
     * 鑾峰彇arg0灞炴?х殑鍊笺??
                      ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:49: 错误: 编码GBK的不可映射字符
     * 璁剧疆arg0灞炴?х殑鍊笺??
                ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:49: 错误: 编码GBK的不可映射字符
     * 璁剧疆arg0灞炴?х殑鍊笺??
                     ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:49: 错误: 编码GBK的不可映射字符
     * 璁剧疆arg0灞炴?х殑鍊笺??
                      ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:13: 错误: 编码GBK的不可映射字符
 * <p>addAndUpdateResponse complex type鐨? Java 绫汇??
                                        ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:13: 错误: 编码GBK的不可映射字符
 * <p>addAndUpdateResponse complex type鐨? Java 绫汇??
                                                 ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:13: 错误: 编码GBK的不可映射字符
 * <p>addAndUpdateResponse complex type鐨? Java 绫汇??
                                                  ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:15: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                   ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:15: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                    ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:62: 错误: 编码GBK的不可映射字符
     * 鑾峰彇return灞炴?х殑鍊笺??
                  ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:62: 错误: 编码GBK的不可映射字符
     * 鑾峰彇return灞炴?х殑鍊笺??
                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:62: 错误: 编码GBK的不可映射字符
     * 鑾峰彇return灞炴?х殑鍊笺??
                        ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:74: 错误: 编码GBK的不可映射字符
     * 璁剧疆return灞炴?х殑鍊笺??
                  ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:74: 错误: 编码GBK的不可映射字符
     * 璁剧疆return灞炴?х殑鍊笺??
                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:74: 错误: 编码GBK的不可映射字符
     * 璁剧疆return灞炴?х殑鍊笺??
                        ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:87: 错误: 编码GBK的不可映射字符
     * <p>anonymous complex type鐨? Java 绫汇??
                                 ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:87: 错误: 编码GBK的不可映射字符
     * <p>anonymous complex type鐨? Java 绫汇??
                                          ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:87: 错误: 编码GBK的不可映射字符
     * <p>anonymous complex type鐨? Java 绫汇??
                                           ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:89: 错误: 编码GBK的不可映射字符
     * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:89: 错误: 编码GBK的不可映射字符
     * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                        ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:155: 错误: 编码GBK的不可映射字符
         * <p>anonymous complex type鐨? Java 绫汇??
                                     ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:155: 错误: 编码GBK的不可映射字符
         * <p>anonymous complex type鐨? Java 绫汇??
                                              ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:155: 错误: 编码GBK的不可映射字符
         * <p>anonymous complex type鐨? Java 绫汇??
                                               ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:157: 错误: 编码GBK的不可映射字符
         * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                           ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:157: 错误: 编码GBK的不可映射字符
         * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                            ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:185: 错误: 编码GBK的不可映射字符
             * 鑾峰彇key灞炴?х殑鍊笺??
                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:185: 错误: 编码GBK的不可映射字符
             * 鑾峰彇key灞炴?х殑鍊笺??
                            ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:185: 错误: 编码GBK的不可映射字符
             * 鑾峰彇key灞炴?х殑鍊笺??
                             ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:197: 错误: 编码GBK的不可映射字符
             * 璁剧疆key灞炴?х殑鍊笺??
                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:197: 错误: 编码GBK的不可映射字符
             * 璁剧疆key灞炴?х殑鍊笺??
                            ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:197: 错误: 编码GBK的不可映射字符
             * 璁剧疆key灞炴?х殑鍊笺??
                             ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:209: 错误: 编码GBK的不可映射字符
             * 鑾峰彇value灞炴?х殑鍊笺??
                         ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:209: 错误: 编码GBK的不可映射字符
             * 鑾峰彇value灞炴?х殑鍊笺??
                              ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:209: 错误: 编码GBK的不可映射字符
             * 鑾峰彇value灞炴?х殑鍊笺??
                               ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:221: 错误: 编码GBK的不可映射字符
             * 璁剧疆value灞炴?х殑鍊笺??
                         ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:221: 错误: 编码GBK的不可映射字符
             * 璁剧疆value灞炴?х殑鍊笺??
                              ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:221: 错误: 编码GBK的不可映射字符
             * 璁剧疆value灞炴?х殑鍊笺??
                               ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:10: 错误: 编码GBK的不可映射字符
 * <p>delete complex type鐨? Java 绫汇??
                          ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:10: 错误: 编码GBK的不可映射字符
 * <p>delete complex type鐨? Java 绫汇??
                                   ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:10: 错误: 编码GBK的不可映射字符
 * <p>delete complex type鐨? Java 绫汇??
                                    ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:12: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                   ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:12: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                    ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:37: 错误: 编码GBK的不可映射字符
     * 鑾峰彇arg0灞炴?х殑鍊笺??
                ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:37: 错误: 编码GBK的不可映射字符
     * 鑾峰彇arg0灞炴?х殑鍊笺??
                     ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:37: 错误: 编码GBK的不可映射字符
     * 鑾峰彇arg0灞炴?х殑鍊笺??
                      ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:49: 错误: 编码GBK的不可映射字符
     * 璁剧疆arg0灞炴?х殑鍊笺??
                ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:49: 错误: 编码GBK的不可映射字符
     * 璁剧疆arg0灞炴?х殑鍊笺??
                     ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:49: 错误: 编码GBK的不可映射字符
     * 璁剧疆arg0灞炴?х殑鍊笺??
                      ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:13: 错误: 编码GBK的不可映射字符
 * <p>deleteResponse complex type鐨? Java 绫汇??
                                  ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:13: 错误: 编码GBK的不可映射字符
 * <p>deleteResponse complex type鐨? Java 绫汇??
                                           ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:13: 错误: 编码GBK的不可映射字符
 * <p>deleteResponse complex type鐨? Java 绫汇??
                                            ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:15: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                   ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:15: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                    ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:62: 错误: 编码GBK的不可映射字符
     * 鑾峰彇return灞炴?х殑鍊笺??
                  ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:62: 错误: 编码GBK的不可映射字符
     * 鑾峰彇return灞炴?х殑鍊笺??
                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:62: 错误: 编码GBK的不可映射字符
     * 鑾峰彇return灞炴?х殑鍊笺??
                        ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:74: 错误: 编码GBK的不可映射字符
     * 璁剧疆return灞炴?х殑鍊笺??
                  ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:74: 错误: 编码GBK的不可映射字符
     * 璁剧疆return灞炴?х殑鍊笺??
                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:74: 错误: 编码GBK的不可映射字符
     * 璁剧疆return灞炴?х殑鍊笺??
                        ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:87: 错误: 编码GBK的不可映射字符
     * <p>anonymous complex type鐨? Java 绫汇??
                                 ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:87: 错误: 编码GBK的不可映射字符
     * <p>anonymous complex type鐨? Java 绫汇??
                                          ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:87: 错误: 编码GBK的不可映射字符
     * <p>anonymous complex type鐨? Java 绫汇??
                                           ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:89: 错误: 编码GBK的不可映射字符
     * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:89: 错误: 编码GBK的不可映射字符
     * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                        ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:155: 错误: 编码GBK的不可映射字符
         * <p>anonymous complex type鐨? Java 绫汇??
                                     ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:155: 错误: 编码GBK的不可映射字符
         * <p>anonymous complex type鐨? Java 绫汇??
                                              ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:155: 错误: 编码GBK的不可映射字符
         * <p>anonymous complex type鐨? Java 绫汇??
                                               ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:157: 错误: 编码GBK的不可映射字符
         * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                           ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:157: 错误: 编码GBK的不可映射字符
         * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                            ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:185: 错误: 编码GBK的不可映射字符
             * 鑾峰彇key灞炴?х殑鍊笺??
                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:185: 错误: 编码GBK的不可映射字符
             * 鑾峰彇key灞炴?х殑鍊笺??
                            ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:185: 错误: 编码GBK的不可映射字符
             * 鑾峰彇key灞炴?х殑鍊笺??
                             ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:197: 错误: 编码GBK的不可映射字符
             * 璁剧疆key灞炴?х殑鍊笺??
                       ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:197: 错误: 编码GBK的不可映射字符
             * 璁剧疆key灞炴?х殑鍊笺??
                            ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:197: 错误: 编码GBK的不可映射字符
             * 璁剧疆key灞炴?х殑鍊笺??
                             ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:209: 错误: 编码GBK的不可映射字符
             * 鑾峰彇value灞炴?х殑鍊笺??
                         ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:209: 错误: 编码GBK的不可映射字符
             * 鑾峰彇value灞炴?х殑鍊笺??
                              ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:209: 错误: 编码GBK的不可映射字符
             * 鑾峰彇value灞炴?х殑鍊笺??
                               ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:221: 错误: 编码GBK的不可映射字符
             * 璁剧疆value灞炴?х殑鍊笺??
                         ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:221: 错误: 编码GBK的不可映射字符
             * 璁剧疆value灞炴?х殑鍊笺??
                              ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:221: 错误: 编码GBK的不可映射字符
             * 璁剧疆value灞炴?х殑鍊笺??
                               ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:10: 错误: 编码GBK的不可映射字符
 * <p>getAppointResult complex type鐨? Java 绫汇??
                                    ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:10: 错误: 编码GBK的不可映射字符
 * <p>getAppointResult complex type鐨? Java 绫汇??
                                             ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:10: 错误: 编码GBK的不可映射字符
 * <p>getAppointResult complex type鐨? Java 绫汇??
                                              ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:12: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                   ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:12: 错误: 编码GBK的不可映射字符
 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广??
                                    ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:37: 错误: 编码GBK的不可映射字符
     * 鑾峰彇arg0灞炴?х殑鍊笺??
                ^
C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:37: 错误: 编码GBK的不可映射字符
     * 鑾峰彇arg0灞炴?х殑鍊笺??
                     ^

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java cxf swing 结合发布webservice
在一个桌面程序中需要用到webservice,使用swing编写桌面程序,用cxf及内置的jetty发布webservice,目前在eclipse中可以正常运行, 但是一旦打包成jar文件就会报错: [main] DEBUG org.apache.cxf.common.logging.LogUtils - Using org.apache.cxf.common.logging.Log4jLogger for logging. [main] INFO org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean - Creating Service {http://schemas.xmlsoap.org/soap/}WebserviceImplService from class com.test.IWebservice [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created JAXBContext "jar:file:/E:/am-win-x86/AMStartup.jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id: null Classes known to this context: [B boolean byte char com.sun.xml.bind.api.CompositeStructure com.test.jaxws_asm.SayHello com.test.jaxws_asm.SayHelloResponse double float int java.awt.Image java.io.File java.lang.Boolean java.lang.Byte java.lang.Character java.lang.Class java.lang.Double java.lang.Float java.lang.Integer java.lang.Long java.lang.Object java.lang.Short java.lang.String java.lang.Void java.math.BigDecimal java.math.BigInteger java.net.URI java.net.URL java.util.Calendar java.util.Date java.util.GregorianCalendar java.util.UUID javax.activation.DataHandler javax.xml.bind.JAXBElement javax.xml.datatype.Duration javax.xml.datatype.XMLGregorianCalendar javax.xml.namespace.QName javax.xml.transform.Source long short void " with classes [class com.test.jaxws_asm.SayHello, class com.test.jaxws_asm.SayHelloResponse]. [main] INFO com.test.Test - webService发布失败 org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/ at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:352) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:182) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:259) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:144) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) at com.test.Test.publishWebservice(Test.java:51) at com.test.Test.<init>(Test.java:31) at com.test.Test.main(Test.java:71) Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered. at org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:93) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:339) ... 8 more 不知道具体是什么原因,另外我使用的打包工具是fatjar,求大婶帮助
wsimport生成webservice代码调用出现错误
Type Exception Report Message An exception occurred processing JSP page [/u/jsp/china/xunjian/ceshi.jsp] at line [9] Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception org.apache.jasper.JasperException: An exception occurred processing JSP page [/u/jsp/china/xunjian/ceshi.jsp] at line [9] 6: out.println("============="); 7: SendSMSNewServiceService sendSMSNewServiceService = new SendSMSNewServiceService(); 8: out.println("**********"); 9: ISendSMSNewService sendSMSNewServicePort = sendSMSNewServiceService.getSendSMSNewServicePort(); 10: out.println("-----"); 11: String alarm = "测试"; 12: alarm = URLEncoder.encode(alarm, "utf-8"); Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) netgain.servlets.filters.MainFilter.doFilter(MainFilter.java:105) Root Cause javax.servlet.ServletException: java.lang.NoSuchFieldError: QUALIFIED org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838) org.apache.jsp.u.jsp.china.xunjian.ceshi_jsp._jspService(ceshi_jsp.java:1825) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) netgain.servlets.filters.MainFilter.doFilter(MainFilter.java:105) Root Cause java.lang.NoSuchFieldError: QUALIFIED org.apache.cxf.service.model.SchemaInfo.setSchema(SchemaInfo.java:146) org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:136) org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:81) org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:65) org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:60) org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder.java:372) org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:339) org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:203) org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:142) org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:412) org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:534) org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:248) org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205) org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101) org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90) org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:155) org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156) org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:464) org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:331) org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:318) javax.xml.ws.Service.getPort(Unknown Source) com.service.impl.SendSMSNewServiceService.getSendSMSNewServicePort(SendSMSNewServiceService.java:56) org.apache.jsp.u.jsp.china.xunjian.ceshi_jsp._jspService(ceshi_jsp.java:1800) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) netgain.servlets.filters.MainFilter.doFilter(MainFilter.java:105) 网上都说是包冲突到底哪冲突了 这是什么原因造成的了。急求啊
CXF报错Does it exist in service WSDL?如何处理
我spring整合cxf(cxf-2.6.16.jar),然后发布了一个测试服务,在浏览器中可访问到发布的服务。 ![图片说明](https://img-ask.csdn.net/upload/201706/01/1496301158_771615.png) 然后我写了一个客户端去调用我发布的服务,一直报错 ``` 六月 01, 2017 3:03:10 下午 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [springmvc] in context with path [/FeiBao] threw exception [Request processing failed; nested exception is javax.xml.ws.soap.SOAPFaultException: Message part {message.service.com}testStr was not recognized. (Does it exist in service WSDL?)] with root cause org.apache.cxf.binding.soap.SoapFault: Message part {message.service.com}testStr was not recognized. (Does it exist in service WSDL?) at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84) at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51) at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:845) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1705) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1538) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1445) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:660) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:137) ``` 我在百度上搜索问题答案,有说调用服务的接口和服务端不在同一命名空间下,于是我加上了在@WebService中加上了targetNamespace="message.service.com"属性,但是,依旧报同样的错误。找了几个小时,依旧未找到解决办法,跪求大神解答。 我服务端的cxf配置: ``` <bean id="MyTestServiceBean" class="com.webservice.message.impl.MyTestServiceImpl"/> <jaxws:endpoint id="MyTestService" implementor="#MyTestServiceBean" address="/MyTestService"> </jaxws:endpoint> ``` 服务端的接口文件: ``` package com.webservice.message; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; @WebService(targetNamespace="message.service.com") @SOAPBinding(style = Style.RPC) public interface MyTestService { public String testStr(String str); } ``` 服务端的接口实现: ``` package com.webservice.message.impl; import javax.jws.WebService; import com.webservice.message.MyTestService; @WebService (endpointInterface= "com.webservice.message.MyTestService",targetNamespace="message.service.com") public class MyTestServiceImpl implements MyTestService { @Override public String testStr(String str) { return "hello," + str; } } ``` 接下来是客户端的部分 客户端cxf的配置: ``` <jaxws:client id="MyTestService" serviceClass="com.buick.activity.webservice.service.MyTestService" address="http://127.0.0.1:8080/MessageService/ws/CheckVerifyCodeService?wsdl"> </jaxws:client> ``` 客户端的接口文件: ``` package com.buick.activity.webservice.service; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; @WebService(targetNamespace="message.service.com") @SOAPBinding(style = Style.RPC) public interface MyTestService { public String testStr(String str); } ``` 如果觉得我表意不清晰,欢迎追问。
使用cxf查询天气预报报错
异常信息如下: 警告: Interceptor for {http://WebXml.com.cn/}WeatherWS#{http://WebXml.com.cn/}getWeather has thrown exception, unwinding now org.apache.cxf.binding.soap.SoapFault: No namespace on "html" element. You must send a SOAP message. at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:122) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:172) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:69) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) at com.sun.proxy.$Proxy43.getWeather(Unknown Source) at com.atguigu.client.MainClient.main(MainClient.java:14) Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: No namespace on "html" element. You must send a SOAP message. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161) at com.sun.proxy.$Proxy43.getWeather(Unknown Source) at com.atguigu.client.MainClient.main(MainClient.java:14) Caused by: org.apache.cxf.binding.soap.SoapFault: No namespace on "html" element. You must send a SOAP message. at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:122) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:172) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:69) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) ... 2 more 我是在cxf的bin文件夹中输入命令wsdl2java 生成服务端的各个类,然后简单写了一个main方法: public class MainClient { public static void main(String[] args) { WeatherWSSoap weatherWSSoap = new WeatherWS().getWeatherWSSoap(); ArrayOfString weather = weatherWSSoap.getWeather("北京", ""); List<String> list = weather.getString(); for (String string : list) { System.out.println(string); } } } 运行时就报了如上异常。。。 哪位好心人帮我看看怎么出的错,百度了一些然而并没有明白。。。 谢谢!
java使用webservice服务,创建客户端的时候报错,折磨了一天,各位有缘人帮忙看一下吧
``` org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:86) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:295) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:240) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:233) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:188) at com.bksrj.utils.InvoiceUtil.getZxtApiXml(InvoiceUtil.java:58) at com.bksrj.service.impl.IxoInvoiceServiceImpl.checkInvoice(IxoInvoiceServiceImpl.java:666) at com.bksrj.controller.InvoiceController.checkInvoice(InvoiceController.java:633) at com.bksrj.task.TimingTask.taskInvoice(TimingTask.java:63) at com.bksrj.task.TimingTask.main(TimingTask.java:27) Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://106.37.170.83/codevati/webservice/VatiWebService?wsdl'.: java.net.ConnectException: Connection refused: connect at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:263) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:206) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:84) ... 9 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188) ... 14 more ```
cxf发布webService报错Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
我在本地调试运行都是正常的,但是当我把程序放在linux服务器运行时就会报错, 我是使用jersey框架和glassfish服务器,没有使用到spring框架,错误信息如下: com.heren.his.commons.filters.SecurityFilter -** javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/** javax.servlet.ServletException: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/ at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:421) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:222) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.heren.his.commons.filters.UTF8Encoding.doFilter(UTF8Encoding.java:22) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.heren.his.commons.filters.SecurityFilter.filterChainDoFilter(SecurityFilter.java:92) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.heren.his.commons.filters.SecurityFilter.doFilter(SecurityFilter.java:86) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.heren.his.commons.filters.RouterFilter.doFilter(RouterFilter.java:52) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.heren.his.commons.filters.HerenWebStatFilter.doFilter(HerenWebStatFilter.java:77) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.heren.his.commons.filters.ForwardFilter.doFilter(ForwardFilter.java:85) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.heren.i0.jpa.PersistFilter.doFilter(PersistFilter.java:98) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.grizzly.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:137) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.grizzly.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:106) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:226) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:173) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573) [heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60] Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/ at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:155) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at javax.xml.ws.Endpoint.publish(Endpoint.java:240) ~[na:1.8.0_60] at com.heren.his.diseasereport.api.InfectionWebResource.pointService(InfectionWebResource.java:41) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60] at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:164) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:181) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:203) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:305) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:288) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1110) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:401) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] ... 28 common frames omitted Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/ at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:352) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:182) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:259) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:144) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] ... 53 common frames omitted Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered. at org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:123) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:339) ~[heren-main-disease-report-1.0.0-SNAPSHOT.jar:na] ... 60 common frames omitted 恳求大佬们帮帮忙
webservice 客户端调用问题
问题: 服务端正常,能够正常访问wsdl地址。 客户端调用,偶尔出现一下错误,有时候不报,网上找了很多办法,都没有解决,不知道有没有高人能够解决,调用代码如下: Object service = null; JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setServiceClass(clazz); factory.setAddress(wsdl); service = factory.create(); (StrucSTaskService)service.sendChildList(); ----------------------- javax.xml.ws.WebServiceException: Could not send Message. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:149) at $Proxy106.send(Unknown Source) at cn.com.xx.turbo.adapter.structured.service.StrucSTaskService.sendChildList(StrucSTaskService.java:565) Caused by: java.net.SocketException: SocketException invoking http://10.1.7.40:8888/turbo/ws/data_exch_service?wsdl: Unexpected end of file from serverJaxWsDynamicClientFactory at sun.reflect.GeneratedConstructorAccessor275.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1364) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:138) ... 8 more Caused by: java.net.SocketException: Unexpected end of file from server at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:782) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:641) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1218) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379) at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:275) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1563) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1533) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1335) ... 18 more
java cxf调用.net的服务端,报类型不匹配
我有一个wsdl的地址,可以根据这个地址,使用cxf生成对应的java po文件。 但是在使用cxf的动态调用的使用,总是报类型不匹配。 这是我的代码 public static void main(String[] args) { // TODO Auto-generated method stub cn.com.webxml.AuthenticationInformation authenticationInformation = new cn.com.webxml.AuthenticationInformation(); cn.com.webxml.ExchangeEventInfo exchangeEventInfo = new cn.com.webxml.ExchangeEventInfo(); cn.com.webxml.Body body = new cn.com.webxml.Body(); javax.xml.ws.Holder<GenericResult> genericResult = new javax.xml.ws.Holder<GenericResult>(); javax.xml.ws.Holder<ResultsInfo> resultsInfo = new javax.xml.ws.Holder<ResultsInfo>(); callService( "http://webservice.e6gpshk.com/dzsn/DZSNWebServices.asmx?wsdl", "QueryVehicleGPSInformation", authenticationInformation, exchangeEventInfo, body, genericResult, resultsInfo); } public static String callService(String wsUrl, String method, Object... arg) { JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); Client client = dcf.createClient(wsUrl); Object[] res = null; try { res = client.invoke(method, arg); } catch (Exception e) { e.printStackTrace(); } return (String) res[0]; } 每次运行的时候,都报 信息: Created classes: com.e6gps.AuthenticationInformation, com.e6gps.Body, com.e6gps.ExceptionInfo, com.e6gps.ExchangeEventInfo, com.e6gps.GenericResult, com.e6gps.ObjectFactory, com.e6gps.ProviderInfomation, com.e6gps.Providerlist, com.e6gps.QueryVehicleGPSInformation, com.e6gps.QueryVehicleGPSInformationResponse, com.e6gps.ResultsInfo java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:99) at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:100) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:340) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326) at cn.com.webTest.GpsTest7.callService(GpsTest7.java:36) at cn.com.webTest.GpsTest7.main(GpsTest7.java:25) 2014-5-29 13:48:20 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging 警告: Interceptor for {http://www.e6gps.com/}Service_DZSN#{http://www.e6gps.com/}QueryVehicleGPSInformation has thrown exception, unwinding now org.apache.cxf.interceptor.Fault at org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:107) at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:100) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:340) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326) at cn.com.webTest.GpsTest7.callService(GpsTest7.java:36) at cn.com.webTest.GpsTest7.main(GpsTest7.java:25) org.apache.cxf.interceptor.Fault at org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:107) at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:100) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:340) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326) at cn.com.webTest.GpsTest7.callService(GpsTest7.java:36) at cn.com.webTest.GpsTest7.main(GpsTest7.java:25) Exception in thread "main" java.lang.NullPointerException at cn.com.webTest.GpsTest7.callService(GpsTest7.java:40) at cn.com.webTest.GpsTest7.main(GpsTest7.java:25) 我朝服务端的开发问了一下他的方法,前三个是输入参数,后两个是输出参数。 请问.net的输出参数,我在调用的时候,也要写上么。 但是我后两个参数写上和不写上都试过了,全是报参数不匹配 请问该怎么解决
连接webservice出下面异常
连接webservice public static void main(String[] args) { JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setServiceClass(OuterService.class); factory.setAddress("http://www.aaaaaaaaa.com/ws/OuterService?wsdl"); factory.setUsername("aaaaaaa"); factory.setPassword("aaaaaaaa"); OuterService outerRegisterService = (OuterService) factory.create(); System.out.println(outerRegisterService.login("test", "123456")); } 出现下面异常,jar包jaxb-api-2.2.6.jar和jaxb-impl-2.2.6.jar都在web下的lib下面了 log4j:WARN No such property [conversionPattern] in org.apache.log4j.SimpleLayout. Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:455) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:303) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:142) at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1174) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:162) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210) at javax.xml.bind.ContextFinder.find(ContextFinder.java:368) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) at org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:345) at org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:343) at java.security.AccessController.doPrivileged(Native Method) at org.apache.cxf.common.jaxb.JAXBContextCache.createContext(JAXBContextCache.java:343) at org.apache.cxf.common.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:244) at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:484) at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:339) at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:490) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:704) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:550) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:265) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102) at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91) at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:157) at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142) at com.celink.googfit.test.Tester.main(Tester.java:249)
通过代理网络访问webservice服务端时报错
公司的网络位代理网络,可以获取天气网webservice的wsdl,但是生成客户端后,调用服务端的方法访问时报错,如下: org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:462) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:365) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:318) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:95) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134) at com.sun.proxy.$Proxy32.getSupportProvince(Unknown Source) at com.client.demo.WeatherDemo.main(WeatherDemo.java:13) Caused by: java.net.UnknownHostException: UnknownHostException invoking http://www.webxml.com.cn/WebServices/WeatherWebService.asmx: www.webxml.com.cn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1454) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1439) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:650) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) ... 9 more Caused by: java.net.UnknownHostException: www.webxml.com.cn at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at sun.net.NetworkClient.doConnect(NetworkClient.java:175) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1092) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1391) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1332) at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42) at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1411) ... 12 more
webService发布到web项目上错误
11:10:54.279 [main] DEBUG o.apache.cxf.common.logging.LogUtils - Using org.apache.cxf.common.logging.Slf4jLogger for logging. 11:10:54.468 [main] INFO o.a.c.s.f.ReflectionServiceFactoryBean - Creating Service {http://webservice.test/}MyWebServiceImplService from class test.webservice.MyWebService 11:10:54.578 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created JAXBContext "jar:file:/E:/Program%20Files/Java/jre8/lib/rt.jar!/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.class Build-Id: 1.8.0_11 Classes known to this context: [B boolean byte char com.sun.xml.internal.bind.api.CompositeStructure double float int java.awt.Image java.io.File java.lang.Boolean java.lang.Byte java.lang.Character java.lang.Class java.lang.Double java.lang.Float java.lang.Integer java.lang.Long java.lang.Object java.lang.Short java.lang.String java.lang.Void java.math.BigDecimal java.math.BigInteger java.net.URI java.net.URL java.util.Calendar java.util.Date java.util.GregorianCalendar java.util.UUID javax.activation.DataHandler javax.xml.bind.JAXBElement javax.xml.datatype.Duration javax.xml.datatype.XMLGregorianCalendar javax.xml.namespace.QName javax.xml.transform.Source long short test.webservice.jaxws_asm.GetProjectInfomation test.webservice.jaxws_asm.GetProjectInfomationResponse void " with classes [class test.webservice.jaxws_asm.GetProjectInfomation, class test.webservice.jaxws_asm.GetProjectInfomationResponse]. 11:10:54.686 [main] DEBUG o.a.c.r.DefaultResourceManager - resolving resource <org.apache.cxf.wsdl11.WSDLManagerImpl/bus> type <interface org.apache.cxf.Bus> 11:10:54.687 [main] DEBUG o.a.c.r.DefaultResourceManager - resolving resource <null> type <interface org.apache.cxf.Bus> 11:10:54.803 [main] DEBUG o.a.c.t.h.JettyHTTPServerEngineFactory - Creating Jetty HTTP Server Engine for port 8080. Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpBuffers at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.getHTTPConnectorFactory(JettyHTTPServerEngine.java:661) at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.retrieveListenerFactory(JettyHTTPServerEngine.java:650) at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.finalizeConfig(JettyHTTPServerEngine.java:702) at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.getOrCreate(JettyHTTPServerEngineFactory.java:121) at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJettyHTTPServerEngine(JettyHTTPServerEngineFactory.java:268) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.retrieveEngine(JettyHTTPDestination.java:127) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.finalizeConfig(JettyHTTPDestination.java:160) at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:308) at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:142) at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:83) at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:62) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:170) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:155) at javax.xml.ws.Endpoint.publish(Unknown Source) at test.webservice.MyWebServicePublish.main(MyWebServicePublish.java:9) Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.HttpBuffers at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 31 more 如果创建的是一个java project就没有问题,可以成功发布,但是在web项目里面就会出问题,我查了一下说是缺少jar包,但是jetty-util-7.5.4.v20111024.jar,cxf-2.7.18.jar,jetty-webapp-7.5.4.v20111024,jetty-server-7.5.4.v20111024,jetty-servlet-7.5.4.v20111024这几个jar包我都复制到本地的tomcat的lib里面了,依然不行,希望大神指点迷津
求问,webService接口调用第一次总是失败,之后就成功,为什么??
我调用webservice服务的接口,发送请求数据,为什么第一次调用接口的时候,总是失败,报错,然后紧接着我在继续调用,就成功了,不报错了,有大神能解释一下为什么吗?代码和报错如下: 报错: webService方法推送技术标准开始了================= 推送失败: javax.xml.ws.soap.SOAPFaultException: Marshalling Error: Error writing request body to server at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161) at com.sun.proxy.$Proxy482.syncTechStds(Unknown Source) at cn.com.ebpm.ep.factor.pgc.law.powerController.pushTechDataByWebService(powerController.java:631) at cn.com.ebpm.ep.factor.pgc.law.TEST.submitTechData(TEST.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at cn.com.ebpm.ep.filter.XssFilter.doFilter(XssFilter.java:79) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jasig.cas.client.javafilter.util.AssertionThreadLocalFilter.doFilter(AssertionThreadLocalFilter.java:56) at com.sgcc.isc.ualogin.client.filter.IsoSSOAssertionThreadLocalFilter.doFilter(IsoSSOAssertionThreadLocalFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jasig.cas.client.javafilter.util.HttpServletRequestWrapperFilter.doFilter(HttpServletRequestWrapperFilter.java:76) at com.sgcc.isc.ualogin.client.filter.IscSSOHttpServletRequestWrapperFilter.doFilter(IscSSOHttpServletRequestWrapperFilter.java:22) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jasig.cas.client.javafilter.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:203) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jasig.cas.client.javafilter.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:127) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jasig.cas.client.javafilter.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:80) at com.sgcc.isc.ualogin.client.filter.IscSingleSignOutFilter.doFilter(IscSingleSignOutFilter.java:47) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at cn.com.ebpm.ep.filter.SqlInjectionFilter.doFilter(SqlInjectionFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at cn.com.ebpm.ep.filter.LoginTimeOutFilter.doFilter(LoginTimeOutFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at cn.com.ebpm.ep.filter.SessionFilter.doFilterInternal(SessionFilter.java:18) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:550) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:388) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:354) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1551) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: javax.xml.bind.MarshalException - with linked exception: [java.io.IOException: Error writing request body to server] at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:313) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:236) at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:95) at org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:617) at org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:241) at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:238) at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:118) at org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) ... 70 more Caused by: java.io.IOException: Error writing request body to server at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3191) at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3174) at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51) at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69) at com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput.write(UTF8XmlOutput.java:396) at com.sun.xml.internal.bind.v2.runtime.output.Encoded.write(Encoded.java:152) at com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput.writeName(UTF8XmlOutput.java:226) at com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput.endTag(UTF8XmlOutput.java:270) at com.sun.xml.internal.bind.v2.runtime.output.NamespaceContextImpl$Element.endElement(NamespaceContextImpl.java:489) at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.endElement(XMLSerializer.java:303) at com.sun.xml.internal.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:160) at com.sun.xml.internal.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:144) at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:343) at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:685) at com.sun.xml.internal.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:143) at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:146) at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:116) at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:318) at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:325) at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:61) at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:483) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:308) ... 84 more ========开始调用技术标准接口了======== webService方法推送技术标准开始了================= 推送完成,返回值:OK 看上面:紧跟着在调用返回ok,就表示成功了。 调用的代码如下: cn.com.ebpm.webservice.teachstd.YDTFIGATE ydtfigate = new cn.com.ebpm.webservice.teachstd.YDTFIGATE(); cn.com.ebpm.webservice.teachstd.SOAServicePort service = ydtfigate.getSOAService(); SyncTechStdsRequest requestData = new SyncTechStdsRequest(); TechStd techBean = null; TechStdCategorys techstdcategorysBean = null; TechStdItem techItemBean = null; List techCategorysList = this.sqlSession.selectList("cn.com.ebpm.ep.factor.pgc.law.power.getTechStdCategory", null); List techList = this.sqlSession.selectList("cn.com.ebpm.ep.factor.pgc.law.power.getTechStd", null); List techItemList = this.sqlSession.selectList("cn.com.ebpm.ep.factor.pgc.law.power.getTechStdItem", null); for (Map map : techList) { techBean = new TechStd(); techBean.setAt152((String)map.get("AT_152")); techBean.setAt55((String)map.get("AT_55")); techBean.setAt593((String)map.get("AT_593")); techBean.setObjectGuid((String)map.get("OBJECT_GUID")); techBean.setObjectName((String)map.get("OBJECT_NAME")); techBean.setParentGuid((String)map.get("PARENT_GUID")); requestData.getTechStds().add(techBean); } for (Map map : techCategorysList) { techstdcategorysBean = new TechStdCategorys(); techstdcategorysBean.setIsparent((String)map.get("ISPARENT")); techstdcategorysBean.setObjectGuid((String)map.get("OBJECT_GUID")); techstdcategorysBean.setObjectName((String)map.get("OBJECT_NAME")); techstdcategorysBean.setObjFlag((String)map.get("OBJ_FLAG")); techstdcategorysBean.setParentGuid((String)map.get("PARENT_GUID")); requestData.getTechStdCategorys().add(techstdcategorysBean); } for (Map map : techItemList) { techItemBean = new TechStdItem(); techItemBean.setAt55((String)map.get("AT_55")); techItemBean.setAt9((String)map.get("AT_9")); techItemBean.setFactorGuid((String)map.get("FACTOR_GUID")); techItemBean.setItemGuid((String)map.get("ITEM_GUID")); techItemBean.setItemName((String)map.get("ITEM_NAME")); requestData.getTechStdItems().add(techItemBean); } Client proxy = ClientProxy.getClient(service); HTTPConduit conduit = (HTTPConduit)proxy.getConduit(); HTTPClientPolicy policy = new HTTPClientPolicy(); policy.setConnectionTimeout(180000L); policy.setReceiveTimeout(300000L); conduit.setClient(policy); SyncTechStdsResponse response = service.syncTechStds(requestData); replayCode = response.getReplyCode(); System.out.println("推送完成,返回值:" + replayCode);
Webservice客户端调用服务端时,服务端一直报错
这个是服务端报错信息: 十一月 18, 2016 2:19:39 下午 org.apache.cxf.phase.PhaseInterceptorChain doIntercept 警告: Application has thrown exception, unwinding now org.apache.cxf.interceptor.Fault at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:148) at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:83) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:114) at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:98) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:104) at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:452) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:196) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:220) at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at org.apache.cxf.transport.servlet.AbstractCXFServlet.service(AbstractCXFServlet.java:211) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.hyjx.framework.interceptor.XSSFilter.doFilter(XSSFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at com.hyjx.framework.service.Ddzh_hdxxWebServiceImpl.getOneZhiXingAjxx(Ddzh_hdxxWebServiceImpl.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:166) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82) ... 35 more 下面是客户端调用时的方法(客户端现在不能修改只能改服务端):/** * 执行远程调用,单例模式调用 * * @param url * wsdl URL * @param invokeFunc * 调用方法 * @param objArray * 参数 * @return * @throws Exception */ public static String remoteCall(String url, String invokeFunc, Object... param) { Client client = null; ClientPool pool = ClientPool.getInstance(url); LOGGER.debug("执行webservice使用参数:" + Arrays.toString(param)); LOGGER.debug("执行webservice调用方法:" + invokeFunc); try { client = pool.get(); if (null == client) { return CONNECT_TIMED_OUT; } return executeRemoteCall4String(client, invokeFunc, param); } catch (Exception e) { LOGGER.error("执行webservice调用失败,尝试重新初始化客户端后调用", e); pool.destory(client); client = pool.get(); try { return executeRemoteCall4String(client, invokeFunc, param); } catch (Exception e1) { LOGGER.error("error ro invoke function: " + invokeFunc + ", where remote call url=" + url + " and params:" + Arrays.toString(param)); } } finally { pool.reuse(client); } return null; } /** * 用指定客户端执行远程调用 * * @param Client * Client * @param invokeFunc * 调用方法 * @param objArray * 参数 * @return * @throws Exception */ private static String executeRemoteCall4String(Client client, String invokeFunc, Object[] objArray) throws Exception { if (client == null) { return null; } Object[] results = client.invoke(invokeFunc, objArray); if (results != null && results.length > 0) { String resultStr = (String) results[0]; LOGGER.debug("执行webservice返回结果:" + resultStr); return resultStr; } return null; }
浏览器输入地址请求webservice,报错不知道为什么,急急急应该是这么请求吧
请求 http://192.168.0.104:8080/cxlgame/service/WinningRecordService?wsdl/getRankingList?wsdl 错误日志: 警告: Interceptor for {http://service.philisence.com/}WinningRecordServiceService has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: No binding operation info while invoking unknown method with params unknown. at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:58) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
spring2.5事务注解
用到的是spring2.5的注解方式配置事务。 在接口中加入@Transactional这个就会报错,否则正常。 配置文件。 [code="java"]<?xml version="1.0" encoding="UTF-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> <bean id="db-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" p:ignoreUnresolvablePlaceholders="true"> <property name="locations"> <list> <value>classpath:DataBase.properties </value> </list> </property> </bean> <tx:annotation-driven transaction-manager="transactionManager"/> <!-- 配置同一个数据源 --> <bean id="daoTemplate" abstract="true" lazy-init="true"> <property name="dataSource" ref="dataSource" /> </bean> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"> <value>${db.driver}</value> </property> <property name="url"> <value>${db.url}</value> </property> <property name="username"> <value>${db.username}</value> </property> <property name="password"> <value>${db.password}</value> </property> <property name="initialSize"> <value>${db.pool.initial}</value> </property> <property name="maxActive"> <value>${db.pool.max}</value> </property> <property name="defaultAutoCommit" value="false" /> </bean> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" p:dataSource-ref="dataSource" /> <bean id="threadPoolTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> <property name="corePoolSize" value="2" /> <property name="keepAliveSeconds" value="200" /> <property name="maxPoolSize" value="10" /> <property name="queueCapacity" value="60" /> </bean> <bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate"> <property name="transactionManager"> <ref bean="transactionManager" /> </property> </bean> </beans>[/code] 接口代码: [code="java"] import javax.jws.WebService; import javax.ws.rs.core.Response; import org.springframework.transaction.annotation.Transactional; import com.sns.bestv.entity.VisFclass; import com.sns.bestv.service.impl.VisFclassServiceImpl.Fclasses; @WebService @Transactional public interface VisFclassService { Response save(VisFclass fclass); Response delete(String app_key,int cid,String groupsids); Response update(VisFclass fclass); Fclasses get(String app_key,int cid); } [/code] 启动时候控制台错误信息: [code="java"] 2009-9-1 20:57:07 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\java\jdk1.6.0_13\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:\java\jdk1.6.0_13\jre\bin;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_13\BIN;C:\Program Files\Common Files\Adobe\AGL;;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\TortoiseSVN\bin;D:\;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;d:\Program Files\SSH Secure Shell;C:\Program Files\SSH Communications Security\SSH Secure Shell 2009-9-1 20:57:07 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8081 2009-9-1 20:57:07 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 763 ms 2009-9-1 20:57:07 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2009-9-1 20:57:07 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 log4j:ERROR Parsing error on line 30 and column 23 log4j:ERROR The content of element type "log4j:configuration" must match "(renderer*,appender*,(category|logger)*,root?,categoryFactory?)". 2009-9-1 20:57:08 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 20:57:08,359 INFO org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189): Root WebApplicationContext: initialization started 20:57:08,437 INFO org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:411): Refreshing org.springframework.web.context.support.XmlWebApplicationContext@db95a1: display name [Root WebApplicationContext]; startup date [Tue Sep 01 20:57:08 CST 2009]; root of context hierarchy 20:57:08,609 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [applicationContext.xml] 20:57:08,937 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [serviceContext.xml] 20:57:09,000 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml] 20:57:09,046 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml] 20:57:09,093 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [META-INF/cxf/cxf-servlet.xml] 20:57:09,187 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:323): Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] 20:57:09,296 INFO org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:426): Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@db95a1]: org.springframework.beans.factory.support.DefaultListableBeanFactory@138847d 20:57:09,671 INFO org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:178): Loading properties file from class path resource [DataBase.properties] 20:57:10,000 INFO org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:414): Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@138847d: defining beans [db-properties,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,daoTemplate,dataSource,transactionManager,userDao,customerDao,custUserDao,aipUsersDao,aipLogDao,postDao,friendDao,messageDao,fclassDao,userClassDao,customizeDao,threadPoolTaskExecutor,transactionTemplate,cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.servlet.ServletTransportFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,userServices,profileService,postService,friendService,messageService,groupService,custermerService,customizeService,userServices_wa]; root of factory hierarchy 20:57:10,500 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.initialize(ThreadPoolTaskExecutor.java:250): Initializing ThreadPoolExecutor 'threadPoolTaskExecutor' 2009-9-1 20:57:12 org.apache.cxf.jaxrs.utils.InjectionUtils reportServerError 严重: Method setMessageContext injection failure 20:57:12,968 INFO org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:421): Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@138847d: defining beans [db-properties,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,daoTemplate,dataSource,transactionManager,userDao,customerDao,custUserDao,aipUsersDao,aipLogDao,postDao,friendDao,messageDao,fclassDao,userClassDao,customizeDao,threadPoolTaskExecutor,transactionTemplate,cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.servlet.ServletTransportFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,userServices,profileService,postService,friendService,messageService,groupService,custermerService,customizeService,userServices_wa]; root of factory hierarchy 20:57:12,984 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.shutdown(ThreadPoolTaskExecutor.java:349): Shutting down ThreadPoolExecutor 'threadPoolTaskExecutor' 20:57:12,984 ERROR org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:215): Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServices_wa': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ... 30 more Caused by: javax.ws.rs.WebApplicationException at org.apache.cxf.jaxrs.utils.InjectionUtils.reportServerError(InjectionUtils.java:277) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectThroughMethod(InjectionUtils.java:190) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectContextProxies(InjectionUtils.java:656) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.injectContexts(JAXRSServerFactoryBean.java:180) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.updateClassResourceProviders(JAXRSServerFactoryBean.java:201) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:81) ... 37 more 2009-9-1 20:57:13 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServices_wa': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ... 30 more Caused by: javax.ws.rs.WebApplicationException at org.apache.cxf.jaxrs.utils.InjectionUtils.reportServerError(InjectionUtils.java:277) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectThroughMethod(InjectionUtils.java:190) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectContextProxies(InjectionUtils.java:656) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.injectContexts(JAXRSServerFactoryBean.java:180) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.updateClassResourceProviders(JAXRSServerFactoryBean.java:201) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:81) ... 37 more 2009-9-1 20:57:13 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2009-9-1 20:57:13 org.apache.catalina.core.StandardContext start 严重: Context [] startup failed due to previous errors 2009-9-1 20:57:13 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2009-9-1 20:57:13 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8081 2009-9-1 20:57:13 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:9009 2009-9-1 20:57:13 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/47 config=null 2009-9-1 20:57:13 org.apache.catalina.startup.Catalina start 信息: Server startup in 6270 ms [/code] [b]问题补充:[/b] 1:@Transactional 不是说用注解就得用接口吗?你说的加到实现类上我也试了一样的错误。 2:[code="java"]<bean id="threadPoolTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> <property name="corePoolSize" value="2" /> <property name="keepAliveSeconds" value="200" /> <property name="maxPoolSize" value="10" /> <property name="queueCapacity" value="60" /> </bean> [/code] 这是连接池的东西。 3: <!-- 定义切入点,引用事务通知 --> [code="java"]<aop:config proxy-target-class="true"> <aop:advisor advice-ref="txAdvice" pointcut="execution (* com.mobile.dao.*.*(..))"/>[/code] </aop:config> 这种方式我试过了。也会出错。 [b]4:其二,既然你要用注解的方式,那么你就要在你的项目中,加入这两个jar包:aspectjweaver.jar aspectjrt.jar 我好像没加这两个包。我加加试试。[/b] 5:配置文件哪里有问题?如果我不在接口或类上加@Transactional 就是完全正确的运行。 谢谢!请帮忙! [b]问题补充:[/b] [b]再补充:两个包我加了,还是一样的错误。而且那两个包是aop才需要的吧?[/b] [b]问题补充:[/b] [b][color=darkred]yangtao309[/color][/b] 按照你说的把那个多余的连接池delete了。程序不会出错了。 但是不会回滚事务? 那我另问一下:[color=blue]我把@Transactional(readOnly=false) public Response addCustomer(VisCustomer cut) 放在一个接口的实现类的方法上面,那是不是就说我这个方法体都具有一个相同的事务呢?只要其中一个地方出错整个方法都执行失败? 因为我这个方法内不止使用了一个dao的一个方法,有多个方法。比如我现在有 table1,table1-2(关系表),table2 我现在要操作table1,给其insert ,insert之后要向 table1-2中添加一条数据,这时我添加table1-2时出错了,那么我操作table1的数据可以回滚吗? [/color] [b]问题补充:[/b] [b]我添加table1-2时并没有异常,是在数据库中被回滚的,程序中执行是正确的。这样能把它在程序中就回滚了吗?我正在看spring2.5的开发参考手册,其中rollbackForClassname 是定义一组类的名字,必须是Throwable的子类,遇到时必须回滚。如果我产生不了异常不就是说还是回滚不了?[/b] [b]问题补充:[/b] [quote]@Transactional(readOnly=false,rollbackFor = Throwable.class)[/quote] 不能回滚事务。肯定还有地方不对。但是配置我想是没问题了。看了api现在完全按照上面来了。非常非常感谢[color=olive]yangtao309 [/color]
Spring boot 中使用webservice的问题
自己写完一个demo后,测试时得不到wsdl文档,下面贴上自己的代码 首先是发布服务用的接口 package com.pudding.tcs.ctrip.testservice; import javax.jws.WebMethod; import javax.jws.WebService; @WebService public interface TestService { @WebMethod public String test(String param); } 接下来是接口实现 package com.pudding.tcs.ctrip.testservice; public class TestServiceImpl implements TestService { @Override public String test(String param) { return "param="+param; } } 再接下来是配置类用于发布服务: package com.pudding.tcs.ctrip.config; import javax.xml.ws.Endpoint; import org.apache.cxf.Bus; import org.apache.cxf.bus.spring.SpringBus; import org.apache.cxf.jaxws.EndpointImpl; import org.apache.cxf.transport.servlet.CXFServlet; import org.springframework.boot.context.embedded.ServletRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.pudding.tcs.ctrip.testservice.TestService; import com.pudding.tcs.ctrip.testservice.TestServiceImpl; @Configuration public class TestConfig { @Bean public ServletRegistrationBean dispatcherServlet() { return new ServletRegistrationBean(new CXFServlet(), "/soap/*"); } @Bean(name = Bus.DEFAULT_BUS_ID) public SpringBus springBus() { return new SpringBus(); } @Bean public TestService testService() { return new TestServiceImpl(); } @Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(springBus(), testService()); endpoint.publish("/test"); return endpoint; } } 按道理讲这样配置完之后我启动服务器,在地址栏输入http://localhost:8080/soap/test?wsdl是可以显示wsdl文档的。可是现在输完地址浏览器没有任何反应。不知道问题出在了哪里。 还望各路神仙给小弟解答一下
CXF调用.NET的WebService,并返回string[]数组问题
CXF调用.NET的WebService,在WebService中返回一个string[]数组,而在WSDL中描述为ArrayOfString,请问我该如果转化这个类型并取出数据?我是这样来调用的: DynamicClientFactory dcf = DynamicClientFactory.newInstance(); org.apache.cxf.endpoint.Client client = dcf .createClient("http://localhost:16249/WebSite1/Service.asmx?wsdl"); Object reply = null; try { reply = client.invoke("testArray", new Object[] {}); } catch (Exception e) { e.printStackTrace(); } Object[] replys = (Object[]) reply; for (Object o : replys) { System.out.println(o); } 打印出来的是一个ArrayOfString类型。我该怎样取得里面的数据呢?这样调对不对?还有别的办法吗?
关于 axis2 org.apache.axis2.databinding.ADBException
我实现别人的一个ws接口,用axis2实现的,报一个这个错! org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement result at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) 有没有个也遇到过呢? 还有就是想向各位请教下,axis,axis2,cxf 都可以实现哪些形式的webservice. RPC/Encoded RPC/Literal Document/Literal Document /Literal 这几中有什么区别,分别是是什么意思,因为我想用cxf实现一个rpc/encoded的webservice,用wsdl2java的时候就报了错。然后改用axis2又报了上边的错。最后找了个axis1算是实现了吧!
java cxf springboot 如何发布一个wsdl文件包含http operation的webservice服务
我希望发布的wsdl文件可以包含http:operation,可以通过post方法调用。 ![图片说明](https://img-ask.csdn.net/upload/201907/04/1562209145_44366.png) 但是目前发布的wsdl文件是这样的,只能通过soap方式调用 ![图片说明](https://img-ask.csdn.net/upload/201907/04/1562209208_124682.png) 使用的是springboot,apache cxf包,发布的部分是这样的 ``` @Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(bus, service); endpoint.publish("/service"); return endpoint; } ``` service部分的代码是这样: ``` //@WebMethod(operationName = "queryInfo", action = "queryInfo") //@WebResult(name = "String") @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) @Path("/queryInfo") @POST public String queryInfo(@PathParam(value = "input") String request) { ... } ``` 求助!
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私...
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小人工智障。 思路可以运用在不同地方,主要介绍的是思路。
面试官问我:什么是消息队列?什么场景需要他?用了会出现什么问题?
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式和人才交流群,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸...
8年经验面试官详解 Java 面试秘诀
作者 |胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。 Java程序员准备和投递简历的实...
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观...
MyBatis研习录(01)——MyBatis概述与入门
MyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis原本是apache的一个开源项目iBatis, 2010年该项目由apache software foundation 迁移到了google code并改名为MyBatis 。2013年11月MyBatis又迁移到Github。
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外...
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip installselenium -ihttps://pypi.tuna.tsinghua.edu.cn/simple/ ...
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca...
Python爬虫精简步骤1 获取数据
爬虫,从本质上来说,就是利用程序在网上拿到对我们有价值的数据。 爬虫能做很多事,能做商业分析,也能做生活助手,比如:分析北京近两年二手房成交均价是多少?广州的Python工程师平均薪资是多少?北京哪家餐厅粤菜最好吃?等等。 这是个人利用爬虫所做到的事情,而公司,同样可以利用爬虫来实现巨大的商业价值。比如你所熟悉的搜索引擎——百度和谷歌,它们的核心技术之一也是爬虫,而且是超级爬虫。 从搜索巨头到人工...
Python绘图,圣诞树,花,爱心 | Turtle篇
每周每日,分享Python实战代码,入门资料,进阶资料,基础语法,爬虫,数据分析,web网站,机器学习,深度学习等等。 公众号回复【进群】沟通交流吧,QQ扫码进群学习吧 微信群 QQ群 1.画圣诞树 import turtle screen = turtle.Screen() screen.setup(800,600) circle = turtle.Turtle()...
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东...
破14亿,Python分析我国存在哪些人口危机!
一、背景 二、爬取数据 三、数据分析 1、总人口 2、男女人口比例 3、人口城镇化 4、人口增长率 5、人口老化(抚养比) 6、各省人口 7、世界人口 四、遇到的问题 遇到的问题 1、数据分页,需要获取从1949-2018年数据,观察到有近20年参数:LAST20,由此推测获取近70年的参数可设置为:LAST70 2、2019年数据没有放上去,可以手动添加上去 3、将数据进行 行列转换 4、列名...
web前端javascript+jquery知识点总结
1.Javascript 语法.用途 javascript 在前端网页中占有非常重要的地位,可以用于验证表单,制作特效等功能,它是一种描述语言,也是一种基于对象(Object)和事件驱动并具有安全性的脚本语言 ...
Python实战:抓肺炎疫情实时数据,画2019-nCoV疫情地图
今天,群里白垩老师问如何用python画武汉肺炎疫情地图。白垩老师是研究海洋生态与地球生物的学者,国家重点实验室成员,于不惑之年学习python,实为我等学习楷模。先前我并没有关注武汉肺炎的具体数据,也没有画过类似的数据分布图。于是就拿了两个小时,专门研究了一下,遂成此文。
听说想当黑客的都玩过这个Monyer游戏(1~14攻略)
第零关 进入传送门开始第0关(游戏链接) 请点击链接进入第1关: 连接在左边→ ←连接在右边 看不到啊。。。。(只能看到一堆大佬做完的留名,也能看到菜鸡的我,在后面~~) 直接fn+f12吧 &lt;span&gt;连接在左边→&lt;/span&gt; &lt;a href="first.php"&gt;&lt;/a&gt; &lt;span&gt;←连接在右边&lt;/span&gt; o...
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ...... ...
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!...
渗透测试-灰鸽子远控木马
木马概述 灰鸽子( Huigezi),原本该软件适用于公司和家庭管理,其功能十分强大,不但能监视摄像头、键盘记录、监控桌面、文件操作等。还提供了黑客专用功能,如:伪装系统图标、随意更换启动项名称和表述、随意更换端口、运行后自删除、毫无提示安装等,并采用反弹链接这种缺陷设计,使得使用者拥有最高权限,一经破解即无法控制。最终导致被黑客恶意使用。原作者的灰鸽子被定义为是一款集多种控制方式于一体的木马程序...
Python:爬取疫情每日数据
前言 目前每天各大平台,如腾讯、今日头条都会更新疫情每日数据,他们的数据源都是一样的,主要都是通过各地的卫健委官网通报。 以全国、湖北和上海为例,分别为以下三个网站: 国家卫健委官网:http://www.nhc.gov.cn/xcs/yqtb/list_gzbd.shtml 湖北卫健委官网:http://wjw.hubei.gov.cn/bmdt/ztzl/fkxxgzbdgrfyyq/xxfb...
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。 再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。 下文是原回答,希望能对你能有所启发。 如果我说,这个世界上人真的分三六九等,...
B 站上有哪些很好的学习资源?
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!! 最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视频,最近两年我和周围的朋友们已经把B站当作学习教室了,而且学习成本还免费,真是个励志的好平台ヽ(.◕ฺˇд ˇ◕ฺ;)ノ 下面我们就来盘点一下B站上优质的学习资源: 综合类 Oeasy: 综合...
雷火神山直播超两亿,Web播放器事件监听是怎么实现的?
Web播放器解决了在手机浏览器和PC浏览器上播放音视频数据的问题,让视音频内容可以不依赖用户安装App,就能进行播放以及在社交平台进行传播。在视频业务大数据平台中,播放数据的统计分析非常重要,所以Web播放器在使用过程中,需要对其内部的数据进行收集并上报至服务端,此时,就需要对发生在其内部的一些播放行为进行事件监听。 那么Web播放器事件监听是怎么实现的呢? 01 监听事件明细表 名...
3万字总结,Mysql优化之精髓
本文知识点较多,篇幅较长,请耐心学习 MySQL已经成为时下关系型数据库产品的中坚力量,备受互联网大厂的青睐,出门面试想进BAT,想拿高工资,不会点MySQL优化知识,拿offer的成功率会大大下降。 为什么要优化 系统的吞吐量瓶颈往往出现在数据库的访问速度上 随着应用程序的运行,数据库的中的数据会越来越多,处理时间会相应变慢 数据是存放在磁盘上的,读写速度无法和内存相比 如何优化 设计...
Python新型冠状病毒疫情数据自动爬取+统计+发送报告+数据屏幕(三)发送篇
今天介绍的项目是使用 Itchat 发送统计报告 项目功能设计: 定时爬取疫情数据存入Mysql 进行数据分析制作疫情报告 使用itchat给亲人朋友发送分析报告 基于Django做数据屏幕 使用Tableau做数据分析 来看看最终效果 目前已经完成,预计2月12日前更新 使用 itchat 发送数据统计报告 itchat 是一个基于 web微信的一个框架,但微信官方并不允许使用这...
作为程序员的我,大学四年一直自学,全靠这些实用工具和学习网站!
我本人因为高中沉迷于爱情,导致学业荒废,后来高考,毫无疑问进入了一所普普通通的大学,实在惭愧???? 我又是那么好强,现在学历不行,没办法改变的事情了,所以,进入大学开始,我就下定决心,一定要让自己掌握更多的技能,尤其选择了计算机这个行业,一定要多学习技术。 在进入大学学习不久后,我就认清了一个现实:我这个大学的整体教学质量和学习风气,真的一言难尽,懂的人自然知道怎么回事? 怎么办?我该如何更好的提升自...
粒子群算法求解物流配送路线问题(python)
1.Matlab实现粒子群算法的程序代码:https://www.cnblogs.com/kexinxin/p/9858664.html matlab代码求解函数最优值:https://blog.csdn.net/zyqblog/article/details/80829043 讲解通俗易懂,有数学实例的博文:https://blog.csdn.net/daaikuaichuan/article/...
教你如何编写第一个简单的爬虫
很多人知道爬虫,也很想利用爬虫去爬取自己想要的数据,那么爬虫到底怎么用呢?今天就教大家编写一个简单的爬虫。 下面以爬取笔者的个人博客网站为例获取第一篇文章的标题名称,教大家学会一个简单的爬虫。 第一步:获取页面 #!/usr/bin/python # coding: utf-8 import requests #引入包requests link = "http://www.santostang....
前端JS初级面试题二 (。•ˇ‸ˇ•。)老铁们!快来瞧瞧自己都会了么
1. 传统事件绑定和符合W3C标准的事件绑定有什么区别? 传统事件绑定 &lt;div onclick=""&gt;123&lt;/div&gt; div1.onclick = function(){}; &lt;button onmouseover=""&gt;&lt;/button&gt; 注意: 如果给同一个元素绑定了两次或多次相同类型的事件,那么后面的绑定会覆盖前面的绑定 (不支持DOM事...
相关热词 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数 c#日期精确到分钟 c#自定义异常必须继承 c#查表并返回值 c# 动态 表达式树 c# 监控方法耗时 c# listbox c#chart显示滚动条
立即提问