提交 44d756ad 编写于 作者: R Ray

修正调用 document style的 jaxws 无法编译发送类的bug

上级 694672b1
......@@ -474,6 +474,12 @@
<packagingExcludes>persistence.xml,WEB-INF/lib/**,META-INF
</packagingExcludes>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webResources>
<resource>
<directory>ext</directory>
<targetPath>WEB-INF/ext</targetPath>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
......
///**
// * Licensed to the Apache Software Foundation (ASF) under one
// * or more contributor license agreements. See the NOTICE file
// * distributed with this work for additional information
// * regarding copyright ownership. The ASF licenses this file
// * to you under the Apache License, Version 2.0 (the
// * "License"); you may not use this file except in compliance
// * with the License. You may obtain a copy of the License at
// *
// * http://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing,
// * software distributed under the License is distributed on an
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// * KIND, either express or implied. See the License for the
// * specific language governing permissions and limitations
// * under the License.
// */
//
//package com.x.base.core.project.webservices;
//
//import java.io.File;
//import java.nio.charset.StandardCharsets;
//import java.util.List;
//
//import org.apache.cxf.Bus;
//import org.apache.cxf.BusFactory;
//import org.apache.cxf.bus.CXFBusFactory;
//import org.apache.cxf.endpoint.EndpointImplFactory;
//import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
//import org.apache.cxf.helpers.JavaUtils;
//import org.apache.cxf.jaxws.support.JaxWsEndpointImplFactory;
//
///**
// * This class reads a WSDL and creates a dynamic client from it with JAX-WS
// * functionality. This provides support for attachments and other useful things
// * that come with JAX-WS.
// *
// * Use {@link #newInstance} to obtain an instance, and then
// * {@link #createClient(String)} (or other overloads) to create a client.
// *
// * This factory uses the JAXB data binding.
// **/
//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 = BusFactory.getThreadDefaultBus();
// return new JaxWsDynamicClientFactory(bus);
// }
//
// 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(StandardCharsets.UTF_8.name());
// javaCompiler.setClassPath(classPath);
// javaCompiler.setOutputDir(dest);
// if (JavaUtils.isJava9Compatible()) {
// javaCompiler.setTarget("9");
// } else {
// javaCompiler.setTarget("1.8");
// }
// return javaCompiler.compileFiles(srcList);
// }
//}
\ No newline at end of file
......@@ -34,10 +34,10 @@ public class WebservicesClient {
return jaxws(wsdl, method, objects);
}
public String jaxwsXml(String wsdlURL, String soapXML) throws Exception {
public String jaxwsXml(String url, String soapXML) throws Exception {
List<NameValuePair> heads = new ArrayList<>();
heads.add(new NameValuePair(ConnectionAction.CONTENT_TYPE, MediaType.TEXT_XML));
return HttpConnection.postAsString(wsdlURL, heads, soapXML);
return HttpConnection.postAsString(url, heads, soapXML);
}
public HttpConnectionResponse restful(String method, String url, Map<String, String> heads, String body,
......
......@@ -90,12 +90,6 @@ public abstract class JettySeverTools {
jars.add(file.getAbsolutePath());
}
}
// if (module.dynamicJars() != null && module.dynamicJars().length > 0) {
// IOFileFilter filter = new WildcardFileFilter(DynamicEntity.JAR_PREFIX + "*.jar");
// for (File o : FileUtils.listFiles(Config.dir_dynamic_jars(true), filter, null)) {
// jars.add(o.getAbsolutePath());
// }
// }
for (Path path : paths) {
if (Files.exists(path) && Files.isDirectory(path)) {
try (Stream<Path> stream = Files.walk(path, FileVisitOption.FOLLOW_LINKS)) {
......@@ -116,12 +110,14 @@ public abstract class JettySeverTools {
}
filter = new WildcardFileFilter("openjpa-*.jar");
filter = FileFilterUtils.or(filter, new WildcardFileFilter("ehcache-*.jar"));
/* 如果不单独导入会导致java.lang.NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes */
// 如果不单独导入会导致java.lang.NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes
filter = FileFilterUtils.or(filter, new WildcardFileFilter("jetty-all-*.jar"));
filter = FileFilterUtils.or(filter, new WildcardFileFilter("jetty-proxy-*.jar"));
filter = FileFilterUtils.or(filter, new WildcardFileFilter("quartz-*.jar"));
filter = FileFilterUtils.or(filter, new WildcardFileFilter("filters-*.jar"));
/* jersey从AppClassLoader加载 */
// JaxWsDynamicClientFactory 需要在WebAppClassLoader加载 jakarta.xml.bind-api-*.jar
filter = FileFilterUtils.or(filter, new WildcardFileFilter("jakarta.xml.bind-api-*.jar"));
// jersey从AppClassLoader加载
for (File o : FileUtils.listFiles(Config.dir_commons_ext().toFile(), filter, null)) {
jars.add(o.getAbsolutePath());
}
......
......@@ -15,6 +15,7 @@ import com.x.base.core.project.config.Config;
import com.x.base.core.project.message.MessageConnector;
import com.x.processplatform.service.processing.processor.invoke.SyncJaxrsInvokeQueue;
import com.x.processplatform.service.processing.processor.invoke.SyncJaxwsInvokeQueue;
import com.x.processplatform.service.processing.schedule.ArchiveHadoop;
import com.x.processplatform.service.processing.schedule.DeleteDraft;
import com.x.processplatform.service.processing.schedule.Expire;
import com.x.processplatform.service.processing.schedule.LogLongDetained;
......@@ -52,7 +53,7 @@ public class ThisApplication {
public static final SyncJaxwsInvokeQueue syncJaxwsInvokeQueue = new SyncJaxwsInvokeQueue();
public static final UpdateTableQueue updateTableQueue = new UpdateTableQueue();
public static final ArchiveHadoopQueue archiveHadoopQueue = new ArchiveHadoopQueue();
private static ProcessingToProcessingSignalStack processingToProcessingSignalStack = new ProcessingToProcessingSignalStack();
......@@ -102,7 +103,7 @@ public class ThisApplication {
context.schedule(UpdateTable.class, Config.processPlatform().getUpdateTable().getCron());
}
if (BooleanUtils.isTrue(Config.processPlatform().getArchiveHadoop().getEnable())) {
context.schedule(UpdateTable.class, Config.processPlatform().getArchiveHadoop().getCron());
context.schedule(ArchiveHadoop.class, Config.processPlatform().getArchiveHadoop().getCron());
}
} catch (Exception e) {
e.printStackTrace();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册