Sfoglia il codice sorgente

webserver增加几个类包升级到3.3.7

o2wwx 5 anni fa
parent
commit
eeb7aad5ce

+ 49 - 5
o2server/pom.xml

@@ -535,23 +535,67 @@
 			<dependency>
 				<groupId>org.apache.cxf</groupId>
 				<artifactId>cxf-core</artifactId>
-				<version>3.3.3</version>
+				<version>3.3.7</version>
 			</dependency>
 			<dependency>
 				<groupId>org.apache.cxf</groupId>
 				<artifactId>cxf-rt-frontend-jaxws</artifactId>
-				<version>3.3.3</version>
+				<version>3.3.7</version>
 			</dependency>
 			<dependency>
 				<groupId>org.apache.cxf</groupId>
 				<artifactId>cxf-rt-frontend-simple</artifactId>
-				<version>3.3.3</version>
+				<version>3.3.7</version>
 			</dependency>
 			<dependency>
 				<groupId>org.apache.cxf</groupId>
 				<artifactId>cxf-rt-wsdl</artifactId>
-				<version>3.3.3</version>
+				<version>3.3.7</version>
 			</dependency>
+
+			<dependency>
+				<groupId>org.apache.cxf</groupId>
+				<artifactId>cxf-rt-databinding-jaxb</artifactId>
+				<version>3.3.7</version>
+			</dependency>
+			<dependency>
+				<groupId>org.apache.cxf</groupId>
+				<artifactId>cxf-rt-transports-http</artifactId>
+				<version>3.3.7</version>
+			</dependency>
+			<dependency>
+				<groupId>org.apache.cxf</groupId>
+				<artifactId>cxf-rt-bindings-soap</artifactId>
+				<version>3.3.7</version>
+		   </dependency>
+			<dependency>
+				<groupId>org.apache.cxf</groupId>
+				<artifactId>cxf-rt-bindings-xml</artifactId>
+				<version>3.3.7</version>
+			</dependency>
+			<dependency>
+				<groupId>org.apache.cxf</groupId>
+				<artifactId>cxf-rt-ws-addr</artifactId>
+				<version>3.3.7</version>
+			</dependency>
+
+			<dependency>
+				<groupId>com.fasterxml.woodstox</groupId>
+				<artifactId>woodstox-core</artifactId>
+				<version>6.2.1</version>
+			</dependency>
+			<dependency>
+				<groupId>org.codehaus.woodstox</groupId>
+				<artifactId>stax2-api</artifactId>
+				<version>4.2.1</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.neethi</groupId>
+				<artifactId>neethi</artifactId>
+				<version>3.1.1</version>
+			</dependency>
+
 			<dependency>
 				<groupId>org.apache.poi</groupId>
 				<artifactId>poi</artifactId>
@@ -902,4 +946,4 @@
 			</snapshots>
 		</repository>
 	</repositories>
-</project>
+</project>

+ 61 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/webservices/JaxWsDynamicClientFactory.java

@@ -0,0 +1,61 @@
+package com.x.base.core.project.webservices;
+
+public  class JaxWsDynamicClientFactory extends DynamicClientFactory {
+
+    protected JaxWsDynamicClientFactory(Bus bus) {
+        super(bus);
+    }
+
+    @Override
+    protected EndpointImplFactory getEndpointImplFactory() {
+        return JaxWsEndpointImplFactory.getSingleton();
+    }
+
+    protected boolean allowWrapperOps() {
+        return true;
+    }
+
+    /**
+     * Create a new instance using a specific <tt>Bus</tt>.
+     *
+     * @param b the <tt>Bus</tt> to use in subsequent operations with the
+     *            instance
+     * @return the new instance
+     */
+    public static JaxWsDynamicClientFactory newInstance(Bus b) {
+        return new JaxWsDynamicClientFactory(b);
+    }
+
+    /**
+     * Create a new instance using a default <tt>Bus</tt>.
+     *
+     * @return the new instance
+     * @see CXFBusFactory#getDefaultBus()
+     */
+    public static JaxWsDynamicClientFactory newInstance() {
+        Bus bus = CXFBusFactory.getThreadDefaultBus();
+        return new JaxWsDynamicClientFactory(bus);
+    }
+
+    /**
+     * 覆写父类的该方法<br/>
+     * 注:解决此(错误:编码GBK的不可映射字符)问题
+     *
+     * @return
+     */
+    @Override
+    protected boolean compileJavaSrc(String classPath, List<File> srcList, String dest) {
+        org.apache.cxf.common.util.Compiler javaCompiler
+                = new org.apache.cxf.common.util.Compiler();
+
+        // 设置编译编码格式(此处为新增代码)
+        javaCompiler.setEncoding("UTF-8");
+
+        javaCompiler.setClassPath(classPath);
+        javaCompiler.setOutputDir(dest);
+        javaCompiler.setTarget("1.6");
+
+        return javaCompiler.compileFiles(srcList);
+    }
+
+}