Author: heiko.braun(a)jboss.com
Date: 2007-07-31 10:46:49 -0400 (Tue, 31 Jul 2007)
New Revision: 4035
Modified:
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/WebServiceClientDeployer.java
Log:
Fix jboss-40 service deployments
Modified:
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/WebServiceClientDeployer.java
===================================================================
---
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/WebServiceClientDeployer.java 2007-07-31
09:40:33 UTC (rev 4034)
+++
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/WebServiceClientDeployer.java 2007-07-31
14:46:49 UTC (rev 4035)
@@ -23,24 +23,23 @@
// $Id$
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Iterator;
-
-import javax.naming.Context;
-
import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.system.ServiceMBeanSupport;
-import org.jboss.util.naming.Util;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.integration.ServiceRefHandler;
+import org.jboss.ws.integration.ServiceRefHandlerFactory;
import org.jboss.ws.integration.URLLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import javax.naming.Context;
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Iterator;
+
/**
* Binds a JAXRPC Service object in the client's ENC for every service-ref element in
the
* deployment descriptor.
@@ -67,13 +66,14 @@
ServiceRefMetaData serviceRef = (ServiceRefMetaData)serviceRefs.next();
String serviceRefName = serviceRef.getServiceRefName();
- UnifiedVirtualFile vfRoot = new ResourceLoaderAdapter(di.localCl);
+ UnifiedVirtualFile vfRoot = new ResourceLoaderAdapter(di.localCl); // Why
this?
UnifiedServiceRefMetaData usr =
ServiceRefMetaDataAdapterFactory.newInstance().buildServiceRefMetaData(vfRoot,
serviceRef);
- usr.setVfsRoot(new URLLoaderAdapter(getDeploymentURL(di)));
+ URLLoaderAdapter urlLoaderAdapter = new
URLLoaderAdapter(getDeploymentURL(di));
+ usr.setVfsRoot(urlLoaderAdapter);
- ServiceReferenceable ref = new ServiceReferenceable(usr);
- Util.bind(envCtx, serviceRefName, ref);
-
+ ServiceRefHandler serviceRefHandler =
ServiceRefHandlerFactory.getServiceRefHandler();
+ serviceRefHandler.bindServiceRef(envCtx, serviceRefName, urlLoaderAdapter ,
di.ucl, usr);
+
log.debug("Webservice binding: java:comp/env/" + serviceRefName);
}
}