You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/11/13 21:07:47 UTC
svn commit: r713808 - in /cxf/branches/2.1.x-fixes: ./
api/src/main/java/org/apache/cxf/transport/
common/common/src/main/java/org/apache/cxf/resource/
rt/core/src/main/java/org/apache/cxf/catalog/
rt/core/src/main/java/org/apache/cxf/configuration/spr...
Author: dkulp
Date: Thu Nov 13 12:07:46 2008
New Revision: 713808
URL: http://svn.apache.org/viewvc?rev=713808&view=rev
Log:
Merged revisions 713804 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r713804 | dkulp | 2008-11-13 14:57:18 -0500 (Thu, 13 Nov 2008) | 3 lines
Remove some unused code
Wire in conduits into wsdl/schema resolving so configured https conduits can be used to retrieve wsdls/schemas
........
Added:
cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/transport/TransportURIResolver.java
- copied unchanged from r713804, cxf/trunk/api/src/main/java/org/apache/cxf/transport/TransportURIResolver.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/AbstractWrapperWSDLLocator.java
- copied unchanged from r713804, cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/AbstractWrapperWSDLLocator.java
Removed:
cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/XmlSchemaURIResolver.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLLocatorImpl.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLResolver.java
Modified:
cxf/branches/2.1.x-fixes/ (props changed)
cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/ExtendedURIResolver.java
cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/URIResolver.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogWSDLLocator.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogXmlSchemaURIResolver.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ResourceManagerWSDLLocator.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java
cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java
cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml
cxf/branches/2.1.x-fixes/tools/javato/ws/pom.xml
cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 13 12:07:46 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584,704937,704997,705150,705235,705274,705340,705446,705548,705614,705692,705708,706482,706631,706675,706900,706909,707034,707089,707100,707902,708035,708044,708074,708417,708550,708554,709353-709354,709425,710076,710150,710154,71138
8,711410,711490,711975,712194,712198,712238,712272,712299,712312,712670,712893,713082,713095-713096,713099,713584,713597
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584,704937,704997,705150,705235,705274,705340,705446,705548,705614,705692,705708,706482,706631,706675,706900,706909,707034,707089,707100,707902,708035,708044,708074,708417,708550,708554,709353-709354,709425,710076,710150,710154,71138
8,711410,711490,711975,712194,712198,712238,712272,712299,712312,712670,712893,713082,713095-713096,713099,713584,713597,713804
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/ExtendedURIResolver.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/ExtendedURIResolver.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/ExtendedURIResolver.java (original)
+++ cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/ExtendedURIResolver.java Thu Nov 13 12:07:46 2008
@@ -28,9 +28,9 @@
public class ExtendedURIResolver {
- private org.apache.cxf.resource.URIResolver currentResolver;
- private String lastestImportUri;
- private Stack<InputStream> resourceOpened = new Stack<InputStream>();
+ protected org.apache.cxf.resource.URIResolver currentResolver;
+ protected String lastestImportUri;
+ protected Stack<InputStream> resourceOpened = new Stack<InputStream>();
public ExtendedURIResolver() {
currentResolver = new org.apache.cxf.resource.URIResolver();
Modified: cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/URIResolver.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/URIResolver.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/URIResolver.java (original)
+++ cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/resource/URIResolver.java Thu Nov 13 12:07:46 2008
@@ -78,6 +78,11 @@
}
}
+ public void unresolve() {
+ this.file = null;
+ this.uri = null;
+ this.is = null;
+ }
public void resolve(String baseUriStr, String uriStr, Class callingCls) throws IOException {
this.calling = (callingCls != null) ? callingCls : getClass();
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogWSDLLocator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogWSDLLocator.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogWSDLLocator.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogWSDLLocator.java Thu Nov 13 12:07:46 2008
@@ -25,7 +25,9 @@
import org.xml.sax.InputSource;
+import org.apache.cxf.Bus;
import org.apache.cxf.resource.ExtendedURIResolver;
+import org.apache.cxf.transport.TransportURIResolver;
import org.apache.xml.resolver.Catalog;
/**
@@ -38,15 +40,24 @@
private Catalog catalogResolver;
private String baseUri;
+ public CatalogWSDLLocator(String wsdlUrl) {
+ this.baseUri = wsdlUrl;
+ this.resolver = new ExtendedURIResolver();
+ }
public CatalogWSDLLocator(String wsdlUrl, OASISCatalogManager catalogManager) {
this.baseUri = wsdlUrl;
this.catalogResolver = catalogManager.getCatalog();
this.resolver = new ExtendedURIResolver();
}
+ public CatalogWSDLLocator(String wsdlUrl, Bus b) {
+ this.baseUri = wsdlUrl;
+ this.catalogResolver = OASISCatalogManager.getCatalogManager(b).getCatalog();
+ this.resolver = new TransportURIResolver(b);
+ }
public InputSource getBaseInputSource() {
InputSource result = resolver.resolve(baseUri, null);
- if (result == null) {
+ if (result == null && catalogResolver != null) {
try {
String s = catalogResolver.resolveSystem(baseUri);
if (s != null) {
@@ -88,17 +99,18 @@
this.baseUri = parent;
String resolvedImportLocation = null;
- try {
- resolvedImportLocation = this.catalogResolver.resolveSystem(importLocation);
- if (resolvedImportLocation == null) {
- resolvedImportLocation = catalogResolver.resolveURI(importLocation);
- }
- if (resolvedImportLocation == null) {
- resolvedImportLocation = catalogResolver.resolvePublic(importLocation, parent);
+ if (catalogResolver != null) {
+ try {
+ resolvedImportLocation = this.catalogResolver.resolveSystem(importLocation);
+ if (resolvedImportLocation == null) {
+ resolvedImportLocation = catalogResolver.resolveURI(importLocation);
+ }
+ if (resolvedImportLocation == null) {
+ resolvedImportLocation = catalogResolver.resolvePublic(importLocation, parent);
+ }
+ } catch (IOException e) {
+ throw new RuntimeException("Catalog resolution failed", e);
}
-
- } catch (IOException e) {
- throw new RuntimeException("Catalog resolution failed", e);
}
InputSource in = null;
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogXmlSchemaURIResolver.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogXmlSchemaURIResolver.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogXmlSchemaURIResolver.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/CatalogXmlSchemaURIResolver.java Thu Nov 13 12:07:46 2008
@@ -18,6 +18,7 @@
*/
package org.apache.cxf.catalog;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
@@ -28,6 +29,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.resource.ExtendedURIResolver;
+import org.apache.cxf.transport.TransportURIResolver;
import org.apache.ws.commons.schema.XmlSchemaException;
import org.apache.ws.commons.schema.resolver.URIResolver;
import org.apache.xml.resolver.Catalog;
@@ -43,6 +45,8 @@
public CatalogXmlSchemaURIResolver(Bus bus) {
this(OASISCatalogManager.getCatalogManager(bus));
+ this.resolver = new TransportURIResolver(bus);
+ this.catalogResolver = OASISCatalogManager.getCatalogManager(bus).getCatalog();
}
public CatalogXmlSchemaURIResolver(OASISCatalogManager catalogManager) {
this.resolver = new ExtendedURIResolver();
@@ -85,7 +89,8 @@
+ (baseUri == null
? "."
: ", relative to '" + baseUri + "'."));
- } else if (in.getByteStream() != null) {
+ } else if (in.getByteStream() != null
+ && !(in.getByteStream() instanceof ByteArrayInputStream)) {
//workaround bug in XmlSchema - XmlSchema is not closing the InputStreams
//that are returned for imports. Thus, with a lot of services starting up
//or a lot of schemas imported or similar, it's easy to run out of
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java Thu Nov 13 12:07:46 2008
@@ -104,10 +104,13 @@
}
public void configureBean(Object beanInstance) {
- configureBean(null, beanInstance);
+ configureBean(null, beanInstance, true);
}
- public synchronized void configureBean(String bn, Object beanInstance) {
+ public void configureBean(String bn, Object beanInstance) {
+ configureBean(bn, beanInstance, true);
+ }
+ public synchronized void configureBean(String bn, Object beanInstance, boolean checkWildcards) {
if (null == appContexts) {
return;
@@ -120,8 +123,9 @@
if (null == bn) {
return;
}
-
- configureWithWildCard(bn, beanInstance);
+ if (checkWildcards) {
+ configureWithWildCard(bn, beanInstance);
+ }
final String beanName = bn;
setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
@@ -155,7 +159,7 @@
}
private void configureWithWildCard(String bn, Object beanInstance) {
- if (!wildCardBeanDefinitions.isEmpty() && !isWildcardBeanName(bn)) {
+ if (!wildCardBeanDefinitions.isEmpty()) {
String className = beanInstance.getClass().getName();
List<MatcherHolder> matchers = wildCardBeanDefinitions.get(className);
if (matchers != null) {
@@ -163,7 +167,7 @@
synchronized (m.matcher) {
m.matcher.reset(bn);
if (m.matcher.matches()) {
- configureBean(m.wildCardId, beanInstance);
+ configureBean(m.wildCardId, beanInstance, false);
return;
}
}
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java Thu Nov 13 12:07:46 2008
@@ -29,6 +29,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusException;
+import org.apache.cxf.bus.extension.DeferredMap;
import org.apache.cxf.common.i18n.BundleUtils;
import org.apache.cxf.common.i18n.Message;
import org.apache.cxf.configuration.spring.MapProvider;
@@ -119,7 +120,24 @@
}
public ConduitInitiator getConduitInitiatorForUri(String uri) {
- // TODO Auto-generated method stub
+ for (ConduitInitiator ci : conduitInitiators.values()) {
+ for (String prefix : ci.getUriPrefixes()) {
+ if (uri.startsWith(prefix)) {
+ return ci;
+ }
+ }
+ }
+ //looks like we'll need to undefer everything so we can try again.
+ if (conduitInitiators instanceof DeferredMap) {
+ ((DeferredMap)conduitInitiators).undefer();
+ for (ConduitInitiator df : conduitInitiators.values()) {
+ for (String prefix : df.getUriPrefixes()) {
+ if (uri.startsWith(prefix)) {
+ return df;
+ }
+ }
+ }
+ }
return null;
}
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java Thu Nov 13 12:07:46 2008
@@ -136,6 +136,7 @@
if (!mp.containsKey("")) {
Definition def = new ServiceWSDLBuilder(bus, endpointInfo.getService()).build();
+
mp.put("", def);
updateDefinition(def, mp, smp, base, endpointInfo);
}
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ResourceManagerWSDLLocator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ResourceManagerWSDLLocator.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ResourceManagerWSDLLocator.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ResourceManagerWSDLLocator.java Thu Nov 13 12:07:46 2008
@@ -18,7 +18,6 @@
*/
package org.apache.cxf.wsdl11;
-import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -27,91 +26,39 @@
import org.apache.cxf.Bus;
import org.apache.cxf.catalog.CatalogWSDLLocator;
-import org.apache.cxf.catalog.OASISCatalogManager;
import org.apache.cxf.resource.ResourceManager;
-public class ResourceManagerWSDLLocator implements WSDLLocator {
- WSDLLocator parent;
+public class ResourceManagerWSDLLocator extends AbstractWrapperWSDLLocator {
Bus bus;
- String wsdlUrl;
- InputSource last;
- String baseUri;
- boolean fromParent;
public ResourceManagerWSDLLocator(String wsdlUrl,
WSDLLocator parent,
Bus bus) {
- this.wsdlUrl = wsdlUrl;
+ super(wsdlUrl, parent);
this.bus = bus;
- this.parent = parent;
}
public ResourceManagerWSDLLocator(String wsdlUrl,
Bus bus) {
- this.wsdlUrl = wsdlUrl;
+ super(wsdlUrl, new CatalogWSDLLocator(wsdlUrl, bus));
this.bus = bus;
- this.parent = new CatalogWSDLLocator(wsdlUrl, OASISCatalogManager.getCatalogManager(bus));
}
- public void close() {
- if (!fromParent) {
- try {
- if (last.getByteStream() != null) {
- last.getByteStream().close();
- }
- } catch (IOException e) {
- //ignore
- }
+ public InputSource getInputSource() {
+ InputStream ins = bus.getExtension(ResourceManager.class).getResourceAsStream(wsdlUrl);
+ InputSource is = new InputSource(ins);
+ is.setSystemId(wsdlUrl);
+ is.setPublicId(wsdlUrl);
+
+ URL url = bus.getExtension(ResourceManager.class).resolveResource(wsdlUrl, URL.class);
+ if (url != null) {
+ is.setSystemId(url.toString());
+ is.setPublicId(url.toString());
}
- parent.close();
- }
-
- public InputSource getBaseInputSource() {
- InputSource is = parent.getBaseInputSource();
- fromParent = true;
- if (is == null) {
- InputStream ins = bus.getExtension(ResourceManager.class).getResourceAsStream(wsdlUrl);
- is = new InputSource(ins);
- is.setSystemId(wsdlUrl);
- is.setPublicId(wsdlUrl);
-
- URL url = bus.getExtension(ResourceManager.class).resolveResource(wsdlUrl, URL.class);
- if (url != null) {
- is.setSystemId(url.toString());
- is.setPublicId(url.toString());
- }
- fromParent = false;
- baseUri = is.getPublicId();
- } else {
- baseUri = is.getSystemId();
- }
- last = is;
-
+ baseUri = is.getPublicId();
return is;
}
-
- public String getBaseURI() {
- if (last == null) {
- getBaseInputSource();
- try {
- if (last.getByteStream() != null) {
- last.getByteStream().close();
- }
- } catch (IOException e) {
- //ignore
- }
- }
- return baseUri;
- }
-
- public InputSource getImportInputSource(String parentLocation, String importLocation) {
- return parent.getImportInputSource(parentLocation, importLocation);
- }
-
- public String getLatestImportURI() {
- return parent.getLatestImportURI();
- }
-
+
}
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java Thu Nov 13 12:07:46 2008
@@ -38,7 +38,6 @@
import org.apache.cxf.Bus;
import org.apache.cxf.catalog.CatalogXmlSchemaURIResolver;
-import org.apache.cxf.catalog.OASISCatalogManager;
import org.apache.cxf.common.xmlschema.SchemaCollection;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.service.model.SchemaInfo;
@@ -119,7 +118,7 @@
schemaCol.setBaseUri(def.getDocumentBaseURI());
CatalogXmlSchemaURIResolver schemaResolver =
- new CatalogXmlSchemaURIResolver(OASISCatalogManager.getCatalogManager(bus));
+ new CatalogXmlSchemaURIResolver(bus);
schemaCol.setSchemaResolver(schemaResolver);
XmlSchema xmlSchema = schemaCol.read(schemaElem, systemId);
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java Thu Nov 13 12:07:46 2008
@@ -409,6 +409,12 @@
Map<QName, MessageInfo> messages = serviceInfo.getMessages();
for (Map.Entry<QName, MessageInfo> mie : messages.entrySet()) {
+ if (!mie.getKey().getNamespaceURI().equals(definition.getTargetNamespace())) {
+ continue;
+ }
+ if (definition.getMessage(mie.getKey()) != null) {
+ continue;
+ }
Message message = definition.createMessage();
message.setUndefined(false);
message.setQName(mie.getKey());
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Thu Nov 13 12:07:46 2008
@@ -51,7 +51,6 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusException;
import org.apache.cxf.catalog.CatalogWSDLLocator;
-import org.apache.cxf.catalog.OASISCatalogManager;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.CacheMap;
import org.apache.cxf.common.util.PropertiesLoaderUtils;
@@ -204,8 +203,7 @@
reader.setFeature("javax.wsdl.verbose", false);
reader.setFeature("javax.wsdl.importDocuments", true);
reader.setExtensionRegistry(registry);
- CatalogWSDLLocator catLocator =
- new CatalogWSDLLocator(url, OASISCatalogManager.getCatalogManager(bus));
+ CatalogWSDLLocator catLocator = new CatalogWSDLLocator(url, bus);
ResourceManagerWSDLLocator wsdlLocator = new ResourceManagerWSDLLocator(url,
catLocator,
bus);
Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Thu Nov 13 12:07:46 2008
@@ -101,10 +101,15 @@
private static final Logger LOG = LogUtils.getL7dLogger(WSDLServiceBuilder.class);
private Bus bus;
private Map<String, Element> schemaList = new HashMap<String, Element>();
+ private boolean recordOriginal = true;
public WSDLServiceBuilder(Bus bus) {
this.bus = bus;
}
+ public WSDLServiceBuilder(Bus bus, boolean record) {
+ this.bus = bus;
+ recordOriginal = record;
+ }
private void copyExtensors(AbstractPropertiesHolder info, List<?> extList) {
if (info != null) {
@@ -126,7 +131,9 @@
public List<ServiceInfo> buildServices(Definition d) {
DescriptionInfo description = new DescriptionInfo();
- description.setProperty(WSDL_DEFINITION, d);
+ if (recordOriginal) {
+ description.setProperty(WSDL_DEFINITION, d);
+ }
description.setName(d.getQName());
description.setBaseURI(d.getDocumentBaseURI());
copyExtensors(description, d.getExtensibilityElements());
@@ -178,7 +185,9 @@
if (def.getPortTypes().size() == 0) {
DescriptionInfo description = new DescriptionInfo();
- description.setProperty(WSDL_DEFINITION, def);
+ if (recordOriginal) {
+ description.setProperty(WSDL_DEFINITION, def);
+ }
description.setName(def.getQName());
description.setBaseURI(def.getDocumentBaseURI());
copyExtensors(description, def.getExtensibilityElements());
@@ -186,7 +195,9 @@
ServiceInfo service = new ServiceInfo();
service.setDescription(description);
- service.setProperty(WSDL_DEFINITION, def);
+ if (recordOriginal) {
+ service.setProperty(WSDL_DEFINITION, def);
+ }
getSchemas(def, service);
service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
@@ -198,7 +209,9 @@
public ServiceInfo buildMockService(Definition def, PortType p) {
DescriptionInfo description = new DescriptionInfo();
- description.setProperty(WSDL_DEFINITION, def);
+ if (recordOriginal) {
+ description.setProperty(WSDL_DEFINITION, def);
+ }
description.setName(def.getQName());
description.setBaseURI(def.getDocumentBaseURI());
copyExtensors(description, def.getExtensibilityElements());
@@ -206,7 +219,9 @@
ServiceInfo service = new ServiceInfo();
service.setDescription(description);
- service.setProperty(WSDL_DEFINITION, def);
+ if (recordOriginal) {
+ service.setProperty(WSDL_DEFINITION, def);
+ }
getSchemas(def, service);
service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
@@ -222,7 +237,9 @@
DescriptionInfo description = d;
if (null == description) {
description = new DescriptionInfo();
- description.setProperty(WSDL_DEFINITION, def);
+ if (recordOriginal) {
+ description.setProperty(WSDL_DEFINITION, def);
+ }
description.setName(def.getQName());
description.setBaseURI(def.getDocumentBaseURI());
copyExtensors(description, def.getExtensibilityElements());
@@ -242,8 +259,10 @@
service = new ServiceInfo();
service.setDescription(description);
description.getDescribed().add(service);
- service.setProperty(WSDL_DEFINITION, def);
- service.setProperty(WSDL_SERVICE, serv);
+ if (recordOriginal) {
+ service.setProperty(WSDL_DEFINITION, def);
+ service.setProperty(WSDL_SERVICE, serv);
+ }
getSchemas(def, service);
service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
@@ -475,7 +494,9 @@
}
this.copyExtensors(inf, p.getExtensibilityElements());
this.copyExtensionAttributes(inf, p);
- inf.setProperty(WSDL_PORTTYPE, p);
+ if (recordOriginal) {
+ inf.setProperty(WSDL_PORTTYPE, p);
+ }
for (Operation op : cast(p.getOperations(), Operation.class)) {
buildInterfaceOperation(inf, op);
}
@@ -484,7 +505,9 @@
private void buildInterfaceOperation(InterfaceInfo inf, Operation op) {
OperationInfo opInfo = inf.addOperation(new QName(inf.getName().getNamespaceURI(), op.getName()));
- opInfo.setProperty(WSDL_OPERATION, op);
+ if (recordOriginal) {
+ opInfo.setProperty(WSDL_OPERATION, op);
+ }
List<String> porderList = CastUtils.cast((List)op.getParameterOrdering());
opInfo.setParameterOrdering(porderList);
this.copyExtensors(opInfo, op.getExtensibilityElements());
Modified: cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java Thu Nov 13 12:07:46 2008
@@ -88,7 +88,7 @@
bindingFactoryManager = control.createMock(BindingFactoryManager.class);
destinationFactoryManager = control.createMock(DestinationFactoryManager.class);
destinationFactory = control.createMock(DestinationFactory.class);
- wsdlServiceBuilder = new WSDLServiceBuilder(bus);
+ wsdlServiceBuilder = new WSDLServiceBuilder(bus, false);
for (Service serv : CastUtils.cast(def.getServices().values(), Service.class)) {
if (serv != null) {
@@ -109,10 +109,7 @@
control.replay();
serviceInfo = wsdlServiceBuilder.buildServices(def, service).get(0);
- serviceInfo.setProperty(WSDLServiceBuilder.WSDL_DEFINITION, null);
- serviceInfo.setProperty(WSDLServiceBuilder.WSDL_SERVICE, null);
newDef = new ServiceWSDLBuilder(bus, serviceInfo).build();
-
}
@After
Modified: cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java (original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java Thu Nov 13 12:07:46 2008
@@ -44,6 +44,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.binding.BindingFactoryManager;
+import org.apache.cxf.catalog.CatalogWSDLLocator;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.xmlschema.SchemaCollection;
import org.apache.cxf.helpers.CastUtils;
@@ -111,7 +112,7 @@
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose", false);
- def = wsdlReader.readWSDL(new WSDLLocatorImpl(wsdlUrl));
+ def = wsdlReader.readWSDL(new CatalogWSDLLocator(wsdlUrl));
int seq = 0;
for (Service serv : CastUtils.cast(def.getServices().values(), Service.class)) {
Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java Thu Nov 13 12:07:46 2008
@@ -34,11 +34,11 @@
import org.apache.cxf.Bus;
import org.apache.cxf.binding.BindingFactoryManager;
+import org.apache.cxf.catalog.CatalogWSDLLocator;
import org.apache.cxf.service.model.MessageInfo;
import org.apache.cxf.service.model.OperationInfo;
import org.apache.cxf.service.model.ServiceInfo;
import org.apache.cxf.transport.DestinationFactoryManager;
-import org.apache.cxf.wsdl11.WSDLLocatorImpl;
import org.apache.cxf.wsdl11.WSDLServiceBuilder;
import org.easymock.classextension.EasyMock;
import org.easymock.classextension.IMocksControl;
@@ -147,7 +147,7 @@
private ServiceInfo getMockedServiceModel(String wsdlUrl) throws Exception {
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose", false);
- Definition def = wsdlReader.readWSDL(new WSDLLocatorImpl(wsdlUrl));
+ Definition def = wsdlReader.readWSDL(new CatalogWSDLLocator(wsdlUrl));
IMocksControl control = EasyMock.createNiceControl();
Bus bus = control.createMock(Bus.class);
Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java (original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java Thu Nov 13 12:07:46 2008
@@ -19,6 +19,8 @@
package org.apache.cxf.systest.http;
+import java.net.URL;
+
import javax.xml.ws.BindingProvider;
import org.apache.cxf.BusFactory;
@@ -75,12 +77,19 @@
//
// tests
//
-
-
- public final void testSuccessfulCall(String configuration, String address) throws Exception {
+ public final void testSuccessfulCall(String configuration,
+ String address) throws Exception {
+ testSuccessfulCall(configuration, address, null);
+ }
+ public final void testSuccessfulCall(String configuration,
+ String address,
+ URL url) throws Exception {
setTheConfiguration(configuration);
startServers();
- SOAPService service = new SOAPService();
+ if (url == null) {
+ url = SOAPService.WSDL_LOCATION;
+ }
+ SOAPService service = new SOAPService(url, SOAPService.SERVICE);
assertNotNull("Service is null", service);
final Greeter port = service.getHttpsPort();
assertNotNull("Port is null", port);
@@ -120,6 +129,7 @@
@Test
public final void testResourceKeySpecEndpointURL() throws Exception {
testSuccessfulCall("resources/resource-key-spec-url.xml",
- "https://localhost:9005/SoapContext/HttpsPort");
+ "https://localhost:9005/SoapContext/HttpsPort",
+ new URL("https://localhost:9005/SoapContext/HttpsPort?wsdl"));
}
}
Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml (original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml Thu Nov 13 12:07:46 2008
@@ -80,7 +80,7 @@
<!-- -->
<!-- This test exercises the resource attribute in a keyStore and certStore element -->
<!-- -->
- <http:conduit name="https://localhost:9005/SoapContext/HttpsPort">
+ <http:conduit name="https://localhost:9005/SoapContext/HttpsPort.*">
<http:tlsClientParameters disableCNCheck="true">
<sec:keyManagers keyPassword="password">
<sec:keyStore type="pkcs12" password="password"
Modified: cxf/branches/2.1.x-fixes/tools/javato/ws/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/javato/ws/pom.xml?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/javato/ws/pom.xml (original)
+++ cxf/branches/2.1.x-fixes/tools/javato/ws/pom.xml Thu Nov 13 12:07:46 2008
@@ -136,7 +136,12 @@
<artifactId>cxf-rt-databinding-aegis</artifactId>
<version>${project.version}</version>
</dependency>
-
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http-jetty</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
Modified: cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?rev=713808&r1=713807&r2=713808&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java (original)
+++ cxf/branches/2.1.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java Thu Nov 13 12:07:46 2008
@@ -26,6 +26,7 @@
import javax.xml.namespace.QName;
+import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.jaxb.JAXBDataBinding;
@@ -37,6 +38,7 @@
import org.apache.cxf.tools.fortest.withannotation.doc.Hello;
import org.apache.cxf.tools.java2wsdl.generator.wsdl11.WSDL11Generator;
import org.apache.cxf.tools.util.AnnotationUtil;
+import org.apache.cxf.transport.DestinationFactoryManager;
import org.apache.hello_world_rpclit.javato.GreeterRPCLit;
import org.junit.After;
import org.junit.Before;
@@ -54,6 +56,10 @@
builder = new JaxwsServiceBuilder();
builder.setBus(BusFactory.getDefaultBus());
generator.setBus(builder.getBus());
+
+ Bus b = builder.getBus();
+ assertNotNull(b.getExtension(DestinationFactoryManager.class)
+ .getDestinationFactory("http://schemas.xmlsoap.org/soap/http"));
}
@After