[jbossws-commits] JBossWS SVN: r2461 - in trunk/integration-jboss40/src/main: java/org and 7 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Feb 23 15:33:41 EST 2007


Author: jason.greene at jboss.com
Date: 2007-02-23 15:33:41 -0500 (Fri, 23 Feb 2007)
New Revision: 2461

Added:
   trunk/integration-jboss40/src/main/java/org/
   trunk/integration-jboss40/src/main/java/org/jboss/
   trunk/integration-jboss40/src/main/java/org/jboss/ws/
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java
   trunk/integration-jboss40/src/main/resources/jbossws.sar/
   trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/
   trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml
   trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
Removed:
   trunk/integration-jboss40/src/main/java/org/jboss/
   trunk/integration-jboss40/src/main/java/org/jboss/ws/
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
   trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java
   trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/
   trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml
   trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
Log:
merge missing jboss40 integration


Copied: trunk/integration-jboss40/src/main/java/org (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/java/org)

Copied: trunk/integration-jboss40/src/main/java/org/jboss (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss)

Copied: trunk/integration-jboss40/src/main/java/org/jboss/ws (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws)

Copied: trunk/integration-jboss40/src/main/java/org/jboss/ws/integration (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration)

Copied: trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40 (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40)

Deleted: trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java	2007-02-23 20:32:50 UTC (rev 2460)
+++ trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java	2007-02-23 20:33:41 UTC (rev 2461)
@@ -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.ws.integration.jboss40;
-
-// $Id$
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.webservice.metadata.serviceref.HandlerMetaData;
-import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
-import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
-import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
-
-/**
- * Build container independent service ref meta data 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 05-May-2006
- */
-public class ServiceRefMetaDataAdaptor
-{
-   public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws IOException
-   {
-      UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
-      usrmd.setServiceRefName(srmd.getServiceRefName());
-      usrmd.setServiceInterface(srmd.getServiceInterface());
-      usrmd.setWsdlLocation(srmd.getWsdlURL());
-      usrmd.setMappingLocation(udi.getMetaDataFileURL(srmd.getJaxrpcMappingFile()));
-      usrmd.setServiceQName(srmd.getServiceQName());
-
-      LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
-      for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
-      {
-         UnifiedPortComponentRefMetaData upcmd = new UnifiedPortComponentRefMetaData();
-         upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
-         upcmd.setPortComponentLink(pcmd.getPortComponentLink());
-         upcmd.setCallProperties(pcmd.getCallProperties());
-         pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
-      }
-      usrmd.setPortComponentRefs(pcrefs);
-
-      ArrayList<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
-      for (HandlerMetaData hmd : srmd.getHandlers())
-      {
-         UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
-         uhmd.setHandlerName(hmd.getHandlerName());
-         uhmd.setHandlerClass(hmd.getHandlerClass());
-
-         for(String portname : hmd.getPortNames())
-         {
-            uhmd.addPortName(portname);   
-         }
-         for (InitParamMetaData ipmd : hmd.getInitParams())
-         {
-            HandlerInitParam ip = new HandlerInitParam();
-            ip.setParamName(ipmd.getParamName());
-            ip.setParamValue(ipmd.getParamValue());
-            uhmd.addInitParam(ip);
-         }
-         for (QName soapHeader : hmd.getSoapHeaders())
-         {
-            uhmd.addSoapHeader(soapHeader);
-         }
-         for (String soapRole : hmd.getSoapRoles())
-         {
-            uhmd.addSoapRole(soapRole);
-         }
-         handlers.add(uhmd);
-      }
-      usrmd.setHandlers(handlers);
-
-      usrmd.setConfigName(srmd.getConfigName());
-      usrmd.setConfigFile(srmd.getConfigFile());
-      usrmd.setWsdlOverride(srmd.getWsdlOverride());
-      usrmd.setCallProperties(srmd.getCallProperties());
-
-      return usrmd;
-   }
-}

Copied: trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java)
===================================================================
--- trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java	                        (rev 0)
+++ trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java	2007-02-23 20:33:41 UTC (rev 2461)
@@ -0,0 +1,107 @@
+/*
+ * 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.ws.integration.jboss40;
+
+// $Id$
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.webservice.metadata.serviceref.HandlerMetaData;
+import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
+import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
+import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
+
+/**
+ * Build container independent service ref meta data 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class ServiceRefMetaDataAdaptor
+{
+   public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws IOException
+   {
+      UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
+      usrmd.setServiceRefName(srmd.getServiceRefName());
+      usrmd.setServiceInterface(srmd.getServiceInterface());
+      usrmd.setWsdlLocation(srmd.getWsdlURL());
+      usrmd.setMappingLocation(udi.getMetaDataFileURL(srmd.getJaxrpcMappingFile()));
+      usrmd.setServiceQName(srmd.getServiceQName());
+
+      LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
+      for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
+      {
+         UnifiedPortComponentRefMetaData upcmd = new UnifiedPortComponentRefMetaData();
+         upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
+         upcmd.setPortComponentLink(pcmd.getPortComponentLink());
+         upcmd.setCallProperties(pcmd.getCallProperties());
+         pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
+      }
+      usrmd.setPortComponentRefs(pcrefs);
+
+      ArrayList<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
+      for (HandlerMetaData hmd : srmd.getHandlers())
+      {
+         UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
+         uhmd.setHandlerName(hmd.getHandlerName());
+         uhmd.setHandlerClass(hmd.getHandlerClass());
+
+         for(String portname : hmd.getPortNames())
+         {
+            uhmd.addPortName(portname);   
+         }
+         for (InitParamMetaData ipmd : hmd.getInitParams())
+         {
+            HandlerInitParam ip = new HandlerInitParam();
+            ip.setParamName(ipmd.getParamName());
+            ip.setParamValue(ipmd.getParamValue());
+            uhmd.addInitParam(ip);
+         }
+         for (QName soapHeader : hmd.getSoapHeaders())
+         {
+            uhmd.addSoapHeader(soapHeader);
+         }
+         for (String soapRole : hmd.getSoapRoles())
+         {
+            uhmd.addSoapRole(soapRole);
+         }
+         handlers.add(uhmd);
+      }
+      usrmd.setHandlers(handlers);
+
+      usrmd.setConfigName(srmd.getConfigName());
+      usrmd.setConfigFile(srmd.getConfigFile());
+      usrmd.setWsdlOverride(srmd.getWsdlOverride());
+      usrmd.setCallProperties(srmd.getCallProperties());
+
+      return usrmd;
+   }
+}

Deleted: trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java	2007-02-23 20:32:50 UTC (rev 2460)
+++ trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java	2007-02-23 20:33:41 UTC (rev 2461)
@@ -1,140 +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.ws.integration.jboss40;
-
-// $Id$
-
-import java.net.URL;
-import java.util.Iterator;
-
-import javax.naming.Context;
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.xml.rpc.JAXRPCException;
-
-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.WSException;
-import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.integration.jboss42.DeploymentInfoAdaptor;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
-
-/**
- * Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
- * deployment descriptor.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 15-Jan-2005
- */
-public class WebServiceClientDeployer extends ServiceMBeanSupport implements WebServiceClientDeployerMBean
-{
-   /**
-    * This binds a jaxrpc Service into the callers ENC for every service-ref element
-    *
-    * @param envCtx      ENC to bind the javax.rpc.xml.Service object to
-    * @param serviceRefs An iterator of the service-ref elements in the client deployment descriptor
-    * @param di          The client's deployment info
-    * @throws org.jboss.deployment.DeploymentException if it goes wrong
-    */
-   public void setupServiceRefEnvironment(Context envCtx, Iterator serviceRefs, DeploymentInfo di) throws DeploymentException
-   {
-      try
-      {
-         while (serviceRefs.hasNext())
-         {
-            ServiceRefMetaData serviceRef = (ServiceRefMetaData)serviceRefs.next();
-            String serviceRefName = serviceRef.getServiceRefName();
-
-            // Build the container independent deployment info
-            UnifiedDeploymentInfo udi = new JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
-            DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
-            
-            UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(udi, serviceRef);
-
-            JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
-            wsServiceRef.setJavaWsdlMapping(javaWsdlMapping);
-
-            Definition wsdlDefinition = getWsdlDefinition(wsServiceRef);
-            wsServiceRef.setWsdlDefinition(wsdlDefinition);
-
-            ServiceReferenceable ref = new ServiceReferenceable(wsServiceRef, udi);
-            Util.bind(envCtx, serviceRefName, ref);
-
-            log.debug("Webservice binding: java:comp/env/" + serviceRefName);
-         }
-      }
-      catch (Exception e)
-      {
-         throw new DeploymentException("Cannot bind webservice to client environment", e);
-      }
-   }
-
-   private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
-   {
-      JavaWsdlMapping javaWsdlMapping = null;
-      URL mappingURL = serviceRef.getMappingLocation();
-      if (mappingURL != null)
-      {
-         try
-         {
-            // setup the XML binding Unmarshaller
-            JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
-            javaWsdlMapping = mappingFactory.parse(mappingURL);
-         }
-         catch (Exception e)
-         {
-            throw new JAXRPCException("Cannot unmarshal jaxrpc-mapping-file: " + mappingURL, e);
-         }
-      }
-      return javaWsdlMapping;
-   }
-
-   private Definition getWsdlDefinition(UnifiedServiceRefMetaData serviceRef)
-   {
-      Definition wsdlDefinition = null;
-      {
-         URL wsdlOverride = serviceRef.getWsdlOverride();
-         URL wsdlURL = serviceRef.getWsdlLocation();
-         if (wsdlOverride == null && wsdlURL != null)
-         {
-            try
-            {
-               WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
-               wsdlDefinition = factory.parse(wsdlURL);
-            }
-            catch (WSDLException e)
-            {
-               throw new WSException("Cannot unmarshall wsdl, cause: " + e.toString());
-            }
-         }
-      }
-      return wsdlDefinition;
-   }
-}

Copied: trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java)
===================================================================
--- trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java	                        (rev 0)
+++ trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java	2007-02-23 20:33:41 UTC (rev 2461)
@@ -0,0 +1,140 @@
+/*
+ * 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.ws.integration.jboss40;
+
+// $Id$
+
+import java.net.URL;
+import java.util.Iterator;
+
+import javax.naming.Context;
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.xml.rpc.JAXRPCException;
+
+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.WSException;
+import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.jboss42.DeploymentInfoAdaptor;
+import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
+import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
+
+/**
+ * Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
+ * deployment descriptor.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 15-Jan-2005
+ */
+public class WebServiceClientDeployer extends ServiceMBeanSupport implements WebServiceClientDeployerMBean
+{
+   /**
+    * This binds a jaxrpc Service into the callers ENC for every service-ref element
+    *
+    * @param envCtx      ENC to bind the javax.rpc.xml.Service object to
+    * @param serviceRefs An iterator of the service-ref elements in the client deployment descriptor
+    * @param di          The client's deployment info
+    * @throws org.jboss.deployment.DeploymentException if it goes wrong
+    */
+   public void setupServiceRefEnvironment(Context envCtx, Iterator serviceRefs, DeploymentInfo di) throws DeploymentException
+   {
+      try
+      {
+         while (serviceRefs.hasNext())
+         {
+            ServiceRefMetaData serviceRef = (ServiceRefMetaData)serviceRefs.next();
+            String serviceRefName = serviceRef.getServiceRefName();
+
+            // Build the container independent deployment info
+            UnifiedDeploymentInfo udi = new JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
+            DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
+            
+            UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(udi, serviceRef);
+
+            JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
+            wsServiceRef.setJavaWsdlMapping(javaWsdlMapping);
+
+            Definition wsdlDefinition = getWsdlDefinition(wsServiceRef);
+            wsServiceRef.setWsdlDefinition(wsdlDefinition);
+
+            ServiceReferenceable ref = new ServiceReferenceable(wsServiceRef, udi);
+            Util.bind(envCtx, serviceRefName, ref);
+
+            log.debug("Webservice binding: java:comp/env/" + serviceRefName);
+         }
+      }
+      catch (Exception e)
+      {
+         throw new DeploymentException("Cannot bind webservice to client environment", e);
+      }
+   }
+
+   private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
+   {
+      JavaWsdlMapping javaWsdlMapping = null;
+      URL mappingURL = serviceRef.getMappingLocation();
+      if (mappingURL != null)
+      {
+         try
+         {
+            // setup the XML binding Unmarshaller
+            JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
+            javaWsdlMapping = mappingFactory.parse(mappingURL);
+         }
+         catch (Exception e)
+         {
+            throw new JAXRPCException("Cannot unmarshal jaxrpc-mapping-file: " + mappingURL, e);
+         }
+      }
+      return javaWsdlMapping;
+   }
+
+   private Definition getWsdlDefinition(UnifiedServiceRefMetaData serviceRef)
+   {
+      Definition wsdlDefinition = null;
+      {
+         URL wsdlOverride = serviceRef.getWsdlOverride();
+         URL wsdlURL = serviceRef.getWsdlLocation();
+         if (wsdlOverride == null && wsdlURL != null)
+         {
+            try
+            {
+               WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
+               wsdlDefinition = factory.parse(wsdlURL);
+            }
+            catch (WSDLException e)
+            {
+               throw new WSException("Cannot unmarshall wsdl, cause: " + e.toString());
+            }
+         }
+      }
+      return wsdlDefinition;
+   }
+}

Deleted: trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java	2007-02-23 20:32:50 UTC (rev 2460)
+++ trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java	2007-02-23 20:33:41 UTC (rev 2461)
@@ -1,38 +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.ws.integration.jboss40;
-
-import javax.management.ObjectName;
-
-import org.jboss.system.ServiceMBean;
-import org.jboss.webservice.WebServiceClientDeployment;
-import org.jboss.ws.core.utils.ObjectNameFactory;
-
-/**
- * MBean interface.
- * @since 19-Jan-2005
- */
-public interface WebServiceClientDeployerMBean extends WebServiceClientDeployment, ServiceMBean
-{
-   // default object name
-   public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceClientDeployer");
-}

Copied: trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java)
===================================================================
--- trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java	                        (rev 0)
+++ trunk/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java	2007-02-23 20:33:41 UTC (rev 2461)
@@ -0,0 +1,38 @@
+/*
+* 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.ws.integration.jboss40;
+
+import javax.management.ObjectName;
+
+import org.jboss.system.ServiceMBean;
+import org.jboss.webservice.WebServiceClientDeployment;
+import org.jboss.ws.core.utils.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface WebServiceClientDeployerMBean extends WebServiceClientDeployment, ServiceMBean
+{
+   // default object name
+   public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceClientDeployer");
+}

Copied: trunk/integration-jboss40/src/main/resources/jbossws.sar (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.sar)

Copied: trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.sar/META-INF)

Deleted: trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml	2007-02-23 20:32:50 UTC (rev 2460)
+++ trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml	2007-02-23 20:33:41 UTC (rev 2461)
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id$ -->
-
-<server>
-
-   <!--
-     Bind JAXRPC ServiceRefs
-   -->
-   <mbean name="jboss.ws:service=WebServiceClientDeployer" code="org.jboss.ws.integration.jboss40.WebServiceClientDeployer">
-      <depends>jboss:service=Naming</depends>
-   </mbean>
-
-   <!--
-     A deployer service for JSE endpoints.
-   -->
-   <mbean name="jboss.ws:service=WebServiceDeployerJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
-      <depends-list optional-attribute-name="Interceptables">
-         <depends-list-element>jboss.web:service=WebServer</depends-list-element>
-      </depends-list>
-   </mbean>
-
-   <!--
-     A deployer service for EJB2.1 endpoints.
-   -->
-   <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB21">
-      <depends-list optional-attribute-name="Interceptables">
-         <depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
-      </depends-list>
-   </mbean>
-
-   <!--
-     A deployer service for EJB3 endpoints.
-   <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB3">
-      <depends-list optional-attribute-name="Interceptables">
-         <depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
-      </depends-list>
-   </mbean>
-   -->
-
-   <!--
-     A deployer service for JSE endpoints that are nested in service archives (sar).
-   -->
-   <mbean name="jboss.ws:service=DeployerInterceptorNestedJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorNestedJSE">
-      <depends optional-attribute-name="MainDeployer" proxy-type="attribute">jboss.system:service=MainDeployer</depends>
-      <depends>jboss.ws:service=WebServiceDeployerJSE</depends>
-   </mbean>
-
-</server>

Copied: trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml)
===================================================================
--- trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml	                        (rev 0)
+++ trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml	2007-02-23 20:33:41 UTC (rev 2461)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<server>
+
+   <!--
+     Bind JAXRPC ServiceRefs
+   -->
+   <mbean name="jboss.ws:service=WebServiceClientDeployer" code="org.jboss.ws.integration.jboss40.WebServiceClientDeployer">
+      <depends>jboss:service=Naming</depends>
+   </mbean>
+
+   <!--
+     A deployer service for JSE endpoints.
+   -->
+   <mbean name="jboss.ws:service=WebServiceDeployerJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.web:service=WebServer</depends-list-element>
+      </depends-list>
+   </mbean>
+
+   <!--
+     A deployer service for EJB2.1 endpoints.
+   -->
+   <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB21">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
+      </depends-list>
+   </mbean>
+
+   <!--
+     A deployer service for EJB3 endpoints.
+   <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB3">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
+      </depends-list>
+   </mbean>
+   -->
+
+   <!--
+     A deployer service for JSE endpoints that are nested in service archives (sar).
+   -->
+   <mbean name="jboss.ws:service=DeployerInterceptorNestedJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorNestedJSE">
+      <depends optional-attribute-name="MainDeployer" proxy-type="attribute">jboss.system:service=MainDeployer</depends>
+      <depends>jboss.ws:service=WebServiceDeployerJSE</depends>
+   </mbean>
+
+</server>

Deleted: trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml	2007-02-23 20:32:50 UTC (rev 2460)
+++ trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml	2007-02-23 20:33:41 UTC (rev 2461)
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id$ -->
-
-<server>
-
-   <!--
-     Bind JAXRPC ServiceRefs
-   -->
-   <mbean name="jboss.ws:service=WebServiceClientDeployer" code="org.jboss.ws.integration.jboss40.WebServiceClientDeployer">
-      <depends>jboss:service=Naming</depends>
-   </mbean>
-
-   <!--
-     A deployer service for JSE endpoints.
-   -->
-   <mbean name="jboss.ws:service=WebServiceDeployerJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
-      <depends-list optional-attribute-name="Interceptables">
-         <depends-list-element>jboss.web:service=WebServer</depends-list-element>
-      </depends-list>
-   </mbean>
-
-   <!--
-     A deployer service for EJB2.1 endpoints.
-   -->
-   <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB21">
-      <depends-list optional-attribute-name="Interceptables">
-         <depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
-      </depends-list>
-   </mbean>
-
-   <!--
-     A deployer service for EJB3 endpoints.
-   -->
-   <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB3">
-      <depends-list optional-attribute-name="Interceptables">
-         <depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
-      </depends-list>
-   </mbean>
-
-   <!--
-     A deployer service for JSE endpoints that are nested in service archives (sar).
-   -->
-   <mbean name="jboss.ws:service=DeployerInterceptorNestedJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorNestedJSE">
-      <depends optional-attribute-name="MainDeployer" proxy-type="attribute">jboss.system:service=MainDeployer</depends>
-      <depends>jboss.ws:service=WebServiceDeployerJSE</depends>
-   </mbean>
-
-</server>

Copied: trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml (from rev 2460, branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml)
===================================================================
--- trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml	                        (rev 0)
+++ trunk/integration-jboss40/src/main/resources/jbossws.sar/META-INF/jboss-service.xml	2007-02-23 20:33:41 UTC (rev 2461)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<server>
+
+   <!--
+     Bind JAXRPC ServiceRefs
+   -->
+   <mbean name="jboss.ws:service=WebServiceClientDeployer" code="org.jboss.ws.integration.jboss40.WebServiceClientDeployer">
+      <depends>jboss:service=Naming</depends>
+   </mbean>
+
+   <!--
+     A deployer service for JSE endpoints.
+   -->
+   <mbean name="jboss.ws:service=WebServiceDeployerJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.web:service=WebServer</depends-list-element>
+      </depends-list>
+   </mbean>
+
+   <!--
+     A deployer service for EJB2.1 endpoints.
+   -->
+   <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB21">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
+      </depends-list>
+   </mbean>
+
+   <!--
+     A deployer service for EJB3 endpoints.
+   -->
+   <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB3">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
+      </depends-list>
+   </mbean>
+
+   <!--
+     A deployer service for JSE endpoints that are nested in service archives (sar).
+   -->
+   <mbean name="jboss.ws:service=DeployerInterceptorNestedJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorNestedJSE">
+      <depends optional-attribute-name="MainDeployer" proxy-type="attribute">jboss.system:service=MainDeployer</depends>
+      <depends>jboss.ws:service=WebServiceDeployerJSE</depends>
+   </mbean>
+
+</server>




More information about the jbossws-commits mailing list