Author: bimargulies
Date: Wed Mar 19 06:35:16 2008
New Revision: 638828
URL: http://svn.apache.org/viewvc?rev=638828&view=rev
Log:
Speed up repeated endpoint creation by a very large amount by caching the
schemas, both
in DOM and XmlSchema forms.
Added:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceSchemaInfo.java
(with props)
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/ClientEndpointCreationLoop.java
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/CacheMap.java
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
(original)
+++
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceInfo.java
Wed Mar 19 06:35:16 2008
@@ -165,11 +165,16 @@
return null;
}
- public Collection<SchemaInfo> getSchemas() {
- return Collections.unmodifiableCollection(schemas);
+ public List<SchemaInfo> getSchemas() {
+ return Collections.unmodifiableList(schemas);
}
public SchemaCollection getXmlSchemaCollection() {
return xmlSchemaCollection;
+ }
+
+ public void setServiceSchemaInfo(ServiceSchemaInfo serviceSchemaInfo) {
+ xmlSchemaCollection = serviceSchemaInfo.getSchemaCollection();
+ schemas = serviceSchemaInfo.getSchemaInfoList();
}
}
Added:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceSchemaInfo.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceSchemaInfo.java?rev=638828&view=auto
==============================================================================
---
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceSchemaInfo.java
(added)
+++
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceSchemaInfo.java
Wed Mar 19 06:35:16 2008
@@ -0,0 +1,47 @@
+/**
+ * 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 org.apache.cxf.service.model;
+
+import java.util.List;
+
+import org.apache.cxf.common.xmlschema.SchemaCollection;
+
+/**
+ * The ServiceInfo class has schema in two forms: the XmlSchema, in a
SchemaCollection, and the
+ * DOM trees in the SchemaInfo objects. This class exists in order to allow
the WSDL cache to store both.
+ */
+public class ServiceSchemaInfo {
+ private SchemaCollection schemaCollection;
+ private List<SchemaInfo> schemaInfoList;
+
+ public SchemaCollection getSchemaCollection() {
+ return schemaCollection;
+ }
+ public void setSchemaCollection(SchemaCollection schemaCollection) {
+ this.schemaCollection = schemaCollection;
+ }
+ public List<SchemaInfo> getSchemaInfoList() {
+ return schemaInfoList;
+ }
+ public void setSchemaInfoList(List<SchemaInfo> schemaInfoList) {
+ this.schemaInfoList = schemaInfoList;
+ }
+
+}
Propchange:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceSchemaInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/ServiceSchemaInfo.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
Wed Mar 19 06:35:16 2008
@@ -26,8 +26,9 @@
import javax.wsdl.WSDLException;
import javax.wsdl.extensions.ExtensionRegistry;
import javax.wsdl.factory.WSDLFactory;
-
import org.w3c.dom.Element;
+import org.apache.cxf.service.model.ServiceSchemaInfo;
+
/**
* WSDLManager
@@ -41,7 +42,7 @@
* this to register their own extensors.
* @return the ExtensionRegistry
*/
- ExtensionRegistry getExtenstionRegistry();
+ ExtensionRegistry getExtensionRegistry();
/**
* Returns the WSDLFactory that is used to read/write WSDL definitions
@@ -90,5 +91,19 @@
* @return all Definitions in the map
*/
Map<Object, Definition> getDefinitions();
+
+ /**
+ * This object will cache the schemas for a WSDL.
+ * @param wsdl
+ * @return
+ */
+ ServiceSchemaInfo getSchemasForDefinition(Definition wsdl);
+
+ /**
+ * Register a collection of schemas for a WSDL.
+ * @param wsdl
+ * @param schemas
+ */
+ void putSchemasForDefinition(Definition wsdl, ServiceSchemaInfo schemas);
}
Modified:
incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/ClientEndpointCreationLoop.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/ClientEndpointCreationLoop.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/ClientEndpointCreationLoop.java
(original)
+++
incubator/cxf/trunk/benchmark/profiling/src/main/java/org/apache/cxf/profile/ClientEndpointCreationLoop.java
Wed Mar 19 06:35:16 2008
@@ -61,6 +61,8 @@
}
Controller.stopAllocRecording();
Controller.stopCPURecording();
- Controller.saveSnapshot(new File(args[1]));
+ if (args.length > 1) {
+ Controller.saveSnapshot(new File(args[1]));
+ }
}
}
Modified:
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/CacheMap.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/CacheMap.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/CacheMap.java
(original)
+++
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/CacheMap.java
Wed Mar 19 06:35:16 2008
@@ -25,8 +25,8 @@
/**
- * Implements a useful caching map. It weakly references the keys,
- * but strongly references the data. It works a log like the WeakHashMap,
+ * Implements a useful caching map. It weakly references the keys,
+ * but strongly references the data. It works much like the WeakHashMap,
* in that when the keys are garbage collected, the data is removed from
* the map.
*
Modified:
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
(original)
+++
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
Wed Mar 19 06:35:16 2008
@@ -251,23 +251,29 @@
}
public void addGlobalElementToSchema(XmlSchemaElement element) {
- XmlSchema schema =
getSchemaByTargetNamespace(element.getQName().getNamespaceURI());
- if (schema == null) {
- schema =
newXmlSchemaInCollection(element.getQName().getNamespaceURI());
+ synchronized (this) {
+ XmlSchema schema =
getSchemaByTargetNamespace(element.getQName().getNamespaceURI());
+ if (schema == null) {
+ schema =
newXmlSchemaInCollection(element.getQName().getNamespaceURI());
+ }
+ schema.getItems().add(element);
+ // believe it or not, it is up to us to do both of these adds!
+ schema.getElements().add(element.getQName(), element);
}
- schema.getItems().add(element);
- // believe it or not, it is up to us to do both of these adds!
- schema.getElements().add(element.getQName(), element);
}
public static void addGlobalElementToSchema(XmlSchema schema,
XmlSchemaElement element) {
- schema.getItems().add(element);
- // believe it or not, it is up to us to do both of these adds!
- schema.getElements().add(element.getQName(), element);
+ synchronized (schema) {
+ schema.getItems().add(element);
+ // believe it or not, it is up to us to do both of these adds!
+ schema.getElements().add(element.getQName(), element);
+ }
}
public static void addGlobalTypeToSchema(XmlSchema schema, XmlSchemaType
type) {
- schema.getItems().add(type);
- schema.addType(type);
+ synchronized (schema) {
+ schema.getItems().add(type);
+ schema.addType(type);
+ }
}
}
Modified:
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Wed Mar 19 06:35:16 2008
@@ -180,7 +180,7 @@
private void createSoapBinding(final SoapBindingInfo bi) throws
WSDLException {
boolean isSoap12 = bi.getSoapVersion() instanceof Soap12;
ExtensionRegistry extensionRegistry =
getBus().getExtension(WSDLManager.class)
- .getExtenstionRegistry();
+ .getExtensionRegistry();
SoapBinding soapBinding =
SOAPBindingUtil.createSoapBinding(extensionRegistry, isSoap12);
soapBinding.setStyle(bi.getStyle());
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
(original)
+++
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
Wed Mar 19 06:35:16 2008
@@ -159,7 +159,7 @@
WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class)
.getWSDLFactory().newWSDLWriter();
-
def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtenstionRegistry());
+
def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
doc = wsdlWriter.getDocument(def);
} else {
SchemaReference si = smp.get(xsd);
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
(original)
+++
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
Wed Mar 19 06:35:16 2008
@@ -205,7 +205,7 @@
private Definition newDefinition(final QName name, String targetNamespace)
{
Definition d =
bus.getExtension(WSDLManager.class).getWSDLFactory().newDefinition();
-
d.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtenstionRegistry());
+
d.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
d.setQName(name);
d.setTargetNamespace(targetNamespace);
addNamespace(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NS_SCHEMA_XSD,
d);
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
(original)
+++
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Wed Mar 19 06:35:16 2008
@@ -53,6 +53,7 @@
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.CacheMap;
import org.apache.cxf.common.util.PropertiesLoaderUtils;
+import org.apache.cxf.service.model.ServiceSchemaInfo;
import org.apache.cxf.wsdl.JAXBExtensionHelper;
import org.apache.cxf.wsdl.WSDLConstants;
import org.apache.cxf.wsdl.WSDLManager;
@@ -71,6 +72,9 @@
final ExtensionRegistry registry;
final WSDLFactory factory;
final Map<Object, Definition> definitionsMap;
+ final Map<Definition, ServiceSchemaInfo> schemaCacheMap;
+ private boolean disableSchemaCache;
+
private Bus bus;
public WSDLManagerImpl() throws BusException {
@@ -93,6 +97,7 @@
throw new BusException(e);
}
definitionsMap = new CacheMap<Object, Definition>();
+ schemaCacheMap = new CacheMap<Definition, ServiceSchemaInfo>();
registerInitialExtensions();
}
@@ -127,7 +132,7 @@
*
* @see org.apache.cxf.wsdl.WSDLManager#getExtenstionRegistry()
*/
- public ExtensionRegistry getExtenstionRegistry() {
+ public ExtensionRegistry getExtensionRegistry() {
return registry;
}
@@ -230,6 +235,37 @@
LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex);
}
}
+ }
+
+ public ServiceSchemaInfo getSchemasForDefinition(Definition wsdl) {
+ if (disableSchemaCache) {
+ return null;
+ }
+ synchronized (schemaCacheMap) {
+ return schemaCacheMap.get(wsdl);
+ }
+
+ }
+
+ public void putSchemasForDefinition(Definition wsdl, ServiceSchemaInfo
schemas) {
+ if (!disableSchemaCache) {
+ synchronized (schemaCacheMap) {
+ schemaCacheMap.put(wsdl, schemas);
+ }
+ }
+
+ }
+
+ public boolean isDisableSchemaCache() {
+ return disableSchemaCache;
+ }
+
+ /**
+ * There's a test that 'fails' by succeeding if the cache is operational.
+ * @param disableSchemaCache
+ */
+ public void setDisableSchemaCache(boolean disableSchemaCache) {
+ this.disableSchemaCache = disableSchemaCache;
}
}
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
(original)
+++
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
Wed Mar 19 06:35:16 2008
@@ -70,9 +70,11 @@
import org.apache.cxf.service.model.MessagePartInfo;
import org.apache.cxf.service.model.OperationInfo;
import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.service.model.ServiceSchemaInfo;
import org.apache.cxf.service.model.UnwrappedOperationInfo;
import org.apache.cxf.transport.DestinationFactory;
import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.cxf.wsdl.WSDLManager;
import org.apache.ws.commons.schema.XmlSchemaComplexContentExtension;
import org.apache.ws.commons.schema.XmlSchemaComplexType;
import org.apache.ws.commons.schema.XmlSchemaElement;
@@ -235,8 +237,24 @@
description.getDescribed().add(service);
service.setProperty(WSDL_DEFINITION, def);
service.setProperty(WSDL_SERVICE, serv);
+ WSDLManager wsdlManager = bus.getExtension(WSDLManager.class);
+ ServiceSchemaInfo serviceSchemaInfo = null;
+ if (wsdlManager != null) {
+ serviceSchemaInfo =
wsdlManager.getSchemasForDefinition(def);
+ }
+
+ if (serviceSchemaInfo != null) {
+ service.setServiceSchemaInfo(serviceSchemaInfo);
+ } else {
+ getSchemas(def, service);
+ if (wsdlManager != null) {
+ serviceSchemaInfo = new ServiceSchemaInfo();
+
serviceSchemaInfo.setSchemaCollection(service.getXmlSchemaCollection());
+
serviceSchemaInfo.setSchemaInfoList(service.getSchemas());
+ wsdlManager.putSchemasForDefinition(def,
serviceSchemaInfo);
+ }
+ }
- getSchemas(def, service);
service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
service.setTargetNamespace(def.getTargetNamespace());
service.setName(serv.getQName());
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
(original)
+++
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
Wed Mar 19 06:35:16 2008
@@ -208,7 +208,7 @@
Addressing addressing = getAddressing();
if (addressing != null) {
ExtensionRegistry extensionRegistry =
getBus().getExtension(WSDLManager.class)
- .getExtenstionRegistry();
+ .getExtensionRegistry();
try {
ExtensibilityElement el =
extensionRegistry.createExtension(javax.wsdl.Binding.class,
JAXWSAConstants.
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
(original)
+++
incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsServerFactoryBeanTest.java
Wed Mar 19 06:35:16 2008
@@ -107,7 +107,7 @@
Definition def = new ServiceWSDLBuilder(bus, service).build();
WSDLWriter wsdlWriter =
bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter();
-
def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtenstionRegistry());
+
def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
Document doc = wsdlWriter.getDocument(def);
Map<String, String> ns = new HashMap<String, String>();
@@ -142,7 +142,7 @@
Definition def = new ServiceWSDLBuilder(bus, service).build();
WSDLWriter wsdlWriter =
bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter();
-
def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtenstionRegistry());
+
def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
Document doc = wsdlWriter.getDocument(def);
Map<String, String> ns = new HashMap<String, String>();
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java?rev=638828&r1=638827&r2=638828&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java
Wed Mar 19 06:35:16 2008
@@ -34,6 +34,8 @@
import org.apache.cxf.catalog.CatalogWSDLLocator;
import org.apache.cxf.catalog.OASISCatalogManager;
import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.wsdl.WSDLManager;
+import org.apache.cxf.wsdl11.WSDLManagerImpl;
import org.apache.hello_world.Greeter;
import org.apache.hello_world.GreeterImpl;
@@ -97,6 +99,9 @@
Bus bus = BusFactory.getDefaultBus();
OASISCatalogManager catalog = new OASISCatalogManager();
bus.setExtension(catalog, OASISCatalogManager.class);
+ // prevent cache from papering over the lack of a schema.
+ WSDLManagerImpl mgr =
(WSDLManagerImpl)bus.getExtension(WSDLManager.class);
+ mgr.setDisableSchemaCache(true);
try {
SOAPService service = new SOAPService(wsdl, serviceName);