JBossWS SVN: r4338 - legacy/branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-08-13 11:06:55 -0400 (Mon, 13 Aug 2007)
New Revision: 4338
Added:
legacy/branches/dlofthouse/ASPATCH-260/
Log:
Temp area to test level of fix required.
Copied: legacy/branches/dlofthouse/ASPATCH-260 (from rev 4337, legacy/branches/jbossws-1.2.1.GA_CP)
17 years, 4 months
JBossWS SVN: r4337 - in stack/native/branches/native-2.0: src/main/java/org/jboss/ws/core/jaxws/client and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-13 10:28:40 -0400 (Mon, 13 Aug 2007)
New Revision: 4337
Modified:
stack/native/branches/native-2.0/
stack/native/branches/native-2.0/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java
stack/native/branches/native-2.0/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
Log:
more debug logging
Property changes on: stack/native/branches/native-2.0
___________________________________________________________________
Name: svn:ignore
- output-eclipse
output
thirdparty
output*
version.properties.md5
ant.properties
+ output-eclipse
output
thirdparty
output*
version.properties.md5
ant.properties
clipboard.txt
Modified: stack/native/branches/native-2.0/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java
===================================================================
--- stack/native/branches/native-2.0/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java 2007-08-13 14:16:55 UTC (rev 4336)
+++ stack/native/branches/native-2.0/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java 2007-08-13 14:28:40 UTC (rev 4337)
@@ -114,6 +114,8 @@
if (Service.class.isAssignableFrom(serviceClass) == false)
throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
+
+ log.debug("Loaded Service '" + serviceClass.getName() + "' from: " + serviceClass.getProtectionDomain().getCodeSource());
// Receives either a javax.xml.ws.Service or a dynamic proxy
Object target;
Modified: stack/native/branches/native-2.0/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/branches/native-2.0/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-08-13 14:16:55 UTC (rev 4336)
+++ stack/native/branches/native-2.0/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-08-13 14:28:40 UTC (rev 4337)
@@ -211,6 +211,8 @@
// Try the filename as Resource
if (fileURL == null)
{
+ log.debug(wsClass.getProtectionDomain().getCodeSource());
+ log.debug(wsClass.getClassLoader());
fileURL = wsClass.getClassLoader().getResource(filename);
}
@@ -232,6 +234,8 @@
if (fileURL == null)
throw new WSException("Cannot resolve handler file '" + filename + "' on " + wsClass.getName());
+ log.debug("Loading handler chain: " + fileURL);
+
UnifiedHandlerChainsMetaData handlerChainsMetaData = null;
try
{
17 years, 4 months
JBossWS SVN: r4336 - in legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src: test/java/org/jboss/test/ws/common/utils and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-08-13 10:16:55 -0400 (Mon, 13 Aug 2007)
New Revision: 4336
Modified:
legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src/main/java/org/jboss/ws/utils/DOMWriter.java
legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
Log:
[JBWS-1786] Failed to parse source: Element loginResponse is not bound as a Failed to parse source: Element XXXX is not bound as a global element.
Modified: legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src/main/java/org/jboss/ws/utils/DOMWriter.java
===================================================================
--- legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src/main/java/org/jboss/ws/utils/DOMWriter.java 2007-08-13 13:20:25 UTC (rev 4335)
+++ legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src/main/java/org/jboss/ws/utils/DOMWriter.java 2007-08-13 14:16:55 UTC (rev 4336)
@@ -102,6 +102,8 @@
private Node rootNode;
// True if we want namespace completion
private boolean completeNamespaces = true;
+ // The current default namespace
+ private String currentDefaultNamespace;
public DOMWriter(Writer w)
{
@@ -275,6 +277,7 @@
Map nsMap = new HashMap();
String elPrefix = node.getPrefix();
+ String elNamespaceURI = node.getNamespaceURI();
if (elPrefix != null)
{
String nsURI = getNamespaceURI(elPrefix, element, rootNode);
@@ -289,6 +292,9 @@
String atName = attr.getNodeName();
String atValue = normalize(attr.getNodeValue(), canonical);
+ if (atName.equals("xmlns"))
+ currentDefaultNamespace = atValue;
+
if (atPrefix != null && !atPrefix.equals("xmlns") && !atPrefix.equals("xml"))
{
String nsURI = getNamespaceURI(atPrefix, element, rootNode);
@@ -328,6 +334,18 @@
}
}
+ // The SAX ContentHandler will by default not add the namespace declaration
+ // <Hello xmlns='http://somens'>World</Hello>
+ if (elPrefix == null && elNamespaceURI != null)
+ {
+ String defaultNamespace = element.getAttribute("xmlns");
+ if (defaultNamespace.length() == 0 && !elNamespaceURI.equals(currentDefaultNamespace))
+ {
+ out.print(" xmlns='" + elNamespaceURI + "'");
+ currentDefaultNamespace = elNamespaceURI;
+ }
+ }
+
if (hasChildNodes)
{
out.print('>');
Modified: legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
===================================================================
--- legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2007-08-13 13:20:25 UTC (rev 4335)
+++ legacy/branches/jbossws-1.0.4.GA_JBWS-1786/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2007-08-13 14:16:55 UTC (rev 4336)
@@ -156,6 +156,34 @@
assertEquals(expStr, wasStr);
}
+ /** The envelope defines a default namespace
+ */
+ public void testNamespaceCompletionDefault() throws Exception
+ {
+ String inStr =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns='http://somens'>" +
+ "<env:Body>" +
+ "<rpc>" +
+ "<param1/>" +
+ "<param2/>" +
+ "</rpc>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ Element env = DOMUtils.parse(inStr);
+ Element body = DOMUtils.getFirstChildElement(env);
+ Element rpc = DOMUtils.getFirstChildElement(body);
+
+ String expStr =
+ "<rpc xmlns='http://somens'>" +
+ "<param1/>" +
+ "<param2/>" +
+ "</rpc>";
+
+ String wasStr = DOMWriter.printNode(rpc, false);
+ assertEquals(expStr, wasStr);
+ }
+
/** The element does not contain the required attribute ns declaration.
*/
public void testNamespaceCompletionAttribute() throws Exception
17 years, 4 months
JBossWS SVN: r4335 - framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-13 09:20:25 -0400 (Mon, 13 Aug 2007)
New Revision: 4335
Added:
framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
Modified:
framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
Log:
Extract DefaultSPIProvider
Copied: framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java (from rev 4334, framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java)
===================================================================
--- framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java (rev 0)
+++ framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2007-08-13 13:20:25 UTC (rev 4335)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.framework.deployment.DefaultDeploymentAspectManagerFactory;
+import org.jboss.wsf.framework.deployment.DefaultDeploymentModelFactory;
+import org.jboss.wsf.framework.deployment.DefaultLifecycleHandlerFactory;
+import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
+import org.jboss.wsf.framework.http.DefaultHttpServerFactory;
+import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
+import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
+import org.jboss.wsf.framework.serviceref.DefaultServiceRefHandlerFactory;
+import org.jboss.wsf.framework.serviceref.DefaultServiceRefMetaDataParserFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServerFactory;
+import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
+import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
+import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
+import org.jboss.wsf.spi.management.EndpointMetricsFactory;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParserFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
+import org.jboss.wsf.spi.util.ServiceLoader;
+
+/**
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 13-Aug-2007
+ */
+class DefaultSPIProvider extends SPIProvider
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(DefaultSPIProvider.class);
+
+ /**
+ * Gets the specified SPI.
+ */
+ public <T> T getSPI(Class<T> spiType)
+ {
+ log.debug("provide SPI '" + spiType + "'");
+
+ T returnType = null;
+
+ // SPI provided by framework, default that can be overridden
+
+ if (DeploymentAspectManagerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultDeploymentAspectManagerFactory.class.getName());
+ }
+ if (DeploymentModelFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultDeploymentModelFactory.class.getName());
+ }
+ else if (EndpointMetricsFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultEndpointMetricsFactory.class.getName());
+ }
+ else if (HttpContextFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultHttpContextFactory.class.getName());
+ }
+ else if (HttpServerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultHttpServerFactory.class.getName());
+ }
+ else if (LifecycleHandlerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultLifecycleHandlerFactory.class.getName());
+ }
+ else if (ResourceInjectorFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultResourceInjectorFactory.class.getName());
+ }
+ else if (ServiceRefHandlerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultServiceRefHandlerFactory.class.getName());
+ }
+ else if (ServiceRefMetaDataParserFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultServiceRefMetaDataParserFactory.class.getName());
+ }
+
+ // SPI provided by either container or stack integration
+
+ else if (EndpointRegistryFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (InvocationHandlerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (RequestHandlerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (SecurityAdaptorFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (ServerConfigFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (ServiceRefBinderFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (WebServiceContextFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+
+ if (returnType == null)
+ throw new WSFException("Failed to provide SPI '" + spiType + "'");
+
+ // help debugging
+ log.debug(spiType + " Implementation: " + returnType);
+
+ return returnType;
+ }
+
+ // Load SPI implementation through ServiceLoader
+ private <T> T loadService(Class<T> spiType, String defaultImpl)
+ {
+ return (T)ServiceLoader.loadService(spiType.getName(), defaultImpl);
+ }
+}
Modified: framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
===================================================================
--- framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2007-08-13 13:17:12 UTC (rev 4334)
+++ framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2007-08-13 13:20:25 UTC (rev 4335)
@@ -21,36 +21,8 @@
*/
package org.jboss.wsf.framework;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.framework.deployment.DefaultDeploymentAspectManagerFactory;
-import org.jboss.wsf.framework.deployment.DefaultDeploymentModelFactory;
-import org.jboss.wsf.framework.deployment.DefaultLifecycleHandlerFactory;
-import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
-import org.jboss.wsf.framework.http.DefaultHttpServerFactory;
-import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
-import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
-import org.jboss.wsf.framework.serviceref.DefaultServiceRefHandlerFactory;
-import org.jboss.wsf.framework.serviceref.DefaultServiceRefMetaDataParserFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFException;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
-import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
-import org.jboss.wsf.spi.http.HttpContextFactory;
-import org.jboss.wsf.spi.http.HttpServerFactory;
-import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
-import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
-import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
-import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
-import org.jboss.wsf.spi.management.EndpointMetricsFactory;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParserFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
-import org.jboss.wsf.spi.util.ServiceLoader;
/**
* @author Heiko.Braun(a)jboss.com
@@ -58,111 +30,8 @@
*/
public class DefaultSPIProviderResolver extends SPIProviderResolver
{
- private final static SPIProvider DEFAULT_PROVIDER = new Provider();
-
public SPIProvider getProvider()
{
- return DEFAULT_PROVIDER;
+ return new DefaultSPIProvider();
}
-
- static class Provider extends SPIProvider
- {
- // provide logging
- private static final Logger log = Logger.getLogger(Provider.class);
-
- /**
- * Gets the specified SPI.
- */
- public <T> T getSPI(Class<T> spiType)
- {
- log.debug("provide SPI '" + spiType + "'");
-
- T returnType = null;
-
- // SPI provided by framework, default that can be overridden
-
- if (DeploymentAspectManagerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultDeploymentAspectManagerFactory.class.getName());
- }
- if (DeploymentModelFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultDeploymentModelFactory.class.getName());
- }
- else if (EndpointMetricsFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultEndpointMetricsFactory.class.getName());
- }
- else if (HttpContextFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultHttpContextFactory.class.getName());
- }
- else if (HttpServerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultHttpServerFactory.class.getName());
- }
- else if (LifecycleHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultLifecycleHandlerFactory.class.getName());
- }
- else if (ResourceInjectorFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultResourceInjectorFactory.class.getName());
- }
- else if (ServiceRefHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultServiceRefHandlerFactory.class.getName());
- }
- else if (ServiceRefMetaDataParserFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultServiceRefMetaDataParserFactory.class.getName());
- }
-
- // SPI provided by either container or stack integration
-
- else if (EndpointRegistryFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (InvocationHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (RequestHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (SecurityAdaptorFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (ServerConfigFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (ServiceRefBinderFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (WebServiceContextFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
-
- // help debugging
- if (null == returnType)
- throw new WSFException("Failed to provide SPI '" + spiType + "'");
-
- log.debug(spiType + " Implementation: " + returnType);
-
- return returnType;
- }
-
- // Load SPI implementation through ServiceLoader
- private <T> T loadService(Class<T> spiType, String defaultImpl)
- {
- return (T)ServiceLoader.loadService(spiType.getName(), defaultImpl);
- }
- }
-
}
17 years, 4 months
JBossWS SVN: r4334 - framework/trunk/src/main/java/org/jboss/wsf/framework.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-13 09:17:12 -0400 (Mon, 13 Aug 2007)
New Revision: 4334
Added:
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
Log:
Extract DefaultSPIProvider
Added: framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2007-08-13 13:17:12 UTC (rev 4334)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.framework.deployment.DefaultDeploymentAspectManagerFactory;
+import org.jboss.wsf.framework.deployment.DefaultDeploymentModelFactory;
+import org.jboss.wsf.framework.deployment.DefaultLifecycleHandlerFactory;
+import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
+import org.jboss.wsf.framework.http.DefaultHttpServerFactory;
+import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
+import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
+import org.jboss.wsf.framework.serviceref.DefaultServiceRefHandlerFactory;
+import org.jboss.wsf.framework.serviceref.DefaultServiceRefMetaDataParserFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServerFactory;
+import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
+import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
+import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
+import org.jboss.wsf.spi.management.EndpointMetricsFactory;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParserFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
+import org.jboss.wsf.spi.util.ServiceLoader;
+
+/**
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 13-Aug-2007
+ */
+class DefaultSPIProvider extends SPIProvider
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(DefaultSPIProvider.class);
+
+ /**
+ * Gets the specified SPI.
+ */
+ public <T> T getSPI(Class<T> spiType)
+ {
+ log.debug("provide SPI '" + spiType + "'");
+
+ T returnType = null;
+
+ // SPI provided by framework, default that can be overridden
+
+ if (DeploymentAspectManagerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultDeploymentAspectManagerFactory.class.getName());
+ }
+ if (DeploymentModelFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultDeploymentModelFactory.class.getName());
+ }
+ else if (EndpointMetricsFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultEndpointMetricsFactory.class.getName());
+ }
+ else if (HttpContextFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultHttpContextFactory.class.getName());
+ }
+ else if (HttpServerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultHttpServerFactory.class.getName());
+ }
+ else if (LifecycleHandlerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultLifecycleHandlerFactory.class.getName());
+ }
+ else if (ResourceInjectorFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultResourceInjectorFactory.class.getName());
+ }
+ else if (ServiceRefHandlerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultServiceRefHandlerFactory.class.getName());
+ }
+ else if (ServiceRefMetaDataParserFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultServiceRefMetaDataParserFactory.class.getName());
+ }
+
+ // SPI provided by either container or stack integration
+
+ else if (EndpointRegistryFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (InvocationHandlerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (RequestHandlerFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (SecurityAdaptorFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (ServerConfigFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (ServiceRefBinderFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+ else if (WebServiceContextFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
+
+ if (returnType == null)
+ throw new WSFException("Failed to provide SPI '" + spiType + "'");
+
+ // help debugging
+ log.debug(spiType + " Implementation: " + returnType);
+
+ return returnType;
+ }
+
+ // Load SPI implementation through ServiceLoader
+ private <T> T loadService(Class<T> spiType, String defaultImpl)
+ {
+ return (T)ServiceLoader.loadService(spiType.getName(), defaultImpl);
+ }
+}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2007-08-13 13:16:44 UTC (rev 4333)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2007-08-13 13:17:12 UTC (rev 4334)
@@ -21,36 +21,8 @@
*/
package org.jboss.wsf.framework;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.framework.deployment.DefaultDeploymentAspectManagerFactory;
-import org.jboss.wsf.framework.deployment.DefaultDeploymentModelFactory;
-import org.jboss.wsf.framework.deployment.DefaultLifecycleHandlerFactory;
-import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
-import org.jboss.wsf.framework.http.DefaultHttpServerFactory;
-import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
-import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
-import org.jboss.wsf.framework.serviceref.DefaultServiceRefHandlerFactory;
-import org.jboss.wsf.framework.serviceref.DefaultServiceRefMetaDataParserFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFException;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
-import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
-import org.jboss.wsf.spi.http.HttpContextFactory;
-import org.jboss.wsf.spi.http.HttpServerFactory;
-import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
-import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
-import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
-import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
-import org.jboss.wsf.spi.management.EndpointMetricsFactory;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParserFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
-import org.jboss.wsf.spi.util.ServiceLoader;
/**
* @author Heiko.Braun(a)jboss.com
@@ -58,111 +30,8 @@
*/
public class DefaultSPIProviderResolver extends SPIProviderResolver
{
- private final static SPIProvider DEFAULT_PROVIDER = new Provider();
-
public SPIProvider getProvider()
{
- return DEFAULT_PROVIDER;
+ return new DefaultSPIProvider();
}
-
- static class Provider extends SPIProvider
- {
- // provide logging
- private static final Logger log = Logger.getLogger(Provider.class);
-
- /**
- * Gets the specified SPI.
- */
- public <T> T getSPI(Class<T> spiType)
- {
- log.debug("provide SPI '" + spiType + "'");
-
- T returnType = null;
-
- // SPI provided by framework, default that can be overridden
-
- if (DeploymentAspectManagerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultDeploymentAspectManagerFactory.class.getName());
- }
- if (DeploymentModelFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultDeploymentModelFactory.class.getName());
- }
- else if (EndpointMetricsFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultEndpointMetricsFactory.class.getName());
- }
- else if (HttpContextFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultHttpContextFactory.class.getName());
- }
- else if (HttpServerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultHttpServerFactory.class.getName());
- }
- else if (LifecycleHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultLifecycleHandlerFactory.class.getName());
- }
- else if (ResourceInjectorFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultResourceInjectorFactory.class.getName());
- }
- else if (ServiceRefHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultServiceRefHandlerFactory.class.getName());
- }
- else if (ServiceRefMetaDataParserFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultServiceRefMetaDataParserFactory.class.getName());
- }
-
- // SPI provided by either container or stack integration
-
- else if (EndpointRegistryFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (InvocationHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (RequestHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (SecurityAdaptorFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (ServerConfigFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (ServiceRefBinderFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (WebServiceContextFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
-
- // help debugging
- if (null == returnType)
- throw new WSFException("Failed to provide SPI '" + spiType + "'");
-
- log.debug(spiType + " Implementation: " + returnType);
-
- return returnType;
- }
-
- // Load SPI implementation through ServiceLoader
- private <T> T loadService(Class<T> spiType, String defaultImpl)
- {
- return (T)ServiceLoader.loadService(spiType.getName(), defaultImpl);
- }
- }
-
}
17 years, 4 months
JBossWS SVN: r4333 - spi/trunk/src/main/java/org/jboss/wsf/spi.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-13 09:16:44 -0400 (Mon, 13 Aug 2007)
New Revision: 4333
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/SPIProviderResolver.java
Log:
layout code
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/SPIProviderResolver.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/SPIProviderResolver.java 2007-08-13 12:59:45 UTC (rev 4332)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/SPIProviderResolver.java 2007-08-13 13:16:44 UTC (rev 4333)
@@ -23,7 +23,6 @@
import org.jboss.wsf.spi.util.ServiceLoader;
-
/**
* Locates an SPIProvider.
*
@@ -36,10 +35,8 @@
public static SPIProviderResolver getInstance()
{
- return (SPIProviderResolver) ServiceLoader.loadService(
- SPIProviderResolver.class.getName(),
- DEFAULT_SPI_PROVIDER_RESOLVER
- );
+ SPIProviderResolver resolver = (SPIProviderResolver)ServiceLoader.loadService(SPIProviderResolver.class.getName(), DEFAULT_SPI_PROVIDER_RESOLVER);
+ return resolver;
}
public abstract SPIProvider getProvider();
17 years, 4 months
JBossWS SVN: r4332 - legacy/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-08-13 08:59:45 -0400 (Mon, 13 Aug 2007)
New Revision: 4332
Added:
legacy/branches/jbossws-1.0.4.GA_JBWS-1786/
Log:
Branch for JBWS-1786
Copied: legacy/branches/jbossws-1.0.4.GA_JBWS-1786 (from rev 4331, legacy/tags/jbossws-1.0.4.GA)
17 years, 4 months
JBossWS SVN: r4331 - framework/branches/framework-2.0/hudson/hudson-home.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-13 08:34:52 -0400 (Mon, 13 Aug 2007)
New Revision: 4331
Modified:
framework/branches/framework-2.0/hudson/hudson-home/config.xml
Log:
Remove sunri, xfire
Modified: framework/branches/framework-2.0/hudson/hudson-home/config.xml
===================================================================
--- framework/branches/framework-2.0/hudson/hudson-home/config.xml 2007-08-13 12:25:54 UTC (rev 4330)
+++ framework/branches/framework-2.0/hudson/hudson-home/config.xml 2007-08-13 12:34:52 UTC (rev 4331)
@@ -72,10 +72,6 @@
<string>Distro-Native-AS-5.0</string>
<string>Distro-Native-AS-4.2</string>
<string>Distro-Native-AS-4.0</string>
- <string>Distro-SunRI-AS-5.0</string>
- <string>Distro-SunRI-AS-4.2</string>
- <string>Distro-XFire-AS-5.0</string>
- <string>Distro-XFire-AS-4.2</string>
</jobNames>
<name>Distribution Tests</name>
<description>
@@ -96,10 +92,6 @@
<string>Integration-Native-AS-5.0</string>
<string>Integration-Native-AS-4.2</string>
<string>Integration-Native-AS-4.0</string>
- <string>Integration-SunRI-AS-5.0</string>
- <string>Integration-SunRI-AS-4.2</string>
- <string>Integration-XFire-AS-5.0</string>
- <string>Integration-XFire-AS-4.2</string>
</jobNames>
<name>Integration Tests</name>
<description>
17 years, 4 months
JBossWS SVN: r4330 - stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-13 08:25:54 -0400 (Mon, 13 Aug 2007)
New Revision: 4330
Modified:
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
Log:
Add testNamespaceCompletionDefault
Modified: stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
===================================================================
--- stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2007-08-13 10:55:42 UTC (rev 4329)
+++ stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2007-08-13 12:25:54 UTC (rev 4330)
@@ -133,6 +133,34 @@
assertEquals(expStr, wasStr);
}
+ /** The envelope defines a default namespace
+ */
+ public void testNamespaceCompletionDefault() throws Exception
+ {
+ String inStr =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns='http://somens'>" +
+ "<env:Body>" +
+ "<rpc>" +
+ "<param1/>" +
+ "<param2/>" +
+ "</rpc>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ Element env = DOMUtils.parse(inStr);
+ Element body = DOMUtils.getFirstChildElement(env);
+ Element rpc = DOMUtils.getFirstChildElement(body);
+
+ String expStr =
+ "<rpc xmlns='http://somens'>" +
+ "<param1/>" +
+ "<param2/>" +
+ "</rpc>";
+
+ String wasStr = DOMWriter.printNode(rpc, false);
+ assertEquals(expStr, wasStr);
+ }
+
/** The element does not contain the required attribute ns declaration.
*/
public void testNamespaceCompletionAttribute() throws Exception
17 years, 4 months
JBossWS SVN: r4329 - stack/native/branches/native-2.0/ant-import-tests.
by jbossws-commits@lists.jboss.org
Author: richard_opalka
Date: 2007-08-13 06:55:42 -0400 (Mon, 13 Aug 2007)
New Revision: 4329
Modified:
stack/native/branches/native-2.0/ant-import-tests/build-jars-jaxws.xml
Log:
[JBWS-1762] creating new test archive in the form of directory
Modified: stack/native/branches/native-2.0/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/native-2.0/ant-import-tests/build-jars-jaxws.xml 2007-08-13 10:54:00 UTC (rev 4328)
+++ stack/native/branches/native-2.0/ant-import-tests/build-jars-jaxws.xml 2007-08-13 10:55:42 UTC (rev 4329)
@@ -356,6 +356,18 @@
</classes>
</war>
+ <!-- jaxws-jbws1762 -->
+ <mkdir dir="${tests.output.dir}/libs/jaxws-jbws1762.war"/>
+ <mkdir dir="${tests.output.dir}/libs/jaxws-jbws1762.war/WEB-INF"/>
+ <mkdir dir="${tests.output.dir}/libs/jaxws-jbws1762.war/WEB-INF/classes"/>
+ <copy file="${tests.output.dir}/resources/jaxws/jbws1762/WEB-INF/web.xml" toDir="${tests.output.dir}/libs/jaxws-jbws1762.war/WEB-INF"/>
+ <copy toDir="${tests.output.dir}/libs/jaxws-jbws1762.war/WEB-INF/classes">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1762/JBWS1762.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws1762/JBWS1762Impl.class"/>
+ </fileset>
+ </copy>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/libs/jaxws-namespace.war" webxml="${tests.output.dir}/resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
17 years, 4 months