[jbossws-commits] JBossWS SVN: r3879 - in trunk: integration/native/src/main/resources/jbossws-native50.sar/META-INF and 32 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Jul 13 07:55:01 EDT 2007


Author: heiko.braun at jboss.com
Date: 2007-07-13 07:55:00 -0400 (Fri, 13 Jul 2007)
New Revision: 3879

Added:
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection/
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java
   trunk/testsuite/src/resources/jaxws/samples/serviceref/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl
   trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml
Removed:
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefObjectFactory.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/serviceref/
   trunk/jbossws-core/src/test/resources/jaxws/serviceref/
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl
   trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml
   trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/
   trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml
Modified:
   trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
   trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
   trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
   trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java
   trunk/integration/sunri/ant-import/build-testsuite.xml
   trunk/integration/sunri/build.xml
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
   trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
   trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml
   trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/META-INF/jbossws-deployer-beans.xml
   trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml
   trunk/integration/sunri/src/test/resources/test-excludes.txt
   trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml
   trunk/jbossws-core/src/test/resources/test-excludes-jboss40.txt
   trunk/jbossws-core/src/test/resources/test-excludes-jboss42.txt
   trunk/jbossws-core/src/test/resources/test-excludes-jboss50.txt
   trunk/testsuite/ant-import/build-jars-jaxws.xml
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
Log:
Fix [JBWS-1737]: Service-ref for Sun-RI

Modified: trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -32,13 +32,31 @@
   <bean name="WSSubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager">
     <property name="bindAddress">${jboss.bind.address}</property>
   </bean>
-  
-  <!-- Bind Service objects in client environment context  -->
-  <bean name="WSServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
-  
-  <!-- Note, JBoss_4_2_0_GA uses this hardcoded bean name -->
-  <bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
-  
+
+  <!--
+      ServiceRe Handling
+   -->
+
+   <!-- Bind Service objects in client environment context  -->
+   <bean name="WSServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+      <property name="jaxrpcBinder"><inject bean="WSServiceRefBinderJAXRPC"/></property>
+      <property name="jaxwsBinder"><inject bean="WSServiceRefBinderJAXWS"/></property>
+   </bean>
+
+   <!-- Note, JBoss_4_2_0_GA uses this hardcoded bean name -->
+   <bean name="ServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+      <property name="jaxrpcBinder"><inject bean="WSServiceRefBinderJAXRPC"/></property>
+      <property name="jaxwsBinder"><inject bean="WSServiceRefBinderJAXWS"/></property>
+   </bean>
+
+  <bean name="WSServiceRefBinderJAXRPC" class="org.jboss.ws.core.jaxrpc.client.ServiceRefBinderJAXRPC"/>
+
+  <bean name="WSServiceRefBinderJAXWS" class="org.jboss.ws.core.jaxws.client.ServiceRefBinderJAXWS"/>
+
+   <!--
+      MC Utils
+   -->
+
   <!-- Locate the single instance of the kernel -->  
   <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
     <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>

Modified: trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -34,8 +34,15 @@
   </bean>
   
   <!-- Bind Service objects in client environment context  -->
-  <bean name="WSServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
-  
+  <bean name="WSServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+     <property name="jaxrpcBinder"><inject bean="WSServiceRefBinderJAXRPC"/></property>
+     <property name="jaxwsBinder"><inject bean="WSServiceRefBinderJAXWS"/></property>
+  </bean>
+
+  <bean name="WSServiceRefBinderJAXRPC" class="org.jboss.ws.core.jaxrpc.client.ServiceRefBinderJAXRPC"/>
+
+  <bean name="WSServiceRefBinderJAXWS" class="org.jboss.ws.core.jaxws.client.ServiceRefBinderJAXWS"/>
+
   <!-- Locate the single instance of the kernel -->  
   <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
     <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>

Modified: trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -27,6 +27,7 @@
 import javax.naming.NamingException;
 
 import org.jboss.xb.binding.UnmarshallingContext;
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
 import org.xml.sax.Attributes;
 
 /**
@@ -46,4 +47,8 @@
    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;
+
+   void setJaxrpcBinder(ServiceRefBinder binder);
+
+   void setJaxwsBinder(ServiceRefBinder binder);
 }

Modified: trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -57,7 +57,7 @@
       KernelRegistryEntry entry = registry.getEntry(ServiceRefHandler.BEAN_NAME);
       ServiceRefHandler handler = (ServiceRefHandler)entry.getTarget();
 
-      // Try legancy JBossAS-4.2 name
+      // Try legacy JBossAS-4.2 name
       if (handler == null)
       {
          entry = registry.getEntry("ServiceRefHandler");
@@ -69,7 +69,7 @@
    private static ServiceRefHandler getClientSideServiceRefHandler()
    {
       String propName = ServiceRefHandler.class.getName();
-      String defaultImpl = "org.jboss.ws.core.client.ServiceRefHandlerImpl";
+      String defaultImpl = "org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl";
       ServiceRefHandler handler = (ServiceRefHandler)ServiceLoader.loadService(propName, defaultImpl);
       return handler;
    }

Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java (from rev 3873, branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java	                        (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ *         Created: Jul 11, 2007
+ */
+public class WSFException extends RuntimeException
+{
+   public WSFException()
+   {
+      super();
+   }
+
+   public WSFException(String message)
+   {
+      super(message);
+   }
+
+   public WSFException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   public WSFException(Throwable cause)
+   {
+      super(cause);    
+   }
+
+   public static void rethrow(String string, Throwable th)
+   {
+      if (th instanceof WSFException)
+         throw (WSFException)th;
+
+      throw new WSFException(string, th);
+   }
+
+   public static void rethrow(Throwable th)
+   {
+      if (th instanceof WSFException)
+         throw (WSFException)th;
+
+      throw new WSFException(th);
+   }
+}

Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref (from rev 3873, branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref)

Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,201 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.deployment.serviceref;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.util.naming.Util;
-import org.jboss.logging.Logger;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.Referenceable;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-import javax.xml.ws.Service;
-import javax.jws.HandlerChain;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.annotation.Annotation;
-import java.util.List;
-import java.util.ArrayList;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-/**
- * A generic ServiceRefBinder that knows how to deal with JAX-WS services.
- * Subclasses need to provide a stack specific {@link Referenceable} that can be bound into JNDI.
- * <p/>
- * This works in conjunction with a ServiceObjectFactory that knows how to assemble
- * the Service after JNDI lookup on the client side.
- *
- * @see javax.naming.spi.ObjectFactory
- *
- * @author Heiko.Braun at jboss.com
- *         Created: Jul 12, 2007
- */
-public abstract class CommonServiceRefBinder implements ServiceRefBinder
-{
-   // logging support
-   private static Logger log = Logger.getLogger(CommonServiceRefBinder.class);
-
-   public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
-   {
-      WebServiceRef wsref = null;
-
-      // Build the list of @WebServiceRef relevant annotations
-      List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
-      if (anElement != null)
-      {
-         for (Annotation an : anElement.getAnnotations())
-         {
-            if (an instanceof WebServiceRef)
-               wsrefList.add((WebServiceRef)an);
-
-            if (an instanceof WebServiceRefs)
-            {
-               WebServiceRefs wsrefs = (WebServiceRefs)an;
-               for (WebServiceRef aux : wsrefs.value())
-                  wsrefList.add(aux);
-            }
-         }
-      }
-
-      // Use the single @WebServiceRef
-      if (wsrefList.size() == 1)
-      {
-         wsref = wsrefList.get(0);
-      }
-      else
-      {
-         for (WebServiceRef aux : wsrefList)
-         {
-            if (encName.endsWith("/" + aux.name()))
-            {
-               wsref = aux;
-               break;
-            }
-         }
-      }
-
-      Class targetClass = null;
-      if (anElement instanceof Field)
-      {
-         targetClass = ((Field)anElement).getType();
-      }
-      else if (anElement instanceof Method)
-      {
-         targetClass = ((Method)anElement).getParameterTypes()[0];
-      }
-      else
-      {
-         if( wsref!=null && (wsref.type() != Object.class) )
-            targetClass = wsref.type();
-      }
-
-      String targetClassName = (targetClass != null ? targetClass.getName() : null);
-      String externalName = encCtx.getNameInNamespace() + "/" + encName;
-      log.debug("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
-
-      String serviceImplClass = null;
-
-      // #1 Use the explicit @WebServiceRef.value
-      if (wsref != null && wsref.value() != Object.class)
-         serviceImplClass = wsref.value().getName();
-
-      // #2 Use the target ref type
-      if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
-         serviceImplClass = targetClass.getName();
-
-      // #3 Use <service-interface>
-      if (serviceImplClass == null && serviceRef.getServiceInterface() != null)
-         serviceImplClass = serviceRef.getServiceInterface();
-
-      // #4 Use javax.xml.ws.Service
-      if (serviceImplClass == null)
-         serviceImplClass = Service.class.getName();
-
-      // #1 Use the explicit @WebServiceRef.type
-      if (wsref != null && wsref.type() != Object.class)
-         targetClassName = wsref.type().getName();
-
-
-      // #2 Use the target ref type
-      if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
-         targetClassName = targetClass.getName();
-
-      // Set the wsdlLocation if there is no override already
-      if (serviceRef.getWsdlOverride() == null && wsref != null && wsref.wsdlLocation().length() > 0)
-         serviceRef.setWsdlOverride(wsref.wsdlLocation());
-
-      // Set the handlerChain from @HandlerChain on the annotated element
-      String handlerChain = serviceRef.getHandlerChain();
-      if (anElement != null)
-      {
-         HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
-         if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
-            handlerChain = anHandlerChain.file();
-      }
-
-      // Resolve path to handler chain
-      if (handlerChain != null)
-      {
-         try
-         {
-            new URL(handlerChain);
-         }
-         catch (MalformedURLException ex)
-         {
-            Class declaringClass = null;
-            if (anElement instanceof Field)
-               declaringClass = ((Field)anElement).getDeclaringClass();
-            else if (anElement instanceof Method)
-               declaringClass = ((Method)anElement).getDeclaringClass();
-            else if (anElement instanceof Class)
-               declaringClass = (Class)anElement;
-
-            handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
-         }
-
-         serviceRef.setHandlerChain(handlerChain);
-      }
-
-      // Do not use rebind, the binding should be unique
-      // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
-      Referenceable serviceReferenceable = buildServiceReferenceable(serviceImplClass, targetClassName, serviceRef);
-      Util.bind(encCtx, encName, serviceReferenceable);
-
-   }
-
-   /**
-    * Subclasses should provide a stack specific ServiceReferenceable.
-    *
-    * @param serviceImplClass
-    * @param targetClassName
-    * @param serviceRef
-    * @return  a Referenceable that can be used by a stack specific {@link javax.naming.spi.ObjectFactory} on the client side
-    * to create a web service stub
-    * */
-   protected abstract Referenceable buildServiceReferenceable(
-     String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData serviceRef
-   );
-}

Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java (from rev 3873, branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java	                        (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,201 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.deployment.serviceref;
+
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.util.naming.Util;
+import org.jboss.logging.Logger;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.Referenceable;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+import javax.xml.ws.Service;
+import javax.jws.HandlerChain;
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+/**
+ * A generic ServiceRefBinder that knows how to deal with JAX-WS services.
+ * Subclasses need to provide a stack specific {@link Referenceable} that can be bound into JNDI.
+ * <p/>
+ * This works in conjunction with a ServiceObjectFactory that knows how to assemble
+ * the Service after JNDI lookup on the client side.
+ *
+ * @see javax.naming.spi.ObjectFactory
+ *
+ * @author Heiko.Braun at jboss.com
+ *         Created: Jul 12, 2007
+ */
+public abstract class CommonServiceRefBinder implements ServiceRefBinder
+{
+   // logging support
+   private static Logger log = Logger.getLogger(CommonServiceRefBinder.class);
+
+   public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
+   {
+      WebServiceRef wsref = null;
+
+      // Build the list of @WebServiceRef relevant annotations
+      List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
+      if (anElement != null)
+      {
+         for (Annotation an : anElement.getAnnotations())
+         {
+            if (an instanceof WebServiceRef)
+               wsrefList.add((WebServiceRef)an);
+
+            if (an instanceof WebServiceRefs)
+            {
+               WebServiceRefs wsrefs = (WebServiceRefs)an;
+               for (WebServiceRef aux : wsrefs.value())
+                  wsrefList.add(aux);
+            }
+         }
+      }
+
+      // Use the single @WebServiceRef
+      if (wsrefList.size() == 1)
+      {
+         wsref = wsrefList.get(0);
+      }
+      else
+      {
+         for (WebServiceRef aux : wsrefList)
+         {
+            if (encName.endsWith("/" + aux.name()))
+            {
+               wsref = aux;
+               break;
+            }
+         }
+      }
+
+      Class targetClass = null;
+      if (anElement instanceof Field)
+      {
+         targetClass = ((Field)anElement).getType();
+      }
+      else if (anElement instanceof Method)
+      {
+         targetClass = ((Method)anElement).getParameterTypes()[0];
+      }
+      else
+      {
+         if( wsref!=null && (wsref.type() != Object.class) )
+            targetClass = wsref.type();
+      }
+
+      String targetClassName = (targetClass != null ? targetClass.getName() : null);
+      String externalName = encCtx.getNameInNamespace() + "/" + encName;
+      log.debug("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
+
+      String serviceImplClass = null;
+
+      // #1 Use the explicit @WebServiceRef.value
+      if (wsref != null && wsref.value() != Object.class)
+         serviceImplClass = wsref.value().getName();
+
+      // #2 Use the target ref type
+      if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
+         serviceImplClass = targetClass.getName();
+
+      // #3 Use <service-interface>
+      if (serviceImplClass == null && serviceRef.getServiceInterface() != null)
+         serviceImplClass = serviceRef.getServiceInterface();
+
+      // #4 Use javax.xml.ws.Service
+      if (serviceImplClass == null)
+         serviceImplClass = Service.class.getName();
+
+      // #1 Use the explicit @WebServiceRef.type
+      if (wsref != null && wsref.type() != Object.class)
+         targetClassName = wsref.type().getName();
+
+
+      // #2 Use the target ref type
+      if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
+         targetClassName = targetClass.getName();
+
+      // Set the wsdlLocation if there is no override already
+      if (serviceRef.getWsdlOverride() == null && wsref != null && wsref.wsdlLocation().length() > 0)
+         serviceRef.setWsdlOverride(wsref.wsdlLocation());
+
+      // Set the handlerChain from @HandlerChain on the annotated element
+      String handlerChain = serviceRef.getHandlerChain();
+      if (anElement != null)
+      {
+         HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
+         if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
+            handlerChain = anHandlerChain.file();
+      }
+
+      // Resolve path to handler chain
+      if (handlerChain != null)
+      {
+         try
+         {
+            new URL(handlerChain);
+         }
+         catch (MalformedURLException ex)
+         {
+            Class declaringClass = null;
+            if (anElement instanceof Field)
+               declaringClass = ((Field)anElement).getDeclaringClass();
+            else if (anElement instanceof Method)
+               declaringClass = ((Method)anElement).getDeclaringClass();
+            else if (anElement instanceof Class)
+               declaringClass = (Class)anElement;
+
+            handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
+         }
+
+         serviceRef.setHandlerChain(handlerChain);
+      }
+
+      // Do not use rebind, the binding should be unique
+      // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
+      Referenceable serviceReferenceable = buildServiceReferenceable(serviceImplClass, targetClassName, serviceRef);
+      Util.bind(encCtx, encName, serviceReferenceable);
+
+   }
+
+   /**
+    * Subclasses should provide a stack specific ServiceReferenceable.
+    *
+    * @param serviceImplClass
+    * @param targetClassName
+    * @param serviceRef
+    * @return  a Referenceable that can be used by a stack specific {@link javax.naming.spi.ObjectFactory} on the client side
+    * to create a web service stub
+    * */
+   protected abstract Referenceable buildServiceReferenceable(
+     String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData serviceRef
+   );
+}

Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.deployment.serviceref;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import java.lang.reflect.AnnotatedElement;
-
-/**
- * Creates a ServiceReferenceable and binds it to JNDI.
- *
- * @author Heiko.Braun at jboss.com
- *         Created: Jul 11, 2007
- */
-public interface ServiceRefBinder
-{
-   public final static String JAXRPC_BINDER = "WSServiceRefBinderJAXRPC";
-
-   public final static String JAXWS_BINDER = "WSServiceRefBinderJAXWS";
-
-   void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef)
-       throws NamingException;
-}

Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java (from rev 3873, branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java	                        (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.deployment.serviceref;
+
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.lang.reflect.AnnotatedElement;
+
+/**
+ * Creates a ServiceReferenceable and binds it to JNDI.
+ *
+ * @author Heiko.Braun at jboss.com
+ *         Created: Jul 11, 2007
+ */
+public interface ServiceRefBinder
+{
+   public final static String JAXRPC_BINDER = "WSServiceRefBinderJAXRPC";
+
+   public final static String JAXWS_BINDER = "WSServiceRefBinderJAXWS";
+
+   void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef)
+       throws NamingException;
+}

Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,180 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.deployment.serviceref;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.integration.*;
-import org.jboss.wsf.spi.WSFException;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import java.io.File;
-import java.lang.reflect.AnnotatedElement;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * Bind service refs in the client's ENC
- * for every service-ref element in the deployment descriptor.
- *
- * @author Thomas.Diesler at jboss.org
- * @author Heiko.Braun at jboss.com
- *
- * @since 04-Nov-2006
- */
-public class ServiceRefHandlerImpl implements ServiceRefHandler
-{
-   // logging support
-   private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
-
-   private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
-
-   enum Type {JAXRPC, JAXWS};
-
-   /* binds jaxrpc deployments */
-   private ServiceRefBinder jaxrpcBinder;
-
-   /*binds jaxws deployments */
-   private ServiceRefBinder jaxwsBinder;
-
-   public void setJaxrpcBinder(ServiceRefBinder binder)
-   {
-      this.jaxrpcBinder = binder;
-   }
-
-   public void setJaxwsBinder(ServiceRefBinder binder)
-   {
-      this.jaxwsBinder = binder;
-   }
-
-   public ServiceRefMetaData newServiceRefMetaData()
-   {
-      return new UnifiedServiceRefMetaData();
-   }
-   
-   public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
-   {
-      if (sref.isProcessed())
-      {
-         log.debug("Attempt to rebind the service-ref: " + sref.getServiceRefName());
-         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.toURL());
-               }
-               catch (MalformedURLException e){}
-            }
-
-         }
-      }
-
-      UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
-      serviceRef.setVfsRoot(vfsRoot);
-      try
-      {
-         if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
-         {
-            jaxrpcBinder.setupServiceRef(encCtx, encName, null, serviceRef);
-         }
-         else
-         {
-            AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
-            jaxwsBinder.setupServiceRef(encCtx, encName, anElement, serviceRef);
-         }
-      }
-      finally
-      {
-         sref.setProcessed(true);
-      }
-   }
-
-   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
-      String serviceRefType = serviceRef.getServiceRefType();
-      if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
-         return Type.JAXWS;
-
-      // The mapping-file is JAXRPC specific
-      if (serviceRef.getMappingFile() != null)
-         return Type.JAXRPC;
-
-      String siName = serviceRef.getServiceInterface();
-      if (siName == 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);
-         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);
-      }
-      catch (ClassNotFoundException e)
-      {
-         throw new IllegalStateException("Cannot load <service-interface>: " + siName);
-      }
-   }
-}

Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java (from rev 3873, branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java	                        (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.deployment.serviceref;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.*;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.io.File;
+import java.lang.reflect.AnnotatedElement;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Bind service refs in the client's ENC
+ * for every service-ref element in the deployment descriptor.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author Heiko.Braun at jboss.com
+ *
+ * @since 04-Nov-2006
+ */
+public class ServiceRefHandlerImpl implements ServiceRefHandler
+{
+   // logging support
+   private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
+
+   private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
+
+   enum Type {JAXRPC, JAXWS};
+
+   /* binds jaxrpc deployments */
+   private ServiceRefBinder jaxrpcBinder;
+
+   /*binds jaxws deployments */
+   private ServiceRefBinder jaxwsBinder;
+
+   public void setJaxrpcBinder(ServiceRefBinder binder)
+   {
+      this.jaxrpcBinder = binder;
+   }
+
+   public void setJaxwsBinder(ServiceRefBinder binder)
+   {
+      this.jaxwsBinder = binder;
+   }
+
+   public ServiceRefMetaData newServiceRefMetaData()
+   {
+      return new UnifiedServiceRefMetaData();
+   }
+   
+   public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
+   {
+      if (sref.isProcessed())
+      {
+         log.debug("Attempt to rebind the service-ref: " + sref.getServiceRefName());
+         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.toURL());
+               }
+               catch (MalformedURLException e){}
+            }
+
+         }
+      }
+
+      UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
+      serviceRef.setVfsRoot(vfsRoot);
+      try
+      {
+         if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
+         {
+            jaxrpcBinder.setupServiceRef(encCtx, encName, null, serviceRef);
+         }
+         else
+         {
+            AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
+            jaxwsBinder.setupServiceRef(encCtx, encName, anElement, serviceRef);
+         }
+      }
+      finally
+      {
+         sref.setProcessed(true);
+      }
+   }
+
+   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
+      String serviceRefType = serviceRef.getServiceRefType();
+      if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
+         return Type.JAXWS;
+
+      // The mapping-file is JAXRPC specific
+      if (serviceRef.getMappingFile() != null)
+         return Type.JAXRPC;
+
+      String siName = serviceRef.getServiceInterface();
+      if (siName == 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);
+         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);
+      }
+      catch (ClassNotFoundException e)
+      {
+         throw new IllegalStateException("Cannot load <service-interface>: " + siName);
+      }
+   }
+}

Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,305 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.deployment.serviceref;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.integration.ServiceRefElement;
-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.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A object model factory for <service-ref>
- * 
- * @author Thomas.Diesler at 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));
-      }
-
-      /* 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;
-   }
-}

Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java (from rev 3873, branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java	                        (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,305 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.deployment.serviceref;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.integration.ServiceRefElement;
+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.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A object model factory for <service-ref>
+ * 
+ * @author Thomas.Diesler at 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));
+      }
+
+      /* 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;
+   }
+}

Modified: trunk/integration/sunri/ant-import/build-testsuite.xml
===================================================================
--- trunk/integration/sunri/ant-import/build-testsuite.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/sunri/ant-import/build-testsuite.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -46,6 +46,7 @@
     </path>
     
     <path id="tests.extra.classpath">
+      <pathelement location="${int.sunri.dir}/output/lib/jbossws-sunri-client.jar"/>
       <pathelement location="${spi.dir}/output/lib/jbossws-spi.jar"/>
     </path>
     

Modified: trunk/integration/sunri/build.xml
===================================================================
--- trunk/integration/sunri/build.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/sunri/build.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -112,20 +112,23 @@
   <target name="jars-common" depends="compile">
     
     <!-- Build jbossws-sunri.jar -->
-    <mkdir dir="${sunri.output.lib.dir}"/>
+     <mkdir dir="${sunri.output.lib.dir}"/>
     <jar jarfile="${sunri.output.lib.dir}/jbossws-sunri.jar" manifest="${sunri.output.etc.dir}/default.mf">
       <fileset dir="${sunri.output.classes.dir}">
-        <exclude name="org/jboss/wsf/stack/sunri/sunri/tools/**"/>
-		  <include name="org/jboss/wsf/stack/sunri50/**"/>        
-		  <include name="org/jboss/wsf/stack/sunri/metadata/**"/>
-      	  <include name="org/jboss/wsf/stack/sunri/log/**"/>
-      	  <include name="org/jboss/wsf/stack/sunri/*"/>
+         <exclude name="org/jboss/wsf/stack/sunri/sunri/tools/**"/>
+         <include name="org/jboss/wsf/stack/sunri50/**"/>
+         <include name="org/jboss/wsf/stack/sunri/injection/**"/>
+         <include name="org/jboss/wsf/stack/sunri/client/**"/>
+         <include name="org/jboss/wsf/stack/sunri/metadata/**"/>
+         <include name="org/jboss/wsf/stack/sunri/log/**"/>
+         <include name="org/jboss/wsf/stack/sunri/*"/>
 		</fileset>     
     </jar>
 
 	  <!-- jbossws-sunri-client.jar -->
 	 <jar jarfile="${sunri.output.lib.dir}/jbossws-sunri-client.jar" manifest="${sunri.output.etc.dir}/default.mf">
       <fileset dir="${sunri.output.classes.dir}">
+        <include name="org/jboss/wsf/stack/sunri/client/**"/>	
         <include name="org/jboss/wsf/stack/sunri/tools/**"/>		  
 		</fileset>
       <metainf dir="${sunri.resources.dir}/jbossws-sunri-client.jar/META-INF"/>

Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -80,6 +80,8 @@
  * {@link createInvoker(Class)}
  *  
  *
+ * @see com.sun.xml.ws.transport.http.servlet.WSServletContextListener
+ * 
  * @author WS Development Team
  * @author Kohsuke Kawaguchi
  * @author Thomas.Diesler at jboss.org

Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -23,24 +23,11 @@
 
 // $Id$
 
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextAttributeEvent;
-import javax.servlet.ServletContextAttributeListener;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.xml.ws.WebServiceException;
-
 import com.sun.istack.NotNull;
 import com.sun.xml.ws.api.server.BoundEndpoint;
 import com.sun.xml.ws.api.server.Container;
 import com.sun.xml.ws.api.server.Module;
+import com.sun.xml.ws.api.server.ResourceInjector;
 import com.sun.xml.ws.resources.WsservletMessages;
 import com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
 import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
@@ -48,6 +35,15 @@
 import com.sun.xml.ws.transport.http.servlet.WSServlet;
 import com.sun.xml.ws.transport.http.servlet.WSServletDelegate;
 
+import javax.servlet.*;
+import javax.xml.ws.WebServiceException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 /**
  * A copy of WSServletContextListener that externalizes
  * 
@@ -173,10 +169,16 @@
          {
             return (T)servletContext;
          }
-         if (spiType == Module.class)
+         else if (spiType == Module.class)
          {
             return spiType.cast(module);
          }
+         else if(spiType == ResourceInjector.class)
+         {
+            return (T)ResourceInjector.STANDALONE;
+         }
+
+         logger.log(Level.WARNING, "Unable to resolve SPI for type: " + spiType);
          return null;
       }
    }

Copied: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client (from rev 3873, branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client)

Deleted: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.sunri.client;
-
-import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import java.lang.reflect.AnnotatedElement;
-
-/**
- * @author Heiko.Braun at jboss.com
- *         Created: Jul 12, 2007
- */
-public class DummyServiceRefBinderJAXRPC implements ServiceRefBinder
-{
-   public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
-   {
-      throw new IllegalArgumentException("The Sun-RI stack doesnt support JAX-RPC service-ref deployments");
-   }
-}

Copied: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java (from rev 3873, branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java)
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java	                        (rev 0)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.client;
+
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.lang.reflect.AnnotatedElement;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ *         Created: Jul 12, 2007
+ */
+public class DummyServiceRefBinderJAXRPC implements ServiceRefBinder
+{
+   public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
+   {
+      throw new IllegalArgumentException("The Sun-RI stack doesnt support JAX-RPC service-ref deployments");
+   }
+}

Deleted: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.sunri.client;
-
-import org.jboss.wsf.spi.deployment.serviceref.CommonServiceRefBinder;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-import javax.naming.Referenceable;
-
-/**
- * @author Heiko.Braun at jboss.com
- *         Created: Jul 12, 2007
- */
-public class ServiceRefBinderJAXWS extends CommonServiceRefBinder
-{
-   /**
-    * Create a Sun-RI specific service referenceable.
-    * Most of the setup is done in {@link CommonServiceRefBinder}
-    *
-    * @param serviceImplClass
-    * @param targetClassName
-    * @param serviceRef
-    * @return a Sun-RI specific service referenceable.
-    */
-   protected Referenceable buildServiceReferenceable(
-     String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData serviceRef)
-   {
-      return new SunRIServiceReferenceable(serviceImplClass, targetClassName, serviceRef);
-   }
-}

Copied: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java (from rev 3873, branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java)
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java	                        (rev 0)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.client;
+
+import org.jboss.wsf.spi.deployment.serviceref.CommonServiceRefBinder;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.Referenceable;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ *         Created: Jul 12, 2007
+ */
+public class ServiceRefBinderJAXWS extends CommonServiceRefBinder
+{
+   /**
+    * Create a Sun-RI specific service referenceable.
+    * Most of the setup is done in {@link CommonServiceRefBinder}
+    *
+    * @param serviceImplClass
+    * @param targetClassName
+    * @param serviceRef
+    * @return a Sun-RI specific service referenceable.
+    */
+   protected Referenceable buildServiceReferenceable(
+     String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData serviceRef)
+   {
+      return new SunRIServiceReferenceable(serviceImplClass, targetClassName, serviceRef);
+   }
+}

Deleted: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,213 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.sunri.client;
-
-import org.jboss.wsf.spi.WSFException;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-import javax.naming.*;
-import javax.naming.spi.ObjectFactory;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.Hashtable;
-import org.jboss.logging.Logger;
-
-/**
- * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
- * for a given WSDL when the webservice client does a JNDI lookup
- *
- * @see SunRIServiceReferenceable
- *
- * @author Heiko.Braun at jboss.com
- *         Created: Jul 12, 2007
- * */
-public class SunRIServiceObjectFactory implements ObjectFactory
-{
-   protected final Logger log = Logger.getLogger(SunRIServiceObjectFactory.class);
-
-   /**
-    * Creates an object using the location or reference information specified.
-    * <p/>
-    *
-    * @param obj         The possibly null object containing location or reference
-    *                    information that can be used in creating an object.
-    * @param name        The name of this object relative to <code>nameCtx</code>,
-    *                    or null if no name is specified.
-    * @param nameCtx     The context relative to which the <code>name</code>
-    *                    parameter is specified, or null if <code>name</code> is
-    *                    relative to the default initial context.
-    * @param environment The possibly null environment that is used in
-    *                    creating the object.
-    * @return The object created; null if an object cannot be created.
-    * @throws Exception if this object factory encountered an exception
-    *                   while attempting to create an object, and no other object factories are
-    *                   to be tried.
-    * @see javax.naming.spi.NamingManager#getObjectInstance
-    * @see javax.naming.spi.NamingManager#getURLContext
-    */
-   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
-   {
-      try
-      {
-         Reference ref = (Reference)obj;
-
-         // Get the target class name
-         String targetClassName = (String)ref.get(SunRIServiceReferenceable.TARGET_CLASS_NAME).getContent();
-
-         // Unmarshall the UnifiedServiceRef
-         UnifiedServiceRefMetaData serviceRef = unmarshallServiceRef(ref);
-         String serviceRefName = serviceRef.getServiceRefName();
-         QName serviceQName = serviceRef.getServiceQName();
-
-         String serviceImplClass = serviceRef.getServiceImplClass();
-         if (serviceImplClass == null)
-            serviceImplClass = (String)ref.get(SunRIServiceReferenceable.SERVICE_IMPL_CLASS).getContent();
-
-         // If the target defaults to javax.xml.ws.Service, use the service as the target
-         if (Service.class.getName().equals(targetClassName))
-            targetClassName = serviceImplClass;
-
-         log.debug("getObjectInstance [name=" + serviceRefName + ",service=" + serviceImplClass + ",target=" + targetClassName + "]");
-
-         // Load the service class
-         ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-         Class serviceClass = ctxLoader.loadClass(serviceImplClass);
-         Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
-
-         if (Service.class.isAssignableFrom(serviceClass) == false)
-            throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
-
-         // Receives either a javax.xml.ws.Service or a dynamic proxy
-         Object target;
-
-         // Get the URL to the wsdl
-         URL wsdlURL = serviceRef.getWsdlLocation();
-
-         // Generic javax.xml.ws.Service
-         if (serviceClass == Service.class)
-         {
-            if (wsdlURL != null)
-            {
-               target = Service.create(wsdlURL, serviceQName);
-            }
-            else
-            {
-               throw new IllegalArgumentException("Cannot create generic javax.xml.ws.Service without wsdlLocation: " + serviceRefName);
-            }
-         }
-         // Generated javax.xml.ws.Service subclass
-         else
-         {
-            if (wsdlURL != null)
-            {
-               Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
-               target = ctor.newInstance(new Object[] { wsdlURL, serviceQName });
-            }
-            else
-            {
-               target = (Service)serviceClass.newInstance();
-            }
-         }
-
-         // Configure the service
-         configureService((Service)target, serviceRef);
-
-         if (targetClassName != null && targetClassName.equals(serviceImplClass) == false)
-         {
-            try
-            {
-               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))
-                     {
-                        port = method.invoke(target, new Object[0]);
-                        target = port;
-                        break;
-                     }
-                  }
-               }
-
-               if (port == null)
-               {
-                  Method method = serviceClass.getMethod("getPort", new Class[] { Class.class });
-                  port = method.invoke(target, new Object[] { targetClass });
-                  target = port;
-               }
-            }
-            catch (InvocationTargetException ex)
-            {
-               throw ex.getTargetException();
-            }
-         }
-
-         return target;
-      }
-      catch (Throwable ex)
-      {
-         WSFException.rethrow("Cannot create service", ex);
-         return null;
-      }
-   }
-
-
-   private void configureService(Service service, UnifiedServiceRefMetaData serviceRef)
-   {
-      log.warn("Service configuration not available in Sun-RI");
-   }
-
-   private UnifiedServiceRefMetaData unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
-   {
-      UnifiedServiceRefMetaData sref;
-      RefAddr refAddr = ref.get(SunRIServiceReferenceable.SERVICE_REF_META_DATA);
-      ByteArrayInputStream bais = new ByteArrayInputStream((byte[])refAddr.getContent());
-      try
-      {
-         ObjectInputStream ois = new ObjectInputStream(bais);
-         sref = (UnifiedServiceRefMetaData)ois.readObject();
-         ois.close();
-      }
-      catch (IOException e)
-      {
-         throw new NamingException("Cannot unmarshall service ref meta data, cause: " + e.toString());
-      }
-
-      // Verify it. There is some know coinstraints
-      if(null == sref.getServiceQName())
-         throw new IllegalArgumentException("ServiceQName may not be null. " +
-           "Specify a service QName in the service-ref declaration.");
-
-      return sref;
-   }
-}
-

Copied: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java (from rev 3873, branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java)
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java	                        (rev 0)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceObjectFactory.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,213 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.client;
+
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.*;
+import javax.naming.spi.ObjectFactory;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Hashtable;
+import org.jboss.logging.Logger;
+
+/**
+ * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
+ * for a given WSDL when the webservice client does a JNDI lookup
+ *
+ * @see SunRIServiceReferenceable
+ *
+ * @author Heiko.Braun at jboss.com
+ *         Created: Jul 12, 2007
+ * */
+public class SunRIServiceObjectFactory implements ObjectFactory
+{
+   protected final Logger log = Logger.getLogger(SunRIServiceObjectFactory.class);
+
+   /**
+    * Creates an object using the location or reference information specified.
+    * <p/>
+    *
+    * @param obj         The possibly null object containing location or reference
+    *                    information that can be used in creating an object.
+    * @param name        The name of this object relative to <code>nameCtx</code>,
+    *                    or null if no name is specified.
+    * @param nameCtx     The context relative to which the <code>name</code>
+    *                    parameter is specified, or null if <code>name</code> is
+    *                    relative to the default initial context.
+    * @param environment The possibly null environment that is used in
+    *                    creating the object.
+    * @return The object created; null if an object cannot be created.
+    * @throws Exception if this object factory encountered an exception
+    *                   while attempting to create an object, and no other object factories are
+    *                   to be tried.
+    * @see javax.naming.spi.NamingManager#getObjectInstance
+    * @see javax.naming.spi.NamingManager#getURLContext
+    */
+   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
+   {
+      try
+      {
+         Reference ref = (Reference)obj;
+
+         // Get the target class name
+         String targetClassName = (String)ref.get(SunRIServiceReferenceable.TARGET_CLASS_NAME).getContent();
+
+         // Unmarshall the UnifiedServiceRef
+         UnifiedServiceRefMetaData serviceRef = unmarshallServiceRef(ref);
+         String serviceRefName = serviceRef.getServiceRefName();
+         QName serviceQName = serviceRef.getServiceQName();
+
+         String serviceImplClass = serviceRef.getServiceImplClass();
+         if (serviceImplClass == null)
+            serviceImplClass = (String)ref.get(SunRIServiceReferenceable.SERVICE_IMPL_CLASS).getContent();
+
+         // If the target defaults to javax.xml.ws.Service, use the service as the target
+         if (Service.class.getName().equals(targetClassName))
+            targetClassName = serviceImplClass;
+
+         log.debug("getObjectInstance [name=" + serviceRefName + ",service=" + serviceImplClass + ",target=" + targetClassName + "]");
+
+         // Load the service class
+         ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+         Class serviceClass = ctxLoader.loadClass(serviceImplClass);
+         Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
+
+         if (Service.class.isAssignableFrom(serviceClass) == false)
+            throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
+
+         // Receives either a javax.xml.ws.Service or a dynamic proxy
+         Object target;
+
+         // Get the URL to the wsdl
+         URL wsdlURL = serviceRef.getWsdlLocation();
+
+         // Generic javax.xml.ws.Service
+         if (serviceClass == Service.class)
+         {
+            if (wsdlURL != null)
+            {
+               target = Service.create(wsdlURL, serviceQName);
+            }
+            else
+            {
+               throw new IllegalArgumentException("Cannot create generic javax.xml.ws.Service without wsdlLocation: " + serviceRefName);
+            }
+         }
+         // Generated javax.xml.ws.Service subclass
+         else
+         {
+            if (wsdlURL != null)
+            {
+               Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
+               target = ctor.newInstance(new Object[] { wsdlURL, serviceQName });
+            }
+            else
+            {
+               target = (Service)serviceClass.newInstance();
+            }
+         }
+
+         // Configure the service
+         configureService((Service)target, serviceRef);
+
+         if (targetClassName != null && targetClassName.equals(serviceImplClass) == false)
+         {
+            try
+            {
+               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))
+                     {
+                        port = method.invoke(target, new Object[0]);
+                        target = port;
+                        break;
+                     }
+                  }
+               }
+
+               if (port == null)
+               {
+                  Method method = serviceClass.getMethod("getPort", new Class[] { Class.class });
+                  port = method.invoke(target, new Object[] { targetClass });
+                  target = port;
+               }
+            }
+            catch (InvocationTargetException ex)
+            {
+               throw ex.getTargetException();
+            }
+         }
+
+         return target;
+      }
+      catch (Throwable ex)
+      {
+         WSFException.rethrow("Cannot create service", ex);
+         return null;
+      }
+   }
+
+
+   private void configureService(Service service, UnifiedServiceRefMetaData serviceRef)
+   {
+      log.warn("Service configuration not available in Sun-RI");
+   }
+
+   private UnifiedServiceRefMetaData unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
+   {
+      UnifiedServiceRefMetaData sref;
+      RefAddr refAddr = ref.get(SunRIServiceReferenceable.SERVICE_REF_META_DATA);
+      ByteArrayInputStream bais = new ByteArrayInputStream((byte[])refAddr.getContent());
+      try
+      {
+         ObjectInputStream ois = new ObjectInputStream(bais);
+         sref = (UnifiedServiceRefMetaData)ois.readObject();
+         ois.close();
+      }
+      catch (IOException e)
+      {
+         throw new NamingException("Cannot unmarshall service ref meta data, cause: " + e.toString());
+      }
+
+      // Verify it. There is some know coinstraints
+      if(null == sref.getServiceQName())
+         throw new IllegalArgumentException("ServiceQName may not be null. " +
+           "Specify a service QName in the service-ref declaration.");
+
+      return sref;
+   }
+}
+

Deleted: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.sunri.client;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-import javax.naming.*;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.IOException;
-
-/**
- * A JNDI reference to a javax.xml.ws.Service
- *
- * It holds the information to reconstrut the javax.xml.ws.Service
- * when the client does a JNDI lookup.
- *
- * @author Heiko.Braun at jboss.com
- */
-public class SunRIServiceReferenceable implements Referenceable
-{
-   public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
-   public static final String SERVICE_IMPL_CLASS = "SERVICE_CLASS_NAME";
-   public static final String TARGET_CLASS_NAME = "TARGET_CLASS_NAME";
-
-   private String serviceImplClass;
-   private String targetClassName;
-   private UnifiedServiceRefMetaData serviceRef;
-
-   public SunRIServiceReferenceable(String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData serviceRef)
-   {
-      this.serviceImplClass = serviceImplClass;
-      this.targetClassName = targetClassName;
-      this.serviceRef = serviceRef;
-   }
-
-   /**
-    * Retrieves the Reference of this object.
-    *
-    * @return The non-null Reference of this object.
-    * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
-    */
-   public Reference getReference() throws NamingException
-   {
-      Reference myRef = new Reference(SunRIServiceReferenceable.class.getName(), SunRIServiceObjectFactory.class.getName(), null);
-
-      myRef.add(new StringRefAddr(SERVICE_IMPL_CLASS, serviceImplClass));
-      myRef.add(new StringRefAddr(TARGET_CLASS_NAME, targetClassName));
-      myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshall(serviceRef)));
-
-      return myRef;
-   }
-
-   private byte[] marshall(Object obj) throws NamingException
-   {
-      ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
-      try
-      {
-         ObjectOutputStream oos = new ObjectOutputStream(baos);
-         oos.writeObject(obj);
-         oos.close();
-      }
-      catch (IOException e)
-      {
-         throw new NamingException("Cannot marshall object, cause: " + e.toString());
-      }
-      return baos.toByteArray();
-   }
-}

Copied: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java (from rev 3873, branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java)
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java	                        (rev 0)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/SunRIServiceReferenceable.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.client;
+
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.*;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectOutputStream;
+import java.io.IOException;
+
+/**
+ * A JNDI reference to a javax.xml.ws.Service
+ *
+ * It holds the information to reconstrut the javax.xml.ws.Service
+ * when the client does a JNDI lookup.
+ *
+ * @author Heiko.Braun at jboss.com
+ */
+public class SunRIServiceReferenceable implements Referenceable
+{
+   public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
+   public static final String SERVICE_IMPL_CLASS = "SERVICE_CLASS_NAME";
+   public static final String TARGET_CLASS_NAME = "TARGET_CLASS_NAME";
+
+   private String serviceImplClass;
+   private String targetClassName;
+   private UnifiedServiceRefMetaData serviceRef;
+
+   public SunRIServiceReferenceable(String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData serviceRef)
+   {
+      this.serviceImplClass = serviceImplClass;
+      this.targetClassName = targetClassName;
+      this.serviceRef = serviceRef;
+   }
+
+   /**
+    * Retrieves the Reference of this object.
+    *
+    * @return The non-null Reference of this object.
+    * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
+    */
+   public Reference getReference() throws NamingException
+   {
+      Reference myRef = new Reference(SunRIServiceReferenceable.class.getName(), SunRIServiceObjectFactory.class.getName(), null);
+
+      myRef.add(new StringRefAddr(SERVICE_IMPL_CLASS, serviceImplClass));
+      myRef.add(new StringRefAddr(TARGET_CLASS_NAME, targetClassName));
+      myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshall(serviceRef)));
+
+      return myRef;
+   }
+
+   private byte[] marshall(Object obj) throws NamingException
+   {
+      ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
+      try
+      {
+         ObjectOutputStream oos = new ObjectOutputStream(baos);
+         oos.writeObject(obj);
+         oos.close();
+      }
+      catch (IOException e)
+      {
+         throw new NamingException("Cannot marshall object, cause: " + e.toString());
+      }
+      return baos.toByteArray();
+   }
+}

Copied: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection (from rev 3873, branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection)

Modified: trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -31,7 +31,9 @@
   
   <!-- Bind Service objects in client environment context  -->
   <!-- The bean name is compiled into the server. Changeit with the next release. -->
-  <!--bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/-->
+
+  <!-- Bind Service objects in client environment context  -->
+  <!--bean name="WSServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl"/-->
   
   <!-- Locate the single instance of the kernel -->  
   <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">

Modified: trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/META-INF/jbossws-deployer-beans.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/META-INF/jbossws-deployer-beans.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -8,16 +8,6 @@
   <bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.WebServiceDeployerEJB">
     <property name="relOrderEJB2x"><inject bean="EJB2xDeployer" property="relativeOrder"/></property>
     <property name="relOrderEJB3"><inject bean="EJBRegistrationDeployer" property="relativeOrder"/></property>
-    <install bean="MainDeployer" method="addDeployer">
-      <parameter>
-        <this/>
-      </parameter>
-    </install>
-    <uninstall bean="MainDeployer" method="removeDeployer">
-      <parameter>
-        <this/>
-      </parameter>
-    </uninstall>
     <depends>EJB2xDeployer</depends>
     <depends>EJBRegistrationDeployer</depends>
   </bean>
@@ -27,16 +17,6 @@
   -->
   <bean name="WebServiceDeployerJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerJSE">
     <property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
-    <install bean="MainDeployer" method="addDeployer">
-      <parameter>
-        <this/>
-      </parameter>
-    </install>
-    <uninstall bean="MainDeployer" method="removeDeployer">
-      <parameter>
-        <this/>
-      </parameter>
-    </uninstall>
     <depends>WebAppParsingDeployer</depends>
   </bean>
   
@@ -46,16 +26,6 @@
   <bean name="WebServiceMainDeployer" class="org.jboss.wsf.container.jboss50.WebServiceMainDeployer">
     <property name="relOrderJSE"><inject bean="WebServiceDeployerJSE" property="relativeOrder"/></property>
     <property name="relOrderEJB"><inject bean="WebServiceDeployerEJB" property="relativeOrder"/></property>
-    <install bean="MainDeployer" method="addDeployer">
-      <parameter>
-        <this/>
-      </parameter>
-    </install>
-    <uninstall bean="MainDeployer" method="removeDeployer">
-      <parameter>
-        <this/>
-      </parameter>
-    </uninstall>
     <depends>WarDeployer</depends>
     <depends>WebServiceDeployerEJB</depends>
     <depends>WebServiceDeployerJSE</depends>

Modified: trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -29,8 +29,15 @@
   <bean name="WSEndpointRegistry" class="org.jboss.wsf.stack.sunri.ManagedEndpointRegistry"/>
   
   <!-- Bind Service objects in client environment context  -->
-  <!-- The bean name is compiled into the server. Changeit with the next release. -->
-  <!--bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/-->
+  <bean name="WSServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+     <property name="jaxrpcBinder"><inject bean="WSServiceRefBinderJAXRPC"/></property>
+     <property name="jaxwsBinder"><inject bean="WSServiceRefBinderJAXWS"/></property>
+  </bean>
+
+  <bean name="WSServiceRefBinderJAXRPC" class="org.jboss.wsf.stack.sunri.client.DummyServiceRefBinderJAXRPC"/>
+
+  <bean name="WSServiceRefBinderJAXWS" class="org.jboss.wsf.stack.sunri.client.ServiceRefBinderJAXWS"/>
+
   
   <!-- Locate the single instance of the kernel -->  
   <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">

Modified: trunk/integration/sunri/src/test/resources/test-excludes.txt
===================================================================
--- trunk/integration/sunri/src/test/resources/test-excludes.txt	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/integration/sunri/src/test/resources/test-excludes.txt	2007-07-13 11:55:00 UTC (rev 3879)
@@ -18,5 +18,4 @@
 org/jboss/test/ws/jaxws/samples/jaxr/**
 
 # [JBWS-1674] Fix @WebServiceRef with SunRI
-org/jboss/test/ws/jaxws/samples/retail/**
-org/jboss/test/ws/jaxws/samples/webserviceref/**
+#org/jboss/test/ws/jaxws/samples/retail/**

Modified: trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -344,51 +344,6 @@
       </webinf>
     </war>
 
-		<!-- jaxws-serviceref -->
-		<war warfile="${tests.output.dir}/libs/jaxws-serviceref.war" webxml="${tests.output.dir}/resources/jaxws/serviceref/WEB-INF/web.xml">
-			<classes dir="${tests.output.dir}/classes">
-				<include name="org/jboss/test/ws/jaxws/serviceref/TestEndpointImpl.class"/>
-			</classes>
-		</war>
-		<jar destfile="${tests.output.dir}/libs/jaxws-serviceref-client.jar">
-			<fileset dir="${tests.output.dir}/classes">
-				<include name="org/jboss/test/ws/jaxws/serviceref/ApplicationClient.class"/>
-				<include name="org/jboss/test/ws/jaxws/serviceref/TestEndpointService.class"/>
-				<include name="org/jboss/test/ws/jaxws/serviceref/TestEndpoint.class"/>
-			</fileset>
-			<metainf dir="${tests.output.dir}/resources/jaxws/serviceref/META-INF">
-				<include name="application-client.xml"/>
-				<include name="jboss-client.xml"/>
-				<include name="wsdl/**"/>
-			</metainf>
-		</jar>
-		<war destfile="${tests.output.dir}/libs/jaxws-serviceref-servlet-client.war" webxml="${tests.output.dir}/resources/jaxws/serviceref/servlet-client/WEB-INF/web.xml">
-			<classes dir="${tests.output.dir}/classes">
-				<include name="org/jboss/test/ws/jaxws/serviceref/ServletClient.class"/>
-				<include name="org/jboss/test/ws/jaxws/serviceref/TestEndpointService.class"/>
-				<include name="org/jboss/test/ws/jaxws/serviceref/TestEndpoint.class"/>
-			</classes>
-			<webinf dir="${tests.output.dir}/resources/jaxws/serviceref/META-INF">
-				<include name="wsdl/**"/>
-			</webinf>
-			<webinf dir="${tests.output.dir}/resources/jaxws/serviceref/servlet-client/WEB-INF">
-				<include name="jboss-web.xml"/>
-			</webinf>
-		</war>
-		<jar destfile="${tests.output.dir}/libs/jaxws-serviceref-ejb-client.jar">
-			<fileset dir="${tests.output.dir}/classes">
-				<include name="org/jboss/test/ws/jaxws/serviceref/EJBClient.class"/>
-				<include name="org/jboss/test/ws/jaxws/serviceref/EJBRemote.class"/>
-				<include name="org/jboss/test/ws/jaxws/serviceref/TestEndpointService.class"/>
-				<include name="org/jboss/test/ws/jaxws/serviceref/TestEndpoint.class"/>
-			</fileset>
-			<metainf dir="${tests.output.dir}/resources/jaxws/serviceref/META-INF">
-				<include name="ejb-jar.xml"/>
-				<include name="jboss.xml"/>
-				<include name="wsdl/**"/>
-			</metainf>
-		</jar>
-
 		<!-- jaxws-wrapped-accessor -->
 		<war warfile="${tests.output.dir}/libs/jaxws-wrapped-accessor.war" webxml="${tests.output.dir}/resources/jaxws/wrapped/accessor/WEB-INF/web.xml">
 			<classes dir="${tests.output.dir}/classes">

Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,166 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.client;
-
-// $Id$
-
-import java.lang.reflect.AnnotatedElement;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.File;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.client.ServiceRefHandlerJAXRPC;
-import org.jboss.ws.core.jaxws.client.ServiceRefHandlerJAXWS;
-import org.jboss.ws.integration.*;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.WSException;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * Bind service refs in the client's ENC for every service-ref element in the
- * deployment descriptor.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 04-Nov-2006
- */
-public class ServiceRefHandlerImpl implements ServiceRefHandler
-{
-   // logging support
-   private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
-
-   private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
-
-   public ServiceRefMetaData newServiceRefMetaData()
-   {
-      return new UnifiedServiceRefMetaData();
-   }
-   
-   public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
-   {
-      if (sref.isProcessed())
-      {
-         log.debug("Attempt to rebind the service-ref: " + sref.getServiceRefName());
-         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 WSException("Failed to bind service-ref, the deployment root expandedDirectory doesn't exist: " + fileName);
-
-               // update the rootFile
-               try
-               {
-                  vfsRoot = new URLLoaderAdapter(expandedDirectory.toURL());
-               }
-               catch (MalformedURLException e){}
-            }
-
-         }
-      }
-
-      UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
-      serviceRef.setVfsRoot(vfsRoot);
-      try
-      {
-         if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
-         {
-            ServiceRefHandlerJAXRPC handler = new ServiceRefHandlerJAXRPC();
-            handler.setupServiceRef(encCtx, encName, serviceRef);
-         }
-         else
-         {
-            AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
-            ServiceRefHandlerJAXWS handler = new ServiceRefHandlerJAXWS();
-            handler.setupServiceRef(encCtx, encName, anElement, serviceRef);
-         }
-      }
-      finally
-      {
-         sref.setProcessed(true);
-      }
-   }
-
-   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
-      String serviceRefType = serviceRef.getServiceRefType();
-      if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
-         return Type.JAXWS;
-
-      // The mapping-file is JAXRPC specific
-      if (serviceRef.getMappingFile() != null)
-         return Type.JAXRPC;
-
-      String siName = serviceRef.getServiceInterface();
-      if (siName == 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);
-         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);
-      }
-      catch (ClassNotFoundException e)
-      {
-         throw new IllegalStateException("Cannot load <service-interface>: " + siName);
-      }
-   }
-}

Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefObjectFactory.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefObjectFactory.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,305 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.client;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.integration.ServiceRefElement;
-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.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A object model factory for <service-ref>
- * 
- * @author Thomas.Diesler at 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));
-      }
-
-      /* 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;
-   }
-}

Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java (from rev 3873, branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java	                        (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxrpc.client;
+
+// $Id$
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
+
+import java.lang.reflect.AnnotatedElement;
+
+/**
+ * Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
+ * deployment descriptor.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Nov-2006
+ */
+public class ServiceRefBinderJAXRPC implements ServiceRefBinder
+{
+   // logging support
+   private static Logger log = Logger.getLogger(ServiceRefBinderJAXRPC.class);
+
+   /**
+    * Binds a Service into the callers ENC for every service-ref element
+    */
+   public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef)
+       throws NamingException
+   {
+      String externalName = encCtx.getNameInNamespace() + "/" + encName;
+      log.info("setupServiceRef [jndi=" + externalName + "]");
+
+      // Do not use rebind, the binding should be unique
+      ServiceReferenceable ref = new ServiceReferenceable(serviceRef);
+      Util.bind(encCtx, encName, ref);
+   }
+}

Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.client;
-
-// $Id$
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
- * deployment descriptor.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 04-Nov-2006
- */
-public class ServiceRefHandlerJAXRPC
-{
-   // logging support
-   private static Logger log = Logger.getLogger(ServiceRefHandlerJAXRPC.class);
-
-   /**
-    * Binds a Service into the callers ENC for every service-ref element
-    */
-   public void setupServiceRef(Context encCtx, String encName, UnifiedServiceRefMetaData serviceRef) throws NamingException
-   {
-      String externalName = encCtx.getNameInNamespace() + "/" + encName;
-      log.info("setupServiceRef [jndi=" + externalName + "]");
-
-      // Do not use rebind, the binding should be unique
-      ServiceReferenceable ref = new ServiceReferenceable(serviceRef);
-      Util.bind(encCtx, encName, ref);
-   }
-}

Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java (from rev 3873, branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java	                        (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxws.client;
+
+// $Id$
+
+import org.jboss.wsf.spi.deployment.serviceref.CommonServiceRefBinder;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.Referenceable;
+
+/**
+ * Binds a JAXWS Service object in the client's ENC
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 17-Jan-2007
+ */
+public class ServiceRefBinderJAXWS extends CommonServiceRefBinder
+{
+   protected Referenceable buildServiceReferenceable(
+     String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData serviceRef)
+   {
+      return new ServiceReferenceable(serviceImplClass, targetClassName, serviceRef);      
+   }
+}

Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,182 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxws.client;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-import javax.jws.HandlerChain;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Binds a JAXWS Service object in the client's ENC
- *
- * @author Thomas.Diesler at jboss.org
- * @since 17-Jan-2007
- */
-public class ServiceRefHandlerJAXWS
-{
-   // logging support
-   private static Logger log = Logger.getLogger(ServiceRefHandlerJAXWS.class);
-
-   public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
-   {
-      WebServiceRef wsref = null;
-
-      // Build the list of @WebServiceRef relevant annotations 
-      List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
-      if (anElement != null)
-      {
-         for (Annotation an : anElement.getAnnotations())
-         {
-            if (an instanceof WebServiceRef)
-               wsrefList.add((WebServiceRef)an);
-
-            if (an instanceof WebServiceRefs)
-            {
-               WebServiceRefs wsrefs = (WebServiceRefs)an;
-               for (WebServiceRef aux : wsrefs.value())
-                  wsrefList.add(aux);
-            }
-         }
-      }
-
-      // Use the single @WebServiceRef
-      if (wsrefList.size() == 1)
-      {
-         wsref = wsrefList.get(0);
-      }
-      else
-      {
-         for (WebServiceRef aux : wsrefList)
-         {
-            if (encName.endsWith("/" + aux.name()))
-            {
-               wsref = aux;
-               break;
-            }
-         }
-      }
-
-      Class targetClass = null;
-      if (anElement instanceof Field)
-      {
-         targetClass = ((Field)anElement).getType();
-      }
-      else if (anElement instanceof Method)
-      {
-         targetClass = ((Method)anElement).getParameterTypes()[0];
-      }
-      else
-      {
-         if( wsref!=null && (wsref.type() != Object.class) )
-            targetClass = wsref.type();
-      }
-
-      String targetClassName = (targetClass != null ? targetClass.getName() : null);
-      String externalName = encCtx.getNameInNamespace() + "/" + encName;
-      log.debug("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
-
-      String serviceImplClass = null;
-
-      // #1 Use the explicit @WebServiceRef.value 
-      if (wsref != null && wsref.value() != Object.class)
-         serviceImplClass = wsref.value().getName();
-
-      // #2 Use the target ref type 
-      if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
-         serviceImplClass = targetClass.getName();
-
-      // #3 Use <service-interface> 
-      if (serviceImplClass == null && serviceRef.getServiceInterface() != null)
-         serviceImplClass = serviceRef.getServiceInterface();
-
-      // #4 Use javax.xml.ws.Service 
-      if (serviceImplClass == null)
-         serviceImplClass = Service.class.getName();
-
-      // #1 Use the explicit @WebServiceRef.type 
-      if (wsref != null && wsref.type() != Object.class)
-         targetClassName = wsref.type().getName();
-
-
-      // #2 Use the target ref type 
-      if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
-         targetClassName = targetClass.getName();
-
-      // Set the wsdlLocation if there is no override already
-      if (serviceRef.getWsdlOverride() == null && wsref != null && wsref.wsdlLocation().length() > 0)
-         serviceRef.setWsdlOverride(wsref.wsdlLocation());
-
-      // Set the handlerChain from @HandlerChain on the annotated element
-      String handlerChain = serviceRef.getHandlerChain();
-      if (anElement != null)
-      {
-         HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
-         if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
-            handlerChain = anHandlerChain.file();
-      }
-
-      // Resolve path to handler chain
-      if (handlerChain != null)
-      {
-         try
-         {
-            new URL(handlerChain);
-         }
-         catch (MalformedURLException ex)
-         {
-            Class declaringClass = null;
-            if (anElement instanceof Field)
-               declaringClass = ((Field)anElement).getDeclaringClass();
-            else if (anElement instanceof Method)
-               declaringClass = ((Method)anElement).getDeclaringClass();
-            else if (anElement instanceof Class)
-               declaringClass = (Class)anElement;
-
-            handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
-         }
-
-         serviceRef.setHandlerChain(handlerChain);
-      }
-
-      // Do not use rebind, the binding should be unique
-      // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
-      Util.bind(encCtx, encName, new ServiceReferenceable(serviceImplClass, targetClassName, serviceRef));
-
-   }
-}

Modified: trunk/jbossws-core/src/test/resources/test-excludes-jboss40.txt
===================================================================
--- trunk/jbossws-core/src/test/resources/test-excludes-jboss40.txt	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/jbossws-core/src/test/resources/test-excludes-jboss40.txt	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,6 +1,3 @@
-# Always exclude
-org/jboss/test/ws/benchmark/**
-
 # JBossAS-4.0 excludes
 org/jboss/test/ws/jaxrpc/jbws723/**
 

Modified: trunk/jbossws-core/src/test/resources/test-excludes-jboss42.txt
===================================================================
--- trunk/jbossws-core/src/test/resources/test-excludes-jboss42.txt	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/jbossws-core/src/test/resources/test-excludes-jboss42.txt	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,10 +1,7 @@
-# Always exclude
-org/jboss/test/ws/benchmark/**
-
 # EJB3/Injection excludes
 org/jboss/test/ws/jaxws/endpoint/**
 org/jboss/test/ws/jaxws/jbws1581/**
 org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase*
 org/jboss/test/ws/jaxws/samples/retail/**
 org/jboss/test/ws/jaxws/samples/webserviceref/**
-org/jboss/test/ws/jaxws/serviceref/**
+#org/jboss/test/ws/jaxws/serviceref/**

Modified: trunk/jbossws-core/src/test/resources/test-excludes-jboss50.txt
===================================================================
--- trunk/jbossws-core/src/test/resources/test-excludes-jboss50.txt	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/jbossws-core/src/test/resources/test-excludes-jboss50.txt	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,6 +1,3 @@
-# Always exclude
-org/jboss/test/ws/benchmark/**
-
 # Fix before JBoss50 goes final
 org/jboss/test/ws/jaxrpc/jbas897/JBAS897TestCase.*
 org/jboss/test/ws/jaxrpc/jbws124/JBWS124TestCase.*

Modified: trunk/testsuite/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/testsuite/ant-import/build-jars-jaxws.xml	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/testsuite/ant-import/build-jars-jaxws.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -27,7 +27,7 @@
         <include name="org/jboss/test/ws/jaxws/samples/asynchronous/TestEndpointBean.class"/>
       </classes>
     </war>
-    
+
     <!-- jaxws-samples-context -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-context.war" webxml="${tests.output.dir}/resources/jaxws/samples/context/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -45,7 +45,7 @@
         <include name="jboss.xml"/>
       </metainf>
     </jar>
-    
+
     <!-- jaxws-samples-eardeployment -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-eardeployment.war" webxml="${tests.output.dir}/resources/jaxws/samples/eardeployment/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -92,7 +92,7 @@
         <include name="org/jboss/test/ws/jaxws/samples/exception/server/UserException.class"/>
       </classes>
     </war>
-    
+
     <!-- jaxws-samples-handlerchain -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-handlerchain.war" webxml="${tests.output.dir}/resources/jaxws/samples/handlerchain/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -102,7 +102,7 @@
         <include name="org/jboss/test/ws/jaxws/samples/handlerchain/jaxws-handlers-server.xml"/>
       </classes>
     </war>
-    
+
     <!-- jaxws-samples-httpbinding -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-httpbinding-jaxb.war" webxml="${tests.output.dir}/resources/jaxws/samples/httpbinding/jaxb/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -124,7 +124,7 @@
         <include name="wsdl/HttpBinding.wsdl"/>
       </webinf>
     </war>
-    
+
     <!-- jaxws-samples-logicalhandler -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-logicalhandler-source.war"
       webxml="${tests.output.dir}/resources/jaxws/samples/logicalhandler/WEB-INF/web-source.xml">
@@ -153,14 +153,14 @@
         <include name="org/jboss/test/ws/jaxws/samples/logicalhandler/jaxws-server-jaxb-handlers.xml"/>
       </classes>
     </war>
-    
+
     <!-- jaxws-samples-oneway -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-oneway.war" webxml="${tests.output.dir}/resources/jaxws/samples/oneway/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
         <include name="org/jboss/test/ws/jaxws/samples/oneway/PingEndpointImpl.class"/>
       </classes>
     </war>
-    
+
     <!-- jaxws-samples-provider -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-provider-jaxb.war" webxml="${tests.output.dir}/resources/jaxws/samples/provider/jaxb/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -190,7 +190,7 @@
         <include name="wsdl/Provider.wsdl"/>
       </webinf>
     </war>
-    
+
     <!-- jaxws-samples-retail -->
     <jar jarfile="${tests.output.dir}/libs/jaxws-samples-retail.jar">
       <fileset dir="${tests.output.dir}/classes">
@@ -201,7 +201,54 @@
         <include name="wsdl/*"/>
       </metainf>
     </jar>
-    
+
+     <!-- jaxws-serviceref -->
+     <war warfile="${tests.output.dir}/libs/jaxws-serviceref.war" webxml="${tests.output.dir}/resources/jaxws/samples/serviceref/WEB-INF/web.xml">
+        <classes dir="${tests.output.dir}/classes">
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.class"/>
+        </classes>
+     </war>
+     <jar destfile="${tests.output.dir}/libs/jaxws-serviceref-client.jar">
+        <fileset dir="${tests.output.dir}/classes">
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/ApplicationClient.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.class"/>
+        </fileset>
+        <metainf dir="${tests.output.dir}/resources/jaxws/samples/serviceref/META-INF">
+           <include name="application-client.xml"/>
+           <include name="jboss-client.xml"/>
+           <include name="wsdl/**"/>
+        </metainf>
+     </jar>
+     <war destfile="${tests.output.dir}/libs/jaxws-serviceref-servlet-client.war" webxml="${tests.output.dir}/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml">
+        <classes dir="${tests.output.dir}/classes">
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.class"/>
+        </classes>
+        <webinf dir="${tests.output.dir}/resources/jaxws/samples/serviceref/META-INF">
+           <include name="wsdl/**"/>
+        </webinf>
+        <webinf dir="${tests.output.dir}/resources/jaxws/samples/serviceref/servlet-client/WEB-INF">
+           <include name="jboss-web.xml"/>
+        </webinf>
+     </war>
+     <jar destfile="${tests.output.dir}/libs/jaxws-serviceref-ejb-client.jar">
+        <fileset dir="${tests.output.dir}/classes">
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.class"/>
+           <include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.class"/>
+        </fileset>
+        <metainf dir="${tests.output.dir}/resources/jaxws/samples/serviceref/META-INF">
+           <include name="ejb-jar.xml"/>
+           <include name="jboss.xml"/>
+           <include name="wsdl/**"/>
+        </metainf>
+     </jar>
+
     <!-- jaxws-samples-soapbinding -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-soapbinding.war" webxml="${tests.output.dir}/resources/jaxws/samples/soapbinding/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -230,7 +277,7 @@
         <include name="org/jboss/test/ws/jaxws/samples/swaref/DocumentPayload*.class"/>
       </fileset>
     </jar>
-     
+
     <!-- jaxws-samples-webmethod -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-webmethod.war" webxml="${tests.output.dir}/resources/jaxws/samples/webmethod/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -238,7 +285,7 @@
         <include name="org/jboss/test/ws/jaxws/samples/webmethod/TestEndpointImpl.class"/>
       </classes>
     </war>
-    
+
     <!-- jaxws-samples-webparam -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-webparam.war" webxml="${tests.output.dir}/resources/jaxws/samples/webparam/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -247,7 +294,7 @@
         <include name="org/jboss/test/ws/jaxws/samples/webparam/SecurityHeader.class"/>
       </classes>
     </war>
-    
+
     <!-- jaxws-samples-webresult -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-webresult.war" webxml="${tests.output.dir}/resources/jaxws/samples/webresult/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -256,7 +303,7 @@
         <include name="org/jboss/test/ws/jaxws/samples/webresult/USAddress.class"/>
       </classes>
     </war>
-    
+
     <!-- jaxws-samples-webservice -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-webservice01-jse.war" webxml="${tests.output.dir}/resources/jaxws/samples/webservice/WEB-INF01/web.xml">
       <classes dir="${tests.output.dir}/classes">
@@ -299,7 +346,7 @@
         <include name="org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface03.class"/>
       </fileset>
     </jar>
-    
+
     <!-- jaxws-samples-xop-doclit -->
     <war jarfile="${tests.output.dir}/libs/jaxws-samples-xop-doclit.war" webxml="${tests.output.dir}/resources/jaxws/samples/xop/doclit/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">

Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -61,10 +61,21 @@
    @PostConstruct
    public void initialize()
    {
-      verificationPort = verificationService.getCCVerificationPort();
-      profilePort = profileService.getProfileMgmtPort();
+      // Throws NPE with SUN-RI, use lazy initialize instead
+      //verificationPort = verificationService.getCCVerificationPort();
+      //profilePort = profileService.getProfileMgmtPort();
    }
 
+   public CCVerification getVerificationPort()
+   {
+      return verificationService.getCCVerificationPort();
+   }
+
+   public ProfileMgmt getProfilePort()
+   {
+      return profileService.getProfileMgmtPort();
+   }
+
    /**
     * Prepare a customer order.
     * This will verify the billing details (i.e. creditcard)
@@ -81,17 +92,20 @@
 
       // verify billing details
       String creditCard = order.getCustomer().getCreditCardDetails();
-      Response<Boolean> response = verificationPort.verifyAsync(creditCard);
+      //Response<Boolean> response = getVerificationPort().verifyAsync(creditCard);
 
+      boolean validCard = getVerificationPort().verify(creditCard);
+
       // high value customer discount
       DiscountRequest discountRequest = new DiscountRequest(order.getCustomer());
-      DiscountResponse discount = profilePort.getCustomerDiscount(discountRequest);
+      DiscountResponse discount = getProfilePort().getCustomerDiscount(discountRequest);
       boolean hasDiscount = discount.getDiscount() > 0.00;
       log.info("High value customer ? " + hasDiscount);
 
       try
       {
-         log.info(creditCard + " valid? " + response.get());
+         //log.info(creditCard + " valid? " + response.get());
+         log.info(creditCard + " valid? " + validCard);
       }
       catch (Exception e)
       {

Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -34,6 +34,6 @@
         @WebParam(name = "creditCardNumber", targetNamespace = "")
         String creditCardNumber);
 
-    Response<Boolean> verifyAsync(String creditCardNumber);
+    //Response<Boolean> verifyAsync(String creditCardNumber);
 
 }

Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -32,7 +32,7 @@
 @Stateless
 @WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification", name = "CCVerification")
 @WebContext(contextRoot = "/jaxws-samples-retail")
- at HandlerChain(file = "../jaxws-handler.xml")
+//@HandlerChain(file = "../jaxws-handler.xml")
 public class CCVerificationBean implements CCVerification
 {
 

Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java	2007-07-13 11:44:50 UTC (rev 3878)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -30,7 +30,7 @@
 @Stateless
 @WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt", name = "ProfileMgmt", serviceName = "ProfileMgmtService")
 @WebContext(contextRoot = "/jaxws-samples-retail")
- at HandlerChain(file = "../jaxws-handler.xml")
+//@HandlerChain(file = "../jaxws-handler.xml")
 public class ProfileMgmtBean implements ProfileMgmt
 {
 

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref)

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.logging.Logger;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-import javax.naming.InitialContext;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.SOAPBinding;
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-
- at Remote(EJBRemote.class)
- at RemoteBinding(jndiBinding = "/ejb/EJBClient")
- at Stateless
-
-public class EJBClient 
-{
-   // Provide logging
-   private static Logger log = Logger.getLogger(EJBClient.class);
-
-   public String echo(String inStr) throws RemoteException
-   {
-      log.info("echo: " + inStr);
-
-      ArrayList ports = new ArrayList(2);
-
-      try
-      {
-         InitialContext iniCtx = new InitialContext();
-         ports.add((TestEndpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class));
-         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
-      }
-      catch (Exception ex)
-      {
-        throw new WebServiceException(ex);
-      }
-
-      for (int i = 0; i < ports.size(); i++)
-      {
-         TestEndpoint port = (TestEndpoint)ports.get(i);
-
-         BindingProvider bp = (BindingProvider)port;
-         boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
-         boolean expectedSetting = (i==0) ? false : true;
-
-         //if(mtomEnabled != expectedSetting)
-         //   throw new WebServiceException("MTOM settings (enabled="+expectedSetting+") not overridden through service-ref" );
-
-         String outStr = port.echo(inStr);
-         if (inStr.equals(outStr) == false)
-            throw new WebServiceException("Invalid echo return: " + inStr);
-      }
-
-      return inStr;
-   }
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.logging.Logger;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.naming.InitialContext;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.soap.SOAPBinding;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+
+ at Remote(EJBRemote.class)
+ at RemoteBinding(jndiBinding = "/ejb/EJBClient")
+ at Stateless
+
+public class EJBClient 
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(EJBClient.class);
+
+   public String echo(String inStr) throws RemoteException
+   {
+      log.info("echo: " + inStr);
+
+      ArrayList ports = new ArrayList(2);
+
+      try
+      {
+         InitialContext iniCtx = new InitialContext();
+         ports.add((TestEndpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
+      }
+      catch (Exception ex)
+      {
+        throw new WebServiceException(ex);
+      }
+
+      for (int i = 0; i < ports.size(); i++)
+      {
+         TestEndpoint port = (TestEndpoint)ports.get(i);
+
+         BindingProvider bp = (BindingProvider)port;
+         boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
+         boolean expectedSetting = (i==0) ? false : true;
+
+         //if(mtomEnabled != expectedSetting)
+         //   throw new WebServiceException("MTOM settings (enabled="+expectedSetting+") not overridden through service-ref" );
+
+         String outStr = port.echo(inStr);
+         if (inStr.equals(outStr) == false)
+            throw new WebServiceException("Invalid echo return: " + inStr);
+      }
+
+      return inStr;
+   }
+}

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,28 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-
-public interface EJBRemote
-{
-   String echo(String input);
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,28 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+
+public interface EJBRemote
+{
+   String echo(String input);
+}

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-import junit.framework.Test;
-import org.jboss.wsf.spi.test.JBossWSTest;
-import org.jboss.wsf.spi.test.JBossWSTestSetup;
-
-import javax.naming.InitialContext;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import java.io.File;
-import java.io.InputStream;
-import java.net.URL;
-
-/**
- * Test the JAXWS <service-ref>
- *
- * @author Thomas.Diesler at jboss.com
- * @since 123-Mar-2007
- */
-public class ServiceRefClientTestCase extends JBossWSTest
-{
-   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
-
-   public static Test suite()
-   {
-      return new JBossWSTestSetup(ServiceRefClientTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-client.jar");
-   }
-
-   public void testWSDLAccess() throws Exception
-   {
-      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
-      InputStream inputStream = wsdlURL.openStream();
-      assertNotNull(inputStream);
-      inputStream.close();
-   }
-
-   public void testDynamicProxy() throws Exception
-   {
-      URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
-      QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
-      Service service = Service.create(wsdlURL, qname);
-      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
-
-      String request = "testDynamicProxy";
-      String response = port.echo(request);
-      assertEquals(request, response);
-   }
-
-   public void testApplicationClient() throws Exception
-   {
-      InitialContext iniCtx = getInitialContext("jbossws-client");
-      Service service = (Service) iniCtx.lookup("java:comp/env/service2");
-      TestEndpoint port = service.getPort(TestEndpoint.class);
-      assertNotNull(port);
-
-      BindingProvider bp = (BindingProvider)port;
-
-      System.out.println("FIXME [JBWS-1736]: MTOM property at service-ref level");
-
-      //boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
-      //assertTrue("MTOM should be enabled on port", mtomEnabled);
-
-      String request = "testApplicationClient";
-      String response = port.echo(request);
-      assertEquals(response, request);
-
-   }
-
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+import junit.framework.Test;
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * Test the JAXWS <service-ref>
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 123-Mar-2007
+ */
+public class ServiceRefClientTestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
+
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(ServiceRefClientTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-client.jar");
+   }
+
+   public void testWSDLAccess() throws Exception
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      InputStream inputStream = wsdlURL.openStream();
+      assertNotNull(inputStream);
+      inputStream.close();
+   }
+
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+      QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
+      Service service = Service.create(wsdlURL, qname);
+      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+      String request = "testDynamicProxy";
+      String response = port.echo(request);
+      assertEquals(request, response);
+   }
+
+   public void testApplicationClient() throws Exception
+   {
+      InitialContext iniCtx = getInitialContext("jbossws-client");
+      Service service = (Service) iniCtx.lookup("java:comp/env/service2");
+      TestEndpoint port = service.getPort(TestEndpoint.class);
+      assertNotNull(port);
+
+      BindingProvider bp = (BindingProvider)port;
+
+      System.out.println("FIXME [JBWS-1736]: MTOM property at service-ref level");
+
+      //boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
+      //assertTrue("MTOM should be enabled on port", mtomEnabled);
+
+      String request = "testApplicationClient";
+      String response = port.echo(request);
+      assertEquals(response, request);
+
+   }
+
+}

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-import junit.framework.Test;
-import org.jboss.wsf.spi.test.JBossWSTest;
-import org.jboss.wsf.spi.test.JBossWSTestSetup;
-
-import javax.naming.InitialContext;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import java.io.File;
-import java.io.InputStream;
-import java.net.URL;
-
-/**
- * Test the JAXRPC <service-ref>
- *
- * @author Thomas.Diesler at jboss.com
- * @since 23-Oct-2005
- */
-public class ServiceRefEJBTestCase extends JBossWSTest
-{
-   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
-   
-   public static Test suite()
-   {
-      return new JBossWSTestSetup(ServiceRefEJBTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-ejb-client.jar");
-   }
-
-   public void testWSDLAccess() throws Exception
-   {
-      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
-      InputStream inputStream = wsdlURL.openStream();
-      assertNotNull(inputStream);
-      inputStream.close();
-   }
-
-   
-   public void testDynamicProxy() throws Exception
-   {
-      URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
-      QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
-      Service service = Service.create(wsdlURL, qname);
-      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
-
-      String helloWorld = "testDynamicProxy";
-      Object retObj = port.echo(helloWorld);
-      assertEquals(helloWorld, retObj);
-   }
-
-
-   public void testEJBClient() throws Exception
-   {      
-      InitialContext iniCtx = getInitialContext();
-      EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("/ejb/EJBClient");
-
-      String helloWorld = "Hello World!";
-      Object retObj = ejbRemote.echo(helloWorld);
-      assertEquals(helloWorld, retObj);
-      
-   }
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+import junit.framework.Test;
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * Test the JAXRPC <service-ref>
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 23-Oct-2005
+ */
+public class ServiceRefEJBTestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
+   
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(ServiceRefEJBTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-ejb-client.jar");
+   }
+
+   public void testWSDLAccess() throws Exception
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      InputStream inputStream = wsdlURL.openStream();
+      assertNotNull(inputStream);
+      inputStream.close();
+   }
+
+   
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+      QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
+      Service service = Service.create(wsdlURL, qname);
+      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+      String helloWorld = "testDynamicProxy";
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+   }
+
+
+   public void testEJBClient() throws Exception
+   {      
+      InitialContext iniCtx = getInitialContext();
+      EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("/ejb/EJBClient");
+
+      String helloWorld = "Hello World!";
+      Object retObj = ejbRemote.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+      
+   }
+}

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-import junit.framework.Test;
-import org.jboss.wsf.spi.test.JBossWSTest;
-import org.jboss.wsf.spi.test.JBossWSTestSetup;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStreamReader;
-import java.io.InputStream;
-import java.net.URL;
-
-/**
- * Test the jaxws <service-ref>
- *
- * @author Thomas.Diesler at jboss.com
- * @since 23-Oct-2005
- */
-public class ServiceRefServletTestCase extends JBossWSTest
-{
-   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
-   
-   public static Test suite()
-   {
-      return new JBossWSTestSetup(ServiceRefServletTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-servlet-client.war");
-   }
-
-   public void testWSDLAccess() throws Exception
-   {
-      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
-      InputStream inputStream = wsdlURL.openStream();
-      assertNotNull(inputStream);
-      inputStream.close();
-   }
-  
-   public void testDynamicProxy() throws Exception
-   {
-      URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
-      QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
-      Service service = Service.create(wsdlURL, qname);
-      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
-
-      String helloWorld = "Hello World!";
-      Object retObj = port.echo(helloWorld);
-      assertEquals(helloWorld, retObj);     
-   }
-
-   public void testServletClient() throws Exception
-   {
-      URL url = new URL(TARGET_ENDPOINT_ADDRESS + "-servlet-client?echo=HelloWorld");
-      BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
-      String retStr = br.readLine();
-      assertEquals("HelloWorld", retStr);
-   }
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+import junit.framework.Test;
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * Test the jaxws <service-ref>
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 23-Oct-2005
+ */
+public class ServiceRefServletTestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
+   
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(ServiceRefServletTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-servlet-client.war");
+   }
+
+   public void testWSDLAccess() throws Exception
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      InputStream inputStream = wsdlURL.openStream();
+      assertNotNull(inputStream);
+      inputStream.close();
+   }
+  
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+      QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
+      Service service = Service.create(wsdlURL, qname);
+      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+      String helloWorld = "Hello World!";
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);     
+   }
+
+   public void testServletClient() throws Exception
+   {
+      URL url = new URL(TARGET_ENDPOINT_ADDRESS + "-servlet-client?echo=HelloWorld");
+      BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+      String retStr = br.readLine();
+      assertEquals("HelloWorld", retStr);
+   }
+}

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-import java.io.IOException;
-import java.util.ArrayList;
-
-import javax.naming.InitialContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.soap.SOAPBinding;
-
-import org.jboss.logging.Logger;
-
-public class ServletClient extends HttpServlet
-{
-   // Provide logging
-   private static Logger log = Logger.getLogger(ServletClient.class);
-
-   protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
-   {
-      String inStr = req.getParameter("echo");
-      log.info("doGet: " + inStr);
-
-      ArrayList ports = new ArrayList();
-      try
-      {
-         InitialContext iniCtx = new InitialContext();
-         ports.add((TestEndpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class));
-         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
-      }
-      catch (Exception ex)
-      {
-         log.error("Cannot add port", ex);
-         throw new WebServiceException(ex);
-      }
-
-      for (int i = 0; i < ports.size(); i++)
-      {
-         TestEndpoint port = (TestEndpoint)ports.get(i);
-
-         BindingProvider bp = (BindingProvider)port;
-         boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
-         boolean expectedSetting = (i==0) ? false : true;
-
-         //if(mtomEnabled != expectedSetting)
-         //   throw new WebServiceException("MTOM settings (enabled="+expectedSetting+") not overridden through service-ref" );
-
-         String outStr = port.echo(inStr);
-         if (inStr.equals(outStr) == false)
-            throw new WebServiceException("Invalid echo return: " + inStr);
-      }
-
-      res.getWriter().print(inStr);
-   }
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+import javax.naming.InitialContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+
+public class ServletClient extends HttpServlet
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(ServletClient.class);
+
+   protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+   {
+      String inStr = req.getParameter("echo");
+      log.info("doGet: " + inStr);
+
+      ArrayList ports = new ArrayList();
+      try
+      {
+         InitialContext iniCtx = new InitialContext();
+         ports.add((TestEndpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot add port", ex);
+         throw new WebServiceException(ex);
+      }
+
+      for (int i = 0; i < ports.size(); i++)
+      {
+         TestEndpoint port = (TestEndpoint)ports.get(i);
+
+         BindingProvider bp = (BindingProvider)port;
+         boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
+         boolean expectedSetting = (i==0) ? false : true;
+
+         //if(mtomEnabled != expectedSetting)
+         //   throw new WebServiceException("MTOM settings (enabled="+expectedSetting+") not overridden through service-ref" );
+
+         String outStr = port.echo(inStr);
+         if (inStr.equals(outStr) == false)
+            throw new WebServiceException("Invalid echo return: " + inStr);
+      }
+
+      res.getWriter().print(inStr);
+   }
+}

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,40 +0,0 @@
-
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-
-/**
- * JBossWS Generated Source
- * 
- * Generation Date: Mon Mar 12 15:09:39 CET 2007
- * 
- * This generated source code represents a derivative work of the input to
- * the generator that produced it. Consult the input for the copyright and
- * terms of use that apply to this source code.
- * 
- * JAX-WS Version: 2.0
- * 
- */
- at WebService(name = "TestEndpoint", targetNamespace = "http://serviceref.samples.jaxws.ws.test.jboss.org/")
- at SOAPBinding(style = SOAPBinding.Style.RPC)
-public interface TestEndpoint {
-
-
-    /**
-     * 
-     * @param arg0
-     * @return
-     *     returns java.lang.String
-     */
-    @WebMethod
-    @WebResult(partName = "return")
-    public String echo(
-        @WebParam(name = "arg0", partName = "arg0")
-        String arg0);
-
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,40 @@
+
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+
+/**
+ * JBossWS Generated Source
+ * 
+ * Generation Date: Mon Mar 12 15:09:39 CET 2007
+ * 
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ * 
+ * JAX-WS Version: 2.0
+ * 
+ */
+ at WebService(name = "TestEndpoint", targetNamespace = "http://serviceref.samples.jaxws.ws.test.jboss.org/")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TestEndpoint {
+
+
+    /**
+     * 
+     * @param arg0
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod
+    @WebResult(partName = "return")
+    public String echo(
+        @WebParam(name = "arg0", partName = "arg0")
+        String arg0);
+
+}

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,50 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.logging.Logger;
-
-/**
- * Test the jaxws <service-ref>
- *
- * @author Thomas.Diesler at jboss.org
- * @since 12-Mar-2007
- */
-
- at WebService (name = "TestEndpoint")
- at SOAPBinding(style = SOAPBinding.Style.RPC)
-public class TestEndpointImpl 
-{
-   // Provide logging
-   private static Logger log = Logger.getLogger(TestEndpointImpl.class);
-   
-   @WebMethod
-   public String echo(String input)
-   {
-      log.info(input);
-      return input;
-   }
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,50 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Test the jaxws <service-ref>
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-Mar-2007
+ */
+
+ at WebService (name = "TestEndpoint")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public class TestEndpointImpl 
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(TestEndpointImpl.class);
+   
+   @WebMethod
+   public String echo(String input)
+   {
+      log.info(input);
+      return input;
+   }
+}

Deleted: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,59 +0,0 @@
-
-package org.jboss.test.ws.jaxws.samples.serviceref;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebEndpoint;
-import javax.xml.ws.WebServiceClient;
-
-
-/**
- * JBossWS Generated Source
- * 
- * Generation Date: Mon Mar 12 15:09:39 CET 2007
- * 
- * This generated source code represents a derivative work of the input to
- * the generator that produced it. Consult the input for the copyright and
- * terms of use that apply to this source code.
- * 
- * JAX-WS Version: 2.0
- * 
- */
- at WebServiceClient(name = "TestEndpointService", targetNamespace = "http://serviceref.samples.jaxws.ws.test.jboss.org/", wsdlLocation = "http://tddell:8080/jaxws-serviceref?wsdl")
-public class TestEndpointService
-    extends Service
-{
-
-    private final static URL TESTENDPOINTSERVICE_WSDL_LOCATION;
-
-    static {
-        URL url = null;
-        try {
-            url = new URL("http://tddell:8080/jaxws-serviceref?wsdl");
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        }
-        TESTENDPOINTSERVICE_WSDL_LOCATION = url;
-    }
-
-    public TestEndpointService(URL wsdlLocation, QName serviceName) {
-        super(wsdlLocation, serviceName);
-    }
-
-    public TestEndpointService() {
-        super(TESTENDPOINTSERVICE_WSDL_LOCATION, new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService"));
-    }
-
-    /**
-     * 
-     * @return
-     *     returns TestEndpoint
-     */
-    @WebEndpoint(name = "TestEndpointPort")
-    public TestEndpoint getTestEndpointPort() {
-        return (TestEndpoint)super.getPort(new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointPort"), TestEndpoint.class);
-    }
-
-}

Copied: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java (from rev 3873, branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java)
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java	                        (rev 0)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,59 @@
+
+package org.jboss.test.ws.jaxws.samples.serviceref;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * JBossWS Generated Source
+ * 
+ * Generation Date: Mon Mar 12 15:09:39 CET 2007
+ * 
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ * 
+ * JAX-WS Version: 2.0
+ * 
+ */
+ at WebServiceClient(name = "TestEndpointService", targetNamespace = "http://serviceref.samples.jaxws.ws.test.jboss.org/", wsdlLocation = "http://tddell:8080/jaxws-serviceref?wsdl")
+public class TestEndpointService
+    extends Service
+{
+
+    private final static URL TESTENDPOINTSERVICE_WSDL_LOCATION;
+
+    static {
+        URL url = null;
+        try {
+            url = new URL("http://tddell:8080/jaxws-serviceref?wsdl");
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        }
+        TESTENDPOINTSERVICE_WSDL_LOCATION = url;
+    }
+
+    public TestEndpointService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public TestEndpointService() {
+        super(TESTENDPOINTSERVICE_WSDL_LOCATION, new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService"));
+    }
+
+    /**
+     * 
+     * @return
+     *     returns TestEndpoint
+     */
+    @WebEndpoint(name = "TestEndpointPort")
+    public TestEndpoint getTestEndpointPort() {
+        return (TestEndpoint)super.getPort(new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointPort"), TestEndpoint.class);
+    }
+
+}

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref)

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF)

Deleted: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
-
-  <display-name>jaxws simple tests</display-name>
-  
-  <service-ref>
-    <service-ref-name>service1</service-ref-name>
-    <service-interface>javax.xml.ws.Service</service-interface>
-    <wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
-    <service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:TestEndpointService</service-qname>
-  </service-ref>
-
-  <service-ref>
-    <service-ref-name>service2</service-ref-name>
-    <service-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpointService</service-interface>
-    <wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
-    <service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:TestEndpointService</service-qname>
-     <port-component-ref>
-      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpoint</service-endpoint-interface>
-      <enable-mtom>true</enable-mtom>
-    </port-component-ref>
-  </service-ref>
-
-</application-client>
-

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml)
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/application-client.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+
+  <display-name>jaxws simple tests</display-name>
+  
+  <service-ref>
+    <service-ref-name>service1</service-ref-name>
+    <service-interface>javax.xml.ws.Service</service-interface>
+    <wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+    <service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:TestEndpointService</service-qname>
+  </service-ref>
+
+  <service-ref>
+    <service-ref-name>service2</service-ref-name>
+    <service-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpointService</service-interface>
+    <wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+    <service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:TestEndpointService</service-qname>
+     <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpoint</service-endpoint-interface>
+      <enable-mtom>true</enable-mtom>
+    </port-component-ref>
+  </service-ref>
+
+</application-client>
+

Deleted: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<ejb-jar version="3.0"
-         xmlns="http://java.sun.com/xml/ns/javaee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
-
-  <enterprise-beans>
-    <session>
-      <ejb-name>EJBClient</ejb-name>
-      <remote>org.jboss.test.ws.jaxws.samples.serviceref.EJBRemote</remote>
-      <ejb-class>org.jboss.test.ws.jaxws.samples.serviceref.EJBClient</ejb-class>
-      <session-type>Stateless</session-type>
-      <transaction-type>Container</transaction-type>
-      
-      <service-ref>
-        <service-ref-name>service1</service-ref-name>
-        <service-interface>javax.xml.ws.Service</service-interface>
-        <wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
-        <service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:TestEndpointService</service-qname>
-      </service-ref>
-    
-      <service-ref>
-        <service-ref-name>service2</service-ref-name>
-        <service-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpointService</service-interface>
-        <wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
-        <service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:TestEndpointService</service-qname>
-        <port-component-ref>
-          <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpoint</service-endpoint-interface>
-          <enable-mtom>true</enable-mtom>
-        </port-component-ref>
-      </service-ref>
-      
-    </session>
-  </enterprise-beans>
-  
-</ejb-jar>
-

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml)
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/ejb-jar.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<ejb-jar version="3.0"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+
+  <enterprise-beans>
+    <session>
+      <ejb-name>EJBClient</ejb-name>
+      <remote>org.jboss.test.ws.jaxws.samples.serviceref.EJBRemote</remote>
+      <ejb-class>org.jboss.test.ws.jaxws.samples.serviceref.EJBClient</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+      
+      <service-ref>
+        <service-ref-name>service1</service-ref-name>
+        <service-interface>javax.xml.ws.Service</service-interface>
+        <wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+        <service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:TestEndpointService</service-qname>
+      </service-ref>
+    
+      <service-ref>
+        <service-ref-name>service2</service-ref-name>
+        <service-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpointService</service-interface>
+        <wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+        <service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:TestEndpointService</service-qname>
+        <port-component-ref>
+          <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpoint</service-endpoint-interface>
+          <enable-mtom>true</enable-mtom>
+        </port-component-ref>
+      </service-ref>
+      
+    </session>
+  </enterprise-beans>
+  
+</ejb-jar>
+

Deleted: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
-  <package-type>org.jboss.test.ws.jaxrpc.serviceref</package-type>
-  <namespaceURI>http://org.jboss.ws/wsref/types</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
-  <service-interface>org.jboss.test.ws.jaxrpc.serviceref.TestEndpointService</service-interface>
-  <wsdl-service-name xmlns:serviceNS='http://org.jboss.ws/wsref'>serviceNS:TestEndpointService</wsdl-service-name>
-  <port-mapping>
-   <port-name>TestEndpointPort</port-name>
-   <java-port-name>TestEndpointPort</java-port-name>
-  </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
-  <service-endpoint-interface>org.jboss.test.ws.jaxrpc.serviceref.TestEndpoint</service-endpoint-interface>
-  <wsdl-port-type xmlns:portTypeNS='http://org.jboss.ws/wsref'>portTypeNS:TestEndpoint</wsdl-port-type>
-  <wsdl-binding xmlns:bindingNS='http://org.jboss.ws/wsref'>bindingNS:TestEndpointBinding</wsdl-binding>
-  <service-endpoint-method-mapping>
-   <java-method-name>echo</java-method-name>
-   <wsdl-operation>echo</wsdl-operation>
-   <method-param-parts-mapping>
-    <param-position>0</param-position>
-    <param-type>java.lang.String</param-type>
-    <wsdl-message-mapping>
-     <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.ws/wsref'>wsdlMsgNS:TestEndpoint_echo</wsdl-message>
-     <wsdl-message-part-name>String_1</wsdl-message-part-name>
-     <parameter-mode>IN</parameter-mode>
-    </wsdl-message-mapping>
-   </method-param-parts-mapping>
-   <wsdl-return-value-mapping>
-    <method-return-value>java.lang.String</method-return-value>
-    <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.ws/wsref'>wsdlMsgNS:TestEndpoint_echoResponse</wsdl-message>
-    <wsdl-message-part-name>result</wsdl-message-part-name>
-   </wsdl-return-value-mapping>
-  </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml)
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jaxrpc-mapping.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+  <package-type>org.jboss.test.ws.jaxrpc.serviceref</package-type>
+  <namespaceURI>http://org.jboss.ws/wsref/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+  <service-interface>org.jboss.test.ws.jaxrpc.serviceref.TestEndpointService</service-interface>
+  <wsdl-service-name xmlns:serviceNS='http://org.jboss.ws/wsref'>serviceNS:TestEndpointService</wsdl-service-name>
+  <port-mapping>
+   <port-name>TestEndpointPort</port-name>
+   <java-port-name>TestEndpointPort</java-port-name>
+  </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+  <service-endpoint-interface>org.jboss.test.ws.jaxrpc.serviceref.TestEndpoint</service-endpoint-interface>
+  <wsdl-port-type xmlns:portTypeNS='http://org.jboss.ws/wsref'>portTypeNS:TestEndpoint</wsdl-port-type>
+  <wsdl-binding xmlns:bindingNS='http://org.jboss.ws/wsref'>bindingNS:TestEndpointBinding</wsdl-binding>
+  <service-endpoint-method-mapping>
+   <java-method-name>echo</java-method-name>
+   <wsdl-operation>echo</wsdl-operation>
+   <method-param-parts-mapping>
+    <param-position>0</param-position>
+    <param-type>java.lang.String</param-type>
+    <wsdl-message-mapping>
+     <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.ws/wsref'>wsdlMsgNS:TestEndpoint_echo</wsdl-message>
+     <wsdl-message-part-name>String_1</wsdl-message-part-name>
+     <parameter-mode>IN</parameter-mode>
+    </wsdl-message-mapping>
+   </method-param-parts-mapping>
+   <wsdl-return-value-mapping>
+    <method-return-value>java.lang.String</method-return-value>
+    <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.ws/wsref'>wsdlMsgNS:TestEndpoint_echoResponse</wsdl-message>
+    <wsdl-message-part-name>result</wsdl-message-part-name>
+   </wsdl-return-value-mapping>
+  </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file

Deleted: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,14 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
-
-<jboss-client>
-  <jndi-name>jbossws-client</jndi-name>
-
-  <!--service-ref>
-    <service-ref-name>service2</service-ref-name>
-    <port-component-ref>
-      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpoint</service-endpoint-interface>
-      <port-qname>{http://serviceref.samples.jaxws.ws.test.jboss.org/}TestEndpointPort</port-qname>
-    </port-component-ref>
-  </service-ref-->
-</jboss-client>

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml)
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/jboss-client.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
+
+<jboss-client>
+  <jndi-name>jbossws-client</jndi-name>
+
+  <!--service-ref>
+    <service-ref-name>service2</service-ref-name>
+    <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpoint</service-endpoint-interface>
+      <port-qname>{http://serviceref.samples.jaxws.ws.test.jboss.org/}TestEndpointPort</port-qname>
+    </port-component-ref>
+  </service-ref-->
+</jboss-client>

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl)

Deleted: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,32 +0,0 @@
-<definitions name='TestEndpointService' targetNamespace='http://serviceref.samples.jaxws.ws.test.jboss.org/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://serviceref.samples.jaxws.ws.test.jboss.org/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types></types>
- <message name='TestEndpoint_echoResponse'>
-  <part name='return' type='xsd:string'/>
- </message>
- <message name='TestEndpoint_echo'>
-  <part name='arg0' type='xsd:string'/>
- </message>
- <portType name='TestEndpoint'>
-  <operation name='echo' parameterOrder='arg0'>
-   <input message='tns:TestEndpoint_echo'/>
-   <output message='tns:TestEndpoint_echoResponse'/>
-  </operation>
- </portType>
- <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
-  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
-  <operation name='echo'>
-   <soap:operation soapAction=''/>
-   <input>
-    <soap:body namespace='http://serviceref.samples.jaxws.ws.test.jboss.org/' use='literal'/>
-   </input>
-   <output>
-    <soap:body namespace='http://serviceref.samples.jaxws.ws.test.jboss.org/' use='literal'/>
-   </output>
-  </operation>
- </binding>
- <service name='TestEndpointService'>
-  <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
-   <soap:address location='http://@jboss.bind.address@:8080/jaxws-serviceref'/>
-  </port>
- </service>
-</definitions>
\ No newline at end of file

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl)
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl	                        (rev 0)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,32 @@
+<definitions name='TestEndpointService' targetNamespace='http://serviceref.samples.jaxws.ws.test.jboss.org/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://serviceref.samples.jaxws.ws.test.jboss.org/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types></types>
+ <message name='TestEndpoint_echoResponse'>
+  <part name='return' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echo'>
+  <part name='arg0' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+  <operation name='echo' parameterOrder='arg0'>
+   <input message='tns:TestEndpoint_echo'/>
+   <output message='tns:TestEndpoint_echoResponse'/>
+  </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <operation name='echo'>
+   <soap:operation soapAction=''/>
+   <input>
+    <soap:body namespace='http://serviceref.samples.jaxws.ws.test.jboss.org/' use='literal'/>
+   </input>
+   <output>
+    <soap:body namespace='http://serviceref.samples.jaxws.ws.test.jboss.org/' use='literal'/>
+   </output>
+  </operation>
+ </binding>
+ <service name='TestEndpointService'>
+  <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+   <soap:address location='http://@jboss.bind.address@:8080/jaxws-serviceref'/>
+  </port>
+ </service>
+</definitions>
\ No newline at end of file

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF)

Deleted: trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-  
-  <servlet>
-    <servlet-name>TestEndpoint</servlet-name>
-    <servlet-class>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpointImpl</servlet-class>
-  </servlet>
-  
-  <servlet-mapping>
-    <servlet-name>TestEndpoint</servlet-name>
-    <url-pattern>/*</url-pattern>
-  </servlet-mapping>
-</web-app>
\ No newline at end of file

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml)
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/WEB-INF/web.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+  
+  <servlet>
+    <servlet-name>TestEndpoint</servlet-name>
+    <servlet-class>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpointImpl</servlet-class>
+  </servlet>
+  
+  <servlet-mapping>
+    <servlet-name>TestEndpoint</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+</web-app>
\ No newline at end of file

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client)

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF)

Deleted: trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml	2007-07-13 10:05:26 UTC (rev 3873)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
-  
-  <servlet>
-    <servlet-name>ServletClient</servlet-name>
-    <servlet-class>org.jboss.test.ws.jaxws.samples.serviceref.ServletClient</servlet-class>
-  </servlet>
-  
-  <servlet-mapping>
-    <servlet-name>ServletClient</servlet-name>
-    <url-pattern>/*</url-pattern>
-  </servlet-mapping>
-  
-  <service-ref>
-    <service-ref-name>service1</service-ref-name>
-    <service-interface>javax.xml.ws.Service</service-interface>
-    <wsdl-file>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
-    <service-qname>{http://serviceref.samples.jaxws.ws.test.jboss.org/}TestEndpointService</service-qname>
-  </service-ref>
-
-  <service-ref>    
-    <service-ref-name>service2</service-ref-name>
-    <service-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpointService</service-interface>
-    <wsdl-file>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
-    <service-qname>{http://serviceref.samples.jaxws.ws.test.jboss.org/}TestEndpointService</service-qname>
-     <port-component-ref>
-        <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpoint</service-endpoint-interface>
-        <enable-mtom>true</enable-mtom>
-     </port-component-ref>
-  </service-ref>
-  
-</web-app>
\ No newline at end of file

Copied: trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml (from rev 3873, branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml)
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml	2007-07-13 11:55:00 UTC (rev 3879)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
+  
+  <servlet>
+    <servlet-name>ServletClient</servlet-name>
+    <servlet-class>org.jboss.test.ws.jaxws.samples.serviceref.ServletClient</servlet-class>
+  </servlet>
+  
+  <servlet-mapping>
+    <servlet-name>ServletClient</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+  
+  <service-ref>
+    <service-ref-name>service1</service-ref-name>
+    <service-interface>javax.xml.ws.Service</service-interface>
+    <wsdl-file>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+    <service-qname>{http://serviceref.samples.jaxws.ws.test.jboss.org/}TestEndpointService</service-qname>
+  </service-ref>
+
+  <service-ref>    
+    <service-ref-name>service2</service-ref-name>
+    <service-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpointService</service-interface>
+    <wsdl-file>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
+    <service-qname>{http://serviceref.samples.jaxws.ws.test.jboss.org/}TestEndpointService</service-qname>
+     <port-component-ref>
+        <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.serviceref.TestEndpoint</service-endpoint-interface>
+        <enable-mtom>true</enable-mtom>
+     </port-component-ref>
+  </service-ref>
+  
+</web-app>
\ No newline at end of file




More information about the jbossws-commits mailing list