[jboss-cvs] JBossAS SVN: r57868 - in branches/JEE5_TCK: ejb3/src/main/org/jboss/ejb3/client ejb3/src/main/org/jboss/ejb3/metamodel ejb3/src/main/org/jboss/injection server/src/main/org/jboss/metadata server/src/main/org/jboss/metamodel/descriptor server/src/main/org/jboss/webservice/metadata/serviceref server/src/resources/dtd tomcat/src/main/org/jboss/web/metamodel/descriptor

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 26 19:53:40 EDT 2006


Author: thomas.diesler at jboss.com
Date: 2006-10-26 19:53:25 -0400 (Thu, 26 Oct 2006)
New Revision: 57868

Added:
   branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/ServiceRef.java
Removed:
   branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java
Modified:
   branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/client/ClientContainer.java
   branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
   branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
   branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
   branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java
   branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
   branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefHandler.java
   branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefInjector.java
   branches/JEE5_TCK/server/src/main/org/jboss/metadata/BeanMetaData.java
   branches/JEE5_TCK/server/src/main/org/jboss/metadata/ClientMetaData.java
   branches/JEE5_TCK/server/src/main/org/jboss/metadata/WebMetaData.java
   branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
   branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
   branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/Ref.java
   branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java
   branches/JEE5_TCK/server/src/resources/dtd/jboss-client_5_0.dtd
   branches/JEE5_TCK/server/src/resources/dtd/jboss-web_5_0.dtd
   branches/JEE5_TCK/server/src/resources/dtd/jboss_5_0.dtd
   branches/JEE5_TCK/tomcat/src/main/org/jboss/web/metamodel/descriptor/JBossWebDDObjectFactory.java
Log:
Support <service-ref> overrides for @WebServiceRef in jboss.xml, jboss-web.xml, jboss-client.xml

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/client/ClientContainer.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/client/ClientContainer.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/client/ClientContainer.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -80,18 +80,6 @@
    private Context enc;
    private Context encEnv;
 
-   /**
-    * This constructor is temporary.
-    * 
-    * @param mainClass
-    * @param applicationClientName
-    * @throws Exception
-    */
-   public ClientContainer(Class<?> mainClass, String applicationClientName) throws Exception
-   {
-      this(null, mainClass, applicationClientName);
-   }
-   
    public ClientContainer(ApplicationClientDD xml, Class<?> mainClass, String applicationClientName) throws Exception
    {
       this.xml = xml;

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -48,7 +48,7 @@
 import org.jboss.metamodel.descriptor.ResourceEnvRef;
 import org.jboss.metamodel.descriptor.ResourceRef;
 import org.jboss.metamodel.descriptor.RunAs;
-import org.jboss.metamodel.descriptor.WebServiceRef;
+import org.jboss.metamodel.descriptor.ServiceRef;
 import org.jboss.metamodel.descriptor.SecurityRole;
 import org.jboss.metamodel.descriptor.PersistenceContextRef;
 
@@ -714,10 +714,10 @@
       parent.addResourceRef(envRef);
    }
 
-   public void addChild(MessageDrivenBean parent, WebServiceRef envRef,
+   public void addChild(MessageDrivenBean parent, ServiceRef envRef,
                         UnmarshallingContext navigator, String namespaceURI, String localName)
    {
-      parent.addWebServiceRef(envRef);
+      parent.addServiceRef(envRef);
    }
    
    public void addChild(MessageDrivenBean parent, MessageDestinationRef ref,
@@ -825,10 +825,10 @@
    /**
     * Called when parsing character is complete.
     */
-   public void addChild(SessionEnterpriseBean parent, WebServiceRef envRef,
+   public void addChild(SessionEnterpriseBean parent, ServiceRef envRef,
                         UnmarshallingContext navigator, String namespaceURI, String localName)
    {
-      parent.addWebServiceRef(envRef);
+      parent.addServiceRef(envRef);
    }
 
    /**
@@ -1118,10 +1118,10 @@
    /**
     * Called when parsing character is complete.
     */
-   public void addChild(Interceptor parent, WebServiceRef ref,
+   public void addChild(Interceptor parent, ServiceRef ref,
                         UnmarshallingContext navigator, String namespaceURI, String localName)
    {
-      parent.addWebServiceRef(ref);
+      parent.addServiceRef(ref);
    }
 
    public void addChild(Interceptor parent, Method method,

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -35,6 +35,7 @@
 import org.jboss.metamodel.descriptor.MessageDestinationRef;
 import org.jboss.metamodel.descriptor.ResourceEnvRef;
 import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.metamodel.descriptor.ServiceRef;
 
 /**
  * Represents EJB elements of the ejb-jar.xml deployment descriptor for the 1.4
@@ -113,6 +114,11 @@
       currentEjb.mergeMessageDestinationRef(ref);
    }
    
+   public void addServiceRef(ServiceRef ref)
+   {
+      currentEjb.addServiceRef(ref);
+   }
+   
    public void setMethodAttributes(MethodAttributes attributes)
    {
       currentEjb.setMethodAttributes(attributes);

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -31,7 +31,7 @@
 import org.jboss.metamodel.descriptor.PersistenceUnitRef;
 import org.jboss.metamodel.descriptor.ResourceEnvRef;
 import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.WebServiceRef;
+import org.jboss.metamodel.descriptor.ServiceRef;
 import org.jboss.metamodel.descriptor.PersistenceContextRef;
 
 /**
@@ -50,7 +50,7 @@
 
    Collection<ResourceRef> getResourceRefs();
 
-   Collection<WebServiceRef> getWebServiceRefs();
+   Collection<ServiceRef> getServiceRefs();
 
    Collection<MessageDestinationRef> getMessageDestinationRefs();
 

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -30,6 +30,7 @@
 import org.jboss.metamodel.descriptor.MessageDestinationRef;
 import org.jboss.metamodel.descriptor.ResourceEnvRef;
 import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.metamodel.descriptor.ServiceRef;
 import org.jboss.util.xml.JBossEntityResolver;
 import org.jboss.xb.binding.JBossXBException;
 import org.jboss.xb.binding.Unmarshaller;
@@ -65,7 +66,7 @@
       
       JBossClientDDObjectFactory factory = new JBossClientDDObjectFactory(dd);
       UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
-      unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
+      unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, Boolean.TRUE);
       Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
       JBossEntityResolver entityResolver = new JBossEntityResolver();
       unmarshaller.setEntityResolver(entityResolver);
@@ -90,6 +91,11 @@
       dd.updateMessageDestinationRef(ref);
    }
 
+   public void addChild(ApplicationClientDD parent, ServiceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      dd.addServiceRef(ref);
+   }
+
    public void addChild(ApplicationClientDD dd, ResourceEnvRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
    {
       dd.updateResourceEnvRef(envRef);

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -46,6 +46,7 @@
 import org.jboss.metamodel.descriptor.NameValuePair;
 import org.jboss.metamodel.descriptor.ResourceEnvRef;
 import org.jboss.metamodel.descriptor.ResourceRef; 
+import org.jboss.metamodel.descriptor.ServiceRef;
 
 /**
  * Represents the jboss.xml deployment descriptor for the 2.1 schema
@@ -76,9 +77,8 @@
             dd = new EjbJarDD();
          
          factory = new JBossDDObjectFactory(dd);
-         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory
-               .newInstance();
-         unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
+         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
+         unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, Boolean.TRUE);
          unmarshaller = unmarshallerFactory.newUnmarshaller();
          JBossEntityResolver entityResolver = new JBossEntityResolver();
          unmarshaller.setEntityResolver(entityResolver);
@@ -722,6 +722,15 @@
    /**
     * Called when parsing character is complete.
     */
+   public void addChild(EnterpriseBeans parent, ServiceRef ref,
+                        UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addServiceRef(ref);
+   }
+   
+   /**
+    * Called when parsing character is complete.
+    */
    public void addChild(EnterpriseBeans parent, ResourceEnvRef ref,
                         UnmarshallingContext navigator, String namespaceURI, String localName)
    {

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefHandler.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefHandler.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefHandler.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -1,24 +1,24 @@
 /*
-  * 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.
-  */
+ * 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.injection;
 
 // $Id$
@@ -26,111 +26,137 @@
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.util.HashMap;
 import java.util.Map;
 
+import javax.naming.Context;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
 import org.jboss.logging.Logger;
 import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.metamodel.descriptor.WebServiceRef;
+import org.jboss.metamodel.descriptor.ServiceRef;
 
 /**
+ * Handle @WebServiceRef annotations
+ * 
  * @author Thomas.Diesler at jboss.com
  */
 public class WebServiceRefHandler implements InjectionHandler
 {
    private static final Logger log = Logger.getLogger(WebServiceRefHandler.class);
+   private Map<String, ServiceRef> srefMap = new HashMap<String, ServiceRef>();
 
    public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
    {
       if (xml == null) return;
-      if (xml.getWebServiceRefs() == null) return;
-      for (WebServiceRef wsRef : xml.getWebServiceRefs())
+      if (xml.getServiceRefs() == null) return;
+      for (ServiceRef sref : xml.getServiceRefs())
       {
-         log.warn("@WebServiceRef override not yet supported");
+         log.debug("@WebServiceRef override: " + sref);
+         if (srefMap.get(sref.getEncName()) != null)
+               throw new IllegalStateException ("Duplicate <service-ref-name> in " + sref);
+         
+         srefMap.put(sref.getEncName(), sref);
       }
    }
 
    public void handleClassAnnotations(Class type, InjectionContainer container)
    {
-      javax.xml.ws.WebServiceRef ref = container.getAnnotation(javax.xml.ws.WebServiceRef.class, type);
-      if (ref != null)
+      WebServiceRef wsref = container.getAnnotation(WebServiceRef.class, type);
+      if (wsref != null)
       {
-         bindRefOnType(type, container, ref);
+         bindRefOnType(type, container, wsref);
       }
 
-      javax.xml.ws.WebServiceRefs refs = container.getAnnotation(javax.xml.ws.WebServiceRefs.class, type);
+      WebServiceRefs refs = container.getAnnotation(WebServiceRefs.class, type);
       if (refs != null)
       {
-         for (javax.xml.ws.WebServiceRef refItem : refs.value())
+         for (WebServiceRef refItem : refs.value())
          {
             bindRefOnType(type, container, refItem);
          }
       }
    }
 
-   private void bindRefOnType(Class type, InjectionContainer container, javax.xml.ws.WebServiceRef ref)
+   private void bindRefOnType(Class type, InjectionContainer container, WebServiceRef wsref)
    {
-      String encName = ref.name();
-      if (encName.equals(""))
+      String name = wsref.name();
+      if (name.equals(""))
       {
-         encName = InjectionUtil.getEncName(type);
+         name = InjectionUtil.getEncName(type).substring(4);
       }
-      else
-      {
-         encName = "env/" + encName;
-      }
       
-      if (!container.getEncInjectors().containsKey(encName))
+      String encName = "env/" + name;
+      Context encCtx = container.getEnc();
+      if (!container.getEncInjectors().containsKey(name))
       {
-         container.getEncInjectors().put(encName, new WebServiceRefInjector(container.getEnc(), encName, null, ref));
+         ServiceRef sref = getServiceRef(name);
+         container.getEncInjectors().put(name, new WebServiceRefInjector(encCtx, encName, null, wsref, sref));
       }
    }
 
    public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
    {
-      javax.xml.ws.WebServiceRef ref = method.getAnnotation(javax.xml.ws.WebServiceRef.class);
-      if (ref == null) return;
-      
+      WebServiceRef wsref = method.getAnnotation(WebServiceRef.class);
+      if (wsref == null) return;
+
       if (!method.getName().startsWith("set"))
          throw new RuntimeException("@WebServiceRef can only be used with a set method: " + method);
+
+      String name = wsref.name();
+      if (name.equals(""))
+      {
+         name = InjectionUtil.getEncName(method).substring(4);
+      }
       
-      String encName = ref.name();
-      if (encName.equals(""))
+      String encName = "env/" + name;
+      Context encCtx = container.getEnc();
+      if (!container.getEncInjectors().containsKey(name))
       {
-         encName = InjectionUtil.getEncName(method);
+         Class refType = method.getParameterTypes()[0];
+         ServiceRef sref = getServiceRef(name);
+         container.getEncInjectors().put(name, new WebServiceRefInjector(encCtx, encName, refType, wsref, sref));
       }
-      else
+
+      injectors.put(method, new JndiMethodInjector(method, encName, encCtx));
+   }
+
+   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
+   {
+      WebServiceRef wsref = field.getAnnotation(WebServiceRef.class);
+      if (wsref == null) return;
+
+      String name = wsref.name();
+      if (name.equals(""))
       {
-         encName = "env/" + encName;
+         name = InjectionUtil.getEncName(field).substring(4);
       }
-      
-      if (!container.getEncInjectors().containsKey(encName))
+
+      String encName = "env/" + name;
+      Context encCtx = container.getEnc();
+      if (!container.getEncInjectors().containsKey(name))
       {
-         container.getEncInjectors().put(encName, new WebServiceRefInjector(container.getEnc(), encName, method.getParameterTypes()[0], ref));
+         Class refType = field.getType();
+         ServiceRef sref = getServiceRef(name);
+         container.getEncInjectors().put(name, new WebServiceRefInjector(encCtx, encName, refType, wsref, sref));
       }
 
-      injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
+      injectors.put(field, new JndiFieldInjector(field, encName, encCtx));
    }
 
-   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
+   private ServiceRef getServiceRef(String name)
    {
-      javax.xml.ws.WebServiceRef ref = field.getAnnotation(javax.xml.ws.WebServiceRef.class);
-      if (ref == null) return;
-      
-      String encName = ref.name();
-      if (encName == null || encName.equals(""))
+      ServiceRef sref = srefMap.get(name);
+      if (sref != null)
       {
-         encName = InjectionUtil.getEncName(field);
+         log.debug("Override @WebServiceRef with: " + sref);
       }
       else
       {
-         encName = "env/" + encName;
+         log.debug("No override for @WebServiceRef.name: " + name);
+         sref = new ServiceRef(name);
       }
-      
-      if (!container.getEncInjectors().containsKey(encName))
-      {
-         container.getEncInjectors().put(encName, new WebServiceRefInjector(container.getEnc(), encName, field.getType(), ref));
-      }
-
-      injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
+      return sref;
    }
 }

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefInjector.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefInjector.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefInjector.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -28,6 +28,7 @@
 import javax.xml.ws.WebServiceRef;
 
 import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.ServiceRef;
 import org.jboss.ws.jaxws.injection.WebServiceRefDeployer;
 
 /**
@@ -41,18 +42,19 @@
    private static final Logger log = Logger.getLogger(WebServiceRefInjector.class);
 
    private Context ctx;
-   private String encName;
+   private String name;
    private Class refType;
    private String refTypeName;
-   private WebServiceRef ref;
+   private WebServiceRef wsref;
+   private ServiceRef sref;
 
-   public WebServiceRefInjector(Context ctx, String encName, Class refType, WebServiceRef ref)
+   public WebServiceRefInjector(Context ctx, String name, Class refType, WebServiceRef wsref, ServiceRef sref)
    {
       this.ctx = ctx;
-      this.encName = encName;
+      this.name = name;
       this.refType = refType;
-      this.ref = ref;
-      
+      this.wsref = wsref;
+      this.sref = sref;
       this.refTypeName = (refType != null ? refType.getName() : null);
    }
 
@@ -60,17 +62,27 @@
    {
       try
       {
-         WebServiceRefDeployer.setupWebServiceRef(ctx, encName, refType, ref);
-         log.debug("@WebServiceRef bound [env=" + encName + ",ref=" + refTypeName + "]");
+         WebServiceRefDeployer.setupWebServiceRef(ctx, name, refType, wsref, getAdaptedServiceRef());
+         log.debug("@WebServiceRef bound [env=" + name + ",ref=" + refTypeName + "]");
       }
       catch (Exception e)
       {
-         throw new WebServiceException("Unable to bind @WebServiceRef [enc=" + encName + ",type=" + refTypeName + "]", e);
+         throw new WebServiceException("Unable to bind @WebServiceRef [enc=" + name + ",type=" + refTypeName + "]", e);
       }
    }
 
+   private org.jboss.ws.jaxws.injection.ServiceRef getAdaptedServiceRef()
+   {
+      org.jboss.ws.jaxws.injection.ServiceRef newRef = new org.jboss.ws.jaxws.injection.ServiceRef();
+      newRef.setEncName(sref.getEncName());
+      newRef.setWsdlLocation(sref.getWsdlLocation());
+      newRef.setConfigName(sref.getConfigName());
+      newRef.setConfigFile(sref.getConfigFile());
+      return newRef;
+   }
+
    public String toString()
    {
-      return super.toString() + "{enc=" + encName + ",type=" + refTypeName + "}";
+      return super.toString() + "{enc=" + name + ",type=" + refTypeName + "}";
    }
 }

Modified: branches/JEE5_TCK/server/src/main/org/jboss/metadata/BeanMetaData.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/metadata/BeanMetaData.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/main/org/jboss/metadata/BeanMetaData.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -818,9 +818,12 @@
       while (iterator.hasNext())
       {
          Element serviceRef = (Element)iterator.next();
-         ServiceRefMetaData refMetaData = new ServiceRefMetaData(application.getResourceCl());
-         refMetaData.importStandardXml(serviceRef);
-         serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
+         if (ServiceRefMetaData.isValidDoctype(serviceRef))
+         {
+            ServiceRefMetaData refMetaData = new ServiceRefMetaData(application.getResourceCl());
+            refMetaData.importStandardXml(serviceRef);
+            serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
+         }
       }
 
       // set the security roles references
@@ -993,11 +996,12 @@
          Element serviceRef = (Element)iterator.next();
          String serviceRefName = MetaData.getUniqueChildContent(serviceRef, "service-ref-name");
          ServiceRefMetaData refMetaData = (ServiceRefMetaData)serviceReferences.get(serviceRefName);
-         if (refMetaData == null)
+         if (refMetaData == null && ServiceRefMetaData.isValidDoctype(serviceRef))
          {
             throw new DeploymentException("service-ref " + serviceRefName + " found in jboss.xml but not in ejb-jar.xml");
          }
-         refMetaData.importJBossXml(serviceRef);
+         if (refMetaData != null)
+            refMetaData.importJBossXml(serviceRef);
       }
 
       // Get the security identity

Modified: branches/JEE5_TCK/server/src/main/org/jboss/metadata/ClientMetaData.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/metadata/ClientMetaData.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/main/org/jboss/metadata/ClientMetaData.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -175,9 +175,12 @@
       while (iterator.hasNext())
       {
          Element serviceRef = (Element) iterator.next();
-         ServiceRefMetaData refMetaData = new ServiceRefMetaData(resourceCl);
-         refMetaData.importStandardXml(serviceRef);
-         serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
+         if (ServiceRefMetaData.isValidDoctype(serviceRef))
+         {
+            ServiceRefMetaData refMetaData = new ServiceRefMetaData(resourceCl);
+            refMetaData.importStandardXml(serviceRef);
+            serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
+         }
       }
 
       // The callback-handler element
@@ -268,14 +271,12 @@
          Element serviceRef = (Element) iterator.next();
          String serviceRefName = MetaData.getUniqueChildContent(serviceRef, "service-ref-name");
          ServiceRefMetaData refMetaData = (ServiceRefMetaData)serviceReferences.get(serviceRefName);
-         if (refMetaData == null)
+         if (refMetaData == null && ServiceRefMetaData.isValidDoctype(serviceRef))
          {
-            // J2EE5 allows service-ref overrides in jboss-client.xml without corresponding elements in application-client.xml
-            log.warn("service-ref " + serviceRefName + " found in jboss-client.xml but not in application-client.xml");
-            refMetaData = new ServiceRefMetaData(serviceRefName);  
-            serviceReferences.put(serviceRefName, refMetaData);
+            throw new DeploymentException("service-ref " + serviceRefName + " found in jboss-client.xml but not in application-client.xml");
          }
-         refMetaData.importJBossXml(serviceRef);
+         if (refMetaData != null)
+            refMetaData.importJBossXml(serviceRef);
       }
 
       // Get the JNDI name binding for resource-refs

Modified: branches/JEE5_TCK/server/src/main/org/jboss/metadata/WebMetaData.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/metadata/WebMetaData.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/main/org/jboss/metadata/WebMetaData.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -1017,9 +1017,12 @@
       while (iterator.hasNext())
       {
          Element serviceRef = (Element) iterator.next();
-         ServiceRefMetaData refMetaData = new ServiceRefMetaData(resourceCl);
-         refMetaData.importStandardXml(serviceRef);
-         serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
+         if (ServiceRefMetaData.isValidDoctype(serviceRef))
+         {
+            ServiceRefMetaData refMetaData = new ServiceRefMetaData(resourceCl);
+            refMetaData.importStandardXml(serviceRef);
+            serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
+         }
       }
 
       // Is the web-app marked distributable?
@@ -1176,13 +1179,12 @@
          Element serviceRef = (Element) iterator.next();
          String serviceRefName = MetaData.getUniqueChildContent(serviceRef, "service-ref-name");
          ServiceRefMetaData refMetaData = (ServiceRefMetaData)serviceReferences.get(serviceRefName);
-         if (refMetaData == null)
+         if (refMetaData == null && ServiceRefMetaData.isValidDoctype(serviceRef))
          {
-            log.warn("service-ref " + serviceRefName + " found in jboss-web.xml but not in web.xml");
-            refMetaData = new ServiceRefMetaData(serviceRefName);
-            serviceReferences.put(serviceRefName, refMetaData);
+            throw new DeploymentException("service-ref " + serviceRefName + " found in jboss-web.xml but not in web.xml");
          }
-         refMetaData.importJBossXml(serviceRef);
+         if (refMetaData != null)
+            refMetaData.importJBossXml(serviceRef);
       }
 
       // WebserviceDescriptions

Modified: branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -93,7 +93,7 @@
       return newRefChild(ref, localName);
    }
 
-   public Object newChild(WebServiceRef ref,
+   public Object newChild(ServiceRef ref,
                           UnmarshallingContext navigator, String namespaceURI, String localName,
                           Attributes attrs)
    {
@@ -155,7 +155,7 @@
       parent.setInjectionTarget(target);
    }
 
-   public void addChild(WebServiceRef parent, InjectionTarget target,
+   public void addChild(ServiceRef parent, InjectionTarget target,
                         UnmarshallingContext navigator, String namespaceURI, String localName)
    {
       parent.setInjectionTarget(target);
@@ -366,29 +366,25 @@
       }
    }
 
-   public void setValue(WebServiceRef ref, UnmarshallingContext navigator,
+   public void setValue(ServiceRef ref, UnmarshallingContext navigator,
                         String namespaceURI, String localName, String value)
    {
-      if (localName.equals("name"))
+      if (localName.equals("service-ref-name"))
       {
-         ref.setName(getValue(localName, value));
+         ref.setEncName(getValue(localName, value));
       }
-      else if (localName.equals("wsdl-location"))
+      else if (localName.equals("wsdl-override"))
       {
          ref.setWsdlLocation(getValue(localName, value));
       }
-      else if (localName.equals("type"))
+      else if (localName.equals("config-name"))
       {
-         ref.setType(getValue(localName, value));
+         ref.setConfigName(getValue(localName, value));
       }
-      else if (localName.equals("value"))
+      else if (localName.equals("config-file"))
       {
-         ref.setValue(getValue(localName, value));
+         ref.setConfigFile(getValue(localName, value));
       }
-      else if (localName.equals("mapped-name"))
-      {
-         ref.setMappedName(getValue(localName, value));
-      }
    }
 
    public void setValue(SecurityRole role, UnmarshallingContext navigator,
@@ -504,7 +500,7 @@
       }
       else if (localName.equals("service-ref"))
       {
-         child = new WebServiceRef();
+         child = new ServiceRef();
       }
       else if (localName.equals("jndi-ref"))
       {

Modified: branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -35,7 +35,7 @@
 import org.jboss.metamodel.descriptor.MessageDestinationRef;
 import org.jboss.metamodel.descriptor.ResourceEnvRef;
 import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.WebServiceRef;
+import org.jboss.metamodel.descriptor.ServiceRef;
 
 /**
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
@@ -53,7 +53,7 @@
    protected HashMap<String, MessageDestinationRef> messageDestinationRefs = new HashMap<String, MessageDestinationRef>();
    /** An index of MessageDestinationRef keyed by message-destination-link values */
    protected HashMap<String, MessageDestinationRef> messageDestinationRefsByLink = new HashMap<String, MessageDestinationRef>();
-   protected HashMap<String, WebServiceRef> webServiceRefs = new HashMap<String, WebServiceRef>();
+   protected HashMap<String, ServiceRef> serviceRefs = new HashMap<String, ServiceRef>();
    protected HashMap<String, JndiRef> jndiRefs = new HashMap<String, JndiRef>();
    protected List<PersistenceContextRef> persistenceContextRefs = new ArrayList<PersistenceContextRef>();
    protected List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
@@ -134,14 +134,14 @@
       jndiRefs.put(ref.getJndiRefName(), ref);
    }
    
-   public Collection<WebServiceRef> getWebServiceRefs()
+   public Collection<ServiceRef> getServiceRefs()
    {
-      return webServiceRefs.values();
+      return serviceRefs.values();
    }
 
-   public void addWebServiceRef(WebServiceRef ref)
+   public void addServiceRef(ServiceRef ref)
    {
-      webServiceRefs.put(ref.getName(), ref);
+      serviceRefs.put(ref.getEncName(), ref);
    }
    
    public void updateEjbRef(EjbRef updatedRef)

Modified: branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/Ref.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/Ref.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/Ref.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -40,15 +40,6 @@
       this.injectionTarget = injectionTarget;
    }
 
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[");
-      sb.append(", injectionTarget=").append(injectionTarget);
-      sb.append("]");
-      return sb.toString();
-   }
-
    public boolean isIgnoreDependency()
    {
       return ignoreDependency;
@@ -58,4 +49,13 @@
    {
       this.ignoreDependency = ignoreDependency;
    }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append(", injectionTarget=").append(injectionTarget);
+      sb.append("]");
+      return sb.toString();
+   }
 }

Copied: branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/ServiceRef.java (from rev 57838, branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java)
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java	2006-10-25 23:44:13 UTC (rev 57838)
+++ branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/ServiceRef.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -0,0 +1,102 @@
+/*
+ * 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.metamodel.descriptor;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * Represents a <service-ref> element of the jboss.xml, jboss-web.xml, jboss-client.xml deployment descriptor 
+ * for the 5.0 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @author Thomas.Diesler at jboss.com
+ */
+public class ServiceRef extends Ref
+{
+   private String encName;
+   private String wsdlLocation;
+   private String configName;
+   private String configFile;
+
+   public ServiceRef()
+   {
+   }
+
+   public ServiceRef(String name)
+   {
+      this.encName = name;
+   }
+
+   public String getEncName()
+   {
+      return encName;
+   }
+
+   public void setEncName(String name)
+   {
+      this.encName = name;
+   }
+
+   public String getWsdlLocation()
+   {
+      return wsdlLocation;
+   }
+
+   public void setWsdlLocation(String wsdlLocation)
+   {
+      this.wsdlLocation = wsdlLocation;
+   }
+
+   public String getConfigFile()
+   {
+      return configFile;
+   }
+
+   public void setConfigFile(String configFile)
+   {
+      this.configFile = configFile;
+   }
+
+   public String getConfigName()
+   {
+      return configName;
+   }
+
+   public void setConfigName(String configName)
+   {
+      this.configName = configName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("name=").append(encName);
+      sb.append(",config-name=").append(configName);
+      sb.append(",config-file=").append(configFile);
+      sb.append(",wsdl=").append(wsdlLocation);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Deleted: branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -1,107 +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.metamodel.descriptor;
-
-// $Id$
-
-/**
- * Represents a <service-ref> element of the ejb-jar.xml deployment descriptor 
- * for the 5.0 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @author Thomas.Diesler at jboss.com
- */
-public class WebServiceRef extends Ref
-{
-   private String name;
-
-   private String wsdlLocation;
-
-   private String type;
-
-   private String value;
-
-   private String mappedName;
-
-   public String getMappedName()
-   {
-      return mappedName;
-   }
-
-   public void setMappedName(String mappedName)
-   {
-      this.mappedName = mappedName;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public String getType()
-   {
-      return type;
-   }
-
-   public void setType(String type)
-   {
-      this.type = type;
-   }
-
-   public String getValue()
-   {
-      return value;
-   }
-
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-
-   public String getWsdlLocation()
-   {
-      return wsdlLocation;
-   }
-
-   public void setWsdlLocation(String wsdlLocation)
-   {
-      this.wsdlLocation = wsdlLocation;
-   }
-
-   public String toString()
-   {
-      StringBuffer sb = new StringBuffer(100);
-      sb.append("[" + this.getClass().getName() + ": ");
-      sb.append("name=").append(name);
-      sb.append(",wsdl=").append(wsdlLocation);
-      sb.append(",type=").append(type);
-      sb.append(",value=").append(value);
-      sb.append(",mappedName=").append(mappedName);
-      sb.append("]");
-      return sb.toString();
-   }
-}

Modified: branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -38,8 +38,11 @@
 import javax.xml.rpc.JAXRPCException;
 
 import org.jboss.deployment.DeploymentException;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ClientMetaData;
 import org.jboss.metadata.MetaData;
 import org.jboss.xb.QNameBuilder;
+import org.w3c.dom.DocumentType;
 import org.w3c.dom.Element;
 
 /** The metdata data from service-ref element in web.xml, ejb-jar.xml, and
@@ -52,6 +55,9 @@
 {
    private static final long serialVersionUID = -3723577995017108437L;
 
+   // provide logging
+   private static Logger log = Logger.getLogger(ServiceRefMetaData.class);
+   
    // The required <service-ref-name> element
    private String serviceRefName;
    // The required <service-interface> element
@@ -210,6 +216,17 @@
       return callProperties;
    }
 
+   public static boolean isValidDoctype(Element element)
+   {
+      DocumentType doctype = element.getOwnerDocument().getDoctype();
+      String publicId = doctype.getPublicId();
+      boolean isValid = "-//JBoss//DTD JBOSS 4.0//EN".equals(publicId);
+      isValid |= "-//JBoss//DTD Web Application 2.4//EN".equals(publicId);
+      isValid |= "-//JBoss//DTD Application Client 4.0//EN".equals(publicId);
+      log.debug("Skip <service-ref> for invalid public id: " + publicId);
+      return isValid;
+   }
+   
    public void importStandardXml(Element element) throws DeploymentException
    {
       serviceRefName = MetaData.getUniqueChildContent(element, "service-ref-name");

Modified: branches/JEE5_TCK/server/src/resources/dtd/jboss-client_5_0.dtd
===================================================================
--- branches/JEE5_TCK/server/src/resources/dtd/jboss-client_5_0.dtd	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/resources/dtd/jboss-client_5_0.dtd	2006-10-26 23:53:25 UTC (rev 57868)
@@ -132,19 +132,11 @@
         <service-ref-name>OrganizationService</service-ref-name>
         <config-name>Secure Client Config</config-name>
         <config-file>META-INF/jbossws-client-config.xml</config-file>
-        <port-component-ref>
-          <service-endpoint-interface>com.dot.SEI</service-endpoint-interface>
-          <call-property>
-            <prop-name>X</prop-name>
-            <prop-value>Y</prop-value>
-          </call-property>
-        </port-component-ref>
     </service-ref>
 -->
-<!ELEMENT service-ref (service-ref-name, config-name?, config-file?, port-component-ref*, wsdl-override?, call-property*)>
+<!ELEMENT service-ref (service-ref-name, config-name?, config-file?, wsdl-override?)>
 
-<!-- The service-ref-name element gives the ENC relative name used
-in the ejb-jar.xml service-ref-name element.
+<!-- The service-ref-name element gives the ENC relative name used by @WebServiceRef.name
 
 Used in: service-ref
 -->
@@ -166,14 +158,6 @@
 -->
 <!ELEMENT config-file (#PCDATA)>
 
-<!-- The port-component-ref element provides additional information about
-the standard j2ee service-reference/port-component-ref. Currently this includes
-properties that should be associated with the call/stub for the port.
-
-Used in: service-ref
--->
-<!ELEMENT port-component-ref (service-endpoint-interface?, call-property*)>
-
 <!-- The wsdl-override element the actual wsdl docuement the web service client
 uses to connect to the remote service. It overrides the value of wsdl-file in ejb-jar.xml.
 
@@ -181,24 +165,6 @@
 -->
 <!ELEMENT wsdl-override (#PCDATA)>
 
-<!-- Fully qualified name of service endpoint interface
--->
-<!ELEMENT service-endpoint-interface ( #PCDATA )>
-
-<!-- Arbitrary jaxrpc property values that should be set on a Call object
-before it's returned to the web service client. The valid properties can be any
-properties supported by the jaxrpc Call implementation.
--->
-<!ELEMENT call-property ( prop-name, prop-value )>
-
-<!-- The string value of a property name
--->
-<!ELEMENT prop-name (#PCDATA)>
-
-<!-- The string value of a property value
--->
-<!ELEMENT prop-value (#PCDATA)>
-
 <!-- message-destination-ref is used to directly bind a message destination reference
 to the JNDI name of a Queue, Topic, or some other physical destination. It should
 only be used when the corresponding message destination reference does not

Modified: branches/JEE5_TCK/server/src/resources/dtd/jboss-web_5_0.dtd
===================================================================
--- branches/JEE5_TCK/server/src/resources/dtd/jboss-web_5_0.dtd	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/resources/dtd/jboss-web_5_0.dtd	2006-10-26 23:53:25 UTC (rev 57868)
@@ -19,7 +19,7 @@
    virtual-host*, use-session-cookies?, replication-config?, resource-env-ref*,
    resource-ref*, security-role*, ejb-ref*, ejb-local-ref*, 
    message-destination-ref*, message-destination*, 
-   service-ref*, webservice-description*, depends*, servlet*)>
+   service-ref*, depends*, servlet*)>
 
 <!-- The class-loading element allows one to override the default class
 loading behavior of the web container. You can specify the
@@ -414,19 +414,11 @@
         <service-ref-name>OrganizationService</service-ref-name>
         <config-name>Secure Client Config</config-name>
         <config-file>META-INF/jbossws-client-config.xml</config-file>
-        <port-component-ref>
-          <service-endpoint-interface>com.dot.SEI</service-endpoint-interface>
-          <call-property>
-            <prop-name>X</prop-name>
-            <prop-value>Y</prop-value>
-          </call-property>
-        </port-component-ref>
     </service-ref>
 -->
-<!ELEMENT service-ref (service-ref-name, config-name?, config-file?, port-component-ref*, wsdl-override?, call-property*)>
+<!ELEMENT service-ref (service-ref-name, config-name?, config-file?, wsdl-override?)>
 
-<!-- The service-ref-name element gives the ENC relative name used
-in the ejb-jar.xml service-ref-name element.
+<!-- The service-ref-name element gives the ENC relative name used by @WebServiceRef.name
 
 Used in: service-ref
 -->
@@ -434,87 +426,24 @@
 
 <!-- The optional config-name element gives the client configuration name that must be present in
 the configuration given by element config-file. 
-	
-The default is: Standard Client
 
-Used in: service-ref, webservice-description
+Used in: service-ref
 -->
 <!ELEMENT config-name (#PCDATA)>
 
 <!-- The optional config-file element gives the to a URL or resource name for the client configuration.
-The default is: META-INF/standard-jbossws-client-config.xml
 
-Used in: service-ref, webservice-description
+Used in: service-ref
 -->
 <!ELEMENT config-file (#PCDATA)>
 
-<!-- The port-component-ref element provides additional information about
-the standard j2ee service-reference/port-component-ref. Currently this includes
-properties that should be associated with the call/stub for the port.
-
-Used in: service-ref
--->
-<!ELEMENT port-component-ref (service-endpoint-interface?, call-property*)>
-
 <!-- The wsdl-override element the actual wsdl docuement the web service client
-uses to connect to the remote service. It overrides the value of wsdl-file in ejb-jar.xml.
+uses to connect to the remote service. 
 
 Used in: service-ref
 -->
 <!ELEMENT wsdl-override (#PCDATA)>
 
-<!-- Fully qualified name of service endpoint interface
--->
-<!ELEMENT service-endpoint-interface ( #PCDATA )>
-
-<!-- Arbitrary jaxrpc property values that should be set on a Call object
-before it's returned to the web service client. The valid properties can be any
-properties supported by the jaxrpc Call implementation.
--->
-<!ELEMENT call-property ( prop-name, prop-value )>
-
-<!-- The string value of a property name
--->
-<!ELEMENT prop-name (#PCDATA)>
-
-<!-- The string value of a property value
--->
-<!ELEMENT prop-value (#PCDATA)>
-
-<!--
-Runtime information about a web service.
-
-wsdl-publish-location is optionally used to specify
-where the final wsdl and any dependent files should be stored.  This location
-resides on the file system from which deployment is initiated.
-
--->
-<!ELEMENT webservice-description ( webservice-description-name, config-name?, config-file?, wsdl-publish-location? )>
-
-<!--
-Unique name of a webservice within a module
--->
-<!ELEMENT webservice-description-name ( #PCDATA )>
-
-<!--
-file: URL of a directory to which a web-service-description's wsdl should be
-published during deployment.  Any required files will be published to this
-directory, preserving their location relative to the module-specific
-wsdl directory(META-INF/wsdl or WEB-INF/wsdl).
-
-Example :
-
-  For an ejb.jar whose webservices.xml wsdl-file element contains
-    META-INF/wsdl/a/Foo.wsdl
-
-  <wsdl-publish-location>file:/home/user1/publish
-  </wsdl-publish-location>
-
-  The final wsdl will be stored in /home/user1/publish/a/Foo.wsdl
-
--->
-<!ELEMENT wsdl-publish-location ( #PCDATA )>
-
 <!-- The servlet element specifies servlet specific bindings. Currently this
 is only the run-as principal identity.
 

Modified: branches/JEE5_TCK/server/src/resources/dtd/jboss_5_0.dtd
===================================================================
--- branches/JEE5_TCK/server/src/resources/dtd/jboss_5_0.dtd	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/server/src/resources/dtd/jboss_5_0.dtd	2006-10-26 23:53:25 UTC (rev 57868)
@@ -17,15 +17,6 @@
   <enforce-ejb-restrictions />
   <security-domain />
   <unauthenticated-principal />
-  <webservices>
-    <context-root>
-    <webservice-description>
-      <webservice-description-name>
-      <config-name>
-      <config-file>
-      <wsdl-publish-location>
-    </webservice-description>
-  <webservices>
 
   <enterprise-beans>
 
@@ -167,7 +158,7 @@
 <!ELEMENT jboss (loader-repository?, jmx-name?, enforce-ejb-restrictions?,
  security-domain?, missing-method-permissions-excluded-mode?,
  unauthenticated-principal?, exception-on-rollback?,
- webservices?, enterprise-beans?, assembly-descriptor?,
+ enterprise-beans?, assembly-descriptor?,
  resource-managers?, invoker-proxy-bindings?, container-configurations?)>
 
 <!-- The loader-repository specifies the name of the UnifiedLoaderRepository
@@ -429,59 +420,11 @@
   the beans. These informations, such as jndi names, resource managers and
   container configurations, are specific to jboss and not described in
   ejb-jar.xml.
-
   jboss will provide a standard behaviour if no enterprise-beans element
   is found, see container-configurations, jndi-name and resource-managers
   for defaults.
-
   Used in: jboss
 -->
-<!ELEMENT webservices (context-root?, webservice-description*)>
-
-<!-- The context-root element specifies the context root of the web
-application that the EJB service endpoints are deployed to. 
-If it is not specified it will be derived from the deployment short name.
--->
-<!ELEMENT context-root (#PCDATA)>
-
-<!--
-Runtime information about a web service.
-wsdl-publish-location is optionally used to specify
-where the final wsdl and any dependent files should be stored.  This location
-resides on the file system from which deployment is initiated.
--->
-<!ELEMENT webservice-description ( webservice-description-name, config-name?, config-file?, wsdl-publish-location? )>
-
-<!--
-Unique name of a webservice within a module. It corresponds to the <webservice-description-name>
-element in webservices.xml
--->
-<!ELEMENT webservice-description-name ( #PCDATA )>
-
-<!--
-file: URL of a directory to which a web-service-description's wsdl should be
-published during deployment.  Any required files will be published to this
-directory, preserving their location relative to the module-specific
-wsdl directory(META-INF/wsdl or WEB-INF/wsdl).
-Example :
-  For an ejb.jar whose webservices.xml wsdl-file element contains
-    META-INF/wsdl/a/Foo.wsdl
-  <wsdl-publish-location>file:/home/user1/publish
-  </wsdl-publish-location>
-  The final wsdl will be stored in /home/user1/publish/a/Foo.wsdl
--->
-<!ELEMENT wsdl-publish-location ( #PCDATA )>
-
-<!--
-  The enterprise-beans element contains additional information about
-  the beans. These informations, such as jndi names, resource managers and
-  container configurations, are specific to jboss and not described in
-  ejb-jar.xml.
-  jboss will provide a standard behaviour if no enterprise-beans element
-  is found, see container-configurations, jndi-name and resource-managers
-  for defaults.
-  Used in: jboss
--->
 <!ELEMENT enterprise-beans ((session | entity | message-driven)*)>
 
 <!--
@@ -703,19 +646,11 @@
         <service-ref-name>OrganizationService</service-ref-name>
         <config-name>Secure Client Config</config-name>
         <config-file>META-INF/jbossws-client-config.xml</config-file>
-        <port-component-ref>
-          <service-endpoint-interface>com.dot.SEI</service-endpoint-interface>
-          <call-property>
-            <prop-name>X</prop-name>
-            <prop-value>Y</prop-value>
-          </call-property>
-        </port-component-ref>
     </service-ref>
 -->
-<!ELEMENT service-ref (service-ref-name, config-name?, config-file?, port-component-ref*, wsdl-override?, call-property*)>
+<!ELEMENT service-ref (service-ref-name, config-name?, config-file?, wsdl-override?)>
 
-<!-- The service-ref-name element gives the ENC relative name used
-in the ejb-jar.xml service-ref-name element.
+<!-- The service-ref-name element gives the ENC relative name used by @WebServiceRef.name
 
 Used in: service-ref
 -->
@@ -723,46 +658,24 @@
 
 <!-- The optional config-name element gives the client configuration name that must be present in
 the configuration given by element config-file. 
-	
-The default is: Standard Client
 
-Used in: service-ref, webservice-description
+Used in: service-ref
 -->
 <!ELEMENT config-name (#PCDATA)>
 
 <!-- The optional config-file element gives the to a URL or resource name for the client configuration.
-The default is: META-INF/standard-jbossws-client-config.xml
 
-Used in: service-ref, webservice-description
+Used in: service-ref
 -->
 <!ELEMENT config-file (#PCDATA)>
 
-<!-- The port-component-ref element provides additional information about
-the standard j2ee service-reference/port-component-ref. Currently this includes
-properties that should be associated with the call/stub for the port.
+<!-- The wsdl-override element the actual wsdl docuement the web service client
+uses to connect to the remote service. 
 
 Used in: service-ref
 -->
-<!ELEMENT port-component-ref (service-endpoint-interface?, call-property*)>
+<!ELEMENT wsdl-override ( #PCDATA )>
 
-<!-- Fully qualified name of service endpoint interface
--->
-<!ELEMENT service-endpoint-interface ( #PCDATA )>
-
-<!-- Arbitrary jaxrpc property values that should be set on a Call object
-before it's returned to the web service client. The valid properties can be any
-properties supported by the jaxrpc Call implementation.
--->
-<!ELEMENT call-property ( prop-name, prop-value )>
-
-<!-- The string value of a property name
--->
-<!ELEMENT prop-name (#PCDATA)>
-
-<!-- The string value of a property value
--->
-<!ELEMENT prop-value (#PCDATA)>
-
 <!--
   The security-identity element specifies whether a specific run-as identity is to be
   used. If there is a run-as role defined for an enterprise bean, there can also be a
@@ -1675,67 +1588,7 @@
 -->  
 <!ELEMENT caller-propagation ( #PCDATA) >
 
-<!-- The port-component element specifies a mapping from a webservice
-port-component whose service-impl-bean/ejb-link value maps to an ejb.
-
-Used in: session
--->
-<!ELEMENT port-component (port-component-name, port-component-uri?, auth-method?,
- transport-guarantee?) >
-
-<!-- Maps to the port-component-name in the webservices.xml descriptor.
-
-Used in: port-component
--->
-<!ELEMENT port-component-name (#PCDATA) >
-
-<!-- Relative path that is appended to the <context-root> element to form fully qualified
-endpoint address for a web service endpoint. 
-
-For backwards compatibility, it may also be the absolute path starting with web context root 
-to form fully qualified endpoint address for a web service endpoint. In this case, the port component uri
-must contain at least two token seperated by '/'. The first token is the web context root,
-which must be identical among all port component uris in a given deployment.
-
-
-Used in: port-component
--->
-<!ELEMENT port-component-uri (#PCDATA) >
-
 <!--
-The transport-guarantee element specifies that the communication
-between client and server should be NONE, INTEGRAL, or
-CONFIDENTIAL. NONE means that the application does not require any
-transport guarantees. A value of INTEGRAL means that the application
-requires that the data sent between the client and server be sent in
-such a way that it can't be changed in transit. CONFIDENTIAL means
-that the application requires that the data be transmitted in a
-fashion that prevents other entities from observing the contents of
-the transmission. In most cases, the presence of the INTEGRAL or
-CONFIDENTIAL flag will indicate that the use of SSL is required.
-
-Used in: port-component
--->
-<!ELEMENT transport-guarantee (#PCDATA)>
-
-<!--
-This is a valid URL pointing to a final WSDL document. It is optional.
-If specified, the WSDL document at this URL will be used during
-deployment instead of the WSDL document associated with the
-service-ref in the standard deployment descriptor.
-
-Examples :
-
-  // available via HTTP
-  <wsdl-override>http://localhost:8000/myservice/myport?WSDL</wsdl-override>
-
-  // in a file
-  <wsdl-override>file:/home/user1/myfinalwsdl.wsdl</wsdl-override>
-
--->
-<!ELEMENT wsdl-override ( #PCDATA )>
-
-<!--
 Activation config
 
 used in message-driven and proxy-factory-config

Modified: branches/JEE5_TCK/tomcat/src/main/org/jboss/web/metamodel/descriptor/JBossWebDDObjectFactory.java
===================================================================
--- branches/JEE5_TCK/tomcat/src/main/org/jboss/web/metamodel/descriptor/JBossWebDDObjectFactory.java	2006-10-26 22:23:19 UTC (rev 57867)
+++ branches/JEE5_TCK/tomcat/src/main/org/jboss/web/metamodel/descriptor/JBossWebDDObjectFactory.java	2006-10-26 23:53:25 UTC (rev 57868)
@@ -30,6 +30,7 @@
 import org.jboss.metamodel.descriptor.MessageDestinationRef;
 import org.jboss.metamodel.descriptor.ResourceEnvRef;
 import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.metamodel.descriptor.ServiceRef;
 import org.jboss.util.xml.JBossEntityResolver;
 import org.jboss.xb.binding.JBossXBException;
 import org.jboss.xb.binding.ObjectModelFactory;
@@ -76,9 +77,8 @@
       if (dd == null) dd = new WebDD();
 
       factory = new JBossWebDDObjectFactory(dd);
-      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory
-              .newInstance();
-      //       unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, Boolean.TRUE);
+      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
+      unmarshallerFactory.setFeature(Unmarshaller.SCHEMA_VALIDATION, Boolean.TRUE);
       unmarshaller = unmarshallerFactory.newUnmarshaller();
       JBossEntityResolver entityResolver = new JBossEntityResolver();
       unmarshaller.setEntityResolver(entityResolver);
@@ -175,13 +175,18 @@
          }
       }
    }
-   public void addChild(WebDD parent, MessageDestinationRef ref,
-                        UnmarshallingContext navigator, String namespaceURI, String localName)
+   
+   public void addChild(WebDD parent, MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
    {
-      log.debug("addMessageDestinationRef, "+ref);
+      log.debug("addMessageDestinationRef, " + ref);
       parent.updateMessageDestinationRef(ref);
    }
 
+   public void addChild(WebDD parent, ServiceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addServiceRef(ref);
+   }
+
    public void addChild(WebDD parent, ResourceEnvRef ref,
                         UnmarshallingContext navigator, String namespaceURI, String localName)
    {




More information about the jboss-cvs-commits mailing list