Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 81d49bf2b -> 22279cf58
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/22279cf5 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/22279cf5 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/22279cf5 Branch: refs/heads/3.0.x-fixes Commit: 22279cf58a2c00af83524fe123f2aab670b6168a Parents: 81d49bf Author: Akitoshi Yoshida <a...@apache.org> Authored: Fri Dec 5 11:13:29 2014 +0100 Committer: Akitoshi Yoshida <a...@apache.org> Committed: Fri Dec 5 12:19:26 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/22279cf5/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/22279cf5/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);