Author: thomas.diesler(a)jboss.com
Date: 2007-02-21 07:53:59 -0500 (Wed, 21 Feb 2007)
New Revision: 2421
Added:
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/
branches/jbossws-1.2.0/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/WebServiceClientDeployer.java
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java
Removed:
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployerMBean.java
Modified:
branches/jbossws-1.2.0/integration-jboss40/.classpath
branches/jbossws-1.2.0/integration-jboss40/build.xml
branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java
branches/jbossws-1.2.0/integration-jboss42/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml
branches/jbossws-1.2.0/integration-jboss42/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
Log:
Cleanup service-ref handling in jboss42
Modified: branches/jbossws-1.2.0/integration-jboss40/.classpath
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/.classpath 2007-02-21 11:15:17 UTC (rev
2420)
+++ branches/jbossws-1.2.0/integration-jboss40/.classpath 2007-02-21 12:53:59 UTC (rev
2421)
@@ -30,5 +30,6 @@
<classpathentry kind="lib"
path="/build/thirdparty/xercesImpl.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/mail.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/jboss-common.jar"
sourcepath="/build/thirdparty/jboss-common-sources.jar"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.USER_LIBRARY/jboss-4.0.x"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: branches/jbossws-1.2.0/integration-jboss40/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/build.xml 2007-02-21 11:15:17 UTC (rev
2420)
+++ branches/jbossws-1.2.0/integration-jboss40/build.xml 2007-02-21 12:53:59 UTC (rev
2421)
@@ -57,12 +57,17 @@
<!-- Compile integration java sources -->
<target name="jboss40-compile-classes"
depends="jboss40-init,core-compile">
<mkdir dir="${jboss40.output.classes.dir}"/>
- <javac srcdir="${jboss42.java.dir}" sourcepath=""
destdir="${jboss40.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
+ <javac sourcepath="" destdir="${jboss40.output.classes.dir}"
encoding="utf-8" debug="${javac.debug}"
verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}">
+ <src location="${jboss42.java.dir}"/>
+ <src location="${jboss40.java.dir}"/>
+ <include name="org/jboss/ws/integration/jboss40/**"/>
<include name="org/jboss/ws/integration/jboss42/**"/>
<exclude
name="org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java"/>
<exclude
name="org/jboss/ws/integration/jboss42/ServiceEndpointGeneratorEJB3.java"/>
<exclude
name="org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java"/>
+ <exclude
name="org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java"/>
+ <exclude
name="org/jboss/ws/integration/jboss42/ServiceRefHandler.java"/>
<classpath refid="jboss40.integration.classpath"/>
<classpath path="${core.output.classes14.dir}"/>
<classpath path="${core.output.classes.dir}"/>
@@ -70,8 +75,10 @@
</target>
<target name="jboss40-compile-ejb3-classes"
depends="jboss40-init,core-compile,jboss40-check-ejb3-classes"
if="jboss40.ejb3.available">
<mkdir dir="${jboss40.output.classes.dir}"/>
- <javac srcdir="${jboss42.java.dir}" sourcepath=""
destdir="${jboss40.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
+ <javac sourcepath="" destdir="${jboss40.output.classes.dir}"
encoding="utf-8" debug="${javac.debug}"
verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}">
+ <src location="${jboss42.java.dir}"/>
+ <src location="${jboss40.java.dir}"/>
<include
name="org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java"/>
<include
name="org/jboss/ws/integration/jboss42/ServiceEndpointGeneratorEJB3.java"/>
<include
name="org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java"/>
@@ -146,6 +153,7 @@
<jar jarfile="${jboss40.output.lib.dir}/jbossws-jboss40-integration.jar"
manifest="${etc.dir}/default.mf">
<fileset dir="${jboss40.output.classes.dir}">
<include name="org/jboss/ws/integration/jboss42/**"/>
+ <include name="org/jboss/ws/integration/jboss40/**"/>
</fileset>
<metainf
dir="${jboss42.resources.dir}/jbossws-jboss42-integration.jar/META-INF"/>
</jar>
@@ -188,7 +196,7 @@
<include name="standard-jaxws-client-config.xml"/>
<include name="standard-jaxws-endpoint-config.xml"/>
</metainf>
- <metainf dir="${jboss42.resources.dir}/jbossws.sar/META-INF">
+ <metainf dir="${jboss40.resources.dir}/jbossws.sar/META-INF">
<include name="jboss-service*.xml"/>
</metainf>
</jar>
@@ -225,6 +233,7 @@
<jar
jarfile="${jboss40.output.lib.dir}/jbossws14-jboss40-integration.jar"
manifest="${etc.dir}/default.mf">
<fileset dir="${jboss40.output.classes14.dir}">
<include name="org/jboss/ws/integration/jboss42/**"/>
+ <include name="org/jboss/ws/integration/jboss40/**"/>
</fileset>
<metainf
dir="${jboss42.resources.dir}/jbossws-jboss42-integration.jar/META-INF"/>
</jar>
@@ -258,7 +267,7 @@
<mkdir
dir="${jboss40.output.dir}/resources/jbossws40-jdk14.sar/META-INF"/>
<copy
tofile="${jboss40.output.dir}/resources/jbossws40-jdk14.sar/META-INF/jboss-service.xml"
-
file="${jboss42.resources.dir}/jbossws.sar/META-INF/jboss-service-no-ejb3.xml"/>
+
file="${jboss40.resources.dir}/jbossws.sar/META-INF/jboss-service-no-ejb3.xml"/>
<!-- Build jbossws40-jdk14.sar -->
<jar jarfile="${jboss40.output.lib.dir}/jbossws40-jdk14.sar"
manifest="${etc.dir}/default.mf">
Added:
branches/jbossws-1.2.0/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
(rev 0)
+++
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java 2007-02-21
12:53:59 UTC (rev 2421)
@@ -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(a)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;
+ }
+}
Property changes on:
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/jbossws-1.2.0/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
(rev 0)
+++
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java 2007-02-21
12:53:59 UTC (rev 2421)
@@ -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(a)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;
+ }
+}
Property changes on:
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/jbossws-1.2.0/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
(rev 0)
+++
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java 2007-02-21
12:53:59 UTC (rev 2421)
@@ -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");
+}
Property changes on:
branches/jbossws-1.2.0/integration-jboss40/src/main/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployerMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
---
branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-02-21
11:15:17 UTC (rev 2420)
+++
branches/jbossws-1.2.0/integration-jboss40/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-02-21
12:53:59 UTC (rev 2421)
@@ -46,12 +46,6 @@
<property
name="serviceEndpointServlet">org.jboss.ws.integration.jboss42.JBossServiceEndpointServlet</property>
</bean>
- <!--
- Bind JAXWS Service objects in client environment context
- JAX-WS functionality is not available with jdk-1.4
- <bean name="WebServiceRefHandler"
class="org.jboss.ws.integration.jboss42.WebServiceRefHandler"/>
- -->
-
<!-- A subscription manager for WS-Eventing -->
<bean name="SubscriptionManager"
class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
Copied:
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java
(from rev 2420,
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java)
===================================================================
---
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java
(rev 0)
+++
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java 2007-02-21
12:53:59 UTC (rev 2421)
@@ -0,0 +1,139 @@
+/*
+ * 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.jboss42;
+
+// $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.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.util.naming.Util;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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(a)jboss.org
+ * @since 15-Jan-2005
+ */
+public class ServiceRefHandler extends ServiceMBeanSupport implements
ServiceRefHandlerMBean
+{
+ /**
+ * 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 bindServiceRefs(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:
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java
(from rev 2420,
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployerMBean.java)
===================================================================
---
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java
(rev 0)
+++
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java 2007-02-21
12:53:59 UTC (rev 2421)
@@ -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.jboss42;
+
+import javax.management.ObjectName;
+
+import org.jboss.system.ServiceMBean;
+import org.jboss.metadata.serviceref.ServiceRefHandler;
+import org.jboss.ws.core.utils.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface ServiceRefHandlerMBean extends ServiceRefHandler, ServiceMBean
+{
+ // default object name
+ public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServiceRefHandler");
+}
Modified:
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java
===================================================================
---
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java 2007-02-21
11:15:17 UTC (rev 2420)
+++
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java 2007-02-21
12:53:59 UTC (rev 2421)
@@ -29,10 +29,10 @@
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.metadata.serviceref.HandlerMetaData;
+import org.jboss.metadata.serviceref.InitParamMetaData;
+import org.jboss.metadata.serviceref.PortComponentRefMetaData;
+import org.jboss.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
Deleted:
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java
===================================================================
---
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java 2007-02-21
11:15:17 UTC (rev 2420)
+++
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java 2007-02-21
12:53:59 UTC (rev 2421)
@@ -1,139 +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.jboss42;
-
-// $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.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(a)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:
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployerMBean.java
===================================================================
---
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployerMBean.java 2007-02-21
11:15:17 UTC (rev 2420)
+++
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployerMBean.java 2007-02-21
12:53:59 UTC (rev 2421)
@@ -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.jboss42;
-
-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");
-}
Modified:
branches/jbossws-1.2.0/integration-jboss42/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml
===================================================================
---
branches/jbossws-1.2.0/integration-jboss42/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml 2007-02-21
11:15:17 UTC (rev 2420)
+++
branches/jbossws-1.2.0/integration-jboss42/src/main/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml 2007-02-21
12:53:59 UTC (rev 2421)
@@ -5,9 +5,9 @@
<server>
<!--
- A deployer service for WS clients.
+ Bind JAXRPC ServiceRefs
-->
- <mbean name="jboss.ws:service=WebServiceClientDeployer"
code="org.jboss.ws.integration.jboss42.WebServiceClientDeployer">
+ <mbean name="jboss.ws:service=ServiceRefHandler"
code="org.jboss.ws.integration.jboss42.ServiceRefHandler">
<depends>jboss:service=Naming</depends>
</mbean>
Modified:
branches/jbossws-1.2.0/integration-jboss42/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
===================================================================
---
branches/jbossws-1.2.0/integration-jboss42/src/main/resources/jbossws.sar/META-INF/jboss-service.xml 2007-02-21
11:15:17 UTC (rev 2420)
+++
branches/jbossws-1.2.0/integration-jboss42/src/main/resources/jbossws.sar/META-INF/jboss-service.xml 2007-02-21
12:53:59 UTC (rev 2421)
@@ -5,9 +5,9 @@
<server>
<!--
- A deployer service for WS clients.
+ Bind JAXRPC ServiceRefs
-->
- <mbean name="jboss.ws:service=WebServiceClientDeployer"
code="org.jboss.ws.integration.jboss42.WebServiceClientDeployer">
+ <mbean name="jboss.ws:service=ServiceRefHandler"
code="org.jboss.ws.integration.jboss42.ServiceRefHandler">
<depends>jboss:service=Naming</depends>
</mbean>