Author: heiko.braun(a)jboss.com
Date: 2008-01-16 04:23:35 -0500 (Wed, 16 Jan 2008)
New Revision: 5474
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefMetaData.java
Log:
Fix JBWS1841: WebServiceRef injection from DD doesn't work. Added injection-target
properties to ServiceRefMetaData
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2008-01-15
23:15:21 UTC (rev 5473)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2008-01-16
09:23:35 UTC (rev 5474)
@@ -23,15 +23,6 @@
// $Id$
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -39,6 +30,15 @@
import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
import org.w3c.dom.Element;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
/**
* The metdata data from service-ref element in web.xml, ejb-jar.xml, and
* application-client.xml.
@@ -93,6 +93,9 @@
// A flag that should be set when this service-ref has been bound.
private transient boolean processed;
+ // Maps 'injection-target-class' to 'injection-target-name'
+ private List<String[]> injectionTargets = new LinkedList<String[]>();
+
public UnifiedServiceRefMetaData(UnifiedVirtualFile vfRoot)
{
this.vfsRoot = vfRoot;
@@ -110,8 +113,8 @@
configFile = sourceRef.configFile;
wsdlOverride = sourceRef.wsdlOverride;
handlerChain = sourceRef.handlerChain;
- callProperties = sourceRef.callProperties;
-
+ callProperties = sourceRef.callProperties;
+
if (serviceQName == null && sourceRef.serviceQName != null)
serviceQName = sourceRef.serviceQName;
@@ -392,6 +395,22 @@
this.anElement = anElement;
}
+ public void registerInjectionTarget(String classname)
+ {
+ this.injectionTargets.add( new String[]{classname, null} );
+ }
+
+ public void finalizeInjectionTarget(String propName)
+ {
+ int index = this.injectionTargets.isEmpty() ? 0 : this.injectionTargets.size() -
1;
+ this.injectionTargets.get(index)[1] = propName;
+ }
+
+ public List<String[]> getInjectionTargets()
+ {
+ return this.injectionTargets;
+ }
+
@Override
public void importStandardXml(Element root)
{
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefMetaData.java 2008-01-15
23:15:21 UTC (rev 5473)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefMetaData.java 2008-01-16
09:23:35 UTC (rev 5474)
@@ -23,10 +23,11 @@
// $Id$
+import org.w3c.dom.Element;
+
import java.io.Serializable;
+import java.util.List;
-import org.w3c.dom.Element;
-
/**
* An abstract service-ref meta data object.
*
@@ -46,6 +47,8 @@
public abstract boolean isProcessed();
public abstract void setProcessed(boolean flag);
+
+ public abstract List<String[]> getInjectionTargets();
@Deprecated
public abstract void importStandardXml(Element element);
Show replies by date