[jboss-cvs] JBossAS SVN: r58121 - in trunk: build deployment/src/main/org/jboss/deployment/services ejb3/src/main ejb3/src/main/org/jboss/ejb3 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 tomcat/src/main/org/jboss/web/tomcat/tc6
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Nov 4 14:58:16 EST 2006
Author: thomas.diesler at jboss.com
Date: 2006-11-04 14:57:58 -0500 (Sat, 04 Nov 2006)
New Revision: 58121
Added:
trunk/ejb3/src/main/org/jboss/injection/WebServiceRefFieldInjector.java
trunk/ejb3/src/main/org/jboss/injection/WebServiceRefMethodInjector.java
Removed:
trunk/ejb3/src/main/javax/
trunk/ejb3/src/main/org/jboss/injection/WebServiceHandler.java
trunk/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java
Modified:
trunk/build/build-thirdparty.xml
trunk/deployment/src/main/org/jboss/deployment/services/DeploymentManagerService.java
trunk/ejb3/src/main/org/jboss/ejb3/EJBContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
trunk/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
trunk/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
trunk/ejb3/src/main/org/jboss/injection/EjbEncInjector.java
trunk/ejb3/src/main/org/jboss/injection/InjectionUtil.java
trunk/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java
trunk/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java
trunk/ejb3/src/main/org/jboss/injection/ResourceHandler.java
trunk/server/src/main/org/jboss/metadata/BeanMetaData.java
trunk/server/src/main/org/jboss/metadata/ClientMetaData.java
trunk/server/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
trunk/server/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
trunk/server/src/main/org/jboss/metamodel/descriptor/Ref.java
trunk/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java
trunk/server/src/resources/dtd/jboss-client_5_0.dtd
trunk/server/src/resources/dtd/jboss-web_5_0.dtd
trunk/server/src/resources/dtd/jboss_5_0.dtd
trunk/tomcat/src/main/org/jboss/web/metamodel/descriptor/JBossWebDDObjectFactory.java
trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/TomcatInjectionContainer.java
Log:
Merge from branch JEE5_TCK\nImplement <service-ref> overrides for @WebServiceRef\nUpdate to jbossxb-1.0.0.CR7
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/build/build-thirdparty.xml 2006-11-04 19:57:58 UTC (rev 58121)
@@ -92,14 +92,14 @@
<componentref name="jboss/common-logging-log4j" version="2.0.1.GA"/>
<componentref name="jboss/common-logging-jdk" version="2.0.1.GA"/>
<componentref name="jboss/common-logging-spi" version="2.0.1.GA"/>
- <componentref name="jboss/jbossxb" version="1.0.0.CR6"/>
+ <componentref name="jboss/jbossxb" version="1.0.0.CR7"/>
<componentref name="jboss/jbossws" version="snapshot"/>
<componentref name="jboss/messaging" version="1.0.1.GA"/>
<componentref name="jboss/microcontainer" version="snapshot"/>
<componentref name="jboss/microcontainer14" version="snapshot"/>
<componentref name="jboss/remoting" version="2.2.0.Alpha2"/>
<componentref name="jboss/jbossretro" version="1.0.4.GA"/>
- <componentref name="jboss/jbossts" version="snapshot"/>
+ <componentref name="jboss/jbossts" version="snapshot"/>
<componentref name="jboss/security-spi" version="snapshot"/>
<componentref name="jboss/security" version="snapshot"/>
<componentref name="jboss/serialization" version="1.0.3.GA"/>
Modified: trunk/deployment/src/main/org/jboss/deployment/services/DeploymentManagerService.java
===================================================================
--- trunk/deployment/src/main/org/jboss/deployment/services/DeploymentManagerService.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/deployment/src/main/org/jboss/deployment/services/DeploymentManagerService.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -157,6 +157,7 @@
{
return this.uploadDir;
}
+
public void setUploadDir(File uploadDir)
{
this.uploadDir = uploadDir;
Modified: trunk/ejb3/src/main/org/jboss/ejb3/EJBContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/EJBContainer.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/ejb3/EJBContainer.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -50,7 +50,7 @@
import org.jboss.injection.PersistenceContextHandler;
import org.jboss.injection.PersistenceUnitHandler;
import org.jboss.injection.ResourceHandler;
-import org.jboss.injection.WebServiceHandler;
+import org.jboss.injection.WebServiceRefHandler;
import org.jboss.logging.Logger;
import org.jboss.metamodel.descriptor.PersistenceContextRef;
import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
@@ -261,7 +261,7 @@
handlers.add(new PersistenceContextHandler());
handlers.add(new PersistenceUnitHandler());
handlers.add(new ResourceHandler());
- handlers.add(new WebServiceHandler());
+ handlers.add(new WebServiceRefHandler());
ClassLoader old = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(classloader);
Modified: trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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: trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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: trunk/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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: trunk/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -48,6 +48,7 @@
import org.jboss.metamodel.descriptor.ResourceEnvRef;
import org.jboss.metamodel.descriptor.ResourceRef;
import org.jboss.metamodel.descriptor.SecurityRole;
+import org.jboss.metamodel.descriptor.ServiceRef;
/**
* Represents the jboss.xml deployment descriptor for the 2.1 schema
@@ -77,9 +78,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);
@@ -714,6 +714,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: trunk/ejb3/src/main/org/jboss/injection/EjbEncInjector.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/EjbEncInjector.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/injection/EjbEncInjector.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -92,6 +92,7 @@
try
{
if (jndiName == null) throw new RuntimeException("Failed to populate ENC: " + encName + " global jndi name was null");
+ log.debug(" " + encName + " --> " + jndiName);
Util.rebind(container.getEnc(), encName, new LinkRef(jndiName));
}
catch (NamingException e)
Modified: trunk/ejb3/src/main/org/jboss/injection/InjectionUtil.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/InjectionUtil.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/injection/InjectionUtil.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -131,6 +131,7 @@
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields)
{
+ log.trace("process field annotation for " + field.toGenericString());
for (InjectionHandler handler : handlers)
{
handler.handleFieldAnnotations(field, container, classInjectors);
@@ -217,13 +218,13 @@
encName = encName.toLowerCase();
}
- encName = "env/" + method.getDeclaringClass().getName() + "/" + encName;
+ encName = getEncName(method.getDeclaringClass()) + "/" + encName;
return encName;
}
public static String getEncName(Field field)
{
- return "env/" + field.getDeclaringClass().getName() + "/" + field.getName();
+ return getEncName(field.getDeclaringClass()) + "/" + field.getName();
}
public static Object getAnnotation(Class annotation, EJBContainer container, Class annotatedClass, boolean isContainer)
Modified: trunk/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/injection/JndiFieldInjector.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -78,23 +78,12 @@
try
{
dependency = ctx.lookup(jndiName);
-
- if (dependency instanceof javax.xml.rpc.Service && !field.isAssignableFrom(javax.xml.rpc.Service.class))
- {
- javax.xml.rpc.Service service = (javax.xml.rpc.Service)dependency;
- dependency = service.getPort(field);
- }
}
catch (NamingException e)
{
e.printStackTrace();
throw new RuntimeException("Unable to inject jndi dependency: " + jndiName + " into field " + field, e);
}
- catch (javax.xml.rpc.ServiceException e)
- {
- e.printStackTrace();
- throw new RuntimeException("Unable to inject jndi webservice dependency: " + jndiName + " into field " + field, e);
- }
return dependency;
}
@@ -139,4 +128,9 @@
throw new RuntimeException(e);
}
}
+
+ public String toString()
+ {
+ return super.toString() + "{field=" + field + ",jndiName=" + jndiName + "}";
+ }
}
Modified: trunk/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/injection/JndiMethodInjector.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -67,24 +67,12 @@
try
{
dependency = ctx.lookup(jndiName);
-
- if (dependency instanceof javax.xml.rpc.Service && !param.isAssignableFrom(javax.xml.rpc.Service.class))
- {
- javax.xml.rpc.Service service = (javax.xml.rpc.Service)dependency;
- dependency = service.getPort(param);
- }
}
catch (NamingException e)
{
e.printStackTrace();
throw new RuntimeException("Unable to @Inject jndi dependency: " + jndiName + " into method " + setMethod, e);
}
- catch (javax.xml.rpc.ServiceException e)
- {
- e.printStackTrace();
- throw new RuntimeException("Unable to @Inject webservice jndi dependency: " + jndiName + " into method " + setMethod, e);
- }
-
return dependency;
}
Modified: trunk/ejb3/src/main/org/jboss/injection/ResourceHandler.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/ResourceHandler.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/injection/ResourceHandler.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -57,6 +57,7 @@
String encName = "env/" + envEntry.getEnvEntryName();
InjectionUtil.injectionTarget(encName, envEntry, container, container.getEncInjections());
if (container.getEncInjectors().containsKey(encName)) continue;
+ log.trace("adding env-entry injector " + encName);
container.getEncInjectors().put(encName, new EnvEntryEncInjector(encName, envEntry.getEnvEntryType(), envEntry.getEnvEntryValue()));
}
}
@@ -245,6 +246,8 @@
Resource ref = field.getAnnotation(Resource.class);
if (ref == null) return;
+ log.trace("field " + field + " has @Resource");
+
String encName = ref.name();
if (encName == null || encName.equals(""))
{
@@ -292,6 +295,10 @@
{
injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
}
+ else
+ {
+ log.warn("Not injecting " + field.getName() + ", no matching enc injector " + encName + " found");
+ }
}
else
{
@@ -300,7 +307,7 @@
String mappedName = ref.mappedName();
if (mappedName == null || mappedName.equals(""))
{
- throw new RuntimeException("You did not specify a @Resource.mappedName() on " + field + " and there is no binding for that enc name in XML");
+ throw new RuntimeException("You did not specify a @Resource.mappedName() on " + field + " and there is no binding for enc name " + encName + " in XML");
}
container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@Resource"));
}
Deleted: trunk/ejb3/src/main/org/jboss/injection/WebServiceHandler.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/WebServiceHandler.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/ejb3/src/main/org/jboss/injection/WebServiceHandler.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -1,122 +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.injection;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-import org.jboss.metamodel.descriptor.WebServiceRef;
-import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.logging.Logger;
-
-/**
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision$</tt>
- */
-public class WebServiceHandler implements InjectionHandler
-{
- private static final Logger log = Logger.getLogger(WebServiceHandler.class);
-
- public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
- {
- if (xml == null) return;
- if (xml.getWebServiceRefs() == null) return;
- for (WebServiceRef wsRef : xml.getWebServiceRefs())
- {
- if (wsRef.getMappedName() == null || wsRef.getMappedName().equals(""))
- throw new RuntimeException("mapped-name is required for <service-ref> " + wsRef.getServiceRefName() + " of " + container.getIdentifier());
-
- String encName = "env/" + wsRef.getServiceRefName();
- if (!container.getEncInjectors().containsKey(encName))
- {
- container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, wsRef.getMappedName(), "jndi ref"));
- }
- InjectionUtil.injectionTarget(encName, wsRef, container, container.getEncInjections());
- }
- }
-
- public void handleClassAnnotations(Class clazz, InjectionContainer container)
- {
- javax.xml.ws.WebServiceRef ref = container.getAnnotation(javax.xml.ws.WebServiceRef.class, clazz);
- if (ref == null) return;
- String encName = ref.name();
- if (encName == null || encName.equals(""))
- {
- throw new RuntimeException("JBoss requires name() for class level @WebServiceRef");
- }
- encName = "env/" + ref.name();
- if (container.getEncInjectors().containsKey(encName)) return;
-
- String mappedName = ref.mappedName();
- if (mappedName == null || mappedName.equals(""))
- {
- throw new RuntimeException("You did not specify a @WebServiceRef.mappedName() on " + clazz.getName() + " and there is no binding for that enc name in XML");
- }
- container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@WebServiceRef"));
- }
-
- 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;
- if (!method.getName().startsWith("set"))
- throw new RuntimeException("@ javax.xml.ws.WebServiceRef can only be used with a set method: " + method);
- String encName = ref.name();
- if (encName == null || encName.equals(""))
- {
- encName = InjectionUtil.getEncName(method);
- }
- else
- {
- encName = "env/" + encName;
- }
- if (!container.getEncInjectors().containsKey(encName))
- {
- container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@ javax.xml.ws.WebServiceRef"));
- }
-
- injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
- }
-
- public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
- {
- 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(""))
- {
- encName = InjectionUtil.getEncName(field);
- }
- else
- {
- encName = "env/" + encName;
- }
- if (!container.getEncInjectors().containsKey(encName))
- {
- container.getEncInjectors().put(encName, new LinkRefEncInjector(encName, ref.mappedName(), "@ javax.xml.ws.WebServiceRef"));
- }
-
- injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
- }
-}
Copied: trunk/ejb3/src/main/org/jboss/injection/WebServiceRefFieldInjector.java (from rev 57787, branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefFieldInjector.java)
Copied: trunk/ejb3/src/main/org/jboss/injection/WebServiceRefMethodInjector.java (from rev 57787, branches/JEE5_TCK/ejb3/src/main/org/jboss/injection/WebServiceRefMethodInjector.java)
Modified: trunk/server/src/main/org/jboss/metadata/BeanMetaData.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/BeanMetaData.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/main/org/jboss/metadata/BeanMetaData.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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: trunk/server/src/main/org/jboss/metadata/ClientMetaData.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/ClientMetaData.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/main/org/jboss/metadata/ClientMetaData.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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: trunk/server/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
===================================================================
--- trunk/server/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -21,22 +21,13 @@
*/
package org.jboss.metamodel.descriptor;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
+import javax.persistence.PersistenceContextType;
import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.EnvEntry;
-import org.jboss.metamodel.descriptor.InjectionTarget;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.SecurityRole;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
-import javax.persistence.PersistenceContextType;
-
/**
* @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
* @version <tt>$Revision$</tt>
@@ -102,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)
{
@@ -164,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);
@@ -375,33 +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("service-ref-name"))
{
- ref.setServiceRefName(getValue(localName, value));
+ ref.setEncName(getValue(localName, value));
}
- else if (localName.equals("service-res-type"))
+ else if (localName.equals("wsdl-override"))
{
- ref.setResType(getValue(localName, value));
+ ref.setWsdlLocation(getValue(localName, value));
}
- else if (localName.equals("service-interface"))
+ else if (localName.equals("config-name"))
{
- ref.setServiceInterface(getValue(localName, value));
+ ref.setConfigName(getValue(localName, value));
}
- else if (localName.equals("wsdl-file"))
+ else if (localName.equals("config-file"))
{
- ref.setWsdlFile(getValue(localName, value));
+ ref.setConfigFile(getValue(localName, value));
}
- else if (localName.equals("jaxrpc-mapping-file"))
- {
- ref.setJaxRpcMappingFile(getValue(localName, value));
- }
- else if (localName.equals("mapped-name"))
- {
- ref.setMappedName(getValue(localName, value));
- }
}
public void setValue(SecurityRole role, UnmarshallingContext navigator,
@@ -517,7 +500,7 @@
}
else if (localName.equals("service-ref"))
{
- child = new WebServiceRef();
+ child = new ServiceRef();
}
else if (localName.equals("jndi-ref"))
{
Modified: trunk/server/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
===================================================================
--- trunk/server/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -36,7 +36,6 @@
import org.jboss.metamodel.descriptor.ResourceEnvRef;
import org.jboss.metamodel.descriptor.ResourceRef;
import org.jboss.metamodel.descriptor.ServiceRef;
-import org.jboss.metamodel.descriptor.WebServiceRef;
/**
* @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
@@ -55,7 +54,6 @@
/** An index of MessageDestinationRef keyed by message-destination-link values */
protected HashMap<String, MessageDestinationRef> messageDestinationRefsByLink = new HashMap<String, MessageDestinationRef>();
protected HashMap<String, ServiceRef> serviceRefs = new HashMap<String, ServiceRef>();
- protected HashMap<String, WebServiceRef> webServiceRefs = new HashMap<String, WebServiceRef>();
protected HashMap<String, JndiRef> jndiRefs = new HashMap<String, JndiRef>();
protected List<PersistenceContextRef> persistenceContextRefs = new ArrayList<PersistenceContextRef>();
protected List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
@@ -145,17 +143,7 @@
{
serviceRefs.put(ref.getEncName(), ref);
}
-
- public Collection<WebServiceRef> getWebServiceRefs()
- {
- return webServiceRefs.values();
- }
-
- public void addWebServiceRef(WebServiceRef ref)
- {
- webServiceRefs.put(ref.getServiceRefName(), ref);
- }
-
+
public void updateEjbRef(EjbRef updatedRef)
{
EjbRef ref = (EjbRef)ejbRefs.get(updatedRef.getEjbRefName());
Modified: trunk/server/src/main/org/jboss/metamodel/descriptor/Ref.java
===================================================================
--- trunk/server/src/main/org/jboss/metamodel/descriptor/Ref.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/main/org/jboss/metamodel/descriptor/Ref.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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();
+ }
}
Deleted: trunk/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java
===================================================================
--- trunk/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/main/org/jboss/metamodel/descriptor/WebServiceRef.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -1,135 +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;
-
-import org.jboss.logging.Logger;
-
-import org.jboss.metamodel.descriptor.Ref;
-
-/**
- * Represents a <resource-ref> element of the ejb-jar.xml deployment descriptor for the
- * 1.4 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @version <tt>$Revision$</tt>
- */
-public class WebServiceRef extends Ref
-{
- private static final Logger log = Logger.getLogger(WebServiceRef.class);
-
- private String serviceRefName;
-
- private String resType;
-
- private String serviceInterface;
-
- private String wsdlFile;
-
- private String mappedName;
-
- private String jndiName;
-
- private String jaxRpcMappingFile;
-
- public String getJaxRpcMappingFile()
- {
- return jaxRpcMappingFile;
- }
-
- public void setJaxRpcMappingFile(String jaxRpcMappingFile)
- {
- this.jaxRpcMappingFile = jaxRpcMappingFile;
- }
-
- public String getJndiName()
- {
- return jndiName;
- }
-
- public void setJndiName(String jndiName)
- {
- this.jndiName = jndiName;
- }
-
- public String getMappedName()
- {
- return mappedName;
- }
-
- public void setMappedName(String mappedName)
- {
- this.mappedName = mappedName;
- }
-
- public String getServiceRefName()
- {
- return serviceRefName;
- }
-
- public void setServiceRefName(String serviceRefName)
- {
- this.serviceRefName = serviceRefName;
- }
-
- public String getResType()
- {
- return resType;
- }
-
- public void setResType(String resType)
- {
- this.resType = resType;
- }
-
- public String getServiceInterface()
- {
- return serviceInterface;
- }
-
- public void setServiceInterface(String serviceInterface)
- {
- this.serviceInterface = serviceInterface;
- }
-
- public String getWsdlFile()
- {
- return wsdlFile;
- }
-
- public void setWsdlFile(String wsdlFile)
- {
- this.wsdlFile = wsdlFile;
- }
-
- public String toString()
- {
- StringBuffer sb = new StringBuffer(100);
- sb.append("[" + this.getClass().getName() + ": ");
- sb.append("serviceRefName=").append(serviceRefName);
- sb.append(", jndiName=").append(jndiName);
- sb.append(", jaxRpcMappingFile=").append(jaxRpcMappingFile);
- sb.append(", resType=").append(resType);
- sb.append(", mappedName=").append(mappedName);
- sb.append("]");
- return sb.toString();
- }
-}
Modified: trunk/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java
===================================================================
--- trunk/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -32,15 +32,14 @@
import java.util.LinkedHashMap;
import java.util.Properties;
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
import org.jboss.deployment.DeploymentException;
+import org.jboss.logging.Logger;
import org.jboss.metadata.MetaData;
import org.jboss.metadata.Ref;
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
@@ -54,6 +53,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
@@ -254,6 +256,30 @@
return callProperties;
}
+ public static boolean isValidDoctype(Element element)
+ {
+ // Verify J2EE-1.4
+ String nsURI = element.getOwnerDocument().getDocumentElement().getNamespaceURI();
+ boolean isValid = "http://java.sun.com/xml/ns/j2ee".equals(nsURI);
+
+ // Verify JBoss-4.0
+ DocumentType doctype = element.getOwnerDocument().getDoctype();
+ if (isValid == false && doctype != null)
+ {
+ String publicId = doctype.getPublicId();
+ 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);
+ }
+
+ if (isValid == false)
+ {
+ String dtstr = (doctype != null ? "[public=" + doctype.getPublicId() + ",system=" + doctype.getSystemId() + "]" : null);
+ log.debug("Skip <service-ref> for: nsURI=" + nsURI + ",doctype=" + dtstr);
+ }
+ return isValid;
+ }
+
public void importStandardXml(Element element) throws DeploymentException
{
serviceRefName = MetaData.getUniqueChildContent(element, "service-ref-name");
Modified: trunk/server/src/resources/dtd/jboss-client_5_0.dtd
===================================================================
--- trunk/server/src/resources/dtd/jboss-client_5_0.dtd 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/resources/dtd/jboss-client_5_0.dtd 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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,20 +165,24 @@
-->
<!ELEMENT wsdl-override (#PCDATA)>
-<!-- Fully qualified name of service endpoint interface
+<!-- 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
+specify a message-destination-link to a logical message-destination.
+Example:
+ <message-destination-ref>
+ <message-destination-ref-name>MyQueue</message-destination-ref-name>
+ <jndi-name>queue/GlobalQueue</jndi-name>
+ </service-ref>
-->
-<!ELEMENT service-endpoint-interface ( #PCDATA )>
+<!ELEMENT message-destination-ref (message-destination-ref-name, jndi-name)>
-<!-- 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.
+<!-- The message-destination-ref-name specifies the name of the application-client.xml
+message-destination-ref-name element to which this mapping applies.
-->
-<!ELEMENT call-property ( prop-name, prop-value )>
+<!ELEMENT message-destination-ref-name (#PCDATA)>
-<!-- The string value of a property name
+<!-- The depends element gives a JMX ObjectName of a service on which the
+container depends.
-->
-<!ELEMENT prop-name (#PCDATA)>
-
-<!-- The string value of a property value
--->
-<!ELEMENT prop-value (#PCDATA)>
+<!ELEMENT depends (#PCDATA)>
Modified: trunk/server/src/resources/dtd/jboss-web_5_0.dtd
===================================================================
--- trunk/server/src/resources/dtd/jboss-web_5_0.dtd 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/resources/dtd/jboss-web_5_0.dtd 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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: trunk/server/src/resources/dtd/jboss_5_0.dtd
===================================================================
--- trunk/server/src/resources/dtd/jboss_5_0.dtd 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/server/src/resources/dtd/jboss_5_0.dtd 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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: trunk/tomcat/src/main/org/jboss/web/metamodel/descriptor/JBossWebDDObjectFactory.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/metamodel/descriptor/JBossWebDDObjectFactory.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/tomcat/src/main/org/jboss/web/metamodel/descriptor/JBossWebDDObjectFactory.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -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)
{
Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/TomcatInjectionContainer.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/TomcatInjectionContainer.java 2006-11-04 17:18:54 UTC (rev 58120)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/TomcatInjectionContainer.java 2006-11-04 19:57:58 UTC (rev 58121)
@@ -39,7 +39,7 @@
import org.jboss.injection.PersistenceContextHandler;
import org.jboss.injection.PersistenceUnitHandler;
import org.jboss.injection.ResourceHandler;
-import org.jboss.injection.WebServiceHandler;
+import org.jboss.injection.WebServiceRefHandler;
import org.jboss.injection.InjectionUtil;
import org.jboss.logging.Logger;
import org.jboss.web.WebApplication;
@@ -332,7 +332,7 @@
handlers.add(new PersistenceContextHandler());
handlers.add(new PersistenceUnitHandler());
handlers.add(new ResourceHandler());
- handlers.add(new WebServiceHandler());
+ handlers.add(new WebServiceRefHandler());
ClassLoader old = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getClassloader());
More information about the jboss-cvs-commits
mailing list