JBossWS SVN: r13118 - framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-14 06:40:06 -0400 (Thu, 14 Oct 2010)
New Revision: 13118
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
Log:
refactoring
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2010-10-14 09:39:53 UTC (rev 13117)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2010-10-14 10:40:06 UTC (rev 13118)
@@ -26,7 +26,6 @@
import javax.naming.Context;
import javax.naming.NamingException;
-import org.jboss.logging.Logger;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
@@ -42,52 +41,37 @@
*
* @author Thomas.Diesler(a)jboss.org
* @author Heiko.Braun(a)jboss.com
- *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
* @since 04-Nov-2006
*/
public class DefaultServiceRefHandler implements ServiceRefHandler
{
- // logging support
- private static Logger log = Logger.getLogger(DefaultServiceRefHandler.class);
+ private static final ServiceRefBinderFactory serviceRefBindingFactory;
- private ServiceRefBinder getJaxrpcBinder()
+ static
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- return spiProvider.getSPI(ServiceRefBinderFactory.class).newServiceRefBinder(Type.JAXRPC);
+ serviceRefBindingFactory = spiProvider.getSPI(ServiceRefBinderFactory.class);
}
- private ServiceRefBinder getJaxwsBinder()
+ private ServiceRefBinder getBinder(final Type binderType)
{
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- return spiProvider.getSPI(ServiceRefBinderFactory.class).newServiceRefBinder(Type.JAXWS);
+ return serviceRefBindingFactory.newServiceRefBinder(binderType);
}
- public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
+ public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile deleteme, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
{
- if (sref.isProcessed())
+ final UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
+ final Type bindingType = getServiceRefType(serviceRef, loader);
+ if (bindingType == Type.JAXRPC)
{
- log.debug("Attempt to rebind the service-ref: " + sref.getServiceRefName());
- return;
+ this.getBinder(bindingType).setupServiceRef(encCtx, encName, null, serviceRef, loader);
}
-
- UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
- serviceRef.setVfsRoot(vfsRoot);
- try
+ else
{
- if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
- {
- getJaxrpcBinder().setupServiceRef(encCtx, encName, null, serviceRef, loader);
- }
- else
- {
- AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
- getJaxwsBinder().setupServiceRef(encCtx, encName, anElement, serviceRef, loader);
- }
+ AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
+ this.getBinder(bindingType).setupServiceRef(encCtx, encName, anElement, serviceRef, loader);
}
- finally
- {
- sref.setProcessed(true);
- }
}
private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws NamingException
14 years
JBossWS SVN: r13117 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-14 05:39:53 -0400 (Thu, 14 Oct 2010)
New Revision: 13117
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
Log:
getting rid of deprecated @ChannelPipelineCoverage plus fixing synchronization bug
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2010-10-14 08:09:34 UTC (rev 13116)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2010-10-14 09:39:53 UTC (rev 13117)
@@ -34,13 +34,12 @@
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBufferInputStream;
import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.channel.ChannelPipelineCoverage;
+import org.jboss.netty.channel.ChannelHandler.Sharable;
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import org.jboss.netty.handler.codec.http.HttpResponse;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import org.jboss.netty.handler.codec.http.HttpVersion;
/**
* A Netty channel upstream handler that receives MessageEvent
@@ -48,9 +47,8 @@
*
* @author alessio.soldano(a)jboss.com
* @since 24-Jun-2009
- *
*/
-@ChannelPipelineCoverage("one")
+@Sharable
public class WSResponseHandler extends SimpleChannelUpstreamHandler
{
private FutureResult future;
@@ -118,13 +116,13 @@
return future;
}
- private class FutureResult implements Future<Result>
+ private static class FutureResult implements Future<Result>
{
- protected Result result;
- protected Throwable exception;
- protected boolean done = false;
- protected boolean cancelled = false;
- protected boolean started = false;
+ private volatile Result result;
+ private volatile Throwable exception;
+ private volatile boolean done = false;
+ private volatile boolean cancelled = false;
+ private volatile boolean started = false;
public FutureResult()
{
@@ -232,7 +230,7 @@
public Map<String, Object> getMetadata();
}
- private class ResultImpl implements Result
+ private static class ResultImpl implements Result
{
private InputStream is;
private Map<String, Object> responseHeaders = new HashMap<String, Object>();
14 years
JBossWS SVN: r13116 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-14 04:09:34 -0400 (Thu, 14 Oct 2010)
New Revision: 13116
Modified:
stack/cxf/trunk/pom.xml
Log:
Moving back to CXF snapshots
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2010-10-14 08:09:02 UTC (rev 13115)
+++ stack/cxf/trunk/pom.xml 2010-10-14 08:09:34 UTC (rev 13116)
@@ -58,7 +58,7 @@
<jbossws.jboss601.version>3.2.1.GA</jbossws.jboss601.version>
-->
<!-- END -->
- <cxf.version>2.3.0</cxf.version>
+ <cxf.version>2.3.1-SNAPSHOT</cxf.version>
<cxf.stax.version>1.0.1</cxf.stax.version>
<cxf.asm.version>2.2.3</cxf.asm.version>
<cxf.xjcplugins.version>2.3.0</cxf.xjcplugins.version>
14 years
JBossWS SVN: r13115 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-14 04:09:02 -0400 (Thu, 14 Oct 2010)
New Revision: 13115
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
Log:
[JBWS-3084] Enable autoRedirect for HTTP GET (required by TCK)
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2010-10-13 14:20:40 UTC (rev 13114)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2010-10-14 08:09:02 UTC (rev 13115)
@@ -146,6 +146,11 @@
try
{
final Conduit c = ci.getConduit(info);
+
+ if (c instanceof HTTPConduit)
+ {
+ ((HTTPConduit)c).getClient().setAutoRedirect(true);
+ }
outMessage.put(Message.HTTP_REQUEST_METHOD, "GET");
c.prepare(outMessage);
14 years
JBossWS SVN: r13114 - in framework/trunk/src/main/java/org/jboss/wsf/framework: serviceref and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-13 10:20:40 -0400 (Wed, 13 Oct 2010)
New Revision: 13114
Removed:
framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefMetaDataParser.java
framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefMetaDataParserFactory.java
framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/ServiceRefObjectFactory.java
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
Log:
removing obsolete & deprecated code
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2010-10-13 14:19:06 UTC (rev 13113)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2010-10-13 14:20:40 UTC (rev 13114)
@@ -30,7 +30,6 @@
import org.jboss.wsf.framework.management.DefaultJMSEndpointResolver;
import org.jboss.wsf.framework.security.DefaultSecurityAdapterFactory;
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;
@@ -41,7 +40,6 @@
import org.jboss.wsf.spi.management.EndpointMetricsFactory;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
import org.jboss.wsf.spi.management.JMSEndpointResolver;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParserFactory;
import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
import org.jboss.wsf.spi.util.ServiceLoader;
@@ -84,10 +82,6 @@
{
returnType = loadService(spiType, DefaultServiceRefHandlerFactory.class);
}
- else if (ServiceRefMetaDataParserFactory.class.equals(spiType))
- {
- returnType = loadService(spiType, DefaultServiceRefMetaDataParserFactory.class);
- }
else if (SecurityAdaptorFactory.class.equals(spiType))
{
returnType = loadService(spiType, DefaultSecurityAdapterFactory.class);
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2010-10-13 14:19:06 UTC (rev 13113)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2010-10-13 14:20:40 UTC (rev 13114)
@@ -21,28 +21,20 @@
*/
package org.jboss.wsf.framework.serviceref;
-import java.io.File;
import java.lang.reflect.AnnotatedElement;
-import java.net.MalformedURLException;
-import java.net.URL;
import javax.naming.Context;
import javax.naming.NamingException;
import org.jboss.logging.Logger;
-import org.jboss.wsf.common.URLLoaderAdapter;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
import org.jboss.wsf.spi.serviceref.ServiceRefHandler;
import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
/**
* Bind service refs in the client's ENC
@@ -109,26 +101,23 @@
if (serviceRef.getMappingFile() != null)
return Type.JAXRPC;
- String siName = serviceRef.getServiceInterface();
- if (siName == null)
+ String serviceInterfaceName = serviceRef.getServiceInterface();
+ if (serviceInterfaceName == null)
throw new IllegalStateException("<service-interface> cannot be null");
- if (siName.equals("javax.xml.rpc.Service"))
- return Type.JAXRPC;
-
try
{
- Class siClass = loader.loadClass(siName);
+ Class<?> siClass = loader.loadClass(serviceInterfaceName);
if (javax.xml.ws.Service.class.isAssignableFrom(siClass))
return Type.JAXWS;
else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
return Type.JAXRPC;
else
- throw new IllegalStateException("Illegal service interface: " + siName);
+ throw new IllegalStateException("Illegal service interface: " + serviceInterfaceName);
}
catch (ClassNotFoundException e)
{
- throw new IllegalStateException("Cannot load <service-interface>: " + siName);
+ throw new IllegalStateException("Cannot load <service-interface>: " + serviceInterfaceName);
}
}
}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefMetaDataParser.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefMetaDataParser.java 2010-10-13 14:19:06 UTC (rev 13113)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefMetaDataParser.java 2010-10-13 14:20:40 UTC (rev 13114)
@@ -1,254 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.serviceref;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParser;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
-import org.jboss.xb.QNameBuilder;
-import org.w3c.dom.Element;
-
-/**
- * The metdata data from service-ref element in web.xml, ejb-jar.xml, and
- * application-client.xml.
- *
- * @author Thomas.Diesler(a)jboss.org
- */
-public class DefaultServiceRefMetaDataParser implements ServiceRefMetaDataParser
-{
- private static final Logger log = Logger.getLogger(DefaultServiceRefMetaDataParser.class);
-
- public void importStandardXml(Element root, UnifiedServiceRefMetaData sref)
- {
- sref.setServiceRefName(getElementContent(root, "service-ref-name"));
- sref.setServiceInterface(getOptionalElementContent(root, "service-interface"));
- sref.setWsdlFile(getOptionalElementContent(root, "wsdl-file"));
- sref.setMappingFile(getOptionalElementContent(root, "jaxrpc-mapping-file"));
-
- Element child = DOMUtils.getFirstChildElement(root, "service-qname");
- if (child != null)
- sref.setServiceQName(QNameBuilder.buildQName(child, getTextContent(child)));
-
- // Parse the port-component-ref elements
- Iterator iterator = DOMUtils.getChildElements(root, "port-component-ref");
- while (iterator.hasNext())
- {
- Element pcrefElement = (Element)iterator.next();
- UnifiedPortComponentRefMetaData pcrefMetaData = new UnifiedPortComponentRefMetaData(sref);
- pcrefMetaData.importStandardXml(pcrefElement);
- sref.addPortComponentRef(pcrefMetaData);
- }
-
- // Parse the handler elements
- iterator = DOMUtils.getChildElements(root, "handler");
- while (iterator.hasNext())
- {
- Element handlerElement = (Element)iterator.next();
- UnifiedHandlerMetaData handlerMetaData = new UnifiedHandlerMetaData();
- handlerMetaData.importStandardXml(handlerElement);
- sref.addHandler(handlerMetaData);
- }
- }
-
- public void importJBossXml(Element root, UnifiedServiceRefMetaData sref)
- {
- sref.setConfigName(getOptionalElementContent(root, "config-name"));
- sref.setConfigFile(getOptionalElementContent(root, "config-file"));
- sref.setWsdlOverride(getOptionalElementContent(root, "wsdl-override"));
-
- // Parse the port-component-ref elements
- Iterator iterator = DOMUtils.getChildElements(root, "port-component-ref");
- while (iterator.hasNext())
- {
- Element pcrefElement = (Element)iterator.next();
- String seiName = getOptionalElementContent(pcrefElement, "service-endpoint-interface");
- QName portName = getOptionalElementContentAsQName(pcrefElement, "port-qname");
-
- UnifiedPortComponentRefMetaData pcref = sref.getPortComponentRef(seiName, portName);
- if (pcref == null && seiName != null)
- {
- // Its ok to only have the <port-component-ref> in jboss.xml and not in ejb-jar.xml
- // if it has at least a SEI declared
- pcref = new UnifiedPortComponentRefMetaData(sref);
- pcref.importStandardXml(pcrefElement);
- sref.addPortComponentRef(pcref);
- }
-
- if (pcref != null)
- pcref.importJBossXml(pcrefElement);
- }
-
- // Parse the call-property elements
- iterator = DOMUtils.getChildElements(root, "call-property");
- while (iterator.hasNext())
- {
- Element propElement = (Element)iterator.next();
- String name = getElementContent(propElement, "prop-name");
- String value = getElementContent(propElement, "prop-value");
- sref.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
- }
- }
-
- public void importStandardXml(Element root, UnifiedPortComponentRefMetaData pcref)
- {
- pcref.setServiceEndpointInterface(getOptionalElementContent(root, "service-endpoint-interface"));
- pcref.setPortComponentLink(getOptionalElementContent(root, "port-component-link"));
- }
-
- public void importJBossXml(Element root, UnifiedPortComponentRefMetaData pcref)
- {
- // Look for call-property elements
- Iterator iterator = DOMUtils.getChildElements(root, "call-property");
- while (iterator.hasNext())
- {
- Element propElement = (Element)iterator.next();
- String name = getElementContent(propElement, "prop-name");
- String value = getElementContent(propElement, "prop-value");
- pcref.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
- }
-
- // Look for stub-property elements
- iterator = DOMUtils.getChildElements(root, "stub-property");
- while (iterator.hasNext())
- {
- Element propElement = (Element)iterator.next();
- String name = getElementContent(propElement, "prop-name");
- String value = getElementContent(propElement, "prop-value");
- UnifiedStubPropertyMetaData propMetaData = new UnifiedStubPropertyMetaData();
- propMetaData.setPropName(name);
- propMetaData.setPropValue(value);
- pcref.addStubProperty(propMetaData);
- }
-
- // portQName
- QName portQName = getOptionalElementContentAsQName(root, "port-qname");
- if (portQName != null)
- pcref.setPortQName(portQName);
-
- // config
- Element configName = DOMUtils.getFirstChildElement(root, "config-name");
- if (configName != null)
- pcref.setConfigName(getTextContent(configName));
-
- Element configFile = DOMUtils.getFirstChildElement(root, "config-file");
- if (configFile != null)
- pcref.setConfigFile(getTextContent(configFile));
-
- // service-endpoint-interface
- Element sei = DOMUtils.getFirstChildElement(root, "service-endpoint-interface");
- if (sei != null)
- pcref.setServiceEndpointInterface(getTextContent(sei));
-
- }
-
- public void importStandardXml(Element root, UnifiedHandlerMetaData href)
- {
- href.setHandlerName(getElementContent(root, "handler-name"));
- href.setHandlerClass(getElementContent(root, "handler-class"));
-
- // Parse the init-param elements
- Iterator iterator = DOMUtils.getChildElements(root, "init-param");
- while (iterator.hasNext())
- {
- Element paramElement = (Element)iterator.next();
- UnifiedInitParamMetaData param = new UnifiedInitParamMetaData();
- param.setParamName(getElementContent(paramElement, "param-name"));
- param.setParamValue(getElementContent(paramElement, "param-value"));
- href.addInitParam(param);
- }
-
- // Parse the soap-header elements
- iterator = DOMUtils.getChildElements(root, "soap-header");
- while (iterator.hasNext())
- {
- Element headerElement = (Element)iterator.next();
- String content = getTextContent(headerElement);
- QName qname = DOMUtils.resolveQName(headerElement, content);
- href.addSoapHeader(qname);
- }
-
- // Parse the soap-role elements
- iterator = DOMUtils.getChildElements(root, "soap-role");
- while (iterator.hasNext())
- {
- Element roleElement = (Element)iterator.next();
- String content = getTextContent(roleElement);
- href.addSoapRole(content);
- }
-
- // Parse the port-name elements
- iterator = DOMUtils.getChildElements(root, "port-name");
- while (iterator.hasNext())
- {
- Element portElement = (Element)iterator.next();
- String content = getTextContent(portElement);
- href.addPortName(content);
- }
- }
-
- private String getElementContent(Element element, String childName)
- {
- String childValue = getOptionalElementContent(element, childName);
- if (childValue == null || childValue.length() == 0)
- throw new IllegalStateException("Invalid null element content: " + childName);
-
- return childValue;
- }
-
- private String getOptionalElementContent(Element element, String childName)
- {
- return getTextContent(DOMUtils.getFirstChildElement(element, childName));
- }
-
- private QName getOptionalElementContentAsQName(Element element, String childName)
- {
- QName qname = null;
- String value = getOptionalElementContent(element, childName);
- if (value != null)
- {
- qname = (value.startsWith("{") ? QName.valueOf(value) : DOMUtils.resolveQName(element, value));
- }
- return qname;
- }
-
- private String getTextContent(Element element)
- {
- String content = null;
- if (element != null)
- {
- content = DOMUtils.getTextContent(element);
- if (content != null)
- content = content.trim();
- }
- return content;
- }
-}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefMetaDataParserFactory.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefMetaDataParserFactory.java 2010-10-13 14:19:06 UTC (rev 13113)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefMetaDataParserFactory.java 2010-10-13 14:20:40 UTC (rev 13114)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.serviceref;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParser;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParserFactory;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 02-Aug-2007
- */
-public class DefaultServiceRefMetaDataParserFactory implements ServiceRefMetaDataParserFactory
-{
- public ServiceRefMetaDataParser getServiceRefMetaDataParser()
- {
- return new DefaultServiceRefMetaDataParser();
- }
-}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/ServiceRefObjectFactory.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/ServiceRefObjectFactory.java 2010-10-13 14:19:06 UTC (rev 13113)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/ServiceRefObjectFactory.java 2010-10-13 14:20:40 UTC (rev 13114)
@@ -1,313 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.serviceref;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-import java.util.Set;
-
-/**
- * A object model factory for <service-ref>
- *
- * @author Thomas.Diesler(a)jboss.com
- */
-public class ServiceRefObjectFactory
-{
- public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (ref instanceof UnifiedHandlerChainsMetaData)
- child = newChild((UnifiedHandlerChainsMetaData)ref, navigator, namespaceURI, localName, attrs);
- else if (ref instanceof UnifiedHandlerMetaData)
- child = newChild((UnifiedHandlerMetaData)ref, navigator, namespaceURI, localName, attrs);
- else if (ref instanceof UnifiedPortComponentRefMetaData)
- child = newChild((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI, localName, attrs);
- else if (ref instanceof UnifiedServiceRefMetaData)
- child = newChild((UnifiedServiceRefMetaData)ref, navigator, namespaceURI, localName, attrs);
- return child;
- }
-
- public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (ref instanceof UnifiedCallPropertyMetaData)
- setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedHandlerChainMetaData)
- setValue((UnifiedHandlerChainMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedHandlerMetaData)
- setValue((UnifiedHandlerMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedInitParamMetaData)
- setValue((UnifiedInitParamMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedPortComponentRefMetaData)
- setValue((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedServiceRefMetaData)
- setValue((UnifiedServiceRefMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedCallPropertyMetaData)
- setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedStubPropertyMetaData)
- setValue((UnifiedStubPropertyMetaData)ref, navigator, namespaceURI, localName, value);
- }
-
- private void setValue(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- /* Standard properties */
- if (localName.equals("service-ref-name"))
- {
- ref.setServiceRefName(value);
- }
- else if (localName.equals("service-interface"))
- {
- ref.setServiceInterface(value);
- }
- else if (localName.equals("service-ref-type"))
- {
- ref.setServiceRefType(value);
- }
- else if (localName.equals("wsdl-file"))
- {
- ref.setWsdlFile(value);
- }
- else if (localName.equals("jaxrpc-mapping-file"))
- {
- ref.setMappingFile(value);
- }
- else if (localName.equals("service-qname"))
- {
- ref.setServiceQName(getQNameValue(navigator, value));
- }
- else if (localName.equals("injection-target-class"))
- {
- ref.registerInjectionTarget(value);
- }
- else if (localName.equals("injection-target-name"))
- {
- ref.finalizeInjectionTarget(value);
- }
-
- /* JBoss properties */
- else if (localName.equals("service-impl-class"))
- {
- ref.setServiceImplClass(value);
- }
- else if (localName.equals("config-name"))
- {
- ref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- ref.setConfigFile(value);
- }
- else if (localName.equals("wsdl-override"))
- {
- ref.setWsdlOverride(value);
- }
- else if (localName.equals("handler-chain"))
- {
- ref.setHandlerChain(value);
- }
- }
-
- private Object newChild(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("port-component-ref"))
- {
- child = new UnifiedPortComponentRefMetaData(ref);
- ref.addPortComponentRef((UnifiedPortComponentRefMetaData)child);
- }
- else if (localName.equals("handler"))
- {
- child = new UnifiedHandlerMetaData();
- ref.addHandler((UnifiedHandlerMetaData)child);
- }
- else if (localName.equals("handler-chains"))
- {
- child = new UnifiedHandlerChainsMetaData();
- ref.setHandlerChains((UnifiedHandlerChainsMetaData)child);
- }
- else if (localName.equals("call-property"))
- {
- child = new UnifiedCallPropertyMetaData();
- ref.addCallProperty((UnifiedCallPropertyMetaData)child);
- }
- return child;
- }
-
- private Object newChild(UnifiedHandlerChainsMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("handler-chain"))
- {
- child = new UnifiedHandlerChainMetaData();
- ref.addHandlerChain((UnifiedHandlerChainMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedPortComponentRefMetaData pcref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-endpoint-interface"))
- {
- pcref.setServiceEndpointInterface(value);
- }
- else if (localName.equals("enable-mtom"))
- {
- pcref.setEnableMTOM(Boolean.valueOf(value));
- }
- else if (localName.equals("port-component-link"))
- {
- pcref.setPortComponentLink(value);
- }
- else if (localName.equals("port-qname"))
- {
- pcref.setPortQName(getQNameValue(navigator, value));
- }
- else if (localName.equals("config-name"))
- {
- pcref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- pcref.setConfigFile(value);
- }
- }
-
- private Object newChild(UnifiedPortComponentRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("call-property"))
- {
- child = new UnifiedCallPropertyMetaData();
- ref.addCallProperty((UnifiedCallPropertyMetaData)child);
- }
- if (localName.equals("stub-property"))
- {
- child = new UnifiedStubPropertyMetaData();
- ref.addStubProperty((UnifiedStubPropertyMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedHandlerChainMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-name-pattern"))
- {
- ref.setServiceNamePattern(getQNameValue(navigator, value));
- }
- else if (localName.equals("port-name-pattern"))
- {
- ref.setPortNamePattern(getQNameValue(navigator, value));
- }
- else if (localName.equals("protocol-binding"))
- {
- ref.setProtocolBindings(value);
- }
- }
-
- private void setValue(UnifiedHandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("handler-name"))
- {
- ref.setHandlerName(value);
- }
- else if (localName.equals("handler-class"))
- {
- ref.setHandlerClass(value);
- }
- else if (localName.equals("soap-header"))
- {
- ref.addSoapHeader(getQNameValue(navigator, value));
- }
- else if (localName.equals("soap-role"))
- {
- ref.addSoapRole(value);
- }
- else if (localName.equals("port-name"))
- {
- ref.addPortName(value);
- }
- }
-
- private Object newChild(UnifiedHandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("init-param"))
- {
- child = new UnifiedInitParamMetaData();
- ref.addInitParam((UnifiedInitParamMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedInitParamMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("param-name"))
- {
- ref.setParamName(value);
- }
- else if (localName.equals("param-value"))
- {
- ref.setParamValue(value);
- }
- }
-
- private void setValue(UnifiedCallPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("prop-name"))
- {
- ref.setPropName(value);
- }
- else if (localName.equals("prop-value"))
- {
- ref.setPropValue(value);
- }
- }
-
- private void setValue(UnifiedStubPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("prop-name"))
- {
- ref.setPropName(value);
- }
- else if (localName.equals("prop-value"))
- {
- ref.setPropValue(value);
- }
- }
-
- private QName getQNameValue(UnmarshallingContext navigator, String value)
- {
- QName qname = (value.startsWith("{") ? QName.valueOf(value) : navigator.resolveQName(value));
- return qname;
- }
-}
14 years
JBossWS SVN: r13113 - in spi/trunk/src/main/java/org/jboss/wsf/spi: serviceref and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-13 10:19:06 -0400 (Wed, 13 Oct 2010)
New Revision: 13113
Removed:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/ServiceRefMetaDataParserFactory.java
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefMetaData.java
Log:
removing obsolete & deprecated code
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java 2010-10-13 13:33:31 UTC (rev 13112)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java 2010-10-13 14:19:06 UTC (rev 13113)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.spi.metadata.j2ee.serviceref;
-
-import org.w3c.dom.Element;
-
-/**
- * The metdata data from service-ref element in web.xml, ejb-jar.xml, and
- * application-client.xml.
- *
- * @author Thomas.Diesler(a)jboss.org
- */
-public interface ServiceRefMetaDataParser
-{
- public void importStandardXml(Element root, UnifiedServiceRefMetaData sref);
-
- public void importJBossXml(Element root, UnifiedServiceRefMetaData sref);
-
- public void importStandardXml(Element root, UnifiedPortComponentRefMetaData pcref);
-
- public void importJBossXml(Element root, UnifiedPortComponentRefMetaData pcref);
-
- public void importStandardXml(Element root, UnifiedHandlerMetaData href);
-}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/ServiceRefMetaDataParserFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/ServiceRefMetaDataParserFactory.java 2010-10-13 13:33:31 UTC (rev 13112)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/ServiceRefMetaDataParserFactory.java 2010-10-13 14:19:06 UTC (rev 13113)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.spi.metadata.j2ee.serviceref;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 02-Aug-2007
- */
-public interface ServiceRefMetaDataParserFactory
-{
- ServiceRefMetaDataParser getServiceRefMetaDataParser();
-}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2010-10-13 13:33:31 UTC (rev 13112)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2010-10-13 14:19:06 UTC (rev 13113)
@@ -28,10 +28,7 @@
import javax.xml.namespace.QName;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-import org.w3c.dom.Element;
/**
* The unified metdata data for a handler element
@@ -134,13 +131,6 @@
portNames.add(value);
}
- public void importStandardXml(Element root)
- {
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServiceRefMetaDataParserFactory factory = provider.getSPI(ServiceRefMetaDataParserFactory.class);
- factory.getServiceRefMetaDataParser().importStandardXml(root, this);
- }
-
public String toString()
{
StringBuilder str = new StringBuilder();
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2010-10-13 13:33:31 UTC (rev 13112)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2010-10-13 14:19:06 UTC (rev 13113)
@@ -26,10 +26,7 @@
import javax.xml.namespace.QName;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-import org.w3c.dom.Element;
/** The metdata data from service-ref/port-component-ref element in web.xml, ejb-jar.xml, and application-client.xml.
*
@@ -254,20 +251,6 @@
this.configName = configName;
}
- public void importStandardXml(Element root)
- {
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServiceRefMetaDataParserFactory factory = provider.getSPI(ServiceRefMetaDataParserFactory.class);
- factory.getServiceRefMetaDataParser().importStandardXml(root, this);
- }
-
- public void importJBossXml(Element root)
- {
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServiceRefMetaDataParserFactory factory = provider.getSPI(ServiceRefMetaDataParserFactory.class);
- factory.getServiceRefMetaDataParser().importJBossXml(root, this);
- }
-
public boolean matches(String seiName, QName portName)
{
if (seiName == null && portName == null)
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2010-10-13 13:33:31 UTC (rev 13112)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2010-10-13 14:19:06 UTC (rev 13113)
@@ -41,13 +41,10 @@
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.deployment.WritableUnifiedVirtualFile;
import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
import org.jboss.wsf.spi.util.URLLoaderAdapter;
-import org.w3c.dom.Element;
/**
* The metdata data from service-ref element in web.xml, ejb-jar.xml, and
@@ -492,24 +489,6 @@
return this.injectionTargets;
}
- @Override
- @Deprecated
- public void importStandardXml(Element root)
- {
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServiceRefMetaDataParserFactory factory = provider.getSPI(ServiceRefMetaDataParserFactory.class);
- factory.getServiceRefMetaDataParser().importStandardXml(root, this);
- }
-
- @Override
- @Deprecated
- public void importJBossXml(Element root)
- {
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServiceRefMetaDataParserFactory factory = provider.getSPI(ServiceRefMetaDataParserFactory.class);
- factory.getServiceRefMetaDataParser().importJBossXml(root, this);
- }
-
private void writeObject(ObjectOutputStream out) throws IOException
{
out.defaultWriteObject();
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefMetaData.java 2010-10-13 13:33:31 UTC (rev 13112)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefMetaData.java 2010-10-13 14:19:06 UTC (rev 13113)
@@ -21,7 +21,6 @@
*/
package org.jboss.wsf.spi.serviceref;
-import org.w3c.dom.Element;
import java.io.Serializable;
import java.util.List;
@@ -47,11 +46,5 @@
public abstract List<String[]> getInjectionTargets();
- @Deprecated
- public abstract void importStandardXml(Element element);
-
- @Deprecated
- public abstract void importJBossXml(Element element);
-
public abstract void merge(ServiceRefMetaData targetRef);
}
14 years
JBossWS SVN: r13112 - framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-13 09:33:31 -0400 (Wed, 13 Oct 2010)
New Revision: 13112
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
Log:
removing obsolete code
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2010-10-13 13:31:16 UTC (rev 13111)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2010-10-13 13:33:31 UTC (rev 13112)
@@ -78,39 +78,6 @@
return;
}
- // In case of an .war deployment the associated root file doesn't point to
- // the expanded war file structure and thus breaks service-ref usage for servlet clients.
- // This needs to be fixed in org.jboss.web.AbstractWebDeployer (JBOSS_AS/server module)
- if (vfsRoot instanceof URLLoaderAdapter)
- {
- URLLoaderAdapter ula = (URLLoaderAdapter)vfsRoot;
- URL rootURL = ula.toURL();
- if ("file".equals(rootURL.getProtocol()) && rootURL.getFile().endsWith(".war"))
- {
- String fileName = rootURL.getFile();
-
- if (!new File(fileName).exists()) // might be an exploded directory
- {
- // There is a filename convention for exploded directories
- fileName = fileName.substring(0, fileName.indexOf(".war")) + "-exp.war";
-
- File expandedDirectory = new File(fileName);
- if (!expandedDirectory.exists())
- throw new WSFException("Failed to bind service-ref, the deployment root expandedDirectory doesn't exist: " + fileName);
-
- // update the rootFile
- try
- {
- vfsRoot = new URLLoaderAdapter(expandedDirectory.toURI().toURL());
- }
- catch (MalformedURLException e)
- {
- }
- }
-
- }
- }
-
UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
serviceRef.setVfsRoot(vfsRoot);
try
14 years
JBossWS SVN: r13110 - framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-13 09:04:31 -0400 (Wed, 13 Oct 2010)
New Revision: 13110
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
Log:
removing obsolete and deprecated code
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2010-10-13 13:00:47 UTC (rev 13109)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2010-10-13 13:04:31 UTC (rev 13110)
@@ -58,8 +58,6 @@
// logging support
private static Logger log = Logger.getLogger(DefaultServiceRefHandler.class);
- private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
-
private ServiceRefBinder getJaxrpcBinder()
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
@@ -72,11 +70,6 @@
return spiProvider.getSPI(ServiceRefBinderFactory.class).newServiceRefBinder(Type.JAXWS);
}
- public ServiceRefMetaData newServiceRefMetaData()
- {
- return new UnifiedServiceRefMetaData();
- }
-
public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
{
if (sref.isProcessed())
@@ -138,16 +131,6 @@
}
}
- public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- return objectFactory.newChild(ref, navigator, namespaceURI, localName, attrs);
- }
-
- public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- objectFactory.setValue(ref, navigator, namespaceURI, localName, value);
- }
-
private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws NamingException
{
// The service-ref-type is JAXWS specific
14 years
JBossWS SVN: r13109 - spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-13 09:00:47 -0400 (Wed, 13 Oct 2010)
New Revision: 13109
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java
Log:
removing obsolete and deprecated code
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java 2010-10-13 12:08:39 UTC (rev 13108)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java 2010-10-13 13:00:47 UTC (rev 13109)
@@ -25,8 +25,6 @@
import javax.naming.NamingException;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
/**
* An implementation of this interface handles all service-ref binding concerns
@@ -36,18 +34,6 @@
*/
public interface ServiceRefHandler
{
- final String BEAN_NAME = "WSServiceRefHandler";
-
enum Type {JAXRPC, JAXWS};
-
- @Deprecated
- ServiceRefMetaData newServiceRefMetaData();
-
- @Deprecated
- Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs);
-
- @Deprecated
- void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value);
-
void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException;
}
14 years