JBossWS SVN: r16967 - in stack/cxf/branches/ropalka: modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-13 03:08:00 -0500 (Tue, 13 Nov 2012)
New Revision: 16967
Added:
stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java
stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefFactoryFactoryImpl.java
stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefFactoryImpl.java
Removed:
stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderFactoryImpl.java
stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXRPC.java
stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXWS.java
stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceReferenceableJAXWS.java
stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory
Modified:
stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
stack/cxf/branches/ropalka/pom.xml
Log:
[JBWS-3565] WS Ref SPI clean up
Added: stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java
===================================================================
--- stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java (rev 0)
+++ stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java 2012-11-13 08:08:00 UTC (rev 16967)
@@ -0,0 +1,454 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.stack.cxf.client.serviceref;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.RespectBindingFeature;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.MTOMFeature;
+
+import org.jboss.ws.common.Messages;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
+ * for a given WSDL when the webservice client does a JNDI lookup.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public abstract class AbstractServiceObjectFactoryJAXWS
+{
+ public final Object getObjectInstance(UnifiedServiceRefMetaData serviceRef)
+ {
+ try
+ {
+ // class names
+ final String serviceImplClass = this.getServiceClassName(serviceRef);
+ final String targetClassName = this.getTargetClassName(serviceRef);
+ // class instances
+ final Class<?> serviceClass = this.getClass(serviceImplClass);
+ final Class<?> targetClass = this.getClass(targetClassName);
+ final Service serviceInstance;
+
+ this.init(serviceRef);
+ try
+ {
+ serviceInstance = this.instantiateService(serviceRef, serviceClass);
+ this.configure(serviceRef, serviceInstance);
+
+ // construct port
+ final boolean instantiatePort = targetClassName != null && !Service.class.isAssignableFrom(targetClass);
+ if (instantiatePort)
+ {
+ final QName portQName = this.getPortQName(targetClassName, serviceImplClass, serviceRef);
+ final WebServiceFeature[] portFeatures = this.getFeatures(targetClassName, serviceImplClass, serviceRef);
+
+ return instantiatePort(serviceClass, targetClass, serviceInstance, portQName, portFeatures);
+ }
+ }
+ finally
+ {
+ this.destroy(serviceRef);
+ }
+
+ return serviceInstance;
+ }
+ catch (Exception ex)
+ {
+ WSFException.rethrow("Cannot create service", ex);
+ }
+
+ return null;
+ }
+
+ /**
+ * Lifecycle template method called before javax.xml.ws.Service object instantiation.
+ *
+ * @param serviceRefUMDM service reference meta data
+ */
+ protected abstract void init(final UnifiedServiceRefMetaData serviceRefUMDM);
+
+ /**
+ * Lifecycle template method called after javax.xml.ws.Service object was created
+ * and before port is instantiated. It allows stack to configure service before
+ * creating ports.
+ *
+ * @param serviceRefUMDM service reference meta data
+ * @param service service instance
+ */
+ protected abstract void configure(final UnifiedServiceRefMetaData serviceRefUMDM, final Service service);
+
+ /**
+ * Lifecycle template method called after javax.xml.ws.Service object and after port instantiation.
+ *
+ * @param serviceRefUMDM
+ */
+ protected abstract void destroy(final UnifiedServiceRefMetaData serviceRefUMDM);
+
+ private Class<?> getClass(final String className) throws ClassNotFoundException
+ {
+ if (className != null)
+ {
+ return Thread.currentThread().getContextClassLoader().loadClass(className);
+ }
+
+ return null;
+ }
+
+ private String getServiceClassName(final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ final String serviceImplClassName = serviceRefMD.getServiceImplClass();
+ if (serviceImplClassName != null)
+ return serviceImplClassName;
+
+ final String serviceInterfaceName = serviceRefMD.getServiceInterface();
+ if (serviceInterfaceName != null)
+ return serviceInterfaceName;
+
+ return Service.class.getName(); // fallback
+ }
+
+ private String getTargetClassName(final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ return serviceRefMD.getServiceRefType();
+ }
+
+ private Object instantiatePort(final Class<?> serviceClass, final Class<?> targetClass, final Service target,
+ final QName portQName, final WebServiceFeature[] features) throws NoSuchMethodException,
+ InstantiationException, IllegalAccessException, InvocationTargetException
+ {
+ Object retVal = null;
+
+ Object port = null;
+ if (serviceClass != Service.class)
+ {
+ for (Method method : serviceClass.getDeclaredMethods())
+ {
+ String methodName = method.getName();
+ Class<?> retType = method.getReturnType();
+ if (methodName.startsWith("get") && targetClass.isAssignableFrom(retType))
+ {
+ final Method targetMethod = getMethodFor(methodName, features, serviceClass);
+ final Object[] args = getArgumentsFor(features);
+ port = targetMethod.invoke(target, args);
+ retVal = port;
+ break;
+ }
+ }
+ }
+
+ if (port == null)
+ {
+ Method method = getMethodFor("getPort", portQName, features, serviceClass);
+ Object[] args = getArgumentsFor(portQName, features, targetClass);
+ port = method.invoke(target, args);
+ retVal = port;
+ }
+
+ return retVal;
+ }
+
+ private Service instantiateService(final UnifiedServiceRefMetaData serviceRefMD, final Class<?> serviceClass)
+ throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException
+ {
+ final WebServiceFeature[] features = getFeatures(serviceRefMD);
+ final URL wsdlURL = this.getWsdlURL(serviceRefMD, serviceClass);
+ final QName serviceQName = this.getServiceQName(serviceRefMD, serviceClass);
+
+ Service target = null;
+ if (serviceClass == Service.class)
+ {
+ // Generic javax.xml.ws.Service
+ if (wsdlURL != null)
+ {
+ if (features != null)
+ {
+ target = Service.create(wsdlURL, serviceQName, features);
+ }
+ else
+ {
+ target = Service.create(wsdlURL, serviceQName);
+ }
+ }
+ else
+ {
+ throw Messages.MESSAGES.cannotCreateServiceWithoutWsdlLocation(serviceRefMD);
+ }
+ }
+ else
+ {
+ // Generated javax.xml.ws.Service subclass
+ if (wsdlURL != null)
+ {
+ if (features != null)
+ {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[]
+ {URL.class, QName.class, WebServiceFeature[].class});
+ target = (Service) ctor.newInstance(new Object[]
+ {wsdlURL, serviceQName, features});
+ }
+ else
+ {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[]
+ {URL.class, QName.class});
+ target = (Service) ctor.newInstance(new Object[]
+ {wsdlURL, serviceQName});
+ }
+ }
+ else
+ {
+ if (features != null)
+ {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[]
+ {WebServiceFeature[].class});
+ target = (Service) ctor.newInstance(new Object[]
+ {features});
+ }
+ else
+ {
+ target = (Service) serviceClass.newInstance();
+ }
+ }
+ }
+
+ return target;
+ }
+
+ private URL getWsdlURL(final UnifiedServiceRefMetaData serviceRefMD, final Class<?> serviceClass)
+ {
+ if (serviceRefMD.getWsdlLocation() == null)
+ {
+ final WebServiceClient webServiceClientAnnotation = serviceClass.getAnnotation(WebServiceClient.class);
+ if (webServiceClientAnnotation != null)
+ {
+ // use the @WebServiceClien(wsdlLocation=...) if the service ref wsdl location returned at this time would be null
+ if (webServiceClientAnnotation.wsdlLocation().length() > 0)
+ {
+ serviceRefMD.setWsdlOverride(webServiceClientAnnotation.wsdlLocation());
+ }
+ }
+ }
+
+ return serviceRefMD.getWsdlLocation();
+ }
+
+ private QName getServiceQName(final UnifiedServiceRefMetaData serviceRefMD, final Class<?> serviceClass)
+ {
+ QName retVal = serviceRefMD.getServiceQName();
+
+ if (retVal == null)
+ {
+ final WebServiceClient webServiceClientAnnotation = serviceClass.getAnnotation(WebServiceClient.class);
+ if (webServiceClientAnnotation != null)
+ {
+ retVal = new QName(webServiceClientAnnotation.targetNamespace(), webServiceClientAnnotation.name());
+ }
+ }
+
+ return retVal;
+ }
+
+ private WebServiceFeature[] getFeatures(final String targetClassName, final String serviceClassName,
+ final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ if (targetClassName != null && !targetClassName.equals(serviceClassName))
+ {
+ final Collection<UnifiedPortComponentRefMetaData> portComponentRefs = serviceRefMD.getPortComponentRefs();
+ for (final UnifiedPortComponentRefMetaData portComponentRefMD : portComponentRefs)
+ {
+ if (targetClassName.equals(portComponentRefMD.getServiceEndpointInterface()))
+ {
+ return getFeatures(portComponentRefMD);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private QName getPortQName(final String targetClassName, final String serviceClassName,
+ final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ if (targetClassName != null && !targetClassName.equals(serviceClassName))
+ {
+ final Collection<UnifiedPortComponentRefMetaData> portComponentRefs = serviceRefMD.getPortComponentRefs();
+ for (final UnifiedPortComponentRefMetaData portComponentRefMD : portComponentRefs)
+ {
+ if (targetClassName.equals(portComponentRefMD.getServiceEndpointInterface()))
+ {
+ return portComponentRefMD.getPortQName();
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private Method getMethodFor(final String methodName, final QName portQName, final WebServiceFeature[] features, final Class<?> serviceClass)
+ throws NoSuchMethodException
+ {
+ if ((portQName == null) && (features == null))
+ return serviceClass.getMethod(methodName, new Class[]
+ {Class.class});
+ if ((portQName != null) && (features == null))
+ return serviceClass.getMethod(methodName, new Class[]
+ {QName.class, Class.class});
+ if ((portQName == null) && (features != null))
+ return serviceClass.getMethod(methodName, new Class[]
+ {Class.class, WebServiceFeature[].class});
+ if ((portQName != null) && (features != null))
+ return serviceClass.getMethod(methodName, new Class[]
+ {QName.class, Class.class, WebServiceFeature[].class});
+
+ throw new IllegalStateException();
+ }
+
+ private Method getMethodFor(final String methodName, final WebServiceFeature[] features, final Class<?> serviceClass)
+ throws NoSuchMethodException
+ {
+ if (features == null)
+ {
+ return serviceClass.getMethod(methodName, new Class[] {});
+ }
+ else
+ {
+ return serviceClass.getMethod(methodName, new Class[] { WebServiceFeature[].class } );
+ }
+ }
+
+ private Object[] getArgumentsFor(final QName portQName, final WebServiceFeature[] features,
+ final Class<?> targetClass) throws NoSuchMethodException
+ {
+ if ((portQName == null) && (features == null))
+ return new Object[]
+ {targetClass};
+ if ((portQName != null) && (features == null))
+ return new Object[]
+ {portQName, targetClass};
+ if ((portQName == null) && (features != null))
+ return new Object[]
+ {targetClass, features};
+ if ((portQName != null) && (features != null))
+ return new Object[]
+ {portQName, targetClass, features};
+
+ throw new IllegalStateException();
+ }
+
+ private Object[] getArgumentsFor(final WebServiceFeature[] features) throws NoSuchMethodException
+ {
+ if (features == null)
+ {
+ return new Object[] {};
+ }
+ else
+ {
+ return new Object[] {features};
+ }
+ }
+
+ private WebServiceFeature[] getFeatures(final UnifiedServiceRefMetaData serviceRef)
+ {
+ List<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
+
+ // configure @Addressing feature
+ if (serviceRef.isAddressingAnnotationSpecified())
+ {
+ final boolean enabled = serviceRef.isAddressingEnabled();
+ final boolean required = serviceRef.isAddressingRequired();
+ final String refResponses = serviceRef.getAddressingResponses();
+ AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
+ if ("ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.ANONYMOUS;
+ if ("NON_ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.NON_ANONYMOUS;
+
+ features.add(new AddressingFeature(enabled, required, responses));
+ }
+
+ // configure @MTOM feature
+ if (serviceRef.isMtomAnnotationSpecified())
+ {
+ final boolean enabled = serviceRef.isMtomEnabled();
+ final int threshold = serviceRef.getMtomThreshold();
+ features.add(new MTOMFeature(enabled, threshold));
+ }
+
+ // configure @RespectBinding feature
+ if (serviceRef.isRespectBindingAnnotationSpecified())
+ {
+ final boolean enabled = serviceRef.isRespectBindingEnabled();
+ features.add(new RespectBindingFeature(enabled));
+ }
+
+ return features.size() == 0 ? null : features.toArray(new WebServiceFeature[]
+ {});
+ }
+
+ private WebServiceFeature[] getFeatures(final UnifiedPortComponentRefMetaData portComponentRefMD)
+ {
+ List<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
+ // configure @Addressing feature
+ if (portComponentRefMD.isAddressingAnnotationSpecified())
+ {
+ final boolean enabled = portComponentRefMD.isAddressingEnabled();
+ final boolean required = portComponentRefMD.isAddressingRequired();
+ final String refResponses = portComponentRefMD.getAddressingResponses();
+ AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
+ if ("ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.ANONYMOUS;
+ if ("NON_ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.NON_ANONYMOUS;
+
+ features.add(new AddressingFeature(enabled, required, responses));
+ }
+
+ // configure @MTOM feature
+ if (portComponentRefMD.isMtomEnabled())
+ {
+ features.add(new MTOMFeature(true, portComponentRefMD.getMtomThreshold()));
+ }
+
+ // configure @RespectBinding feature
+ if (portComponentRefMD.isRespectBindingAnnotationSpecified())
+ {
+ final boolean enabled = portComponentRefMD.isRespectBindingEnabled();
+ features.add(new RespectBindingFeature(enabled));
+ }
+
+ return features.size() == 0 ? null : features.toArray(new WebServiceFeature[]
+ {});
+ }
+}
Modified: stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
===================================================================
--- stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2012-11-13 07:57:12 UTC (rev 16966)
+++ stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2012-11-13 08:08:00 UTC (rev 16967)
@@ -29,7 +29,6 @@
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.configuration.Configurer;
-import org.jboss.ws.common.serviceref.AbstractServiceObjectFactoryJAXWS;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.wsf.stack.cxf.client.Constants;
Deleted: stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderFactoryImpl.java
===================================================================
--- stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderFactoryImpl.java 2012-11-13 07:57:12 UTC (rev 16966)
+++ stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderFactoryImpl.java 2012-11-13 08:08:00 UTC (rev 16967)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.stack.cxf.client.serviceref;
-
-import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
-
-/**
- * Binds either JAXRPC or JAXWS Service object in the client's ENC.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class CXFServiceRefBinderFactoryImpl implements ServiceRefBinderFactory
-{
- private static final ServiceRefBinder JAXRPC_BINDER = new CXFServiceRefBinderJAXRPC();
-
- private static final ServiceRefBinder JAXWS_BINDER = new CXFServiceRefBinderJAXWS();
-
- public ServiceRefBinder newServiceRefBinder(final Type type)
- {
- return type == Type.JAXRPC ? JAXRPC_BINDER : JAXWS_BINDER;
- }
-}
Deleted: stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXRPC.java
===================================================================
--- stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXRPC.java 2012-11-13 07:57:12 UTC (rev 16966)
+++ stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXRPC.java 2012-11-13 08:08:00 UTC (rev 16967)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.stack.cxf.client.serviceref;
-
-import javax.naming.Referenceable;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
-import org.jboss.wsf.stack.cxf.Messages;
-
-/**
- * Binds a JAXRPC Service object to the client's ENC.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-final class CXFServiceRefBinderJAXRPC implements ServiceRefBinder
-{
- @Override
- public Referenceable createReferenceable(final UnifiedServiceRefMetaData serviceRefUMDM)
- {
- throw Messages.MESSAGES.jaxrpcServiceRefNotSupported();
- }
-}
Deleted: stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXWS.java
===================================================================
--- stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXWS.java 2012-11-13 07:57:12 UTC (rev 16966)
+++ stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefBinderJAXWS.java 2012-11-13 08:08:00 UTC (rev 16967)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.stack.cxf.client.serviceref;
-
-import javax.naming.Referenceable;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
-
-/**
- * Binds a JAXWS Service object to the client's ENC.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-final class CXFServiceRefBinderJAXWS implements ServiceRefBinder
-{
- @Override
- public Referenceable createReferenceable(final UnifiedServiceRefMetaData serviceRefUMDM)
- {
- return new CXFServiceReferenceableJAXWS(serviceRefUMDM);
- }
-}
Added: stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefFactoryFactoryImpl.java
===================================================================
--- stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefFactoryFactoryImpl.java (rev 0)
+++ stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefFactoryFactoryImpl.java 2012-11-13 08:08:00 UTC (rev 16967)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.stack.cxf.client.serviceref;
+
+import org.jboss.wsf.spi.serviceref.ServiceRefFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class CXFServiceRefFactoryFactoryImpl implements ServiceRefFactoryFactory
+{
+ public ServiceRefFactory newServiceRefFactory()
+ {
+ return new CXFServiceRefFactoryImpl();
+ }
+}
Added: stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefFactoryImpl.java
===================================================================
--- stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefFactoryImpl.java (rev 0)
+++ stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefFactoryImpl.java 2012-11-13 08:08:00 UTC (rev 16967)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.stack.cxf.client.serviceref;
+
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.serviceref.ServiceRefFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefType;
+import org.jboss.wsf.stack.cxf.Messages;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class CXFServiceRefFactoryImpl implements ServiceRefFactory
+{
+ @Override
+ public Object newServiceRef(final UnifiedServiceRefMetaData serviceRefUMDM)
+ {
+ if (serviceRefUMDM.getType() == ServiceRefType.JAXWS) {
+ return new CXFServiceObjectFactoryJAXWS().getObjectInstance(serviceRefUMDM);
+ } else {
+ throw Messages.MESSAGES.jaxrpcServiceRefNotSupported();
+ }
+ }
+}
Deleted: stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceReferenceableJAXWS.java
===================================================================
--- stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceReferenceableJAXWS.java 2012-11-13 07:57:12 UTC (rev 16966)
+++ stack/cxf/branches/ropalka/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceReferenceableJAXWS.java 2012-11-13 08:08:00 UTC (rev 16967)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.stack.cxf.client.serviceref;
-
-import org.jboss.ws.common.serviceref.AbstractServiceReferenceableJAXWS;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * {@inheritDoc}
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-final class CXFServiceReferenceableJAXWS extends AbstractServiceReferenceableJAXWS<CXFServiceObjectFactoryJAXWS>
-{
- public CXFServiceReferenceableJAXWS(final UnifiedServiceRefMetaData serviceRefMD)
- {
- super(serviceRefMD);
- }
-
- @Override
- protected Class<CXFServiceObjectFactoryJAXWS> getObjectFactory()
- {
- return CXFServiceObjectFactoryJAXWS.class;
- }
-}
Deleted: stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory
===================================================================
--- stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory 2012-11-13 07:57:12 UTC (rev 16966)
+++ stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory 2012-11-13 08:08:00 UTC (rev 16967)
@@ -1 +0,0 @@
-org.jboss.wsf.stack.cxf.client.serviceref.CXFServiceRefBinderFactoryImpl
\ No newline at end of file
Modified: stack/cxf/branches/ropalka/pom.xml
===================================================================
--- stack/cxf/branches/ropalka/pom.xml 2012-11-13 07:57:12 UTC (rev 16966)
+++ stack/cxf/branches/ropalka/pom.xml 2012-11-13 08:08:00 UTC (rev 16967)
@@ -60,14 +60,14 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.1.Final</jbossws.api.version>
- <jbossws.spi.version>2.1.0.Final</jbossws.spi.version>
- <jbossws.common.version>2.1.0.Final</jbossws.common.version>
+ <jbossws.spi.version>2.1.1-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.1.1-SNAPSHOT</jbossws.common.version>
<jbossws.common.tools.version>1.1.0.Final</jbossws.common.tools.version>
<jbossws.shared.testsuite.version>4.1.1-SNAPSHOT</jbossws.shared.testsuite.version>
<jbossws.jboss711.version>4.1.1-SNAPSHOT</jbossws.jboss711.version>
<jbossws.jboss712.version>4.1.1-SNAPSHOT</jbossws.jboss712.version>
<jbossws.jboss713.version>4.1.1-SNAPSHOT</jbossws.jboss713.version>
- <jbossws.native.version>4.1.0.Final</jbossws.native.version>
+ <jbossws.native.version>4.1.1-SNAPSHOT</jbossws.native.version>
<jboss711.version>7.1.1.Final</jboss711.version>
<jboss712.version>7.1.2.Final</jboss712.version>
<jboss713.version>7.1.3.Final</jboss713.version>
12 years, 4 months
JBossWS SVN: r16966 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-13 02:57:12 -0500 (Tue, 13 Nov 2012)
New Revision: 16966
Added:
stack/cxf/branches/ropalka/
Log:
WS Ref optimization branch
12 years, 4 months
JBossWS SVN: r16965 - in common/branches/ropalka: src/main/java/org/jboss/ws/common and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-13 02:53:09 -0500 (Tue, 13 Nov 2012)
New Revision: 16965
Removed:
common/branches/ropalka/src/main/java/org/jboss/ws/common/serviceref/
Modified:
common/branches/ropalka/pom.xml
common/branches/ropalka/src/main/java/org/jboss/ws/common/Messages.java
common/branches/ropalka/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
Log:
[JBWS-3565] WS Ref SPI clean up
Modified: common/branches/ropalka/pom.xml
===================================================================
--- common/branches/ropalka/pom.xml 2012-11-13 07:49:47 UTC (rev 16964)
+++ common/branches/ropalka/pom.xml 2012-11-13 07:53:09 UTC (rev 16965)
@@ -27,7 +27,7 @@
<!-- Properties -->
<properties>
- <jbossws.spi.version>2.1.0.Final</jbossws.spi.version>
+ <jbossws.spi.version>2.1.1-SNAPSHOT</jbossws.spi.version>
<jboss.jaxbintros.version>1.0.2.GA</jboss.jaxbintros.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
<jboss-logging.version>3.1.2.GA</jboss-logging.version>
Modified: common/branches/ropalka/src/main/java/org/jboss/ws/common/Messages.java
===================================================================
--- common/branches/ropalka/src/main/java/org/jboss/ws/common/Messages.java 2012-11-13 07:49:47 UTC (rev 16964)
+++ common/branches/ropalka/src/main/java/org/jboss/ws/common/Messages.java 2012-11-13 07:53:09 UTC (rev 16965)
@@ -29,7 +29,6 @@
import java.util.Collection;
import javax.management.ObjectName;
-import javax.naming.NamingException;
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Cause;
@@ -113,12 +112,6 @@
@Message(id = 22031, value = "Cycle detected in sub-graph: %s")
IllegalStateException cycleDetectedInSubGraph(Collection<?> c);
- @Message(id = 22032, value = "Cannot marshall service ref meta data")
- NamingException cannotMarshallServiceRefMetaData(@Cause Throwable cause);
-
- @Message(id = 22033, value = "Cannot unmarshall service ref meta data")
- NamingException cannotUnMarshallServiceRefMetaData(@Cause Throwable cause);
-
@Message(id = 22034, value = "Missing VFS root for service-ref: %s")
IllegalStateException missingVFSRootInServiceRef(String serviceRefName);
Modified: common/branches/ropalka/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
===================================================================
--- common/branches/ropalka/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-11-13 07:49:47 UTC (rev 16964)
+++ common/branches/ropalka/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-11-13 07:53:09 UTC (rev 16965)
@@ -29,7 +29,6 @@
import org.jboss.ws.common.management.DefaultEndpointRegistryFactory;
import org.jboss.ws.common.management.DefaultJMSEndpointResolver;
import org.jboss.ws.common.security.DefaultSecurityAdapterFactory;
-import org.jboss.ws.common.serviceref.DefaultServiceRefHandlerFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
@@ -37,7 +36,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.serviceref.ServiceRefHandlerFactory;
/**
* @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
@@ -66,10 +64,6 @@
{
returnType = loadService(spiType, DefaultLifecycleHandlerFactory.class, loader);
}
- else if (ServiceRefHandlerFactory.class.equals(spiType))
- {
- returnType = loadService(spiType, DefaultServiceRefHandlerFactory.class, loader);
- }
else if (SecurityAdaptorFactory.class.equals(spiType))
{
returnType = loadService(spiType, DefaultSecurityAdapterFactory.class, loader);
12 years, 4 months
JBossWS SVN: r16964 - common/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-13 02:49:47 -0500 (Tue, 13 Nov 2012)
New Revision: 16964
Added:
common/branches/ropalka/
Log:
WS Ref optimization branch
12 years, 4 months
JBossWS SVN: r16963 - in spi/branches/ropalka/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: 2012-11-13 02:47:18 -0500 (Tue, 13 Nov 2012)
New Revision: 16963
Added:
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefFactory.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefFactoryFactory.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefType.java
Removed:
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinder.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinderFactory.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefElement.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandlerFactory.java
Modified:
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java
Log:
[JBWS-3565] WS Ref SPI clean up
Deleted: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -1,71 +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.jboss.wsf.spi.serviceref.ServiceRefElement;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 06-May-2004
- */
-public class UnifiedCallPropertyMetaData extends ServiceRefElement
-{
- // The required <prop-name> element
- private String propName;
- // The required <prop-value> element
- private String propValue;
-
- public UnifiedCallPropertyMetaData(String propName, String propValue)
- {
- this.propName = propName;
- this.propValue = propValue;
- }
-
- public UnifiedCallPropertyMetaData()
- {
- }
-
- public String getPropName()
- {
- return propName;
- }
-
- public void setPropName(String paramName)
- {
- this.propName = paramName;
- }
-
- public String getPropValue()
- {
- return propValue;
- }
-
- public void setPropValue(String paramValue)
- {
- this.propValue = paramValue;
- }
-
- public String toString()
- {
- return "[name=" + propName + ",value=" + propValue + "]";
- }
-}
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -21,19 +21,19 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-
/** The unified metadata data for a handler chain element
*
* @author Thomas.Diesler(a)jboss.org
*/
-public class UnifiedHandlerChainMetaData extends ServiceRefElement
+public class UnifiedHandlerChainMetaData implements Serializable
{
+ private static final long serialVersionUID = 1L;
private QName serviceNamePattern;
private QName portNamePattern;
private String protocolBindings;
@@ -41,11 +41,6 @@
private boolean excluded;
private String id;
- @Deprecated
- public UnifiedHandlerChainMetaData(UnifiedHandlerChainsMetaData handlerChains)
- {
- }
-
public UnifiedHandlerChainMetaData()
{
}
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -21,26 +21,20 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
+import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-
/** The unified metadata data for a handler chains element
*
* @author Thomas.Diesler(a)jboss.org
*/
-public class UnifiedHandlerChainsMetaData extends ServiceRefElement
+public class UnifiedHandlerChainsMetaData implements Serializable
{
- private HandlerType handlerType;
+ private static final long serialVersionUID = 1L;
+
private List<UnifiedHandlerChainMetaData> handlerChains = new LinkedList<UnifiedHandlerChainMetaData>();
- public UnifiedHandlerChainsMetaData(HandlerType handlerType)
- {
- this.handlerType = handlerType;
- }
-
public UnifiedHandlerChainsMetaData()
{
}
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
+import java.io.Serializable;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
@@ -28,15 +29,15 @@
import javax.xml.namespace.QName;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-
/**
* The unified metadata data for a handler element
*
* @author Thomas.Diesler(a)jboss.org
*/
-public class UnifiedHandlerMetaData extends ServiceRefElement
+public class UnifiedHandlerMetaData implements Serializable
{
+ private static final long serialVersionUID = 1L;
+
public enum HandlerType
{
PRE, ENDPOINT, POST, ALL
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -21,14 +21,15 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
+import java.io.Serializable;
/**
* @author Thomas.Diesler(a)jboss.org
* @since 06-May-2004
*/
-public class UnifiedInitParamMetaData extends ServiceRefElement
+public class UnifiedInitParamMetaData implements Serializable
{
+ private static final long serialVersionUID = 1L;
// The required <param-name> element
private String paramName;
// The required <param-value> element
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -21,23 +21,22 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
import org.jboss.wsf.spi.Messages;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
/** The metadata data from service-ref/port-component-ref element in web.xml, ejb-jar.xml, and application-client.xml.
*
* @author Thomas.Diesler(a)jboss.org
* @author alessio.soldano(a)jboss.com
*/
-public class UnifiedPortComponentRefMetaData extends ServiceRefElement
+public class UnifiedPortComponentRefMetaData implements Serializable
{
- private static final long serialVersionUID = 8622309745808960649L;
-
+ private static final long serialVersionUID = 1L;
// The parent service-ref
private UnifiedServiceRefMetaData serviceRefMetaData;
@@ -47,8 +46,6 @@
private String portComponentLink;
// The optional <port-qname> element
private QName portQName;
- // Arbitrary proxy properties given by <call-property>
- private List<UnifiedCallPropertyMetaData> callProperties = new ArrayList<UnifiedCallPropertyMetaData>(2);
// Arbitrary proxy properties given by <stub-property>
private List<UnifiedStubPropertyMetaData> stubProperties = new ArrayList<UnifiedStubPropertyMetaData>(2);
// The optional JBossWS config-name
@@ -192,21 +189,6 @@
this.portQName = portQName;
}
- public List<UnifiedCallPropertyMetaData> getCallProperties()
- {
- return callProperties;
- }
-
- public void setCallProperties(List<UnifiedCallPropertyMetaData> callProps)
- {
- callProperties = callProps;
- }
-
- public void addCallProperty(UnifiedCallPropertyMetaData callProp)
- {
- callProperties.add(callProp);
- }
-
public List<UnifiedStubPropertyMetaData> getStubProperties()
{
return stubProperties;
@@ -275,7 +257,6 @@
str.append("\n respectBindingAnnotationSpecified=" + respectBindingAnnotationSpecified);
str.append("\n respectBindingEnabled=" + respectBindingEnabled);
str.append("\n portComponentLink=" + portComponentLink);
- str.append("\n callProperties=" + callProperties);
str.append("\n stubProperties=" + stubProperties);
str.append("\n configName=" + configName);
str.append("\n configFile=" + configFile);
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -23,15 +23,7 @@
import static org.jboss.wsf.spi.Messages.MESSAGES;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
+import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -42,10 +34,7 @@
import org.jboss.wsf.spi.Loggers;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.wsf.spi.deployment.WritableUnifiedVirtualFile;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-import org.jboss.wsf.spi.serviceref.ServiceRefHandler;
-import org.jboss.wsf.spi.util.URLLoaderAdapter;
+import org.jboss.wsf.spi.serviceref.ServiceRefType;
/**
* The metadata from service-ref element in web.xml, ejb-jar.xml, and
@@ -55,16 +44,15 @@
* @author alessio.soldano(a)jboss.com
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
-public final class UnifiedServiceRefMetaData extends ServiceRefElement
+public final class UnifiedServiceRefMetaData implements Serializable
{
- private static final long serialVersionUID = -926464174132493955L;
-
+ private static final long serialVersionUID = 1L;
private transient UnifiedVirtualFile vfsRoot;
-
- // Standard properties
-
+
+ // Standard properties
+
// Service reference type - either JAX-RPC or JAXWS
- private ServiceRefHandler.Type type;
+ private ServiceRefType type;
// The required <service-ref-name> element
private String serviceRefName;
// The JAXRPC required <service-interface> element
@@ -75,6 +63,7 @@
private String wsdlFile;
// The optional <jaxrpc-mapping-file> element
private String mappingFile;
+ private URL mappingURL;
// The optional <service-qname> element
private QName serviceQName;
// The list <port-component-ref> elements
@@ -92,10 +81,9 @@
private String configFile;
// The optional URL of the actual WSDL to use, <wsdl-override>
private String wsdlOverride;
+ private URL wsdlLocation;
// The optional <handler-chain> element. JAX-WS handler chain declared in the JBoss JavaEE5 descriptor
private String handlerChain;
- // Arbitrary proxy properties given by <call-property>
- private List<UnifiedCallPropertyMetaData> callProperties = new ArrayList<UnifiedCallPropertyMetaData>(2);
// @Addressing annotation metadata
private boolean isAddressingAnnotationSpecified;
private boolean addressingEnabled;
@@ -117,7 +105,7 @@
public UnifiedServiceRefMetaData()
{
}
-
+
public void setAddressingAnnotationSpecified(final boolean isAddressingAnnotationSpecified) {
this.isAddressingAnnotationSpecified = isAddressingAnnotationSpecified;
}
@@ -205,12 +193,12 @@
this.vfsRoot = vfsRoot;
}
- public ServiceRefHandler.Type getType()
+ public ServiceRefType getType()
{
return type;
}
- public void setType(ServiceRefHandler.Type type)
+ public void setType(ServiceRefType type)
{
this.type = type;
}
@@ -232,23 +220,21 @@
public void setMappingFile(String mappingFile)
{
+ if (mappingFile != null) {
+ try
+ {
+ mappingURL = vfsRoot.findChild(mappingFile).toURL();
+ }
+ catch (Exception e)
+ {
+ throw MESSAGES.cannotFindFile(e, mappingFile);
+ }
+ }
this.mappingFile = mappingFile;
}
public URL getMappingLocation()
{
- URL mappingURL = null;
- if (mappingFile != null)
- {
- try
- {
- mappingURL = vfsRoot.findChild(mappingFile).toURL();
- }
- catch (Exception e)
- {
- throw MESSAGES.cannotFindFile(e, mappingFile);
- }
- }
return mappingURL;
}
@@ -336,11 +322,15 @@
public void setWsdlFile(String wsdlFile)
{
this.wsdlFile = wsdlFile;
+ initWsdlLocation();
}
+
+ public URL getWsdlLocation() {
+ return wsdlLocation;
+ }
- public URL getWsdlLocation()
+ public void initWsdlLocation()
{
- URL wsdlLocation = null;
if (wsdlOverride != null)
{
try
@@ -378,8 +368,6 @@
}
}
}
-
- return wsdlLocation;
}
public String getConfigFile()
@@ -410,23 +398,9 @@
public void setWsdlOverride(String wsdlOverride)
{
this.wsdlOverride = wsdlOverride;
+ initWsdlLocation();
}
- public List<UnifiedCallPropertyMetaData> getCallProperties()
- {
- return callProperties;
- }
-
- public void setCallProperties(List<UnifiedCallPropertyMetaData> callProps)
- {
- callProperties = callProps;
- }
-
- public void addCallProperty(UnifiedCallPropertyMetaData callProp)
- {
- callProperties.add(callProp);
- }
-
public UnifiedHandlerChainsMetaData getHandlerChains()
{
return handlerChains;
@@ -447,76 +421,6 @@
this.handlerChain = handlerChain;
}
- private void writeObject(ObjectOutputStream out) throws IOException
- {
- out.defaultWriteObject();
- out.writeObject(vfsRoot);
- if (vfsRoot instanceof WritableUnifiedVirtualFile)
- {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- ((WritableUnifiedVirtualFile)vfsRoot).writeContent(bos, new WritableUnifiedVirtualFile.NameFilter() {
- public boolean accept(String fileName)
- {
- boolean result = fileName.contains("META-INF");
- result = result || fileName.endsWith(".wsdl");
- result = result || fileName.endsWith(".xsd");
- result = result || fileName.endsWith(".xml");
- return result;
- }
- });
- out.writeObject(bos.toByteArray());
- out.writeObject(vfsRoot.getName());
- }
- }
-
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
- {
- in.defaultReadObject();
- UnifiedVirtualFile obj = (UnifiedVirtualFile)in.readObject();
- if (obj.toURL() == null && (obj instanceof WritableUnifiedVirtualFile))
- {
- //the virtual file has been created in a different VM (or is even pointing to a different filesystem), try getting the serialized contents
- byte[] bytes = (byte[])in.readObject();
- String vfName = (String)in.readObject();
- ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
- File tempFile = File.createTempFile("jbossws-vf-", "-" + vfName);
- tempFile.deleteOnExit();
- FileOutputStream fos = new FileOutputStream(tempFile);
- copyStreamAndClose(fos, bis);
- this.vfsRoot = new URLLoaderAdapter(tempFile.toURI().toURL());
- }
- else
- {
- this.vfsRoot = (UnifiedVirtualFile)obj;
- }
- }
-
- private static void copyStreamAndClose(OutputStream outs, InputStream ins) throws IOException
- {
- try
- {
- byte[] bytes = new byte[1024];
- int r = ins.read(bytes);
- while (r > 0)
- {
- outs.write(bytes, 0, r);
- r = ins.read(bytes);
- }
- }
- catch (IOException e)
- {
- throw e;
- }
- finally{
- try {
- ins.close();
- } catch (Exception e) {}
- try {
- outs.close();
- } catch (Exception e) {}
- }
- }
-
public String toString()
{
StringBuilder str = new StringBuilder();
@@ -532,7 +436,6 @@
str.append("\n mappingFile=" + mappingFile);
str.append("\n configName=" + configName);
str.append("\n configFile=" + configFile);
- str.append("\n callProperties=" + callProperties);
str.append("\n addressingAnnotationSpecified=" + isAddressingAnnotationSpecified);
str.append("\n addressingEnabled=" + addressingEnabled);
str.append("\n addressingRequired=" + addressingRequired);
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -21,14 +21,15 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
-import org.jboss.wsf.spi.serviceref.ServiceRefElement;
+import java.io.Serializable;
/**
* @author Thomas.Diesler(a)jboss.org
* @since 06-May-2004
*/
-public class UnifiedStubPropertyMetaData extends ServiceRefElement
+public class UnifiedStubPropertyMetaData implements Serializable
{
+ private static final long serialVersionUID = 1L;
// The required <prop-name> element
private String propName;
// The required <prop-value> element
Deleted: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinder.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinder.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinder.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -1,36 +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.serviceref;
-
-import javax.naming.Referenceable;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * Creates a ServiceReferenceable and binds it to JNDI.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public interface ServiceRefBinder
-{
- Referenceable createReferenceable(final UnifiedServiceRefMetaData serviceRef);
-}
Deleted: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinderFactory.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinderFactory.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinderFactory.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -1,32 +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.serviceref;
-
-import org.jboss.wsf.spi.SPIView;
-
-/**
- * @author Thomas.Diesler(a)jboss.com
- */
-public interface ServiceRefBinderFactory extends SPIView
-{
- ServiceRefBinder newServiceRefBinder(ServiceRefHandler.Type type);
-}
Deleted: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefElement.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefElement.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefElement.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -1,34 +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.serviceref;
-
-import java.io.Serializable;
-
-/**
- * A marker for all <service-ref> related objects.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 08-Mar-2007
- */
-public abstract class ServiceRefElement implements Serializable
-{
-}
Added: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefFactory.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefFactory.java (rev 0)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefFactory.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -0,0 +1,34 @@
+/*
+ * 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.serviceref;
+
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * Creates service ref instance.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public interface ServiceRefFactory
+{
+ Object newServiceRef(final UnifiedServiceRefMetaData serviceRef);
+}
Added: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefFactoryFactory.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefFactoryFactory.java (rev 0)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefFactoryFactory.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -0,0 +1,32 @@
+/*
+ * 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.serviceref;
+
+import org.jboss.wsf.spi.SPIView;
+
+/**
+ * @author Thomas.Diesler(a)jboss.com
+ */
+public interface ServiceRefFactoryFactory extends SPIView
+{
+ ServiceRefFactory newServiceRefFactory();
+}
Deleted: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -1,41 +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.serviceref;
-
-import javax.naming.Referenceable;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * An implementation of this interface handles all service-ref binding concerns.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public interface ServiceRefHandler
-{
- enum Type
- {
- JAXRPC, JAXWS
- };
-
- Referenceable createReferenceable(UnifiedServiceRefMetaData serviceRefUMDM);
-}
Deleted: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandlerFactory.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandlerFactory.java 2012-11-13 07:39:44 UTC (rev 16962)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandlerFactory.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -1,29 +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.serviceref;
-
-import org.jboss.wsf.spi.SPIView;
-
-public interface ServiceRefHandlerFactory extends SPIView
-{
- ServiceRefHandler getServiceRefHandler();
-}
Added: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefType.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefType.java (rev 0)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefType.java 2012-11-13 07:47:18 UTC (rev 16963)
@@ -0,0 +1,32 @@
+/*
+ * 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.serviceref;
+
+/**
+ * Creates a ServiceReferenceable and binds it to JNDI.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public enum ServiceRefType
+{
+ JAXRPC, JAXWS
+}
12 years, 4 months
JBossWS SVN: r16962 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-13 02:39:44 -0500 (Tue, 13 Nov 2012)
New Revision: 16962
Added:
spi/branches/ropalka/
Log:
WS Ref optimization branch
12 years, 4 months
JBossWS SVN: r16961 - stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2012-11-08 06:07:50 -0500 (Thu, 08 Nov 2012)
New Revision: 16961
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
Log:
[JBPAPP-10373] replaced schema filename with actual path for schema to allow multiple schemas with the same name to be found
Modified: stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2012-11-08 10:08:23 UTC (rev 16960)
+++ stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2012-11-08 11:07:50 UTC (rev 16961)
@@ -168,20 +168,21 @@
String locationURI = wsdlImport.getLocationURI();
Definition subdef = wsdlImport.getDefinition();
+ URL targetURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + locationURI);
+
// its an external import, don't publish locally
if (locationURI.startsWith("http://") == false)
{
// infinity loops prevention
- if (published.contains(locationURI))
+ if (published.contains(targetURL.getPath()))
{
continue;
}
else
{
- published.add(locationURI);
+ published.add(targetURL.getPath());
}
- URL targetURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + locationURI);
File targetFile = new File(targetURL.getPath());
targetFile.getParentFile().mkdirs();
@@ -221,17 +222,18 @@
{
if (schemaLocation.startsWith("http://") == false)
{
+ URL xsdURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + schemaLocation);
+
// infinity loops prevention
- if (published.contains(schemaLocation))
+ if (published.contains(xsdURL.getPath()))
{
continue;
}
else
{
- published.add(schemaLocation);
+ published.add(xsdURL.getPath());
}
- URL xsdURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + schemaLocation);
File targetFile = new File(xsdURL.getPath());
targetFile.getParentFile().mkdirs();
12 years, 4 months
JBossWS SVN: r16960 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2012-11-08 05:08:23 -0500 (Thu, 08 Nov 2012)
New Revision: 16960
Added:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-10373/
Log:
[JBPAPP-10373] Create one off patch branch
12 years, 4 months