Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 17:33:47 -0400 (Thu, 29 Mar 2007)
New Revision: 2718
Modified:
trunk/build/ant-import/build-hudson.xml
trunk/build/etc/component-info/jbossws-jboss50.xml
trunk/build/etc/component-info/jbossws.xml
trunk/build/version.properties
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java
Log:
Add classloader to bindServiceRef
Modified: trunk/build/ant-import/build-hudson.xml
===================================================================
--- trunk/build/ant-import/build-hudson.xml 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/build/ant-import/build-hudson.xml 2007-03-29 21:33:47 UTC (rev 2718)
@@ -87,7 +87,6 @@
<copy todir="${hudson.home}" overwrite="true">
<fileset dir="${build.dir}/hudson/hudson-home"/>
<filterset>
- <filter token="version.id" value="${version.id}"/>
<filter token="svn.basedir.local"
value="${svn.basedir.local}"/>
<filter token="svn.basename" value="${svn.basename}"/>
<filter token="svn.url" value="${svn.url}"/>
Modified: trunk/build/etc/component-info/jbossws-jboss50.xml
===================================================================
--- trunk/build/etc/component-info/jbossws-jboss50.xml 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/build/etc/component-info/jbossws-jboss50.xml 2007-03-29 21:33:47 UTC (rev 2718)
@@ -12,13 +12,13 @@
<compatible version="@repository.id(a)"/>
</import>
<import componentref="jboss/jbossxb">
- <compatible version="@jboss-jbossxb@-jboss50"/>
+ <compatible version="@jboss-jbossxb-jboss50@"/>
</import>
<import componentref="jboss/microcontainer">
- <compatible version="@jboss-microcontainer@-jboss50"/>
+ <compatible version="@jboss-microcontainer-jboss50@"/>
</import>
<import componentref="jboss/remoting">
- <compatible version="@jboss-remoting@-jboss50"/>
+ <compatible version="@jboss-remoting-jboss50@"/>
</import>
<export>
Modified: trunk/build/etc/component-info/jbossws.xml
===================================================================
--- trunk/build/etc/component-info/jbossws.xml 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/build/etc/component-info/jbossws.xml 2007-03-29 21:33:47 UTC (rev 2718)
@@ -14,15 +14,12 @@
<import componentref="apache-xmlsec">
<compatible version="@apache-xmlsec@"/>
- <compatible version="@apache-xmlsec@-brew"/>
</import>
<import componentref="ibm-wsdl4j">
<compatible version="@ibm-wsdl4j@"/>
- <compatible version="@ibm-wsdl4j@-brew"/>
</import>
<import componentref="javassist">
<compatible version="@javassist@"/>
- <compatible version="@javassist@-brew"/>
</import>
<import componentref="jbpm/bpel">
<compatible version="@jbpm-bpel@"/>
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/build/version.properties 2007-03-29 21:33:47 UTC (rev 2718)
@@ -6,7 +6,7 @@
specification.version=jbossws-1.2
version.id=2.0.0.DEV
-repository.id=2.0.0.CR5
+repository.id=2.0.0.DEV
implementation.title=JBoss Web Services (JBossWS)
implementation.url=http://www.jboss.org/products/jbossws
@@ -74,4 +74,4 @@
sun-servlet=2.4
woodstox=3.1.1
wscommons-policy=1.0
-xmlunit=1.0
+xmlunit=1.0
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-29
19:02:50 UTC (rev 2717)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-29
21:33:47 UTC (rev 2718)
@@ -53,25 +53,25 @@
private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
-
+
public ServiceRefMetaData newServiceRefMetaData()
{
return new UnifiedServiceRefMetaData();
}
- public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ServiceRefMetaData sref) throws NamingException
+ public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ClassLoader loader, ServiceRefMetaData sref) throws NamingException
{
if (sref.isProcessed())
{
- // Attempt to rebind service-ref
+ log.debug("Attempt to rebind the service-ref: " +
sref.getServiceRefName());
return;
}
-
+
UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
serviceRef.setVfsRoot(vfsRoot);
try
{
- if (getServiceRefType(serviceRef) == Type.JAXRPC)
+ if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
{
ServiceRefHandlerJAXRPC handler = new ServiceRefHandlerJAXRPC();
handler.setupServiceRef(encCtx, encName, serviceRef);
@@ -88,7 +88,7 @@
sref.setProcessed(true);
}
}
-
+
public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
{
return objectFactory.newChild(ref, navigator, namespaceURI, localName, attrs);
@@ -99,17 +99,17 @@
objectFactory.setValue(ref, navigator, namespaceURI, localName, value);
}
- private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef) throws
NamingException
+ private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader
loader) throws NamingException
{
// The service-ref-type is JAXWS specific
String serviceRefType = serviceRef.getServiceRefType();
if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
return Type.JAXWS;
-
+
// The mapping-file is JAXRPC specific
if (serviceRef.getMappingFile() != null)
return Type.JAXRPC;
-
+
String siName = serviceRef.getServiceInterface();
if (siName == null)
throw new IllegalStateException("<service-interface> cannot be
null");
@@ -117,16 +117,6 @@
if (siName.equals("javax.xml.rpc.Service"))
return Type.JAXRPC;
- log.info("Cannot determine service-ref type, assuming JAXWS");
- return Type.JAXWS;
-
- /*
- * Loading the SI like this might not work for webapp clients.
- *
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- URL rootURL = serviceRef.getVfsRoot().toURL();
- URLClassLoader loader = new URLClassLoader(new URL[] {rootURL}, ctxLoader);
-
try
{
Class siClass = loader.loadClass(siName);
@@ -134,13 +124,11 @@
return Type.JAXWS;
else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
return Type.JAXRPC;
- else
- throw new IllegalStateException("Illegal service interface: " +
siName);
+ else throw new IllegalStateException("Illegal service interface: " +
siName);
}
catch (ClassNotFoundException e)
{
throw new IllegalStateException("Cannot load <service-interface>:
" + siName);
}
- */
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-03-29
19:02:50 UTC (rev 2717)
+++ trunk/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-03-29
21:33:47 UTC (rev 2718)
@@ -45,5 +45,5 @@
void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value);
- void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ServiceRefMetaData sref) throws NamingException;
+ void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ClassLoader loader, ServiceRefMetaData sref) throws NamingException;
}