You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2014/12/05 12:18:34 UTC
cxf git commit: make tools-corba,
rt-ws-eventing tests run without the internet access
Repository: cxf
Updated Branches:
refs/heads/master 71ced4709 -> d611a7a4b
make tools-corba, rt-ws-eventing tests run without the internet access
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d611a7a4
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d611a7a4
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d611a7a4
Branch: refs/heads/master
Commit: d611a7a4b7648204c64f0acf05a51176eb0d4f92
Parents: 71ced47
Author: Akitoshi Yoshida <ay...@apache.org>
Authored: Fri Dec 5 11:13:29 2014 +0100
Committer: Akitoshi Yoshida <ay...@apache.org>
Committed: Fri Dec 5 12:18:27 2014 +0100
----------------------------------------------------------------------
.../test/resources/META-INF/jax-ws-catalog.xml | 23 ++++++++++++++++++++
.../tools/corba/utils/WSDLGenerationTester.java | 7 +++++-
2 files changed, 29 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/d611a7a4/rt/ws/eventing/src/test/resources/META-INF/jax-ws-catalog.xml
----------------------------------------------------------------------
diff --git a/rt/ws/eventing/src/test/resources/META-INF/jax-ws-catalog.xml b/rt/ws/eventing/src/test/resources/META-INF/jax-ws-catalog.xml
new file mode 100644
index 0000000..bdfa1c8
--- /dev/null
+++ b/rt/ws/eventing/src/test/resources/META-INF/jax-ws-catalog.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
+ <rewriteSystem systemIdStartString="http://www.w3.org/2006/03/addressing" rewritePrefix="classpath:/schemas/wsdl"/>
+ <rewriteSystem systemIdStartString="http://www.w3.org/2005/08/addressing" rewritePrefix="classpath:/schemas/wsdl"/>
+</catalog>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d611a7a4/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java b/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java
index 6f65764..7e13027 100644
--- a/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java
+++ b/tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/WSDLGenerationTester.java
@@ -30,8 +30,10 @@ import javax.wsdl.xml.WSDLWriter;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamReader;
+import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.wsdl.WSDLManager;
+import org.apache.cxf.wsdl11.CatalogWSDLLocator;
import org.apache.ws.commons.schema.XmlSchema;
import org.apache.ws.commons.schema.XmlSchemaCollection;
@@ -161,7 +163,10 @@ public class WSDLGenerationTester {
WSDLReader reader = factory.newWSDLReader();
reader.setFeature("javax.wsdl.importDocuments", false);
reader.setExtensionRegistry(wm.getExtensionRegistry());
- Definition wsdlDefn = reader.readWSDL(defnFile.toString());
+ final String url = defnFile.toString();
+ CatalogWSDLLocator locator = new CatalogWSDLLocator(url, (Bus)null);
+
+ Definition wsdlDefn = reader.readWSDL(locator);
WSDLWriter wsdlWriter = factory.newWSDLWriter();
wsdlWriter.writeWSDL(wsdlDefn, writer);