JBossWS SVN: r2176 - in branches/jbossws-1.2.0/build: etc and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-29 09:12:46 -0500 (Mon, 29 Jan 2007)
New Revision: 2176
Modified:
branches/jbossws-1.2.0/build/ant-import/build-release.xml
branches/jbossws-1.2.0/build/etc/jbossws-component-info.xml
Log:
Use jbossws-core.jar in component-info. EJB3 tests need server side annotations.
Modified: branches/jbossws-1.2.0/build/ant-import/build-release.xml
===================================================================
--- branches/jbossws-1.2.0/build/ant-import/build-release.xml 2007-01-29 13:02:19 UTC (rev 2175)
+++ branches/jbossws-1.2.0/build/ant-import/build-release.xml 2007-01-29 14:12:46 UTC (rev 2176)
@@ -46,7 +46,7 @@
<mkdir dir="${jbossws.repository.dir}/lib"/>
<copy todir="${jbossws.repository.dir}/lib" overwrite="true">
<fileset dir="${core.output.lib.dir}">
- <include name="jbossws-client.jar"/>
+ <include name="jbossws-core.jar"/>
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
Modified: branches/jbossws-1.2.0/build/etc/jbossws-component-info.xml
===================================================================
--- branches/jbossws-1.2.0/build/etc/jbossws-component-info.xml 2007-01-29 13:02:19 UTC (rev 2175)
+++ branches/jbossws-1.2.0/build/etc/jbossws-component-info.xml 2007-01-29 14:12:46 UTC (rev 2176)
@@ -5,6 +5,7 @@
version="@repository.id@"
description="JBossWS an implementation of J2EE Web Services">
+ <artifact id="jbossws-core.jar"/>
<artifact id="jboss-jaxrpc.jar"/>
<artifact id="jboss-jaxws.jar"/>
<artifact id="jboss-saaj.jar"/>
@@ -12,7 +13,6 @@
<artifact id="jbossws42.sar"/>
<artifact id="jbossws50.sar"/>
<artifact id="jbossws50-deployer.zip"/>
- <artifact id="jbossws-client.jar"/>
<import componentref="apache-xmlsec">
<compatible version="@apache-xmlsec@"/>
@@ -39,7 +39,7 @@
</import>
<export>
- <include input="jbossws-client.jar"/>
+ <include input="jbossws-core.jar"/>
<include input="jboss-jaxrpc.jar"/>
<include input="jboss-jaxws.jar"/>
<include input="jboss-saaj.jar"/>
17 years, 11 months
JBossWS SVN: r2175 - in branches/jbossws-1.2.0: integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50 and 38 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-29 08:02:19 -0500 (Mon, 29 Jan 2007)
New Revision: 2175
Added:
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/PortProxy.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceExt.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java
Removed:
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceExt.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceFactoryImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceProxy.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
Modified:
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdaptor.java
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerEJB.java
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/jaxrpc/ServiceFactoryImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedBeanMetaData.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1107/JBWS1107TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1124/JBWS1124TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1378/JBWS1378TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1386/JBWS1386TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws950/JBWS950TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws956/JBWS956TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialServiceDocBareTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/exception/ExceptionTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderDIITestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIConfiguredCallTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIUnconfiguredCallTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcProxyTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/oneway/OneWayTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialServiceRpcTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentProxyTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jbws1178/JBWS1178TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/complex/client/JSR181ComplexTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webresult/JSR181WebResultTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java
Log:
Resurect EJB2.1 endpoints/clients
Modified: branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdaptor.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdaptor.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdaptor.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -104,7 +104,7 @@
{
ubmd.setEjbName(bmd.getEjbName());
ubmd.setEjbClass(bmd.getEjbClass());
- ubmd.setServiceEndpoint(bmd.getServiceEndpoint());
+ ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
ubmd.setHome(bmd.getHome());
ubmd.setLocalHome(bmd.getLocalHome());
ubmd.setJndiName(bmd.getJndiName());
Modified: branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -94,7 +94,7 @@
String seiName = epMetaData.getServiceEndpointInterfaceName();
if (epMetaData.getType() == Type.JAXRPC && seiName != null)
{
- String bmdSEI = beanMetaData.getServiceEndpoint();
+ String bmdSEI = beanMetaData.getServiceEndpointInterface();
if (seiName.equals(bmdSEI) == false)
throw new WSException("Endpoint meta data defines SEI '" + seiName + "', <service-endpoint> in ejb-jar.xml defines '" + bmdSEI + "'");
}
Modified: branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -65,7 +65,16 @@
public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
- getMainDeployer().undeploy(udi.webappURL);
+ URL warURL = udi.webappURL;
+ if (warURL == null)
+ {
+ log.error("Cannot obtain waURL for: " + udi.name);
+ return "FAIL";
+ }
+
+ log.debug("destroyServiceEndpoint: " + warURL);
+
+ getMainDeployer().undeploy(warURL);
return "OK";
}
Modified: 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-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebServiceClientDeployer.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -37,7 +37,7 @@
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.ServiceReferenceable;
+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;
Modified: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerEJB.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerEJB.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerEJB.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -62,14 +62,13 @@
protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit)
{
// Destroy the webapp
- URL warURL = unit.getAttachment(ServiceEndpointWebApp.class).getWarURL();
try
{
getServiceEndpointPublisher().destroyServiceEndpoint(udi);
}
catch (Exception ex)
{
- log.error("Cannot destroy service endpoint: " + warURL, ex);
+ log.error("Cannot destroy service endpoint", ex);
}
// Destroy the service endpoint
Modified: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -152,7 +152,7 @@
{
ubmd.setEjbName(bmd.getEjbName());
ubmd.setEjbClass(bmd.getEjbClass());
- ubmd.setServiceEndpoint(bmd.getServiceEndpoint());
+ ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
ubmd.setHome(bmd.getHome());
ubmd.setLocalHome(bmd.getLocalHome());
ubmd.setJndiName(bmd.getJndiName());
Added: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java (rev 0)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,195 @@
+/*
+ * 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.jboss50;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.invocation.Invocation;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.invocation.InvocationType;
+import org.jboss.invocation.PayloadKey;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.security.SecurityAssociation;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
+import org.jboss.ws.core.server.ServiceEndpointInfo;
+import org.jboss.ws.core.server.ServiceEndpointInvoker;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.utils.ObjectNameFactory;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * Handles invocations on EJB2.1 endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-Jan-2005
+ */
+public class ServiceEndpointInvokerEJB21 extends AbstractServiceEndpointInvoker implements ServiceEndpointInvoker
+{
+ // provide logging
+ private Logger log = Logger.getLogger(ServiceEndpointInvokerEJB21.class);
+
+ private String jndiName;
+ private MBeanServer server;
+ private ObjectName objectName;
+
+ public ServiceEndpointInvokerEJB21()
+ {
+ server = MBeanServerLocator.locateJBoss();
+ }
+
+ /** Initialize the service endpoint */
+ @Override
+ public void initServiceEndpoint(ServiceEndpointInfo seInfo)
+ {
+ super.initServiceEndpoint(seInfo);
+
+ ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
+ String ejbName = epMetaData.getLinkName();
+ if (ejbName == null)
+ throw new WSException("Cannot obtain ejb-link from port component");
+
+ UnifiedApplicationMetaData applMetaData = (UnifiedApplicationMetaData)seInfo.getUnifiedDeploymentInfo().metaData;
+ UnifiedBeanMetaData beanMetaData = (UnifiedBeanMetaData)applMetaData.getBeanByEjbName(ejbName);
+ if (beanMetaData == null)
+ throw new WSException("Cannot obtain ejb meta data for: " + ejbName);
+
+ // verify the service endpoint
+ String seiName = epMetaData.getServiceEndpointInterfaceName();
+ if (epMetaData.getType() == Type.JAXRPC && seiName != null)
+ {
+ String bmdSEI = beanMetaData.getServiceEndpointInterface();
+ if (seiName.equals(bmdSEI) == false)
+ throw new WSException("Endpoint meta data defines SEI '" + seiName + "', <service-endpoint> in ejb-jar.xml defines '" + bmdSEI + "'");
+ }
+
+ // get the bean's JNDI name
+ jndiName = beanMetaData.getContainerObjectNameJndiName();
+ if (jndiName == null)
+ throw new WSException("Cannot obtain JNDI name for: " + ejbName);
+
+ objectName = ObjectNameFactory.create("jboss.j2ee:jndiName=" + jndiName + ",service=EJB");
+ }
+
+ /** Load the SEI implementation bean if necessary
+ */
+ public Class loadServiceEndpoint(ServiceEndpointInfo seInfo)
+ {
+ if (server.isRegistered(objectName) == false)
+ throw new WSException("Cannot find service endpoint target: " + objectName);
+
+ return null;
+ }
+
+ /** Create an instance of the SEI implementation bean if necessary */
+ public Object createServiceEndpoint(ServiceEndpointInfo seInfo, Object endpointContext, Class seiImplClass)
+ {
+ return null;
+ }
+
+ /** Invoke an instance of the SEI implementation bean */
+ public void invokeServiceEndpoint(ServiceEndpointInfo seInfo, Object seiImpl, EndpointInvocation epInv) throws Exception
+ {
+ log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+
+ // these are provided by the ServerLoginHandler
+ Principal principal = SecurityAssociation.getPrincipal();
+ Object credential = SecurityAssociation.getCredential();
+
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+
+ // invoke on the container
+ try
+ {
+ // setup the invocation
+ Method method = epInv.getJavaMethod();
+ Object[] args = epInv.getRequestPayload();
+ Invocation inv = new Invocation(null, method, args, null, principal, credential);
+
+ // EJB2.1 endpoints will only get an JAXRPC context
+ if ((msgContext instanceof javax.xml.rpc.handler.MessageContext) == false)
+ msgContext = new SOAPMessageContextJAXRPC(msgContext);
+
+ inv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+ inv.setValue(InvocationKey.SOAP_MESSAGE, msgContext.getSOAPMessage());
+ inv.setType(InvocationType.SERVICE_ENDPOINT);
+
+ // Set the handler callback and endpoint invocation
+ inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
+
+ String[] sig = { Invocation.class.getName() };
+ Object retObj = server.invoke(objectName, "invoke", new Object[] { inv }, sig);
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+
+ /** Create an instance of the SEI implementation bean if necessary */
+ public void destroyServiceEndpoint(ServiceEndpointInfo seInfo, Object seiImpl)
+ {
+ // do nothing
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ public boolean callRequestHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ {
+ if (type == HandlerType.PRE)
+ return handlerDelegate.callRequestHandlerChain(seInfo, type);
+ else
+ return true;
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ {
+ if (type == HandlerType.PRE)
+ return handlerDelegate.callResponseHandlerChain(seInfo, type);
+ else
+ return true;
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
+ {
+ if (type == HandlerType.PRE)
+ return handlerDelegate.callFaultHandlerChain(seInfo, type, ex);
+ else
+ return true;
+ }
+}
Property changes on: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -79,8 +79,14 @@
public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
URL warURL = udi.webappURL;
+ if (warURL == null)
+ {
+ log.error("Cannot obtain waURL for: " + udi.name);
+ return "FAIL";
+ }
+
log.debug("destroyServiceEndpoint: " + warURL);
-
+
DeploymentContext context = contextMap.get(warURL.toExternalForm());
if (context != null)
{
Modified: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -39,7 +39,7 @@
import org.jboss.virtual.VirtualFile;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.ServiceReferenceable;
+import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,626 +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.core.jaxrpc;
-
-// $Id$
-
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.Call;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.rpc.ServiceException;
-import javax.xml.rpc.Stub;
-import javax.xml.rpc.encoding.SerializerFactory;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.SOAPException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.core.CommonClient;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.WSTimeoutException;
-import org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
-import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
-import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.TypesMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-
-/** Provides support for the dynamic invocation of a service endpoint.
- * The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
- *
- * Once a Call instance is created, various setter and getter methods may be used to configure this Call instance.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public class CallImpl extends CommonClient implements Call
-{
- // provide logging
- private static Logger log = Logger.getLogger(CallImpl.class);
-
- // The service that created this call
- private ServiceImpl jaxrpcService;
- // The port type name
- private QName portType;
- // A Map<String,Object> of Call properties
- private Map<String, Object> properties = new HashMap<String, Object>();
-
- // The set of supported properties
- private static final Set<String> standardProperties = new HashSet<String>();
- static
- {
- standardProperties.add(Call.ENCODINGSTYLE_URI_PROPERTY);
- standardProperties.add(Call.OPERATION_STYLE_PROPERTY);
- standardProperties.add(Call.SESSION_MAINTAIN_PROPERTY);
- standardProperties.add(Call.SOAPACTION_URI_PROPERTY);
- standardProperties.add(Call.SOAPACTION_USE_PROPERTY);
- standardProperties.add(Call.USERNAME_PROPERTY);
- standardProperties.add(Call.PASSWORD_PROPERTY);
-
- standardProperties.add(Stub.ENDPOINT_ADDRESS_PROPERTY);
- standardProperties.add(Stub.SESSION_MAINTAIN_PROPERTY);
- standardProperties.add(Stub.USERNAME_PROPERTY);
- standardProperties.add(Stub.PASSWORD_PROPERTY);
- }
-
- /** Create a call that needs to be configured manually
- */
- CallImpl(ServiceImpl service)
- {
- super(service.getServiceMetaData());
- this.jaxrpcService = service;
-
- if (epMetaData != null)
- setTargetEndpointAddress(epMetaData.getEndpointAddress());
- }
-
- /** Create a call for a known WSDL endpoint.
- *
- * @param epMetaData A WSDLEndpoint
- */
- CallImpl(ServiceImpl service, EndpointMetaData epMetaData)
- {
- super(epMetaData);
- this.jaxrpcService = service;
-
- setTargetEndpointAddress(epMetaData.getEndpointAddress());
- }
-
- /** Create a call for a known WSDL endpoint.
- *
- * @param portName Qualified name for the target service endpoint
- * @throws ServiceException
- */
- CallImpl(ServiceImpl service, QName portName, QName opName) throws ServiceException
- {
- super(service.getServiceMetaData(), portName, opName);
- this.jaxrpcService = service;
-
- if (epMetaData != null)
- setTargetEndpointAddress(epMetaData.getEndpointAddress());
- }
-
- public ServiceImpl getServiceImpl()
- {
- return jaxrpcService;
- }
-
- @Override
- protected Map<String, Object> getRequestContext()
- {
- return properties;
- }
-
- /** Gets the address of a target service endpoint.
- */
- public String getTargetEndpointAddress()
- {
- return (String)properties.get(Stub.ENDPOINT_ADDRESS_PROPERTY);
- }
-
- /** Sets the address of the target service endpoint. This address must correspond to the transport
- * specified in the binding for this Call instance.
- *
- * @param address Address of the target service endpoint; specified as an URI
- */
- public void setTargetEndpointAddress(String address)
- {
- this.properties.put(Stub.ENDPOINT_ADDRESS_PROPERTY, address);
- }
-
- /** Adds a parameter type and mode for a specific operation.
- */
- public void addParameter(String paramName, QName xmlType, ParameterMode parameterMode)
- {
- TypeMappingImpl typeMapping = getEndpointMetaData().getServiceMetaData().getTypeMapping();
- Class javaType = typeMapping.getJavaType(xmlType);
-
- // CTS com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/AddGetRemoveAllParametersTest1
- // tests addParameter/getParameter without giving the javaType for a custom parameter
- // IMHO, this flavour of addParameter should only be used for standard types, where
- // the javaType can be derived from the xmlType
- if (javaType == null)
- {
- log.warn("Register unqualified call parameter for: " + xmlType);
- javaType = new UnqualifiedCallParameter(xmlType).getClass();
- typeMapping.register(javaType, xmlType, null, null);
- }
-
- addParameter(paramName, xmlType, javaType, parameterMode);
- }
-
- /** Adds a parameter type and mode for a specific operation.
- */
- public void addParameter(String paramName, QName xmlType, Class javaType, ParameterMode mode)
- {
- QName xmlName = new QName(paramName);
- addParameter(xmlName, xmlType, javaType, mode, false);
- }
-
- /** Add a parameter to the current operation description.
- * This is a propriatary extension that gives full control over the parameter configuration.
- */
- public void addParameter(QName xmlName, QName xmlType, Class javaType, ParameterMode mode, boolean inHeader)
- {
- if (xmlType == null || javaType == null)
- throw new IllegalArgumentException("Invalid null parameter");
-
- OperationMetaData opMetaData = getOperationMetaData();
- ParameterMetaData paramMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaType.getName());
- paramMetaData.setMode(mode);
- paramMetaData.setInHeader(inHeader);
- paramMetaData.setIndex(opMetaData.getParameters().size());
- opMetaData.addParameter(paramMetaData);
-
- registerParameterType(xmlType, javaType);
- }
-
- /** Removes all specified parameters from this Call instance. Note that this method removes only the parameters and
- * not the return type. The setReturnType(null) is used to remove the return type.
- *
- * @throws javax.xml.rpc.JAXRPCException This exception may be thrown If this method is called when the method isParameterAndReturnSpecRequired returns false for this Call's operation.
- */
- public void removeAllParameters()
- {
- OperationMetaData opMetaData = getOperationMetaData();
- opMetaData.removeAllParameters();
- }
-
- /** Sets the return type for a specific operation. Invoking setReturnType(null) removes the return type for this Call object.
- */
- public void setReturnType(QName xmlType)
- {
- Class javaType = getEndpointMetaData().getServiceMetaData().getTypeMapping().getJavaType(xmlType);
- setReturnType(xmlType, javaType);
- }
-
- /** Sets the return type for a specific operation.
- */
- public void setReturnType(QName xmlType, Class javaType)
- {
- if (xmlType == null || javaType == null)
- throw new IllegalArgumentException("Invalid null parameter");
-
- OperationMetaData opMetaData = getOperationMetaData();
- QName xmlName = new QName(Constants.DEFAULT_RPC_RETURN_NAME);
- String javaTypeName = javaType.getName();
- ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
- opMetaData.setReturnParameter(retMetaData);
-
- registerParameterType(xmlType, javaType);
- }
-
- /** Invokes a remote method using the one-way interaction mode.
- */
- public void invokeOneWay(Object[] inputParams)
- {
- try
- {
- invokeInternal(operationName, inputParams, true);
- }
- catch (RemoteException ex)
- {
- throw new JAXRPCException(ex);
- }
- }
-
- /** Invokes a specific operation using a synchronous request-response interaction mode.
- */
- public Object invoke(Object[] inputParams) throws RemoteException
- {
- return invokeInternal(operationName, inputParams, false);
- }
-
- /** Invokes a specific operation using a synchronous request-response interaction mode.
- */
- public Object invoke(QName operationName, Object[] inputParams) throws RemoteException
- {
- return invokeInternal(operationName, inputParams, false);
- }
-
- protected CommonMessageContext processPivot(CommonMessageContext requestContext) {
- log.debug("Begin response processing");
- return requestContext;
- }
-
- /** Returns a List values for the output parameters of the last invoked operation.
- *
- * @return java.util.List Values for the output parameters. An empty List is returned if there are no output values.
- * @throws JAXRPCException If this method is invoked for a one-way operation or is invoked before any invoke method has been called.
- */
- public List getOutputValues()
- {
- if (epInv == null)
- throw new JAXRPCException("Output params not available");
-
- try
- {
- OperationMetaData opMetaData = getOperationMetaData();
-
- List<Object> objPayload = new ArrayList<Object>();
- for (QName xmlName : epInv.getResponseParamNames())
- {
- Object paramValue = epInv.getResponseParamValue(xmlName);
- if (opMetaData.isDocumentWrapped())
- {
- objPayload = Arrays.asList((Object[])paramValue);
- break;
- }
- else
- {
- objPayload.add(paramValue);
- }
- }
- return objPayload;
- }
- catch (SOAPException ex)
- {
- throw new JAXRPCException("Cannot obtain response payload", ex);
- }
- }
-
- /** Returns a Map of {name, value} for the output parameters of the last invoked operation.
- * The parameter names in the returned Map are of type java.lang.String.
- *
- * @return Map Output parameters for the last Call.invoke(). Empty Map is returned if there are no output parameters.
- * @throws JAXRPCException If this method is invoked for a one-way operation or is invoked before any invoke method has been called.
- */
- public Map getOutputParams()
- {
- if (epInv == null)
- throw new JAXRPCException("Output params not available");
-
- try
- {
- Map<String, Object> outMap = new LinkedHashMap<String, Object>();
- for (QName xmlName : epInv.getResponseParamNames())
- {
- Object value = epInv.getResponseParamValue(xmlName);
- outMap.put(xmlName.getLocalPart(), value);
- }
- return outMap;
- }
- catch (SOAPException ex)
- {
- throw new JAXRPCException("Cannot obtain response payload", ex);
- }
- }
-
- /**
- * Gets the qualified name of the port type.
- *
- * @return Qualified name of the port type
- */
- public QName getPortTypeName()
- {
- if (portType != null)
- {
- return portType;
- }
-
- /* This code could be used to derive the portType from the endpoint meta data.
- * However, it breaks CTS com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPortTypeNameTest2
- if (epMetaData != null)
- {
- ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
- WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
- WSDLService wsdlService = wsdlDefinitions.getService(new NCName(serviceMetaData.getName().getLocalPart()));
- WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(epMetaData.getName());
- WSDLInterface wsdlInterface = wsdlEndpoint.getInterface();
- return wsdlInterface.getQName();
- }
- */
-
- // CTS com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPortTypeNameTest2
- return new QName("");
- }
-
- /**
- * Gets the return type for a specific operation
- *
- * @return Returns the XML type for the return value
- */
- public QName getReturnType()
- {
- QName retType = null;
- if (operationName != null)
- {
- OperationMetaData opDesc = getOperationMetaData();
- ParameterMetaData retMetaData = opDesc.getReturnParameter();
- if (retMetaData != null)
- retType = retMetaData.getXmlType();
- }
- return retType;
- }
-
- /**
- * Sets the qualified name of the interface.
- *
- * @param portType - Qualified name of the port type
- */
- public void setPortTypeName(QName portType)
- {
- this.portType = portType;
- }
-
- /**
- * Indicates whether addParameter and setReturnType methods are to be invoked to specify the parameter and return
- * type specification for a specific operation.
- *
- * @param opName Qualified name of the operation
- * @return Returns true if the Call implementation class requires addParameter and setReturnType to be invoked in the client code for the specified operation. This method returns false otherwise.
- * @throws IllegalArgumentException If invalid operation name is specified
- */
- public boolean isParameterAndReturnSpecRequired(QName opName)
- {
- setOperationName(opName);
- OperationMetaData opMetaData = getOperationMetaData();
- return opMetaData.getParameters().size() == 0 && opMetaData.getReturnParameter() == null;
- }
-
- /** Gets the names of configurable properties supported by this Call object.
- * @return Iterator for the property names
- */
- public Iterator getPropertyNames()
- {
- return standardProperties.iterator();
- }
-
- /** Gets the value of a named property.
- */
- public Object getProperty(String name)
- {
- if (null == name)
- throw new JAXRPCException("Unsupported property: " + name);
- // CTS: com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPropertyTest2
- if (name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
- throw new JAXRPCException("Unsupported property: " + name);
-
- return properties.get(name);
- }
-
- /** Sets the value for a named property.
- */
- public void setProperty(String name, Object value)
- {
- if (null == name)
- throw new JAXRPCException("Unsupported property: " + name);
- // CTS: com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPropertyTest2
- if (name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
- throw new JAXRPCException("Unsupported property: " + name);
-
- properties.put(name, value);
- }
-
- /** Removes a named property.
- */
- public void removeProperty(String name)
- {
- properties.remove(name);
- }
-
- /** Gets the XML type of a parameter by name.
- */
- public QName getParameterTypeByName(String paramName)
- {
- OperationMetaData opMetaData = getOperationMetaData();
- ParameterMetaData paramMetaData = opMetaData.getParameter(new QName(paramName));
- if (paramMetaData != null)
- return paramMetaData.getXmlType();
- else return null;
- }
-
- @Override
- protected void setInboundContextProperties()
- {
- }
-
- @Override
- protected void setOutboundContextProperties()
- {
- }
-
- private Object invokeInternal(QName opName, Object[] inputParams, boolean forceOneway) throws RemoteException
- {
- if (opName.equals(operationName) == false)
- setOperationName(opName);
-
- OperationMetaData opMetaData = getOperationMetaData();
-
- // Check or generate the the schema if this call is unconfigured
- generateOrUpdateSchemas(opMetaData);
-
- // Associate a message context with the current thread
- SOAPMessageContextJAXRPC msgContext = new SOAPMessageContextJAXRPC();
- MessageContextAssociation.pushMessageContext(msgContext);
- Object retObj = null;
- try
- {
- retObj = super.invoke(opName, inputParams, properties, forceOneway);
- return retObj;
- }
- catch (SOAPFaultException ex)
- {
- log.error("Call invocation failed", ex);
- String faultCode = ex.getFaultCode().getLocalPart();
- throw new RemoteException("Call invocation failed with code [" + faultCode + "] because of: " + ex.getFaultString(), ex);
- }
- catch (RemoteException rex)
- {
- throw rex;
- }
- catch (WSTimeoutException toex)
- {
- throw toex;
- }
- catch (Exception ex)
- {
- throw new RemoteException("Call invocation failed", ex);
- }
- finally
- {
- // Reset the message context association
- MessageContextAssociation.popMessageContext();
- }
- }
-
- @Override
- protected boolean callRequestHandlerChain(QName portName, HandlerType type)
- {
- SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
- HandlerChainBaseImpl handlerChain = (HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
- boolean status = (handlerChain != null ? handlerChain.handleRequest(msgContext, type) : true);
-
- if (type == HandlerType.ENDPOINT)
- XOPContext.visitAndRestoreXOPData();
-
- return status;
- }
-
- @Override
- protected boolean callResponseHandlerChain(QName portName, HandlerType type)
- {
- SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
- HandlerChainBaseImpl handlerChain = (HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
-
- boolean status = true;
- if (handlerChain != null)
- {
- status = handlerChain.handleResponse(msgContext, type);
- }
- return status;
- }
-
- /** Generate or update the XSD schema for all parameters and the return.
- * This should only be done when the Call is unconfigured, hence there is no WSDL
- */
- private void generateOrUpdateSchemas(OperationMetaData opMetaData)
- {
- ServiceMetaData serviceMetaData = opMetaData.getEndpointMetaData().getServiceMetaData();
- if (serviceMetaData.getWsdlLocation() == null)
- {
- TypesMetaData typesMetaData = serviceMetaData.getTypesMetaData();
- for (ParameterMetaData paramMetaData : opMetaData.getParameters())
- {
- generateOrUpdateParameterSchema(typesMetaData, paramMetaData);
- }
-
- ParameterMetaData retMetaData = opMetaData.getReturnParameter();
- if (retMetaData != null)
- {
- generateOrUpdateParameterSchema(typesMetaData, retMetaData);
- }
- }
- }
-
- /** Generate or update the XSD schema for a given parameter
- * This should only be done if the parameter is not an attachment
- */
- private void generateOrUpdateParameterSchema(TypesMetaData typesMetaData, ParameterMetaData paramMetaData)
- {
- if (paramMetaData.isSwA() == false)
- {
- QName xmlType = paramMetaData.getXmlType();
- Class javaType = paramMetaData.getJavaType();
-
- ServiceMetaData serviceMetaData = getEndpointMetaData().getServiceMetaData();
- TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
- SerializerFactory serFactory = typeMapping.getSerializer(javaType, xmlType);
- if (serFactory instanceof JBossXBSerializerFactory)
- {
- SchemaGenerator xsdGenerator = new SchemaGenerator();
- JBossXSModel model = xsdGenerator.generateXSDSchema(xmlType, javaType);
- typesMetaData.addSchemaModel(model);
- }
- }
- }
-
- private void registerParameterType(QName xmlType, Class javaType)
- {
- ServiceMetaData serviceMetaData = getEndpointMetaData().getServiceMetaData();
-
- String nsURI = xmlType.getNamespaceURI();
- if (Constants.NS_ATTACHMENT_MIME_TYPE.equals(nsURI) == false)
- {
- TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
- Class regJavaType = typeMapping.getJavaType(xmlType);
- if (regJavaType == null)
- {
- typeMapping.register(javaType, xmlType, new JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
- }
- else if (regJavaType != null && JavaUtils.isAssignableFrom(regJavaType, javaType) == false)
- {
- throw new IllegalArgumentException("Different java type already registered: " + regJavaType.getName());
- }
- }
- }
-
- @Override
- public void setConfigName(String configName, String configFile)
- {
- EndpointMetaData epMetaData = getEndpointMetaData();
- epMetaData.setConfigName(configName, configFile);
-
- // Reinitialize the client handler chain
- jaxrpcService.setupHandlerChain(epMetaData);
- }
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,119 +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.core.jaxrpc;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.HandlerChain;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.HandlerRegistry;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.handler.ClientHandlerChain;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-
-/**
- * Provides support for the programmatic configuration of
- * handlers in a HandlerRegistry.
- *
- * A handler chain is registered per service endpoint, as indicated by the
- * qualified name of a port. The getHandlerChain returns the handler chain
- * (as a java.util.List) for the specified service endpoint. The returned
- * handler chain is configured using the java.util.List interface. Each element
- * in this list is required to be of the Java type
- * javax.xml.rpc.handler.HandlerInfo.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 20-Jul-2005
- */
-public class HandlerRegistryImpl implements HandlerRegistry
-{
- // provide logging
- private static Logger log = Logger.getLogger(HandlerRegistryImpl.class);
-
- // Map<QName,HandlerChain> the endpoint name to a HandlerChain
- private Map<QName, HandlerChain> handlerChains = new HashMap<QName, HandlerChain>();
- // Maps the port name to a list of HandlerInfo objects
- private Map<QName, List<HandlerInfo>> handlerInfos = new HashMap<QName, List<HandlerInfo>>();
- // The service this registry is associated with
- private ServiceMetaData serviceMetaData;
-
- public HandlerRegistryImpl(ServiceMetaData serviceMetaData)
- {
- this.serviceMetaData = serviceMetaData;
- }
-
- public List getHandlerChain(QName portName)
- {
- List<HandlerInfo> list = handlerInfos.get(portName);
- if (list == null)
- list = new ArrayList<HandlerInfo>();
-
- return new ArrayList(list);
- }
-
- public void setHandlerChain(QName portName, List chain)
- {
- registerClientHandlerChain(portName, chain, null);
- }
-
- /** Get the handler chain for the given endpoint name, maybe null.
- */
- HandlerChain getHandlerChainInstance(QName portName)
- {
- HandlerChain handlerChain = handlerChains.get(portName);
- return handlerChain;
- }
-
- /** Register a handler chain for the given endpoint name
- */
- void registerClientHandlerChain(QName portName, List<HandlerInfo> infos, Set<String> roles)
- {
- ClientHandlerChain chain = new ClientHandlerChain(infos, roles);
- handlerChains.put(portName, chain);
- handlerInfos.put(portName, infos);
-
- EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
- if (epMetaData == null)
- throw new IllegalStateException("Cannot obtain endpoint meta data for: " + portName);
-
- epMetaData.clearHandlers();
- for (HandlerInfo info : infos)
- {
- HandlerMetaDataJAXRPC handler = new HandlerMetaDataJAXRPC(epMetaData, HandlerType.ENDPOINT);
- handler.setHandlerClassName(info.getHandlerClass().getName());
- handler.setSoapRoles(roles);
- log.debug("Add handler to: " + portName + handler);
- epMetaData.addHandler(handler);
- }
- }
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,216 +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.core.jaxrpc;
-
-// $Id$
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.Stub;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.soap.SOAPFaultException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-
-/**
- * The dynamic proxy that delegates to the underlying Call implementation
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 07-Jan-2005
- */
-public class PortProxy implements InvocationHandler
-{
- // provide logging
- private static final Logger log = Logger.getLogger(PortProxy.class);
-
- // The underlying Call
- private CallImpl call;
- // List<Method> of the Stub methods
- private List stubMethods;
- // List<Method> of the Object methods
- private List objectMethods;
-
- // The set of standard properties
- private static final Set<String> standardProperties = new HashSet<String>();
- static
- {
- standardProperties.add(Stub.ENDPOINT_ADDRESS_PROPERTY);
- standardProperties.add(Stub.SESSION_MAINTAIN_PROPERTY);
- standardProperties.add(Stub.USERNAME_PROPERTY);
- standardProperties.add(Stub.PASSWORD_PROPERTY);
- }
-
- // The map of jboss-ws4ee supported properties
- private static final Map<String,String> legacyPropertyMap = new HashMap<String,String>();
- static
- {
- legacyPropertyMap.put("org.jboss.webservice.client.timeout", StubExt.PROPERTY_CLIENT_TIMEOUT);
- legacyPropertyMap.put("org.jboss.webservice.keyStore", StubExt.PROPERTY_KEY_STORE);
- legacyPropertyMap.put("org.jboss.webservice.keyStorePassword", StubExt.PROPERTY_KEY_STORE_PASSWORD);
- legacyPropertyMap.put("org.jboss.webservice.keyStoreType", StubExt.PROPERTY_KEY_STORE_TYPE);
- legacyPropertyMap.put("org.jboss.webservice.trustStore", StubExt.PROPERTY_TRUST_STORE);
- legacyPropertyMap.put("org.jboss.webservice.trustStorePassword", StubExt.PROPERTY_TRUST_STORE_PASSWORD);
- legacyPropertyMap.put("org.jboss.webservice.trustStoreType", StubExt.PROPERTY_TRUST_STORE_TYPE);
- }
-
- public PortProxy(CallImpl call)
- {
- this.call = call;
- this.stubMethods = new ArrayList(Arrays.asList(StubExt.class.getMethods()));
- this.stubMethods.addAll(Arrays.asList(Stub.class.getMethods()));
- this.objectMethods = Arrays.asList(Object.class.getMethods());
- }
-
- /** Processes a method invocation on a proxy instance and returns the result.
- */
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- {
- // An invocation on the Stub interface
- String methodName = method.getName();
- if (stubMethods.contains(method))
- {
- if (methodName.equals("_getPropertyNames"))
- {
- return call.getPropertyNames();
- }
- else if (methodName.equals("_getProperty"))
- {
- return getProperty((String)args[0]);
- }
- else if (methodName.equals("_setProperty"))
- {
- setProperty((String)args[0], args[1]);
- return null;
- }
- else
- {
- Method callMethod = CallImpl.class.getMethod(methodName, method.getParameterTypes());
- return callMethod.invoke(call, args);
- }
- }
-
- // An invocation on proxy's Object class
- else if (objectMethods.contains(method))
- {
- Method callMethod = CallImpl.class.getMethod(methodName, method.getParameterTypes());
- return callMethod.invoke(call, args);
- }
-
- // An invocation on the service endpoint interface
- else
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- OperationMetaData opMetaData = epMetaData.getOperation(method);
- if (opMetaData == null)
- throw new WSException("Cannot obtain operation meta data for: " + methodName);
-
- call.setOperationName(opMetaData.getQName());
-
- try
- {
- if (opMetaData.isOneWay())
- {
- call.invokeOneWay(args);
- return null;
- }
- else
- {
- Object retObj = call.invoke(args);
- if (retObj != null)
- {
- Class retType = method.getReturnType();
- if (retType == null)
- throw new WSException("Return value not supported by: " + opMetaData);
-
- if (JavaUtils.isPrimitive(retType))
- retObj = JavaUtils.getPrimitiveValueArray(retObj);
- }
- return retObj;
- }
- }
- catch (Exception ex)
- {
- handleException(ex);
- return null;
- }
- }
- }
-
- private Object getProperty(String name)
- {
- name = assertPropertyName(name);
- return call.getProperty(name);
- }
-
- private void setProperty(String name, Object value)
- {
- name = assertPropertyName(name);
- call.setProperty(name, value);
- }
-
- private String assertPropertyName(String name)
- {
- if (name != null && name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
- throw new JAXRPCException("Unsupported property: " + name);
-
- if (legacyPropertyMap.keySet().contains(name))
- {
- String jbosswsName = legacyPropertyMap.get(name);
- log.warn("Legacy propery '" + name + "' mapped to '" + jbosswsName + "'");
- name = jbosswsName;
- }
-
- return name;
- }
-
- private void handleException(Exception ex) throws Throwable
- {
- Throwable th = ex;
- if (ex instanceof RemoteException && ex.getCause() instanceof SOAPFaultException)
- {
- SOAPFaultException faultEx = (SOAPFaultException)ex.getCause();
- if (faultEx.getCause() != null)
- th = faultEx.getCause();
- }
- throw th;
- }
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceExt.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceExt.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceExt.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,42 +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.core.jaxrpc;
-
-//$Id$
-
-import javax.xml.rpc.Service;
-import javax.xml.rpc.handler.HandlerRegistry;
-
-/**
- * Extends the JAXRPC Service with JBoss propriatary behaviour
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 27-Jan-2005
- */
-public interface ServiceExt extends Service
-{
- /**
- * Get a HandlerRegistry that can be used to dynamically
- * change the client side handler chain
- */
- HandlerRegistry getDynamicHandlerRegistry();
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceFactoryImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceFactoryImpl.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceFactoryImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,160 +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.core.jaxrpc;
-
-// $Id$
-
-import java.net.URL;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.Service;
-import javax.xml.rpc.ServiceException;
-import javax.xml.rpc.ServiceFactory;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-
-/**
- * Service class acts as a factory for:
- * <ul>
- * <li>Dynamic proxy for the target service endpoint.
- * <li>Instance of the type javax.xml.rpc.Call for the dynamic invocation of a remote operation on the target service endpoint.
- * <li>Instance of a generated stub class
- * </ul>
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public class ServiceFactoryImpl extends ServiceFactory
-{
- // provide logging
- private final Logger log = Logger.getLogger(ServiceFactoryImpl.class);
-
- /**
- * Create an instance of the generated service implementation class for a given service interface, if available.
- *
- * @param serviceInterface Service interface
- * @return A Service
- * @throws ServiceException If there is any error while creating the specified service, including the case where a
- * generated service implementation class cannot be located
- */
- public Service loadService(Class serviceInterface) throws ServiceException
- {
- throw new NotImplementedException();
- }
-
- /**
- * Create an instance of the generated service implementation class for a given service interface, if available.
- * An implementation may use the provided wsdlDocumentLocation and properties to help locate the generated implementation class.
- * If no such class is present, a ServiceException will be thrown.
- *
- * @param wsdlDocumentLocation URL for the WSDL document location for the service or null
- * @param serviceInterface Service interface
- * @param props A set of implementation-specific properties to help locate the generated service implementation class
- * @return A Service
- * @throws ServiceException If there is any error while creating the specified service, including the case where a
- * generated service implementation class cannot be located
- */
- public Service loadService(URL wsdlDocumentLocation, Class serviceInterface, Properties props) throws ServiceException
- {
- throw new NotImplementedException();
- }
-
- /**
- * Create an instance of the generated service implementation class for a given service, if available.
- * The service is uniquely identified by the wsdlDocumentLocation and serviceName arguments.
- * An implementation may use the provided properties to help locate the generated implementation class.
- * If no such class is present, a ServiceException will be thrown.
- *
- * @param wsdlDocumentLocation URL for the WSDL document location for the service or null
- * @param serviceName Qualified name for the service
- * @param props A set of implementation-specific properties to help locate the generated service implementation class
- * @return A Service
- * @throws ServiceException If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located
- */
- public Service loadService(URL wsdlDocumentLocation, QName serviceName, Properties props) throws ServiceException
- {
- throw new NotImplementedException();
- }
-
- /**
- * Create a <code>Service</code> instance.
- *
- * @param serviceName QName for the service
- * @return Service.
- * @throws ServiceException If any error in creation of the specified service
- */
- public Service createService(QName serviceName) throws ServiceException
- {
- return new ServiceImpl(serviceName);
- }
-
- /**
- * Create a <code>Service</code> instance.
- *
- * @param wsdlURL URL for the WSDL document location
- * @param serviceName QName for the service.
- * @return Service.
- * @throws ServiceException If any error in creation of the specified service
- */
- public Service createService(URL wsdlURL, QName serviceName) throws ServiceException
- {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
-
- URL mappingURL = cl.getResource("META-INF/jaxrpc-mapping.xml");
- if (mappingURL != null)
- log.info("Use jaxrpc-mapping from: " + mappingURL);
-
- return createService(wsdlURL, serviceName, mappingURL, null);
- }
-
- /**
- * Create a <code>Service</code> instance.
- *
- * @param wsdlURL URL for the WSDL document location
- * @param serviceName QName for the service.
- * @param mappingURL URL for the jaxrpc-mapping.xml document location
- * @return Service.
- * @throws ServiceException If any error in creation of the specified service
- */
- public Service createService(URL wsdlURL, QName serviceName, URL mappingURL) throws ServiceException
- {
- return createService(wsdlURL, serviceName, mappingURL, null);
- }
-
- /**
- * Create a <code>Service</code> instance.
- *
- * @param wsdlURL URL for the WSDL document location
- * @param serviceName QName for the service.
- * @param mappingURL URL for the jaxrpc-mapping.xml document location
- * @param securityURL URL for the jboss-ws-security.xml file
- * @return Service.
- * @throws ServiceException If any error in creation of the specified service
- */
- public Service createService(URL wsdlURL, QName serviceName, URL mappingURL, URL securityURL) throws ServiceException
- {
- ServiceImpl service = new ServiceImpl(serviceName, wsdlURL, mappingURL, securityURL);
- return service;
- }
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,451 +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.core.jaxrpc;
-
-// $Id$
-
-import java.lang.reflect.Proxy;
-import java.net.URL;
-import java.rmi.Remote;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.Call;
-import javax.xml.rpc.ServiceException;
-import javax.xml.rpc.Stub;
-import javax.xml.rpc.encoding.TypeMappingRegistry;
-import javax.xml.rpc.handler.HandlerChain;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.HandlerRegistry;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-
-/**
- * Service class acts as a factory for:
- * <ul>
- * <li>Dynamic proxy for the target service endpoint.
- * <li>Instance of the type javax.xml.rpc.Call for the dynamic invocation of a
- * remote operation on the target service endpoint.
- * <li>Instance of a generated stub class
- * </ul>
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public class ServiceImpl implements ServiceExt
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceImpl.class);
-
- // The service meta data that is associated with this JAXRPC Service
- private ServiceMetaData serviceMetaData;
-
- // The optional WSDL location
- private URL wsdlLocation;
-
- // The handler registry
- private HandlerRegistryImpl handlerRegistry;
-
- /**
- * Construct a Service without WSDL meta data
- */
- ServiceImpl(QName serviceName)
- {
- UnifiedMetaData wsMetaData = new UnifiedMetaData(new ResourceLoaderAdapter());
- serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
- handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
- }
-
- /**
- * Construct a Service that has access to some WSDL meta data
- */
- ServiceImpl(QName serviceName, URL wsdlURL, URL mappingURL, URL securityURL)
- {
- this.wsdlLocation = wsdlURL;
- JAXRPCClientMetaDataBuilder builder = new JAXRPCClientMetaDataBuilder();
-
- ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
-
- serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityURL, null, ctxClassLoader);
- handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
- }
-
- /**
- * Construct a Service that has access to some WSDL meta data
- */
- ServiceImpl(QName serviceName, URL wsdlURL, JavaWsdlMapping mappingURL, WSSecurityConfiguration securityConfig, UnifiedServiceRefMetaData serviceRefMetaData)
- {
- this.wsdlLocation = wsdlURL;
- JAXRPCClientMetaDataBuilder builder = new JAXRPCClientMetaDataBuilder();
-
- ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
-
- serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityConfig, serviceRefMetaData, ctxClassLoader);
- handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
- }
-
- public ServiceMetaData getServiceMetaData()
- {
- return serviceMetaData;
- }
-
- /**
- * Gets the location of the WSDL document for this Service.
- *
- * @return URL for the location of the WSDL document for this service
- */
- public URL getWSDLDocumentLocation()
- {
- return wsdlLocation;
- }
-
- /**
- * Gets the name of this service.
- *
- * @return Qualified name of this service
- */
- public QName getServiceName()
- {
- return serviceMetaData.getServiceName();
- }
-
- /**
- * Creates a Call instance.
- *
- * @param portName
- * Qualified name for the target service endpoint
- * @return Call instance
- * @throws javax.xml.rpc.ServiceException
- * If any error in the creation of the Call object
- */
- public Call createCall(QName portName) throws ServiceException
- {
- String nsURI = portName.getNamespaceURI();
- serviceMetaData.assertTargetNamespace(nsURI);
- return new CallImpl(this, portName, null);
- }
-
- /**
- * Creates a Call instance.
- *
- * @param portName
- * Qualified name for the target service endpoint
- * @param operationName
- * Name of the operation for which this Call object is to be
- * created.
- * @return Call instance
- * @throws javax.xml.rpc.ServiceException
- * If any error in the creation of the Call object
- */
- public Call createCall(QName portName, String operationName) throws ServiceException
- {
- String nsURI = portName.getNamespaceURI();
- serviceMetaData.assertTargetNamespace(nsURI);
- QName opName = new QName(nsURI, operationName);
- return new CallImpl(this, portName, opName);
- }
-
- /**
- * Creates a Call instance.
- *
- * @param portName
- * Qualified name for the target service endpoint
- * @param opName
- * Qualified name of the operation for which this Call object is
- * to be created.
- * @return Call instance
- * @throws javax.xml.rpc.ServiceException
- * If any error in the creation of the Call object
- */
- public Call createCall(QName portName, QName opName) throws ServiceException
- {
- serviceMetaData.assertTargetNamespace(portName.getNamespaceURI());
- serviceMetaData.assertTargetNamespace(opName.getNamespaceURI());
- return new CallImpl(this, portName, opName);
- }
-
- /**
- * Creates a Call object not associated with specific operation or target
- * service endpoint. This Call object needs to be configured using the
- * setter methods on the Call interface.
- *
- * @return Call object
- * @throws javax.xml.rpc.ServiceException
- * If any error in the creation of the Call object
- */
- public Call createCall() throws ServiceException
- {
- return new CallImpl(this);
- }
-
- /**
- * Gets an array of preconfigured Call objects for invoking operations on
- * the specified port. There is one Call object per operation that can be
- * invoked on the specified port. Each Call object is pre-configured and
- * does not need to be configured using the setter methods on Call
- * interface. <p/> Each invocation of the getCalls method returns a new
- * array of preconfigured Call objects <p/> This method requires the Service
- * implementation class to have access to the WSDL related metadata.
- *
- * @param portName
- * Qualified name for the target service endpoint
- * @return Call[] Array of pre-configured Call objects
- * @throws javax.xml.rpc.ServiceException
- * If this Service class does not have access to the required
- * WSDL metadata or if an illegal endpointName is specified.
- */
- public Call[] getCalls(QName portName) throws ServiceException
- {
- EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
- if (epMetaData == null)
- throw new ServiceException("Cannot find endpoint for name: " + portName);
-
- List<Call> calls = new ArrayList<Call>();
- for (OperationMetaData opMetaData : epMetaData.getOperations())
- {
- Call call = createCall(portName, opMetaData.getQName());
- calls.add(call);
- }
-
- Call[] callArr = new Call[calls.size()];
- calls.toArray(callArr);
-
- return callArr;
- }
-
- /**
- * J2EE components should not use the getHandlerRegistry() method. A
- * container provider must throw a java.lang.UnsupportedOperationException
- * from the getHandlerRegistry() method of the Service Interface. Handler
- * support is documented in Chapter 6 Handlers.
- */
- public HandlerRegistry getHandlerRegistry()
- {
- throw new UnsupportedOperationException("Components should not use the getHandlerRegistry() method.");
- }
-
- /**
- * Get a HandlerRegistry that can be used to dynamically change the client
- * side handler chain associated with a given endpoint.
- */
- public HandlerRegistry getDynamicHandlerRegistry()
- {
- return handlerRegistry;
- }
-
- /**
- * J2EE components should not use the getTypeMappingRegistry() method. A
- * container provider must throw a java.lang.UnsupportedOperationException
- * from the getTypeMappingRegistry() method of the Service Interface.
- */
- public TypeMappingRegistry getTypeMappingRegistry()
- {
- throw new UnsupportedOperationException("Components should not use the getTypeMappingRegistry() method.");
- }
-
- /**
- * Returns an Iterator for the list of QNames of service endpoints grouped
- * by this service
- *
- * @return Returns java.util.Iterator with elements of type
- * javax.xml.namespace.QName
- * @throws javax.xml.rpc.ServiceException
- * If this Service class does not have access to the required
- * WSDL metadata
- */
- public Iterator getPorts() throws ServiceException
- {
- ArrayList<QName> list = new ArrayList<QName>();
- if (serviceMetaData != null)
- {
- for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
- {
- list.add(epMetaData.getPortName());
- }
- }
- return list.iterator();
- }
-
- /**
- * The getPort method returns either an instance of a generated stub
- * implementation class or a dynamic proxy. The parameter
- * serviceEndpointInterface specifies the service endpoint interface that is
- * supported by the returned stub or proxy. In the implementation of this
- * method, the JAX-RPC runtime system takes the responsibility of selecting
- * a protocol binding (and a port) and configuring the stub accordingly. The
- * returned Stub instance should not be reconfigured by the client.
- */
- public Remote getPort(Class seiClass) throws ServiceException
- {
- if (seiClass == null)
- throw new IllegalArgumentException("SEI class cannot be null");
-
- String seiName = seiClass.getName();
- if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new ServiceException("SEI does not implement java.rmi.Remote: " + seiName);
-
- if (serviceMetaData == null)
- throw new ServiceException("Service meta data not available");
-
- try
- {
- EndpointMetaData epMetaData = serviceMetaData.getEndpointByServiceEndpointInterface(seiName);
- if (epMetaData == null && serviceMetaData.getEndpoints().size() == 1)
- {
- epMetaData = serviceMetaData.getEndpoints().get(0);
- epMetaData.setServiceEndpointInterfaceName(seiName);
- }
-
- if (epMetaData == null)
- throw new ServiceException("Cannot find endpoint meta data for: " + seiName);
-
- return createProxy(seiClass, epMetaData);
- }
- catch (ServiceException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- throw new ServiceException("Cannot create proxy", ex);
- }
- }
-
- /**
- * The getPort method returns either an instance of a generated stub
- * implementation class or a dynamic proxy. A service client uses this
- * dynamic proxy to invoke operations on the target service endpoint. The
- * serviceEndpointInterface specifies the service endpoint interface that is
- * supported by the created dynamic proxy or stub instance.
- */
- public Remote getPort(QName portName, Class seiClass) throws ServiceException
- {
- if (seiClass == null)
- throw new IllegalArgumentException("SEI class cannot be null");
-
- if (serviceMetaData == null)
- throw new ServiceException("Service meta data not available");
-
- String seiName = seiClass.getName();
- if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new ServiceException("SEI does not implement java.rmi.Remote: " + seiName);
-
- EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
- if (epMetaData == null)
- throw new ServiceException("Cannot obtain endpoint meta data for: " + portName);
-
- try
- {
- if (epMetaData.getServiceEndpointInterfaceName() == null)
- epMetaData.setServiceEndpointInterfaceName(seiName);
-
- return createProxy(seiClass, epMetaData);
- }
- catch (ServiceException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- throw new ServiceException("Cannot create proxy", ex);
- }
- }
-
- private Remote createProxy(Class seiClass, EndpointMetaData epMetaData) throws Exception
- {
- CallImpl call = new CallImpl(this, epMetaData);
-
- PortProxy handler = new PortProxy(call);
- ClassLoader cl = epMetaData.getClassLoader();
- Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass, Stub.class, StubExt.class }, handler);
-
- return proxy;
- }
-
- /**
- * Get the handler chain for the given endpoint name, maybe null.
- */
- public HandlerChain getHandlerChain(QName portName)
- {
- return handlerRegistry.getHandlerChainInstance(portName);
- }
-
- /**
- * Register a handler chain for the given endpoint name
- */
- public void registerHandlerChain(QName portName, List infos, Set roles)
- {
- handlerRegistry.registerClientHandlerChain(portName, infos, roles);
- }
-
- void setupHandlerChain(EndpointMetaData epMetaData)
- {
- QName portName = epMetaData.getPortName();
- Set<String> handlerRoles = new HashSet<String>();
- ArrayList handlerInfos = new ArrayList();
- for (HandlerMetaData handlerMetaData : epMetaData.getHandlerMetaData(HandlerType.ALL))
- {
- HandlerMetaDataJAXRPC jaxrpcMetaData = (HandlerMetaDataJAXRPC)handlerMetaData;
- handlerRoles.addAll(jaxrpcMetaData.getSoapRoles());
-
- HashMap hConfig = new HashMap();
- for (HandlerInitParam param : jaxrpcMetaData.getInitParams())
- {
- hConfig.put(param.getParamName(), param.getParamValue());
- }
-
- Set<QName> headers = jaxrpcMetaData.getSoapHeaders();
- QName[] headerArr = new QName[headers.size()];
- headers.toArray(headerArr);
-
- Class hClass = jaxrpcMetaData.getHandlerClass();
- hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
- HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
-
- log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
- handlerInfos.add(info);
-
- // register the handlers with the client engine
- if (handlerInfos.size() > 0)
- registerHandlerChain(portName, handlerInfos, handlerRoles);
- }
- }
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,242 +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.
- */
-// $Id$
-package org.jboss.ws.core.jaxrpc;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.ServiceEndpoint;
-import org.jboss.ws.core.server.ServiceEndpointManager;
-import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-
-import javax.naming.*;
-import javax.naming.spi.ObjectFactory;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.Service;
-import java.io.*;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Proxy;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.rmi.Remote;
-import java.util.Hashtable;
-import java.util.List;
-
-/**
- * This ServiceObjectFactory reconstructs a javax.xml.rpc.Service
- * for a given WSDL when the webservice client does a JNDI lookup
- * <p/>
- * It uses the information provided by the service-ref element in application-client.xml
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class ServiceObjectFactory implements ObjectFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
-
- /**
- * Creates an object using the location or reference information specified.
- * <p/>
- *
- * @param obj The possibly null object containing location or reference
- * information that can be used in creating an object.
- * @param name The name of this object relative to <code>nameCtx</code>,
- * or null if no name is specified.
- * @param nameCtx The context relative to which the <code>name</code>
- * parameter is specified, or null if <code>name</code> is
- * relative to the default initial context.
- * @param environment The possibly null environment that is used in
- * creating the object.
- * @return The object created; null if an object cannot be created.
- * @throws Exception if this object factory encountered an exception
- * while attempting to create an object, and no other object factories are
- * to be tried.
- * @see javax.naming.spi.NamingManager#getObjectInstance
- * @see javax.naming.spi.NamingManager#getURLContext
- */
- public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
- {
- try
- {
- Reference ref = (Reference)obj;
-
- // Unmarshall the ServiceRefMetaData
- UnifiedServiceRefMetaData serviceRefMetaData = null;
- RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
- ByteArrayInputStream bais = new ByteArrayInputStream((byte[])metaRefAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- serviceRefMetaData = (UnifiedServiceRefMetaData)ois.readObject();
- ois.close();
- }
- catch (IOException ex)
- {
- NamingException ne = new NamingException("Cannot unmarshall service ref meta data");
- ne.setRootCause(ex);
- throw ne;
- }
-
- // Unmarshall the WSSecurityConfiguration
- WSSecurityConfiguration securityConfig = null;
- RefAddr wsseRefAddr = ref.get(ServiceReferenceable.SECURITY_CONFIG);
- if (wsseRefAddr != null)
- {
- bais = new ByteArrayInputStream((byte[])wsseRefAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- securityConfig = (WSSecurityConfiguration)ois.readObject();
- ois.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot unmarshall security config, cause: " + e.toString());
- }
- }
-
- ServiceImpl jaxrpcService = null;
- URL wsdlLocation = serviceRefMetaData.getWsdlLocation();
- if (wsdlLocation != null)
- {
- log.debug("Create jaxrpc service from wsdl");
-
- // Create the actual service object
- QName serviceName = serviceRefMetaData.getServiceQName();
- JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)serviceRefMetaData.getJavaWsdlMapping();
- jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, serviceRefMetaData);
- }
- else
- {
- log.debug("Create jaxrpc service with no wsdl");
- jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
- }
-
- // Set any service level properties
- ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
- serviceMetaData.setProperties(serviceRefMetaData.getCallProperties());
-
- // The web service client using a port-component-link, the contet is the URL to
- // the PortComponentLinkServlet that will return the actual endpoint address
- RefAddr pcLinkRef = ref.get(ServiceReferenceable.PORT_COMPONENT_LINK);
- if (pcLinkRef != null)
- {
- String pcLink = (String)pcLinkRef.getContent();
- log.debug("Resolving port-component-link: " + pcLink);
-
- // First try to obtain the endpoint address loacally
- String endpointAddress = null;
- try
- {
- ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
- ServiceEndpointManager epManager = factory.getServiceEndpointManager();
- ServiceEndpoint serviceEndpoint = epManager.resolvePortComponentLink(pcLink);
- if (serviceEndpoint == null)
- throw new WSException("Cannot resolve port-component-link: " + pcLink);
-
- endpointAddress = serviceEndpoint.getServiceEndpointInfo().getServerEndpointMetaData().getEndpointAddress();
- }
- catch (Exception ex)
- {
- // ignore, we are probably a remote client
- }
-
- // We may be remote in the esoteric case where an appclient uses the port-comonent-link feature
- if (endpointAddress == null)
- {
- String servletPath = (String)ref.get(ServiceReferenceable.PORT_COMPONENT_LINK_SERVLET).getContent();
- servletPath += "?pcLink=" + URLEncoder.encode(pcLink, "UTF-8");
- InputStream is = new URL(servletPath).openStream();
- BufferedReader br = new BufferedReader(new InputStreamReader(is));
- endpointAddress = br.readLine();
- is.close();
- }
-
- log.debug("Resolved to: " + endpointAddress);
- if (serviceMetaData.getEndpoints().size() == 1)
- {
- EndpointMetaData epMetaData = serviceMetaData.getEndpoints().get(0);
- epMetaData.setEndpointAddress(endpointAddress);
- }
- else
- {
- log.warn("Cannot set endpoint address for port-component-link, unsuported number of endpoints");
- }
- }
-
- /********************************************************
- * Setup the Proxy that implements the service-interface
- ********************************************************/
-
- // load the service interface class
- ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
- Class siClass = contextCL.loadClass(serviceRefMetaData.getServiceInterface());
- if (Service.class.isAssignableFrom(siClass) == false)
- throw new JAXRPCException("The service interface does not implement javax.xml.rpc.Service: " + siClass.getName());
-
- // load all service endpoint interface classes
- UnifiedPortComponentRefMetaData[] pcrArray = serviceRefMetaData.getPortComponentRefs();
- for (int i = 0; i < pcrArray.length; i++)
- {
- UnifiedPortComponentRefMetaData pcr = pcrArray[i];
- Class seiClass = contextCL.loadClass(pcr.getServiceEndpointInterface());
- if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new IllegalArgumentException("The SEI does not implement java.rmi.Remote: " + seiClass.getName());
- }
-
- // Setup the handler chain
- setupHandlerChain(jaxrpcService);
-
- InvocationHandler handler = new ServiceProxy(jaxrpcService, siClass);
- return Proxy.newProxyInstance(contextCL, new Class[] { siClass, ServiceExt.class }, handler);
- }
- catch (Exception ex)
- {
- log.error("Cannot create service", ex);
- throw ex;
- }
- }
-
- /**
- * Setup the handler chain(s) for this service
- */
- private void setupHandlerChain(ServiceImpl jaxrpcService) throws Exception
- {
- List<EndpointMetaData> endpoints = jaxrpcService.getServiceMetaData().getEndpoints();
- for (EndpointMetaData epMetaData : endpoints)
- {
- jaxrpcService.setupHandlerChain(epMetaData);
- }
- }
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceProxy.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceProxy.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceProxy.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,162 +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.
-*/
-// $Id$
-package org.jboss.ws.core.jaxrpc;
-
-// $Id$
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.rmi.Remote;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.Service;
-
-import org.jboss.logging.Logger;
-
-/**
- * This is the proxy that implements the service interface .
- * <p/>
- * Additionally it handles some ws4ee functionality that is not part of jaxrpc behaviour.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-May-2004
- */
-public class ServiceProxy implements InvocationHandler
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceProxy.class);
-
- // The underlying jaxrpc service
- private ServiceImpl jaxrpcService;
-
- // The methods from java.lang.Object
- private List objectMethods = new ArrayList();
- // The methods from javax.xml.rpc.Service
- private List jaxrpcServiceMethods = new ArrayList();
- // The methods from the service interface, in case of javax.xml.rpc.Service it is empty
- private List serviceInterfaceMethods = new ArrayList();
-
- // The cached getPort method
- private Method getPortMethod;
-
- /**
- * Construct a client side service proxy.
- * <p/>
- * This proxy implements the (generated) service interface.
- *
- * @param service The underlying {@link javax.xml.rpc.Service}
- * @param siClass The service interface, a subclass of {@link javax.xml.rpc.Service}
- */
- public ServiceProxy(ServiceImpl service, Class siClass)
- {
- this.jaxrpcService = service;
-
- // initialize java.lang.Object methods
- objectMethods.addAll(Arrays.asList(Object.class.getMethods()));
-
- // initialize javax.xml.rpc.Service methods
- jaxrpcServiceMethods.addAll(Arrays.asList(ServiceExt.class.getMethods()));
-
- // initialize SI methods
- if (siClass.getName().equals("javax.xml.rpc.Service") == false)
- serviceInterfaceMethods.addAll(Arrays.asList(siClass.getDeclaredMethods()));
-
- // initialize special ws4ee methods
- try
- {
- getPortMethod = Service.class.getMethod("getPort", new Class[]{Class.class});
- }
- catch (NoSuchMethodException e)
- {
- throw new JAXRPCException(e.toString());
- }
- }
-
- /**
- * Processes a method invocation on a proxy instance and returns
- * the result.
- */
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- {
- String methodName = method.getName();
-
- try
- {
- Object retObj = null;
- if (jaxrpcServiceMethods.contains(method))
- {
- log.debug("Invoke on jaxrpc service: " + methodName);
-
- if (method.getName().equals("getPort"))
- {
- Remote port = (Remote)method.invoke(jaxrpcService, args);
- return port;
- }
- else
- {
- retObj = method.invoke(jaxrpcService, args);
- return retObj;
- }
- }
- if (serviceInterfaceMethods.contains(method))
- {
- log.debug("Invoke on service interface: " + methodName);
-
- Class seiClass = method.getReturnType();
- retObj = getPortMethod.invoke(jaxrpcService, new Object[]{seiClass});
- return retObj;
- }
- if (objectMethods.contains(method))
- {
- log.debug("Invoke on object: " + methodName);
-
- retObj = method.invoke(jaxrpcService, args);
- return retObj;
- }
-
- throw new JAXRPCException("Don't know how to invoke: " + method);
- }
- catch (Exception e)
- {
- handleException(e);
- return null;
- }
- }
-
- /**
- * Log the client side exception
- */
- private void handleException(Exception ex) throws Throwable
- {
- Throwable th = ex;
- if (ex instanceof InvocationTargetException)
- th = ((InvocationTargetException)ex).getTargetException();
-
- log.error("Service error", th);
- throw th;
- }
-}
\ No newline at end of file
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -1,193 +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.
- */
-// $Id$
-package org.jboss.ws.core.jaxrpc;
-
-// $Id$
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectOutputStream;
-import java.net.URL;
-
-import javax.naming.BinaryRefAddr;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
-import javax.naming.StringRefAddr;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.server.ServiceEndpointManager;
-import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
-
-/**
- * A JNDI reference to a javax.xml.rpc.Service
- * <p/>
- * It holds the information to reconstrut the javax.xml.rpc.Service
- * when the client does a JNDI lookup.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class ServiceReferenceable implements Referenceable
-{
- // provide logging
- private static Logger log = Logger.getLogger(ServiceReferenceable.class);
-
- public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
- public static final String DEPLOYMENT_URL = "DEPLOYMENT_URL";
- public static final String SECURITY_CONFIG = "SECURITY_CONFIG";
- public static final String DESCRIPTOR_LOC = "DESCRIPTOR_LOC";
- public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
- public static final String PORT_COMPONENT_LINK_SERVLET = "PORT_COMPONENT_LINK_SERVLET";
-
- private UnifiedServiceRefMetaData refMetaData;
- private UnifiedDeploymentInfo udi;
-
- /**
- * A service referenceable for a WSDL document that is part of the deployment
- *
- * @param refMetaData The service-ref meta data
- * @param udi The client DeploymentInfo
- */
- public ServiceReferenceable(UnifiedServiceRefMetaData refMetaData, UnifiedDeploymentInfo udi)
- {
- this.refMetaData = refMetaData;
- this.udi = udi;
- }
-
- /**
- * Retrieves the Reference of this object.
- *
- * @return The non-null Reference of this object.
- * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
- */
- public Reference getReference() throws NamingException
- {
- Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
-
- // The deployment URL of the web service client deployment
- // Add a reference to the client deployment URL
- String deploymentID = udi.name;
- myRef.add(new StringRefAddr(DEPLOYMENT_URL, deploymentID));
-
- // Add a reference to the ServiceRefMetaData and WSDLDefinitions
- myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
-
- // FIXME: JBWS-1431 Merge ws-security config with jaxrpc/jaxws config
- if (getSecurityConfig() != null)
- myRef.add(new BinaryRefAddr(SECURITY_CONFIG, marshallSecurityConfig()));
-
- // Add references to port component links
- UnifiedPortComponentRefMetaData[] pcrArr = refMetaData.getPortComponentRefs();
- for (int i = 0; i < pcrArr.length; i++)
- {
- UnifiedPortComponentRefMetaData pcr = pcrArr[i];
- String pcLink = pcr.getPortComponentLink();
- if (pcLink != null)
- {
- myRef.add(new StringRefAddr(PORT_COMPONENT_LINK, pcLink));
- try
- {
- ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
- ServiceEndpointManager epManager = factory.getServiceEndpointManager();
- String host = epManager.getWebServiceHost();
- int port = epManager.getWebServicePort();
-
- String servletURL = "http://" + host + ":" + port + "/jbossws/pclink";
- myRef.add(new StringRefAddr(PORT_COMPONENT_LINK_SERVLET, servletURL));
- }
- catch (Exception ex)
- {
- throw new NamingException("Cannot obtain path to PortComponentLinkServlet: " + ex);
- }
- }
- }
-
- return myRef;
- }
-
- /** Marshall the ServiceRefMetaData to an byte array
- */
- private byte[] marshallServiceRef() throws NamingException
- {
- refMetaData.getJavaWsdlMapping();
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
- try
- {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(refMetaData);
- oos.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot marshall service ref meta data, cause: " + e.toString());
- }
- return baos.toByteArray();
- }
-
- /** Marshall the WSSecurityConfiguration to an byte array
- */
- private byte[] marshallSecurityConfig() throws NamingException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
- try
- {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- URL vfConfig = getSecurityConfig();
- WSSecurityConfiguration securityConfig = WSSecurityOMFactory.newInstance().parse(vfConfig);
- oos.writeObject(securityConfig);
- oos.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot marshall security config, cause: " + e.toString());
- }
- return baos.toByteArray();
- }
-
- private URL getSecurityConfig()
- {
- String descriptorPath = udi.metaData instanceof UnifiedWebMetaData ? "WEB-INF" : "META-INF";
- descriptorPath = descriptorPath + "/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
- try
- {
- URL vfConfig = udi.getMetaDataFileURL(descriptorPath);
- InputStream inputStream = vfConfig.openStream();
- inputStream.close();
- return vfConfig;
- }
- catch (IOException ex)
- {
- log.debug("Cannot find security config: " + descriptorPath);
- return null;
- }
- }
-}
\ No newline at end of file
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,629 @@
+/*
+ * 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.core.jaxrpc.client;
+
+// $Id$
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.encoding.SerializerFactory;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.SOAPException;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.CommonClient;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.WSTimeoutException;
+import org.jboss.ws.core.jaxrpc.SchemaGenerator;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.jaxrpc.UnqualifiedCallParameter;
+import org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
+import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.umdm.TypesMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
+
+/** Provides support for the dynamic invocation of a service endpoint.
+ * The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
+ *
+ * Once a Call instance is created, various setter and getter methods may be used to configure this Call instance.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class CallImpl extends CommonClient implements Call
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(CallImpl.class);
+
+ // The service that created this call
+ private ServiceImpl jaxrpcService;
+ // The port type name
+ private QName portType;
+ // A Map<String,Object> of Call properties
+ private Map<String, Object> properties = new HashMap<String, Object>();
+
+ // The set of supported properties
+ private static final Set<String> standardProperties = new HashSet<String>();
+ static
+ {
+ standardProperties.add(Call.ENCODINGSTYLE_URI_PROPERTY);
+ standardProperties.add(Call.OPERATION_STYLE_PROPERTY);
+ standardProperties.add(Call.SESSION_MAINTAIN_PROPERTY);
+ standardProperties.add(Call.SOAPACTION_URI_PROPERTY);
+ standardProperties.add(Call.SOAPACTION_USE_PROPERTY);
+ standardProperties.add(Call.USERNAME_PROPERTY);
+ standardProperties.add(Call.PASSWORD_PROPERTY);
+
+ standardProperties.add(Stub.ENDPOINT_ADDRESS_PROPERTY);
+ standardProperties.add(Stub.SESSION_MAINTAIN_PROPERTY);
+ standardProperties.add(Stub.USERNAME_PROPERTY);
+ standardProperties.add(Stub.PASSWORD_PROPERTY);
+ }
+
+ /** Create a call that needs to be configured manually
+ */
+ CallImpl(ServiceImpl service)
+ {
+ super(service.getServiceMetaData());
+ this.jaxrpcService = service;
+
+ if (epMetaData != null)
+ setTargetEndpointAddress(epMetaData.getEndpointAddress());
+ }
+
+ /** Create a call for a known WSDL endpoint.
+ *
+ * @param epMetaData A WSDLEndpoint
+ */
+ CallImpl(ServiceImpl service, EndpointMetaData epMetaData)
+ {
+ super(epMetaData);
+ this.jaxrpcService = service;
+
+ setTargetEndpointAddress(epMetaData.getEndpointAddress());
+ }
+
+ /** Create a call for a known WSDL endpoint.
+ *
+ * @param portName Qualified name for the target service endpoint
+ * @throws ServiceException
+ */
+ CallImpl(ServiceImpl service, QName portName, QName opName) throws ServiceException
+ {
+ super(service.getServiceMetaData(), portName, opName);
+ this.jaxrpcService = service;
+
+ if (epMetaData != null)
+ setTargetEndpointAddress(epMetaData.getEndpointAddress());
+ }
+
+ public ServiceImpl getServiceImpl()
+ {
+ return jaxrpcService;
+ }
+
+ @Override
+ protected Map<String, Object> getRequestContext()
+ {
+ return properties;
+ }
+
+ /** Gets the address of a target service endpoint.
+ */
+ public String getTargetEndpointAddress()
+ {
+ return (String)properties.get(Stub.ENDPOINT_ADDRESS_PROPERTY);
+ }
+
+ /** Sets the address of the target service endpoint. This address must correspond to the transport
+ * specified in the binding for this Call instance.
+ *
+ * @param address Address of the target service endpoint; specified as an URI
+ */
+ public void setTargetEndpointAddress(String address)
+ {
+ this.properties.put(Stub.ENDPOINT_ADDRESS_PROPERTY, address);
+ }
+
+ /** Adds a parameter type and mode for a specific operation.
+ */
+ public void addParameter(String paramName, QName xmlType, ParameterMode parameterMode)
+ {
+ TypeMappingImpl typeMapping = getEndpointMetaData().getServiceMetaData().getTypeMapping();
+ Class javaType = typeMapping.getJavaType(xmlType);
+
+ // CTS com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/AddGetRemoveAllParametersTest1
+ // tests addParameter/getParameter without giving the javaType for a custom parameter
+ // IMHO, this flavour of addParameter should only be used for standard types, where
+ // the javaType can be derived from the xmlType
+ if (javaType == null)
+ {
+ log.warn("Register unqualified call parameter for: " + xmlType);
+ javaType = new UnqualifiedCallParameter(xmlType).getClass();
+ typeMapping.register(javaType, xmlType, null, null);
+ }
+
+ addParameter(paramName, xmlType, javaType, parameterMode);
+ }
+
+ /** Adds a parameter type and mode for a specific operation.
+ */
+ public void addParameter(String paramName, QName xmlType, Class javaType, ParameterMode mode)
+ {
+ QName xmlName = new QName(paramName);
+ addParameter(xmlName, xmlType, javaType, mode, false);
+ }
+
+ /** Add a parameter to the current operation description.
+ * This is a propriatary extension that gives full control over the parameter configuration.
+ */
+ public void addParameter(QName xmlName, QName xmlType, Class javaType, ParameterMode mode, boolean inHeader)
+ {
+ if (xmlType == null || javaType == null)
+ throw new IllegalArgumentException("Invalid null parameter");
+
+ OperationMetaData opMetaData = getOperationMetaData();
+ ParameterMetaData paramMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaType.getName());
+ paramMetaData.setMode(mode);
+ paramMetaData.setInHeader(inHeader);
+ paramMetaData.setIndex(opMetaData.getParameters().size());
+ opMetaData.addParameter(paramMetaData);
+
+ registerParameterType(xmlType, javaType);
+ }
+
+ /** Removes all specified parameters from this Call instance. Note that this method removes only the parameters and
+ * not the return type. The setReturnType(null) is used to remove the return type.
+ *
+ * @throws javax.xml.rpc.JAXRPCException This exception may be thrown If this method is called when the method isParameterAndReturnSpecRequired returns false for this Call's operation.
+ */
+ public void removeAllParameters()
+ {
+ OperationMetaData opMetaData = getOperationMetaData();
+ opMetaData.removeAllParameters();
+ }
+
+ /** Sets the return type for a specific operation. Invoking setReturnType(null) removes the return type for this Call object.
+ */
+ public void setReturnType(QName xmlType)
+ {
+ Class javaType = getEndpointMetaData().getServiceMetaData().getTypeMapping().getJavaType(xmlType);
+ setReturnType(xmlType, javaType);
+ }
+
+ /** Sets the return type for a specific operation.
+ */
+ public void setReturnType(QName xmlType, Class javaType)
+ {
+ if (xmlType == null || javaType == null)
+ throw new IllegalArgumentException("Invalid null parameter");
+
+ OperationMetaData opMetaData = getOperationMetaData();
+ QName xmlName = new QName(Constants.DEFAULT_RPC_RETURN_NAME);
+ String javaTypeName = javaType.getName();
+ ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
+ opMetaData.setReturnParameter(retMetaData);
+
+ registerParameterType(xmlType, javaType);
+ }
+
+ /** Invokes a remote method using the one-way interaction mode.
+ */
+ public void invokeOneWay(Object[] inputParams)
+ {
+ try
+ {
+ invokeInternal(operationName, inputParams, true);
+ }
+ catch (RemoteException ex)
+ {
+ throw new JAXRPCException(ex);
+ }
+ }
+
+ /** Invokes a specific operation using a synchronous request-response interaction mode.
+ */
+ public Object invoke(Object[] inputParams) throws RemoteException
+ {
+ return invokeInternal(operationName, inputParams, false);
+ }
+
+ /** Invokes a specific operation using a synchronous request-response interaction mode.
+ */
+ public Object invoke(QName operationName, Object[] inputParams) throws RemoteException
+ {
+ return invokeInternal(operationName, inputParams, false);
+ }
+
+ protected CommonMessageContext processPivot(CommonMessageContext requestContext) {
+ log.debug("Begin response processing");
+ return requestContext;
+ }
+
+ /** Returns a List values for the output parameters of the last invoked operation.
+ *
+ * @return java.util.List Values for the output parameters. An empty List is returned if there are no output values.
+ * @throws JAXRPCException If this method is invoked for a one-way operation or is invoked before any invoke method has been called.
+ */
+ public List getOutputValues()
+ {
+ if (epInv == null)
+ throw new JAXRPCException("Output params not available");
+
+ try
+ {
+ OperationMetaData opMetaData = getOperationMetaData();
+
+ List<Object> objPayload = new ArrayList<Object>();
+ for (QName xmlName : epInv.getResponseParamNames())
+ {
+ Object paramValue = epInv.getResponseParamValue(xmlName);
+ if (opMetaData.isDocumentWrapped())
+ {
+ objPayload = Arrays.asList((Object[])paramValue);
+ break;
+ }
+ else
+ {
+ objPayload.add(paramValue);
+ }
+ }
+ return objPayload;
+ }
+ catch (SOAPException ex)
+ {
+ throw new JAXRPCException("Cannot obtain response payload", ex);
+ }
+ }
+
+ /** Returns a Map of {name, value} for the output parameters of the last invoked operation.
+ * The parameter names in the returned Map are of type java.lang.String.
+ *
+ * @return Map Output parameters for the last Call.invoke(). Empty Map is returned if there are no output parameters.
+ * @throws JAXRPCException If this method is invoked for a one-way operation or is invoked before any invoke method has been called.
+ */
+ public Map getOutputParams()
+ {
+ if (epInv == null)
+ throw new JAXRPCException("Output params not available");
+
+ try
+ {
+ Map<String, Object> outMap = new LinkedHashMap<String, Object>();
+ for (QName xmlName : epInv.getResponseParamNames())
+ {
+ Object value = epInv.getResponseParamValue(xmlName);
+ outMap.put(xmlName.getLocalPart(), value);
+ }
+ return outMap;
+ }
+ catch (SOAPException ex)
+ {
+ throw new JAXRPCException("Cannot obtain response payload", ex);
+ }
+ }
+
+ /**
+ * Gets the qualified name of the port type.
+ *
+ * @return Qualified name of the port type
+ */
+ public QName getPortTypeName()
+ {
+ if (portType != null)
+ {
+ return portType;
+ }
+
+ /* This code could be used to derive the portType from the endpoint meta data.
+ * However, it breaks CTS com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPortTypeNameTest2
+ if (epMetaData != null)
+ {
+ ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
+ WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
+ WSDLService wsdlService = wsdlDefinitions.getService(new NCName(serviceMetaData.getName().getLocalPart()));
+ WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(epMetaData.getName());
+ WSDLInterface wsdlInterface = wsdlEndpoint.getInterface();
+ return wsdlInterface.getQName();
+ }
+ */
+
+ // CTS com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPortTypeNameTest2
+ return new QName("");
+ }
+
+ /**
+ * Gets the return type for a specific operation
+ *
+ * @return Returns the XML type for the return value
+ */
+ public QName getReturnType()
+ {
+ QName retType = null;
+ if (operationName != null)
+ {
+ OperationMetaData opDesc = getOperationMetaData();
+ ParameterMetaData retMetaData = opDesc.getReturnParameter();
+ if (retMetaData != null)
+ retType = retMetaData.getXmlType();
+ }
+ return retType;
+ }
+
+ /**
+ * Sets the qualified name of the interface.
+ *
+ * @param portType - Qualified name of the port type
+ */
+ public void setPortTypeName(QName portType)
+ {
+ this.portType = portType;
+ }
+
+ /**
+ * Indicates whether addParameter and setReturnType methods are to be invoked to specify the parameter and return
+ * type specification for a specific operation.
+ *
+ * @param opName Qualified name of the operation
+ * @return Returns true if the Call implementation class requires addParameter and setReturnType to be invoked in the client code for the specified operation. This method returns false otherwise.
+ * @throws IllegalArgumentException If invalid operation name is specified
+ */
+ public boolean isParameterAndReturnSpecRequired(QName opName)
+ {
+ setOperationName(opName);
+ OperationMetaData opMetaData = getOperationMetaData();
+ return opMetaData.getParameters().size() == 0 && opMetaData.getReturnParameter() == null;
+ }
+
+ /** Gets the names of configurable properties supported by this Call object.
+ * @return Iterator for the property names
+ */
+ public Iterator getPropertyNames()
+ {
+ return standardProperties.iterator();
+ }
+
+ /** Gets the value of a named property.
+ */
+ public Object getProperty(String name)
+ {
+ if (null == name)
+ throw new JAXRPCException("Unsupported property: " + name);
+ // CTS: com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPropertyTest2
+ if (name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
+ throw new JAXRPCException("Unsupported property: " + name);
+
+ return properties.get(name);
+ }
+
+ /** Sets the value for a named property.
+ */
+ public void setProperty(String name, Object value)
+ {
+ if (null == name)
+ throw new JAXRPCException("Unsupported property: " + name);
+ // CTS: com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPropertyTest2
+ if (name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
+ throw new JAXRPCException("Unsupported property: " + name);
+
+ properties.put(name, value);
+ }
+
+ /** Removes a named property.
+ */
+ public void removeProperty(String name)
+ {
+ properties.remove(name);
+ }
+
+ /** Gets the XML type of a parameter by name.
+ */
+ public QName getParameterTypeByName(String paramName)
+ {
+ OperationMetaData opMetaData = getOperationMetaData();
+ ParameterMetaData paramMetaData = opMetaData.getParameter(new QName(paramName));
+ if (paramMetaData != null)
+ return paramMetaData.getXmlType();
+ else return null;
+ }
+
+ @Override
+ protected void setInboundContextProperties()
+ {
+ }
+
+ @Override
+ protected void setOutboundContextProperties()
+ {
+ }
+
+ private Object invokeInternal(QName opName, Object[] inputParams, boolean forceOneway) throws RemoteException
+ {
+ if (opName.equals(operationName) == false)
+ setOperationName(opName);
+
+ OperationMetaData opMetaData = getOperationMetaData();
+
+ // Check or generate the the schema if this call is unconfigured
+ generateOrUpdateSchemas(opMetaData);
+
+ // Associate a message context with the current thread
+ SOAPMessageContextJAXRPC msgContext = new SOAPMessageContextJAXRPC();
+ MessageContextAssociation.pushMessageContext(msgContext);
+ Object retObj = null;
+ try
+ {
+ retObj = super.invoke(opName, inputParams, properties, forceOneway);
+ return retObj;
+ }
+ catch (SOAPFaultException ex)
+ {
+ log.error("Call invocation failed", ex);
+ String faultCode = ex.getFaultCode().getLocalPart();
+ throw new RemoteException("Call invocation failed with code [" + faultCode + "] because of: " + ex.getFaultString(), ex);
+ }
+ catch (RemoteException rex)
+ {
+ throw rex;
+ }
+ catch (WSTimeoutException toex)
+ {
+ throw toex;
+ }
+ catch (Exception ex)
+ {
+ throw new RemoteException("Call invocation failed", ex);
+ }
+ finally
+ {
+ // Reset the message context association
+ MessageContextAssociation.popMessageContext();
+ }
+ }
+
+ @Override
+ protected boolean callRequestHandlerChain(QName portName, HandlerType type)
+ {
+ SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
+ HandlerChainBaseImpl handlerChain = (HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
+ boolean status = (handlerChain != null ? handlerChain.handleRequest(msgContext, type) : true);
+
+ if (type == HandlerType.ENDPOINT)
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
+ }
+
+ @Override
+ protected boolean callResponseHandlerChain(QName portName, HandlerType type)
+ {
+ SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
+ HandlerChainBaseImpl handlerChain = (HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
+
+ boolean status = true;
+ if (handlerChain != null)
+ {
+ status = handlerChain.handleResponse(msgContext, type);
+ }
+ return status;
+ }
+
+ /** Generate or update the XSD schema for all parameters and the return.
+ * This should only be done when the Call is unconfigured, hence there is no WSDL
+ */
+ private void generateOrUpdateSchemas(OperationMetaData opMetaData)
+ {
+ ServiceMetaData serviceMetaData = opMetaData.getEndpointMetaData().getServiceMetaData();
+ if (serviceMetaData.getWsdlLocation() == null)
+ {
+ TypesMetaData typesMetaData = serviceMetaData.getTypesMetaData();
+ for (ParameterMetaData paramMetaData : opMetaData.getParameters())
+ {
+ generateOrUpdateParameterSchema(typesMetaData, paramMetaData);
+ }
+
+ ParameterMetaData retMetaData = opMetaData.getReturnParameter();
+ if (retMetaData != null)
+ {
+ generateOrUpdateParameterSchema(typesMetaData, retMetaData);
+ }
+ }
+ }
+
+ /** Generate or update the XSD schema for a given parameter
+ * This should only be done if the parameter is not an attachment
+ */
+ private void generateOrUpdateParameterSchema(TypesMetaData typesMetaData, ParameterMetaData paramMetaData)
+ {
+ if (paramMetaData.isSwA() == false)
+ {
+ QName xmlType = paramMetaData.getXmlType();
+ Class javaType = paramMetaData.getJavaType();
+
+ ServiceMetaData serviceMetaData = getEndpointMetaData().getServiceMetaData();
+ TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
+ SerializerFactory serFactory = typeMapping.getSerializer(javaType, xmlType);
+ if (serFactory instanceof JBossXBSerializerFactory)
+ {
+ SchemaGenerator xsdGenerator = new SchemaGenerator();
+ JBossXSModel model = xsdGenerator.generateXSDSchema(xmlType, javaType);
+ typesMetaData.addSchemaModel(model);
+ }
+ }
+ }
+
+ private void registerParameterType(QName xmlType, Class javaType)
+ {
+ ServiceMetaData serviceMetaData = getEndpointMetaData().getServiceMetaData();
+
+ String nsURI = xmlType.getNamespaceURI();
+ if (Constants.NS_ATTACHMENT_MIME_TYPE.equals(nsURI) == false)
+ {
+ TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
+ Class regJavaType = typeMapping.getJavaType(xmlType);
+ if (regJavaType == null)
+ {
+ typeMapping.register(javaType, xmlType, new JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
+ }
+ else if (regJavaType != null && JavaUtils.isAssignableFrom(regJavaType, javaType) == false)
+ {
+ throw new IllegalArgumentException("Different java type already registered: " + regJavaType.getName());
+ }
+ }
+ }
+
+ @Override
+ public void setConfigName(String configName, String configFile)
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ epMetaData.setConfigName(configName, configFile);
+
+ // Reinitialize the client handler chain
+ jaxrpcService.setupHandlerChain(epMetaData);
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,119 @@
+/*
+* 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.core.jaxrpc.client;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.HandlerChain;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.HandlerRegistry;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.jaxrpc.handler.ClientHandlerChain;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * Provides support for the programmatic configuration of
+ * handlers in a HandlerRegistry.
+ *
+ * A handler chain is registered per service endpoint, as indicated by the
+ * qualified name of a port. The getHandlerChain returns the handler chain
+ * (as a java.util.List) for the specified service endpoint. The returned
+ * handler chain is configured using the java.util.List interface. Each element
+ * in this list is required to be of the Java type
+ * javax.xml.rpc.handler.HandlerInfo.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 20-Jul-2005
+ */
+public class HandlerRegistryImpl implements HandlerRegistry
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(HandlerRegistryImpl.class);
+
+ // Map<QName,HandlerChain> the endpoint name to a HandlerChain
+ private Map<QName, HandlerChain> handlerChains = new HashMap<QName, HandlerChain>();
+ // Maps the port name to a list of HandlerInfo objects
+ private Map<QName, List<HandlerInfo>> handlerInfos = new HashMap<QName, List<HandlerInfo>>();
+ // The service this registry is associated with
+ private ServiceMetaData serviceMetaData;
+
+ public HandlerRegistryImpl(ServiceMetaData serviceMetaData)
+ {
+ this.serviceMetaData = serviceMetaData;
+ }
+
+ public List getHandlerChain(QName portName)
+ {
+ List<HandlerInfo> list = handlerInfos.get(portName);
+ if (list == null)
+ list = new ArrayList<HandlerInfo>();
+
+ return new ArrayList(list);
+ }
+
+ public void setHandlerChain(QName portName, List chain)
+ {
+ registerClientHandlerChain(portName, chain, null);
+ }
+
+ /** Get the handler chain for the given endpoint name, maybe null.
+ */
+ HandlerChain getHandlerChainInstance(QName portName)
+ {
+ HandlerChain handlerChain = handlerChains.get(portName);
+ return handlerChain;
+ }
+
+ /** Register a handler chain for the given endpoint name
+ */
+ void registerClientHandlerChain(QName portName, List<HandlerInfo> infos, Set<String> roles)
+ {
+ ClientHandlerChain chain = new ClientHandlerChain(infos, roles);
+ handlerChains.put(portName, chain);
+ handlerInfos.put(portName, infos);
+
+ EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
+ if (epMetaData == null)
+ throw new IllegalStateException("Cannot obtain endpoint meta data for: " + portName);
+
+ epMetaData.clearHandlers();
+ for (HandlerInfo info : infos)
+ {
+ HandlerMetaDataJAXRPC handler = new HandlerMetaDataJAXRPC(epMetaData, HandlerType.ENDPOINT);
+ handler.setHandlerClassName(info.getHandlerClass().getName());
+ handler.setSoapRoles(roles);
+ log.debug("Add handler to: " + portName + handler);
+ epMetaData.addHandler(handler);
+ }
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/PortProxy.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/PortProxy.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/PortProxy.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,210 @@
+/*
+* 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.core.jaxrpc.client;
+
+// $Id$
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.soap.SOAPFaultException;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+
+/**
+ * The dynamic proxy that delegates to the underlying Call implementation
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jan-2005
+ */
+public class PortProxy implements InvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(PortProxy.class);
+
+ // The underlying Call
+ private CallImpl call;
+ // List<Method> of the Stub methods
+ private List stubMethods;
+ // List<Method> of the Object methods
+ private List objectMethods;
+
+ // The set of standard properties
+ private static final Set<String> standardProperties = new HashSet<String>();
+ static
+ {
+ standardProperties.add(Stub.ENDPOINT_ADDRESS_PROPERTY);
+ standardProperties.add(Stub.SESSION_MAINTAIN_PROPERTY);
+ standardProperties.add(Stub.USERNAME_PROPERTY);
+ standardProperties.add(Stub.PASSWORD_PROPERTY);
+ }
+
+ // The map of jboss-ws4ee supported properties
+ private static final Map<String,String> legacyPropertyMap = new HashMap<String,String>();
+ static
+ {
+ legacyPropertyMap.put("org.jboss.webservice.client.timeout", StubExt.PROPERTY_CLIENT_TIMEOUT);
+ legacyPropertyMap.put("org.jboss.webservice.keyStore", StubExt.PROPERTY_KEY_STORE);
+ legacyPropertyMap.put("org.jboss.webservice.keyStorePassword", StubExt.PROPERTY_KEY_STORE_PASSWORD);
+ legacyPropertyMap.put("org.jboss.webservice.keyStoreType", StubExt.PROPERTY_KEY_STORE_TYPE);
+ legacyPropertyMap.put("org.jboss.webservice.trustStore", StubExt.PROPERTY_TRUST_STORE);
+ legacyPropertyMap.put("org.jboss.webservice.trustStorePassword", StubExt.PROPERTY_TRUST_STORE_PASSWORD);
+ legacyPropertyMap.put("org.jboss.webservice.trustStoreType", StubExt.PROPERTY_TRUST_STORE_TYPE);
+ }
+
+ public PortProxy(CallImpl call)
+ {
+ this.call = call;
+ this.stubMethods = new ArrayList(Arrays.asList(StubExt.class.getMethods()));
+ this.stubMethods.addAll(Arrays.asList(Stub.class.getMethods()));
+ this.objectMethods = Arrays.asList(Object.class.getMethods());
+ }
+
+ /** Processes a method invocation on a proxy instance and returns the result.
+ */
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ // An invocation on the Stub interface
+ String methodName = method.getName();
+ if (stubMethods.contains(method))
+ {
+ if (methodName.equals("_getPropertyNames"))
+ {
+ return call.getPropertyNames();
+ }
+ else if (methodName.equals("_getProperty"))
+ {
+ return getProperty((String)args[0]);
+ }
+ else if (methodName.equals("_setProperty"))
+ {
+ setProperty((String)args[0], args[1]);
+ return null;
+ }
+ else
+ {
+ Method callMethod = CallImpl.class.getMethod(methodName, method.getParameterTypes());
+ return callMethod.invoke(call, args);
+ }
+ }
+
+ // An invocation on proxy's Object class
+ else if (objectMethods.contains(method))
+ {
+ Method callMethod = CallImpl.class.getMethod(methodName, method.getParameterTypes());
+ return callMethod.invoke(call, args);
+ }
+
+ // An invocation on the service endpoint interface
+ else
+ {
+ EndpointMetaData epMetaData = call.getEndpointMetaData();
+ OperationMetaData opMetaData = epMetaData.getOperation(method);
+ if (opMetaData == null)
+ throw new WSException("Cannot obtain operation meta data for: " + methodName);
+
+ call.setOperationName(opMetaData.getQName());
+
+ try
+ {
+ if (opMetaData.isOneWay())
+ {
+ call.invokeOneWay(args);
+ return null;
+ }
+ else
+ {
+ Object retObj = call.invoke(args);
+ if (retObj != null)
+ {
+ Class retType = method.getReturnType();
+ if (retType == null)
+ throw new WSException("Return value not supported by: " + opMetaData);
+
+ if (JavaUtils.isPrimitive(retType))
+ retObj = JavaUtils.getPrimitiveValueArray(retObj);
+ }
+ return retObj;
+ }
+ }
+ catch (Exception ex)
+ {
+ handleException(ex);
+ return null;
+ }
+ }
+ }
+
+ private Object getProperty(String name)
+ {
+ name = assertPropertyName(name);
+ return call.getProperty(name);
+ }
+
+ private void setProperty(String name, Object value)
+ {
+ name = assertPropertyName(name);
+ call.setProperty(name, value);
+ }
+
+ private String assertPropertyName(String name)
+ {
+ if (name != null && name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
+ throw new JAXRPCException("Unsupported property: " + name);
+
+ if (legacyPropertyMap.keySet().contains(name))
+ {
+ String jbosswsName = legacyPropertyMap.get(name);
+ log.warn("Legacy propery '" + name + "' mapped to '" + jbosswsName + "'");
+ name = jbosswsName;
+ }
+
+ return name;
+ }
+
+ private void handleException(Exception ex) throws Throwable
+ {
+ Throwable th = ex;
+ if (ex instanceof RemoteException && ex.getCause() instanceof SOAPFaultException)
+ {
+ SOAPFaultException faultEx = (SOAPFaultException)ex.getCause();
+ if (faultEx.getCause() != null)
+ th = faultEx.getCause();
+ }
+ throw th;
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceExt.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceExt.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceExt.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceExt.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,42 @@
+/*
+* 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.core.jaxrpc.client;
+
+//$Id$
+
+import javax.xml.rpc.Service;
+import javax.xml.rpc.handler.HandlerRegistry;
+
+/**
+ * Extends the JAXRPC Service with JBoss propriatary behaviour
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 27-Jan-2005
+ */
+public interface ServiceExt extends Service
+{
+ /**
+ * Get a HandlerRegistry that can be used to dynamically
+ * change the client side handler chain
+ */
+ HandlerRegistry getDynamicHandlerRegistry();
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceFactoryImpl.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,160 @@
+/*
+* 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.core.jaxrpc.client;
+
+// $Id$
+
+import java.net.URL;
+import java.util.Properties;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.ServiceFactory;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+
+/**
+ * Service class acts as a factory for:
+ * <ul>
+ * <li>Dynamic proxy for the target service endpoint.
+ * <li>Instance of the type javax.xml.rpc.Call for the dynamic invocation of a remote operation on the target service endpoint.
+ * <li>Instance of a generated stub class
+ * </ul>
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class ServiceFactoryImpl extends ServiceFactory
+{
+ // provide logging
+ private final Logger log = Logger.getLogger(ServiceFactoryImpl.class);
+
+ /**
+ * Create an instance of the generated service implementation class for a given service interface, if available.
+ *
+ * @param serviceInterface Service interface
+ * @return A Service
+ * @throws ServiceException If there is any error while creating the specified service, including the case where a
+ * generated service implementation class cannot be located
+ */
+ public Service loadService(Class serviceInterface) throws ServiceException
+ {
+ throw new NotImplementedException();
+ }
+
+ /**
+ * Create an instance of the generated service implementation class for a given service interface, if available.
+ * An implementation may use the provided wsdlDocumentLocation and properties to help locate the generated implementation class.
+ * If no such class is present, a ServiceException will be thrown.
+ *
+ * @param wsdlDocumentLocation URL for the WSDL document location for the service or null
+ * @param serviceInterface Service interface
+ * @param props A set of implementation-specific properties to help locate the generated service implementation class
+ * @return A Service
+ * @throws ServiceException If there is any error while creating the specified service, including the case where a
+ * generated service implementation class cannot be located
+ */
+ public Service loadService(URL wsdlDocumentLocation, Class serviceInterface, Properties props) throws ServiceException
+ {
+ throw new NotImplementedException();
+ }
+
+ /**
+ * Create an instance of the generated service implementation class for a given service, if available.
+ * The service is uniquely identified by the wsdlDocumentLocation and serviceName arguments.
+ * An implementation may use the provided properties to help locate the generated implementation class.
+ * If no such class is present, a ServiceException will be thrown.
+ *
+ * @param wsdlDocumentLocation URL for the WSDL document location for the service or null
+ * @param serviceName Qualified name for the service
+ * @param props A set of implementation-specific properties to help locate the generated service implementation class
+ * @return A Service
+ * @throws ServiceException If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located
+ */
+ public Service loadService(URL wsdlDocumentLocation, QName serviceName, Properties props) throws ServiceException
+ {
+ throw new NotImplementedException();
+ }
+
+ /**
+ * Create a <code>Service</code> instance.
+ *
+ * @param serviceName QName for the service
+ * @return Service.
+ * @throws ServiceException If any error in creation of the specified service
+ */
+ public Service createService(QName serviceName) throws ServiceException
+ {
+ return new ServiceImpl(serviceName);
+ }
+
+ /**
+ * Create a <code>Service</code> instance.
+ *
+ * @param wsdlURL URL for the WSDL document location
+ * @param serviceName QName for the service.
+ * @return Service.
+ * @throws ServiceException If any error in creation of the specified service
+ */
+ public Service createService(URL wsdlURL, QName serviceName) throws ServiceException
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+
+ URL mappingURL = cl.getResource("META-INF/jaxrpc-mapping.xml");
+ if (mappingURL != null)
+ log.info("Use jaxrpc-mapping from: " + mappingURL);
+
+ return createService(wsdlURL, serviceName, mappingURL, null);
+ }
+
+ /**
+ * Create a <code>Service</code> instance.
+ *
+ * @param wsdlURL URL for the WSDL document location
+ * @param serviceName QName for the service.
+ * @param mappingURL URL for the jaxrpc-mapping.xml document location
+ * @return Service.
+ * @throws ServiceException If any error in creation of the specified service
+ */
+ public Service createService(URL wsdlURL, QName serviceName, URL mappingURL) throws ServiceException
+ {
+ return createService(wsdlURL, serviceName, mappingURL, null);
+ }
+
+ /**
+ * Create a <code>Service</code> instance.
+ *
+ * @param wsdlURL URL for the WSDL document location
+ * @param serviceName QName for the service.
+ * @param mappingURL URL for the jaxrpc-mapping.xml document location
+ * @param securityURL URL for the jboss-ws-security.xml file
+ * @return Service.
+ * @throws ServiceException If any error in creation of the specified service
+ */
+ public Service createService(URL wsdlURL, QName serviceName, URL mappingURL, URL securityURL) throws ServiceException
+ {
+ ServiceImpl service = new ServiceImpl(serviceName, wsdlURL, mappingURL, securityURL);
+ return service;
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,451 @@
+/*
+ * 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.core.jaxrpc.client;
+
+// $Id$
+
+import java.lang.reflect.Proxy;
+import java.net.URL;
+import java.rmi.Remote;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.encoding.TypeMappingRegistry;
+import javax.xml.rpc.handler.HandlerChain;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.HandlerRegistry;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
+import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+
+/**
+ * Service class acts as a factory for:
+ * <ul>
+ * <li>Dynamic proxy for the target service endpoint.
+ * <li>Instance of the type javax.xml.rpc.Call for the dynamic invocation of a
+ * remote operation on the target service endpoint.
+ * <li>Instance of a generated stub class
+ * </ul>
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class ServiceImpl implements ServiceExt
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceImpl.class);
+
+ // The service meta data that is associated with this JAXRPC Service
+ private ServiceMetaData serviceMetaData;
+
+ // The optional WSDL location
+ private URL wsdlLocation;
+
+ // The handler registry
+ private HandlerRegistryImpl handlerRegistry;
+
+ /**
+ * Construct a Service without WSDL meta data
+ */
+ ServiceImpl(QName serviceName)
+ {
+ UnifiedMetaData wsMetaData = new UnifiedMetaData(new ResourceLoaderAdapter());
+ serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
+ }
+
+ /**
+ * Construct a Service that has access to some WSDL meta data
+ */
+ ServiceImpl(QName serviceName, URL wsdlURL, URL mappingURL, URL securityURL)
+ {
+ this.wsdlLocation = wsdlURL;
+ JAXRPCClientMetaDataBuilder builder = new JAXRPCClientMetaDataBuilder();
+
+ ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
+
+ serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityURL, null, ctxClassLoader);
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
+ }
+
+ /**
+ * Construct a Service that has access to some WSDL meta data
+ */
+ ServiceImpl(QName serviceName, URL wsdlURL, JavaWsdlMapping mappingURL, WSSecurityConfiguration securityConfig, UnifiedServiceRefMetaData serviceRefMetaData)
+ {
+ this.wsdlLocation = wsdlURL;
+ JAXRPCClientMetaDataBuilder builder = new JAXRPCClientMetaDataBuilder();
+
+ ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
+
+ serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityConfig, serviceRefMetaData, ctxClassLoader);
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
+ }
+
+ public ServiceMetaData getServiceMetaData()
+ {
+ return serviceMetaData;
+ }
+
+ /**
+ * Gets the location of the WSDL document for this Service.
+ *
+ * @return URL for the location of the WSDL document for this service
+ */
+ public URL getWSDLDocumentLocation()
+ {
+ return wsdlLocation;
+ }
+
+ /**
+ * Gets the name of this service.
+ *
+ * @return Qualified name of this service
+ */
+ public QName getServiceName()
+ {
+ return serviceMetaData.getServiceName();
+ }
+
+ /**
+ * Creates a Call instance.
+ *
+ * @param portName
+ * Qualified name for the target service endpoint
+ * @return Call instance
+ * @throws javax.xml.rpc.ServiceException
+ * If any error in the creation of the Call object
+ */
+ public Call createCall(QName portName) throws ServiceException
+ {
+ String nsURI = portName.getNamespaceURI();
+ serviceMetaData.assertTargetNamespace(nsURI);
+ return new CallImpl(this, portName, null);
+ }
+
+ /**
+ * Creates a Call instance.
+ *
+ * @param portName
+ * Qualified name for the target service endpoint
+ * @param operationName
+ * Name of the operation for which this Call object is to be
+ * created.
+ * @return Call instance
+ * @throws javax.xml.rpc.ServiceException
+ * If any error in the creation of the Call object
+ */
+ public Call createCall(QName portName, String operationName) throws ServiceException
+ {
+ String nsURI = portName.getNamespaceURI();
+ serviceMetaData.assertTargetNamespace(nsURI);
+ QName opName = new QName(nsURI, operationName);
+ return new CallImpl(this, portName, opName);
+ }
+
+ /**
+ * Creates a Call instance.
+ *
+ * @param portName
+ * Qualified name for the target service endpoint
+ * @param opName
+ * Qualified name of the operation for which this Call object is
+ * to be created.
+ * @return Call instance
+ * @throws javax.xml.rpc.ServiceException
+ * If any error in the creation of the Call object
+ */
+ public Call createCall(QName portName, QName opName) throws ServiceException
+ {
+ serviceMetaData.assertTargetNamespace(portName.getNamespaceURI());
+ serviceMetaData.assertTargetNamespace(opName.getNamespaceURI());
+ return new CallImpl(this, portName, opName);
+ }
+
+ /**
+ * Creates a Call object not associated with specific operation or target
+ * service endpoint. This Call object needs to be configured using the
+ * setter methods on the Call interface.
+ *
+ * @return Call object
+ * @throws javax.xml.rpc.ServiceException
+ * If any error in the creation of the Call object
+ */
+ public Call createCall() throws ServiceException
+ {
+ return new CallImpl(this);
+ }
+
+ /**
+ * Gets an array of preconfigured Call objects for invoking operations on
+ * the specified port. There is one Call object per operation that can be
+ * invoked on the specified port. Each Call object is pre-configured and
+ * does not need to be configured using the setter methods on Call
+ * interface. <p/> Each invocation of the getCalls method returns a new
+ * array of preconfigured Call objects <p/> This method requires the Service
+ * implementation class to have access to the WSDL related metadata.
+ *
+ * @param portName
+ * Qualified name for the target service endpoint
+ * @return Call[] Array of pre-configured Call objects
+ * @throws javax.xml.rpc.ServiceException
+ * If this Service class does not have access to the required
+ * WSDL metadata or if an illegal endpointName is specified.
+ */
+ public Call[] getCalls(QName portName) throws ServiceException
+ {
+ EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
+ if (epMetaData == null)
+ throw new ServiceException("Cannot find endpoint for name: " + portName);
+
+ List<Call> calls = new ArrayList<Call>();
+ for (OperationMetaData opMetaData : epMetaData.getOperations())
+ {
+ Call call = createCall(portName, opMetaData.getQName());
+ calls.add(call);
+ }
+
+ Call[] callArr = new Call[calls.size()];
+ calls.toArray(callArr);
+
+ return callArr;
+ }
+
+ /**
+ * J2EE components should not use the getHandlerRegistry() method. A
+ * container provider must throw a java.lang.UnsupportedOperationException
+ * from the getHandlerRegistry() method of the Service Interface. Handler
+ * support is documented in Chapter 6 Handlers.
+ */
+ public HandlerRegistry getHandlerRegistry()
+ {
+ throw new UnsupportedOperationException("Components should not use the getHandlerRegistry() method.");
+ }
+
+ /**
+ * Get a HandlerRegistry that can be used to dynamically change the client
+ * side handler chain associated with a given endpoint.
+ */
+ public HandlerRegistry getDynamicHandlerRegistry()
+ {
+ return handlerRegistry;
+ }
+
+ /**
+ * J2EE components should not use the getTypeMappingRegistry() method. A
+ * container provider must throw a java.lang.UnsupportedOperationException
+ * from the getTypeMappingRegistry() method of the Service Interface.
+ */
+ public TypeMappingRegistry getTypeMappingRegistry()
+ {
+ throw new UnsupportedOperationException("Components should not use the getTypeMappingRegistry() method.");
+ }
+
+ /**
+ * Returns an Iterator for the list of QNames of service endpoints grouped
+ * by this service
+ *
+ * @return Returns java.util.Iterator with elements of type
+ * javax.xml.namespace.QName
+ * @throws javax.xml.rpc.ServiceException
+ * If this Service class does not have access to the required
+ * WSDL metadata
+ */
+ public Iterator getPorts() throws ServiceException
+ {
+ ArrayList<QName> list = new ArrayList<QName>();
+ if (serviceMetaData != null)
+ {
+ for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
+ {
+ list.add(epMetaData.getPortName());
+ }
+ }
+ return list.iterator();
+ }
+
+ /**
+ * The getPort method returns either an instance of a generated stub
+ * implementation class or a dynamic proxy. The parameter
+ * serviceEndpointInterface specifies the service endpoint interface that is
+ * supported by the returned stub or proxy. In the implementation of this
+ * method, the JAX-RPC runtime system takes the responsibility of selecting
+ * a protocol binding (and a port) and configuring the stub accordingly. The
+ * returned Stub instance should not be reconfigured by the client.
+ */
+ public Remote getPort(Class seiClass) throws ServiceException
+ {
+ if (seiClass == null)
+ throw new IllegalArgumentException("SEI class cannot be null");
+
+ String seiName = seiClass.getName();
+ if (Remote.class.isAssignableFrom(seiClass) == false)
+ throw new ServiceException("SEI does not implement java.rmi.Remote: " + seiName);
+
+ if (serviceMetaData == null)
+ throw new ServiceException("Service meta data not available");
+
+ try
+ {
+ EndpointMetaData epMetaData = serviceMetaData.getEndpointByServiceEndpointInterface(seiName);
+ if (epMetaData == null && serviceMetaData.getEndpoints().size() == 1)
+ {
+ epMetaData = serviceMetaData.getEndpoints().get(0);
+ epMetaData.setServiceEndpointInterfaceName(seiName);
+ }
+
+ if (epMetaData == null)
+ throw new ServiceException("Cannot find endpoint meta data for: " + seiName);
+
+ return createProxy(seiClass, epMetaData);
+ }
+ catch (ServiceException ex)
+ {
+ throw ex;
+ }
+ catch (Exception ex)
+ {
+ throw new ServiceException("Cannot create proxy", ex);
+ }
+ }
+
+ /**
+ * The getPort method returns either an instance of a generated stub
+ * implementation class or a dynamic proxy. A service client uses this
+ * dynamic proxy to invoke operations on the target service endpoint. The
+ * serviceEndpointInterface specifies the service endpoint interface that is
+ * supported by the created dynamic proxy or stub instance.
+ */
+ public Remote getPort(QName portName, Class seiClass) throws ServiceException
+ {
+ if (seiClass == null)
+ throw new IllegalArgumentException("SEI class cannot be null");
+
+ if (serviceMetaData == null)
+ throw new ServiceException("Service meta data not available");
+
+ String seiName = seiClass.getName();
+ if (Remote.class.isAssignableFrom(seiClass) == false)
+ throw new ServiceException("SEI does not implement java.rmi.Remote: " + seiName);
+
+ EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
+ if (epMetaData == null)
+ throw new ServiceException("Cannot obtain endpoint meta data for: " + portName);
+
+ try
+ {
+ if (epMetaData.getServiceEndpointInterfaceName() == null)
+ epMetaData.setServiceEndpointInterfaceName(seiName);
+
+ return createProxy(seiClass, epMetaData);
+ }
+ catch (ServiceException ex)
+ {
+ throw ex;
+ }
+ catch (Exception ex)
+ {
+ throw new ServiceException("Cannot create proxy", ex);
+ }
+ }
+
+ private Remote createProxy(Class seiClass, EndpointMetaData epMetaData) throws Exception
+ {
+ CallImpl call = new CallImpl(this, epMetaData);
+
+ PortProxy handler = new PortProxy(call);
+ ClassLoader cl = epMetaData.getClassLoader();
+ Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass, Stub.class, StubExt.class }, handler);
+
+ return proxy;
+ }
+
+ /**
+ * Get the handler chain for the given endpoint name, maybe null.
+ */
+ public HandlerChain getHandlerChain(QName portName)
+ {
+ return handlerRegistry.getHandlerChainInstance(portName);
+ }
+
+ /**
+ * Register a handler chain for the given endpoint name
+ */
+ public void registerHandlerChain(QName portName, List infos, Set roles)
+ {
+ handlerRegistry.registerClientHandlerChain(portName, infos, roles);
+ }
+
+ void setupHandlerChain(EndpointMetaData epMetaData)
+ {
+ QName portName = epMetaData.getPortName();
+ Set<String> handlerRoles = new HashSet<String>();
+ ArrayList handlerInfos = new ArrayList();
+ for (HandlerMetaData handlerMetaData : epMetaData.getHandlerMetaData(HandlerType.ALL))
+ {
+ HandlerMetaDataJAXRPC jaxrpcMetaData = (HandlerMetaDataJAXRPC)handlerMetaData;
+ handlerRoles.addAll(jaxrpcMetaData.getSoapRoles());
+
+ HashMap hConfig = new HashMap();
+ for (HandlerInitParam param : jaxrpcMetaData.getInitParams())
+ {
+ hConfig.put(param.getParamName(), param.getParamValue());
+ }
+
+ Set<QName> headers = jaxrpcMetaData.getSoapHeaders();
+ QName[] headerArr = new QName[headers.size()];
+ headers.toArray(headerArr);
+
+ Class hClass = jaxrpcMetaData.getHandlerClass();
+ hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
+ HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
+
+ log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
+ handlerInfos.add(info);
+
+ // register the handlers with the client engine
+ if (handlerInfos.size() > 0)
+ registerHandlerChain(portName, handlerInfos, handlerRoles);
+ }
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,252 @@
+/*
+ * 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.
+ */
+// $Id$
+package org.jboss.ws.core.jaxrpc.client;
+
+// $Id$
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.ObjectInputStream;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.rmi.Remote;
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.spi.ObjectFactory;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.Service;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.server.ServiceEndpoint;
+import org.jboss.ws.core.server.ServiceEndpointManager;
+import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
+import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+
+/**
+ * This ServiceObjectFactory reconstructs a javax.xml.rpc.Service
+ * for a given WSDL when the webservice client does a JNDI lookup
+ * <p/>
+ * It uses the information provided by the service-ref element in application-client.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public class ServiceObjectFactory implements ObjectFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
+
+ /**
+ * Creates an object using the location or reference information specified.
+ * <p/>
+ *
+ * @param obj The possibly null object containing location or reference
+ * information that can be used in creating an object.
+ * @param name The name of this object relative to <code>nameCtx</code>,
+ * or null if no name is specified.
+ * @param nameCtx The context relative to which the <code>name</code>
+ * parameter is specified, or null if <code>name</code> is
+ * relative to the default initial context.
+ * @param environment The possibly null environment that is used in
+ * creating the object.
+ * @return The object created; null if an object cannot be created.
+ * @throws Exception if this object factory encountered an exception
+ * while attempting to create an object, and no other object factories are
+ * to be tried.
+ * @see javax.naming.spi.NamingManager#getObjectInstance
+ * @see javax.naming.spi.NamingManager#getURLContext
+ */
+ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
+ {
+ try
+ {
+ Reference ref = (Reference)obj;
+
+ // Unmarshall the ServiceRefMetaData
+ UnifiedServiceRefMetaData serviceRefMetaData = null;
+ RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
+ ByteArrayInputStream bais = new ByteArrayInputStream((byte[])metaRefAddr.getContent());
+ try
+ {
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ serviceRefMetaData = (UnifiedServiceRefMetaData)ois.readObject();
+ ois.close();
+ }
+ catch (IOException ex)
+ {
+ NamingException ne = new NamingException("Cannot unmarshall service ref meta data");
+ ne.setRootCause(ex);
+ throw ne;
+ }
+
+ // Unmarshall the WSSecurityConfiguration
+ WSSecurityConfiguration securityConfig = null;
+ RefAddr wsseRefAddr = ref.get(ServiceReferenceable.SECURITY_CONFIG);
+ if (wsseRefAddr != null)
+ {
+ bais = new ByteArrayInputStream((byte[])wsseRefAddr.getContent());
+ try
+ {
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ securityConfig = (WSSecurityConfiguration)ois.readObject();
+ ois.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot unmarshall security config, cause: " + e.toString());
+ }
+ }
+
+ ServiceImpl jaxrpcService = null;
+ URL wsdlLocation = serviceRefMetaData.getWsdlLocation();
+ if (wsdlLocation != null)
+ {
+ log.debug("Create jaxrpc service from wsdl");
+
+ // Create the actual service object
+ QName serviceName = serviceRefMetaData.getServiceQName();
+ JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)serviceRefMetaData.getJavaWsdlMapping();
+ jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, serviceRefMetaData);
+ }
+ else
+ {
+ log.debug("Create jaxrpc service with no wsdl");
+ jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
+ }
+
+ // Set any service level properties
+ ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
+ serviceMetaData.setProperties(serviceRefMetaData.getCallProperties());
+
+ // The web service client using a port-component-link, the contet is the URL to
+ // the PortComponentLinkServlet that will return the actual endpoint address
+ RefAddr pcLinkRef = ref.get(ServiceReferenceable.PORT_COMPONENT_LINK);
+ if (pcLinkRef != null)
+ {
+ String pcLink = (String)pcLinkRef.getContent();
+ log.debug("Resolving port-component-link: " + pcLink);
+
+ // First try to obtain the endpoint address loacally
+ String endpointAddress = null;
+ try
+ {
+ ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+ ServiceEndpointManager epManager = factory.getServiceEndpointManager();
+ ServiceEndpoint serviceEndpoint = epManager.resolvePortComponentLink(pcLink);
+ if (serviceEndpoint == null)
+ throw new WSException("Cannot resolve port-component-link: " + pcLink);
+
+ endpointAddress = serviceEndpoint.getServiceEndpointInfo().getServerEndpointMetaData().getEndpointAddress();
+ }
+ catch (Exception ex)
+ {
+ // ignore, we are probably a remote client
+ }
+
+ // We may be remote in the esoteric case where an appclient uses the port-comonent-link feature
+ if (endpointAddress == null)
+ {
+ String servletPath = (String)ref.get(ServiceReferenceable.PORT_COMPONENT_LINK_SERVLET).getContent();
+ servletPath += "?pcLink=" + URLEncoder.encode(pcLink, "UTF-8");
+ InputStream is = new URL(servletPath).openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(is));
+ endpointAddress = br.readLine();
+ is.close();
+ }
+
+ log.debug("Resolved to: " + endpointAddress);
+ if (serviceMetaData.getEndpoints().size() == 1)
+ {
+ EndpointMetaData epMetaData = serviceMetaData.getEndpoints().get(0);
+ epMetaData.setEndpointAddress(endpointAddress);
+ }
+ else
+ {
+ log.warn("Cannot set endpoint address for port-component-link, unsuported number of endpoints");
+ }
+ }
+
+ /********************************************************
+ * Setup the Proxy that implements the service-interface
+ ********************************************************/
+
+ // load the service interface class
+ ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
+ Class siClass = contextCL.loadClass(serviceRefMetaData.getServiceInterface());
+ if (Service.class.isAssignableFrom(siClass) == false)
+ throw new JAXRPCException("The service interface does not implement javax.xml.rpc.Service: " + siClass.getName());
+
+ // load all service endpoint interface classes
+ UnifiedPortComponentRefMetaData[] pcrArray = serviceRefMetaData.getPortComponentRefs();
+ for (int i = 0; i < pcrArray.length; i++)
+ {
+ UnifiedPortComponentRefMetaData pcr = pcrArray[i];
+ Class seiClass = contextCL.loadClass(pcr.getServiceEndpointInterface());
+ if (Remote.class.isAssignableFrom(seiClass) == false)
+ throw new IllegalArgumentException("The SEI does not implement java.rmi.Remote: " + seiClass.getName());
+ }
+
+ // Setup the handler chain
+ setupHandlerChain(jaxrpcService);
+
+ InvocationHandler handler = new ServiceProxy(jaxrpcService, siClass);
+ return Proxy.newProxyInstance(contextCL, new Class[] { siClass, ServiceExt.class }, handler);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot create service", ex);
+ throw ex;
+ }
+ }
+
+ /**
+ * Setup the handler chain(s) for this service
+ */
+ private void setupHandlerChain(ServiceImpl jaxrpcService) throws Exception
+ {
+ List<EndpointMetaData> endpoints = jaxrpcService.getServiceMetaData().getEndpoints();
+ for (EndpointMetaData epMetaData : endpoints)
+ {
+ jaxrpcService.setupHandlerChain(epMetaData);
+ }
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceProxy.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -0,0 +1,162 @@
+/*
+* 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.
+*/
+// $Id$
+package org.jboss.ws.core.jaxrpc.client;
+
+// $Id$
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.rmi.Remote;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.Service;
+
+import org.jboss.logging.Logger;
+
+/**
+ * This is the proxy that implements the service interface .
+ * <p/>
+ * Additionally it handles some ws4ee functionality that is not part of jaxrpc behaviour.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-May-2004
+ */
+public class ServiceProxy implements InvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceProxy.class);
+
+ // The underlying jaxrpc service
+ private ServiceImpl jaxrpcService;
+
+ // The methods from java.lang.Object
+ private List objectMethods = new ArrayList();
+ // The methods from javax.xml.rpc.Service
+ private List jaxrpcServiceMethods = new ArrayList();
+ // The methods from the service interface, in case of javax.xml.rpc.Service it is empty
+ private List serviceInterfaceMethods = new ArrayList();
+
+ // The cached getPort method
+ private Method getPortMethod;
+
+ /**
+ * Construct a client side service proxy.
+ * <p/>
+ * This proxy implements the (generated) service interface.
+ *
+ * @param service The underlying {@link javax.xml.rpc.Service}
+ * @param siClass The service interface, a subclass of {@link javax.xml.rpc.Service}
+ */
+ public ServiceProxy(ServiceImpl service, Class siClass)
+ {
+ this.jaxrpcService = service;
+
+ // initialize java.lang.Object methods
+ objectMethods.addAll(Arrays.asList(Object.class.getMethods()));
+
+ // initialize javax.xml.rpc.Service methods
+ jaxrpcServiceMethods.addAll(Arrays.asList(ServiceExt.class.getMethods()));
+
+ // initialize SI methods
+ if (siClass.getName().equals("javax.xml.rpc.Service") == false)
+ serviceInterfaceMethods.addAll(Arrays.asList(siClass.getDeclaredMethods()));
+
+ // initialize special ws4ee methods
+ try
+ {
+ getPortMethod = Service.class.getMethod("getPort", new Class[]{Class.class});
+ }
+ catch (NoSuchMethodException e)
+ {
+ throw new JAXRPCException(e.toString());
+ }
+ }
+
+ /**
+ * Processes a method invocation on a proxy instance and returns
+ * the result.
+ */
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ String methodName = method.getName();
+
+ try
+ {
+ Object retObj = null;
+ if (jaxrpcServiceMethods.contains(method))
+ {
+ log.debug("Invoke on jaxrpc service: " + methodName);
+
+ if (method.getName().equals("getPort"))
+ {
+ Remote port = (Remote)method.invoke(jaxrpcService, args);
+ return port;
+ }
+ else
+ {
+ retObj = method.invoke(jaxrpcService, args);
+ return retObj;
+ }
+ }
+ if (serviceInterfaceMethods.contains(method))
+ {
+ log.debug("Invoke on service interface: " + methodName);
+
+ Class seiClass = method.getReturnType();
+ retObj = getPortMethod.invoke(jaxrpcService, new Object[]{seiClass});
+ return retObj;
+ }
+ if (objectMethods.contains(method))
+ {
+ log.debug("Invoke on object: " + methodName);
+
+ retObj = method.invoke(jaxrpcService, args);
+ return retObj;
+ }
+
+ throw new JAXRPCException("Don't know how to invoke: " + method);
+ }
+ catch (Exception e)
+ {
+ handleException(e);
+ return null;
+ }
+ }
+
+ /**
+ * Log the client side exception
+ */
+ private void handleException(Exception ex) throws Throwable
+ {
+ Throwable th = ex;
+ if (ex instanceof InvocationTargetException)
+ th = ((InvocationTargetException)ex).getTargetException();
+
+ log.error("Service error", th);
+ throw th;
+ }
+}
\ No newline at end of file
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -37,7 +37,6 @@
import javax.naming.StringRefAddr;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.ServiceObjectFactory;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/jaxrpc/ServiceFactoryImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/jaxrpc/ServiceFactoryImpl.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/jaxrpc/ServiceFactoryImpl.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -28,6 +28,6 @@
* Included for backwards compatibility
* @deprecated
*/
-public class ServiceFactoryImpl extends org.jboss.ws.core.jaxrpc.ServiceFactoryImpl
+public class ServiceFactoryImpl extends org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl
{
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedBeanMetaData.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedBeanMetaData.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedBeanMetaData.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -80,12 +80,12 @@
this.portComponent = portComponent;
}
- public String getServiceEndpoint()
+ public String getServiceEndpointInterface()
{
return seiName;
}
- public void setServiceEndpoint(String seiName)
+ public void setServiceEndpointInterface(String seiName)
{
this.seiName = seiName;
}
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -41,7 +41,7 @@
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPBinding;
import org.jboss.ws.core.EndpointInvocation;
-import org.jboss.ws.core.jaxrpc.CallImpl;
+import org.jboss.ws.core.jaxrpc.client.CallImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -45,7 +45,7 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonSOAPBinding;
import org.jboss.ws.core.EndpointInvocation;
-import org.jboss.ws.core.jaxrpc.CallImpl;
+import org.jboss.ws.core.jaxrpc.client.CallImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test case to test that when a deployment contains both an endpoint and a
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1107/JBWS1107TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1107/JBWS1107TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1107/JBWS1107TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test case to test that an endpoint can be accessed if there is whitespace
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1124/JBWS1124TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1124/JBWS1124TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1124/JBWS1124TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -31,7 +31,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Scoped class loading domains for WS endpoints
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -37,7 +37,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* The prefix "xsi" for attribute "xsi:nil" is not bound
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1378/JBWS1378TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1378/JBWS1378TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1378/JBWS1378TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* NPE in replaceAddressLocation with SOAP1.2 WSDL
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.tools.WSTools;
/**
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1386/JBWS1386TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1386/JBWS1386TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1386/JBWS1386TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* [JBWS-1386] - ComplexType with base64Binary property
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.WSTimeoutException;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* NumberFormatException From StubExt.PROPERTY_CLIENT_TIMEOUT
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.test.ws.jaxrpc.jbws1427.interfaces.RequestService;
import org.jboss.test.ws.jaxrpc.jbws1427.services.Message;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws950/JBWS950TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws950/JBWS950TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws950/JBWS950TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Attributes of type xsd:QName incorrectly serialized
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws956/JBWS956TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws956/JBWS956TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws956/JBWS956TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Deserialization of complex bean containing an array of complex beans
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.test.ws.jaxrpc.marshall.types.JavaBean;
import org.jboss.ws.Constants;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test the Dynamic Invocation Interface (DII) on the Call
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialServiceDocBareTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialServiceDocBareTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialServiceDocBareTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test JSE test case for an document/literal/bare style service.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialServiceDocWrappedTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test JSE test case for an document/literal/wrapped style service.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceExt;
+import org.jboss.ws.core.jaxrpc.client.ServiceExt;
import org.jboss.ws.core.utils.ObjectNameFactory;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/exception/ExceptionTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/exception/ExceptionTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/exception/ExceptionTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -48,7 +48,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test user exception propagation.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -37,7 +37,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test bound and unbound headers
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderDIITestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderDIITestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderDIITestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
-import org.jboss.ws.core.jaxrpc.CallImpl;
+import org.jboss.ws.core.jaxrpc.client.CallImpl;
/**
* Test the Dynamic Invocation Interface (DII) on the Call
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
/**
* Test bound and unbound headers
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -56,7 +56,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test Holders
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,8 +33,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
/**
* Test the Dynamic Invocation Interface (DII) on a Call that is preconfigured from WSDL
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test the Dynamic Invocation Interface (DII) on the Call
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -30,8 +30,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
/**
* Test the DynamicProxy Call
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test JSE endpoint for a document style service.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIConfiguredCallTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIConfiguredCallTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIConfiguredCallTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,8 +33,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
/**
* Test the Dynamic Invocation Interface (DII) on a Call that is preconfigured from WSDL
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIUnconfiguredCallTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIUnconfiguredCallTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIUnconfiguredCallTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test the Dynamic Invocation Interface (DII) on the Call
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test JSE test case for an rpc style service.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcProxyTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcProxyTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcProxyTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -30,8 +30,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
/**
* Test the DynamicProxy Call
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -50,7 +50,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -39,7 +39,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test SOAP with XOP through the JAXRPC dynamic proxy layer.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/oneway/OneWayTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/oneway/OneWayTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/oneway/OneWayTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test JSE test case for onway operations.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialServiceRpcTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialServiceRpcTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialServiceRpcTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test JSE test case for an rpc style service.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentProxyTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentProxyTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentProxyTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -40,7 +40,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
* Test SOAP with Attachements (SwA) through the JAXRPC dynamic proxy layer.
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
/**
* Test WS-Security with RPC/Literal
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
/**
* Test WS-Security with RPC/Literal
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -37,8 +37,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
import org.jboss.ws.extensions.security.jaxrpc.WSSecurityHandlerOutbound;
/**
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jbws1178/JBWS1178TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jbws1178/JBWS1178TestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jbws1178/JBWS1178TestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.CallImpl;
+import org.jboss.ws.core.jaxrpc.client.CallImpl;
/**
* [JBWS-1178] Multiple virtual host and soap:address problem
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/complex/client/JSR181ComplexTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/complex/client/JSR181ComplexTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/complex/client/JSR181ComplexTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
/**
*
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -32,8 +32,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.CallImpl;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.CallImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webresult/JSR181WebResultTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webresult/JSR181WebResultTestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webresult/JSR181WebResultTestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -37,8 +37,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.CallImpl;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.CallImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.metadata.umdm.OperationMetaData;
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java 2007-01-29 12:14:45 UTC (rev 2174)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java 2007-01-29 13:02:19 UTC (rev 2175)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
17 years, 11 months
JBossWS SVN: r2174 - in trunk: jbossws-core/src/main/java/org/jboss/ws/tools and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-01-29 07:14:45 -0500 (Mon, 29 Jan 2007)
New Revision: 2174
Added:
trunk/jbossws-core/src/main/resources/schema/eventing.xsd
Removed:
trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToXSD.java
trunk/jbossws-docs/user-guide/project/en/master.template
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java
trunk/jbossws-tests/src/main/resources/jaxws/samples/wseventing/WEB-INF/wsdl/ws-eventing.wsdl
Log:
Resolve eventing.xsd name correctly. Schemaloading uses the EntityResolver now. Subscription.end() message log a warning instead of displaying the stacktrace
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java 2007-01-29 10:40:51 UTC (rev 2173)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java 2007-01-29 12:14:45 UTC (rev 2174)
@@ -177,7 +177,7 @@
}
catch (Exception e)
{
- log.warn("Failed to send subscription end message to: " + this.endTo, e);
+ log.warn("Failed to send subscription end message to: " + this.endTo + "("+e.getMessage()+")");
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToXSD.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2007-01-29 10:40:51 UTC (rev 2173)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2007-01-29 12:14:45 UTC (rev 2174)
@@ -23,14 +23,6 @@
// $Id$
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
import org.apache.xerces.impl.xs.SchemaGrammar;
import org.apache.xerces.impl.xs.XMLSchemaLoader;
import org.apache.xerces.impl.xs.XSModelImpl;
@@ -38,7 +30,6 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.core.utils.JBossWSEntityResolver;
import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
@@ -54,7 +45,16 @@
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
import org.w3c.dom.ls.LSInput;
+import org.xml.sax.InputSource;
+import javax.xml.namespace.QName;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
/**
* <P>
* Handles the conversion of Java classes to XML Schema
@@ -172,7 +172,11 @@
URL url = resURL != null ? resURL : orgURL;
log.debug("Load schema: " + nsURI + "=" + url);
XMLInputSource inputSource = new XMLInputSource(null, url.toExternalForm(), null);
- inputSource.setByteStream(new ResourceURL(url).openStream());
+
+ InputSource tmpSrc = resolver.resolveEntity(null, url.toExternalForm());
+ InputStream in = tmpSrc.getByteStream() != null ? tmpSrc.getByteStream() : new ResourceURL(url).openStream();
+ inputSource.setByteStream(in);
+
SchemaGrammar grammar = (SchemaGrammar)loader.loadGrammar(inputSource);
gs[index++] = grammar;
}
Copied: trunk/jbossws-core/src/main/resources/schema/eventing.xsd (from rev 2172, trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd)
===================================================================
--- trunk/jbossws-core/src/main/resources/schema/eventing.xsd (rev 0)
+++ trunk/jbossws-core/src/main/resources/schema/eventing.xsd 2007-01-29 12:14:45 UTC (rev 2174)
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+(c) 2004 BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc., and TIBCO Software Inc. All rights reserved.
+
+BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc, and TIBCO Software Inc (collectively, the "Authors") hereby grant you permission to copy and display the WS-Eventing Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty, provided that you include the following on ALL copies of the Specification, that you make:
+
+1. A link or URL to the WS-Eventing Specification at one of the Authors' websites
+2. The copyright notice as shown in the WS-Eventing Specification.
+
+BEA, CA, IBM, Microsoft, Sun and TIBCO (collectively, the "Authors") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the Specification.
+
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATION.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the Specification or its contents without specific, written prior permission. Title to copyright in the Specification will at all times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ blockDefault="#all">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <!--xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="wsaddr.xsd"/-->
+ <xs:import namespace="http://www.w3.org/2005/08/addressing"/>
+
+ <!-- Types and global elements -->
+ <xs:complexType name="DeliveryType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Mode" type="xs:anyURI" use="optional"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="NotifyTo" type="wsa:EndpointReferenceType"/>
+
+ <xs:simpleType name="NonNegativeDurationType">
+ <xs:restriction base="xs:duration">
+ <xs:minInclusive value="P0Y0M0DT0H0M0S"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="ExpirationType">
+ <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType"/>
+ </xs:simpleType>
+
+ <xs:complexType name="FilterType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Dialect" type="xs:anyURI" use="optional"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="LanguageSpecificStringType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- Subscribe request -->
+ <xs:element name="Subscribe">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EndTo" type="wsa:EndpointReferenceType" minOccurs="0"/>
+ <xs:element name="Delivery" type="tns:DeliveryType"/>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:element name="Filter" type="tns:FilterType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="Identifier" type="xs:anyURI"/>
+
+ <!-- Subscribe response -->
+ <xs:element name="SubscribeResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
+ <xs:element name="Expires" type="tns:ExpirationType"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Used in a fault if there's an unsupported dialect -->
+ <xs:element name="SupportedDialect" type="xs:anyURI"/>
+
+ <!-- Used in a fault if there's an unsupported delivery mode -->
+ <xs:element name="SupportedDeliveryMode" type="xs:anyURI"/>
+
+ <!-- Renew request -->
+ <xs:element name="Renew">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Renew response -->
+ <xs:element name="RenewResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- GetStatus request -->
+ <xs:element name="GetStatus">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- GetStatus response -->
+ <xs:element name="GetStatusResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Unsubscribe request -->
+ <xs:element name="Unsubscribe">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- count(/s:Envelope/s:Body/*) = 0 for Unsubscribe response -->
+
+ <!-- SubscriptionEnd message -->
+ <xs:element name="SubscriptionEnd">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
+ <xs:element name="Code" type="tns:OpenSubscriptionEndCodeType"/>
+ <xs:element name="Reason" type="tns:LanguageSpecificStringType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="SubscriptionEndCodeType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:DeliveryFailure"/>
+ <xs:enumeration value="tns:SourceShuttingDown"/>
+ <xs:enumeration value="tns:SourceCancelling"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="OpenSubscriptionEndCodeType">
+ <xs:union memberTypes="tns:SubscriptionEndCodeType xs:QName"/>
+ </xs:simpleType>
+
+ <xs:attribute name="EventSource" type="xs:boolean"/>
+
+</xs:schema>
\ No newline at end of file
Property changes on: trunk/jbossws-core/src/main/resources/schema/eventing.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd
===================================================================
--- trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd 2007-01-29 10:40:51 UTC (rev 2173)
+++ trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd 2007-01-29 12:14:45 UTC (rev 2174)
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-(c) 2004 BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc., and TIBCO Software Inc. All rights reserved.
-
-BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc, and TIBCO Software Inc (collectively, the "Authors") hereby grant you permission to copy and display the WS-Eventing Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty, provided that you include the following on ALL copies of the Specification, that you make:
-
-1. A link or URL to the WS-Eventing Specification at one of the Authors' websites
-2. The copyright notice as shown in the WS-Eventing Specification.
-
-BEA, CA, IBM, Microsoft, Sun and TIBCO (collectively, the "Authors") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the Specification.
-
-THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATION.
-
-The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the Specification or its contents without specific, written prior permission. Title to copyright in the Specification will at all times remain with the Authors.
-
-No other rights are granted by implication, estoppel or otherwise.
--->
-<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- xmlns:wsa="http://www.w3.org/2005/08/addressing"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- blockDefault="#all">
-
- <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
- <!--xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="wsaddr.xsd"/-->
- <xs:import namespace="http://www.w3.org/2005/08/addressing"/>
-
- <!-- Types and global elements -->
- <xs:complexType name="DeliveryType" mixed="true">
- <xs:sequence>
- <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="Mode" type="xs:anyURI" use="optional"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:element name="NotifyTo" type="wsa:EndpointReferenceType"/>
-
- <xs:simpleType name="NonNegativeDurationType">
- <xs:restriction base="xs:duration">
- <xs:minInclusive value="P0Y0M0DT0H0M0S"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="ExpirationType">
- <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType"/>
- </xs:simpleType>
-
- <xs:complexType name="FilterType" mixed="true">
- <xs:sequence>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="Dialect" type="xs:anyURI" use="optional"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:complexType name="LanguageSpecificStringType">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute ref="xml:lang"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!-- Subscribe request -->
- <xs:element name="Subscribe">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="EndTo" type="wsa:EndpointReferenceType" minOccurs="0"/>
- <xs:element name="Delivery" type="tns:DeliveryType"/>
- <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
- <xs:element name="Filter" type="tns:FilterType" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="Identifier" type="xs:anyURI"/>
-
- <!-- Subscribe response -->
- <xs:element name="SubscribeResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
- <xs:element name="Expires" type="tns:ExpirationType"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- Used in a fault if there's an unsupported dialect -->
- <xs:element name="SupportedDialect" type="xs:anyURI"/>
-
- <!-- Used in a fault if there's an unsupported delivery mode -->
- <xs:element name="SupportedDeliveryMode" type="xs:anyURI"/>
-
- <!-- Renew request -->
- <xs:element name="Renew">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- Renew response -->
- <xs:element name="RenewResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- GetStatus request -->
- <xs:element name="GetStatus">
- <xs:complexType>
- <xs:sequence>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- GetStatus response -->
- <xs:element name="GetStatusResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- Unsubscribe request -->
- <xs:element name="Unsubscribe">
- <xs:complexType>
- <xs:sequence>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- count(/s:Envelope/s:Body/*) = 0 for Unsubscribe response -->
-
- <!-- SubscriptionEnd message -->
- <xs:element name="SubscriptionEnd">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
- <xs:element name="Code" type="tns:OpenSubscriptionEndCodeType"/>
- <xs:element name="Reason" type="tns:LanguageSpecificStringType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <xs:simpleType name="SubscriptionEndCodeType">
- <xs:restriction base="xs:QName">
- <xs:enumeration value="tns:DeliveryFailure"/>
- <xs:enumeration value="tns:SourceShuttingDown"/>
- <xs:enumeration value="tns:SourceCancelling"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="OpenSubscriptionEndCodeType">
- <xs:union memberTypes="tns:SubscriptionEndCodeType xs:QName"/>
- </xs:simpleType>
-
- <xs:attribute name="EventSource" type="xs:boolean"/>
-
-</xs:schema>
\ No newline at end of file
Modified: trunk/jbossws-docs/user-guide/project/en/master.template
===================================================================
--- trunk/jbossws-docs/user-guide/project/en/master.template 2007-01-29 10:40:51 UTC (rev 2173)
+++ trunk/jbossws-docs/user-guide/project/en/master.template 2007-01-29 12:14:45 UTC (rev 2174)
@@ -1,9 +1,9 @@
-<?xml version='1.0' encoding="iso-8859-1"?>
+<?xml version='1.0' encoding="iso-8859-1"?>
<!-- $Id: master.xml 118 2006-04-06 14:44:24Z thomas.diesler(a)jboss.com $ -->
<!DOCTYPE book PUBLIC
- "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
"../../../docbook-support/support/docbook-dtd/docbookx.dtd"
[
<!ENTITY ch-introduction SYSTEM "modules/introduction.xml">
@@ -101,4 +101,4 @@
&ch-xmlregistry;
&appendix-a;
-</book>
+</book>
\ No newline at end of file
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java 2007-01-29 10:40:51 UTC (rev 2173)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java 2007-01-29 12:14:45 UTC (rev 2174)
@@ -156,7 +156,7 @@
EndpointReferenceType notifyEPR = new EndpointReferenceType();
AttributedURIType attURI = new AttributedURIType();
attURI.setValue("http://" + getServerHost() + ":8080/jaxws-wseventing/eventSink");
- notifyEPR.setAddress(attURI);
+ notifyEPR.setAddress(attURI);
delivery.setNotifyTo(notifyEPR);
return delivery;
}
Modified: trunk/jbossws-tests/src/main/resources/jaxws/samples/wseventing/WEB-INF/wsdl/ws-eventing.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/samples/wseventing/WEB-INF/wsdl/ws-eventing.wsdl 2007-01-29 10:40:51 UTC (rev 2173)
+++ trunk/jbossws-tests/src/main/resources/jaxws/samples/wseventing/WEB-INF/wsdl/ws-eventing.wsdl 2007-01-29 12:14:45 UTC (rev 2174)
@@ -9,7 +9,8 @@
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
- <xs:import namespace="http://schemas.xmlsoap.org/ws/2004/08/eventing" schemaLocation="http://schemas.xmlsoap.org/ws/2004/08/eventing/eventing.xsd"/>
+ <xs:import namespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ schemaLocation="http://schemas.xmlsoap.org/ws/2004/08/eventing/eventing.xsd"/>
</wsdl:types>
<wsdl:message name='SubscribeMsg'>
17 years, 11 months
JBossWS SVN: r2173 - in branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc: client and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-29 05:40:51 -0500 (Mon, 29 Jan 2007)
New Revision: 2173
Added:
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
Log:
Create package jaxrpc.client
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java (from rev 2172, branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-01-29 10:40:51 UTC (rev 2173)
@@ -0,0 +1,194 @@
+/*
+ * 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.
+ */
+// $Id$
+package org.jboss.ws.core.jaxrpc.client;
+
+// $Id$
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectOutputStream;
+import java.net.URL;
+
+import javax.naming.BinaryRefAddr;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.Referenceable;
+import javax.naming.StringRefAddr;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.jaxrpc.ServiceObjectFactory;
+import org.jboss.ws.core.server.ServiceEndpointManager;
+import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+
+/**
+ * A JNDI reference to a javax.xml.rpc.Service
+ * <p/>
+ * It holds the information to reconstrut the javax.xml.rpc.Service
+ * when the client does a JNDI lookup.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public class ServiceReferenceable implements Referenceable
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServiceReferenceable.class);
+
+ public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
+ public static final String DEPLOYMENT_URL = "DEPLOYMENT_URL";
+ public static final String SECURITY_CONFIG = "SECURITY_CONFIG";
+ public static final String DESCRIPTOR_LOC = "DESCRIPTOR_LOC";
+ public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
+ public static final String PORT_COMPONENT_LINK_SERVLET = "PORT_COMPONENT_LINK_SERVLET";
+
+ private UnifiedServiceRefMetaData refMetaData;
+ private UnifiedDeploymentInfo udi;
+
+ /**
+ * A service referenceable for a WSDL document that is part of the deployment
+ *
+ * @param refMetaData The service-ref meta data
+ * @param udi The client DeploymentInfo
+ */
+ public ServiceReferenceable(UnifiedServiceRefMetaData refMetaData, UnifiedDeploymentInfo udi)
+ {
+ this.refMetaData = refMetaData;
+ this.udi = udi;
+ }
+
+ /**
+ * Retrieves the Reference of this object.
+ *
+ * @return The non-null Reference of this object.
+ * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
+ */
+ public Reference getReference() throws NamingException
+ {
+ Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
+
+ // The deployment URL of the web service client deployment
+ // Add a reference to the client deployment URL
+ String deploymentID = udi.name;
+ myRef.add(new StringRefAddr(DEPLOYMENT_URL, deploymentID));
+
+ // Add a reference to the ServiceRefMetaData and WSDLDefinitions
+ myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
+
+ // FIXME: JBWS-1431 Merge ws-security config with jaxrpc/jaxws config
+ if (getSecurityConfig() != null)
+ myRef.add(new BinaryRefAddr(SECURITY_CONFIG, marshallSecurityConfig()));
+
+ // Add references to port component links
+ UnifiedPortComponentRefMetaData[] pcrArr = refMetaData.getPortComponentRefs();
+ for (int i = 0; i < pcrArr.length; i++)
+ {
+ UnifiedPortComponentRefMetaData pcr = pcrArr[i];
+ String pcLink = pcr.getPortComponentLink();
+ if (pcLink != null)
+ {
+ myRef.add(new StringRefAddr(PORT_COMPONENT_LINK, pcLink));
+ try
+ {
+ ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+ ServiceEndpointManager epManager = factory.getServiceEndpointManager();
+ String host = epManager.getWebServiceHost();
+ int port = epManager.getWebServicePort();
+
+ String servletURL = "http://" + host + ":" + port + "/jbossws/pclink";
+ myRef.add(new StringRefAddr(PORT_COMPONENT_LINK_SERVLET, servletURL));
+ }
+ catch (Exception ex)
+ {
+ throw new NamingException("Cannot obtain path to PortComponentLinkServlet: " + ex);
+ }
+ }
+ }
+
+ return myRef;
+ }
+
+ /** Marshall the ServiceRefMetaData to an byte array
+ */
+ private byte[] marshallServiceRef() throws NamingException
+ {
+ refMetaData.getJavaWsdlMapping();
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
+ try
+ {
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(refMetaData);
+ oos.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot marshall service ref meta data, cause: " + e.toString());
+ }
+ return baos.toByteArray();
+ }
+
+ /** Marshall the WSSecurityConfiguration to an byte array
+ */
+ private byte[] marshallSecurityConfig() throws NamingException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
+ try
+ {
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ URL vfConfig = getSecurityConfig();
+ WSSecurityConfiguration securityConfig = WSSecurityOMFactory.newInstance().parse(vfConfig);
+ oos.writeObject(securityConfig);
+ oos.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot marshall security config, cause: " + e.toString());
+ }
+ return baos.toByteArray();
+ }
+
+ private URL getSecurityConfig()
+ {
+ String descriptorPath = udi.metaData instanceof UnifiedWebMetaData ? "WEB-INF" : "META-INF";
+ descriptorPath = descriptorPath + "/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
+ try
+ {
+ URL vfConfig = udi.getMetaDataFileURL(descriptorPath);
+ InputStream inputStream = vfConfig.openStream();
+ inputStream.close();
+ return vfConfig;
+ }
+ catch (IOException ex)
+ {
+ log.debug("Cannot find security config: " + descriptorPath);
+ return null;
+ }
+ }
+}
\ No newline at end of file
17 years, 11 months
JBossWS SVN: r2172 - in branches/jbossws-1.2.0: build/ant-import and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-29 04:16:37 -0500 (Mon, 29 Jan 2007)
New Revision: 2172
Modified:
branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml
branches/jbossws-1.2.0/build/etc/jbossws-component-info.xml
branches/jbossws-1.2.0/build/version.properties
branches/jbossws-1.2.0/integration-jboss42/build.xml
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
branches/jbossws-1.2.0/integration-jboss50/build.xml
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java
branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerJSE.java
branches/jbossws-1.2.0/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java
Log:
jboss50 EJB21 support, first cut
Modified: branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml
===================================================================
--- branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml 2007-01-29 09:16:37 UTC (rev 2172)
@@ -50,10 +50,9 @@
<get src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro.jar" dest="${thirdparty.dir}/jbossretro.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro-rt.jar" dest="${thirdparty.dir}/jbossretro-rt.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-src.zip" dest="${thirdparty.dir}/jboss-xml-binding-src.zip" usetimestamp="true" verbose="true"/>
+ <!--get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-src.zip" dest="${thirdparty.dir}/jboss-xml-binding-src.zip" usetimestamp="true" verbose="true"/-->
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar" dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers.jar" dest="${thirdparty.dir}/jboss-deployers.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar" dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting.jar" dest="${thirdparty.dir}/jboss-remoting.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-client.jar" dest="${thirdparty.dir}/jbosssx-client.jar" usetimestamp="true" verbose="true"/>
Modified: branches/jbossws-1.2.0/build/etc/jbossws-component-info.xml
===================================================================
--- branches/jbossws-1.2.0/build/etc/jbossws-component-info.xml 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/build/etc/jbossws-component-info.xml 2007-01-29 09:16:37 UTC (rev 2172)
@@ -25,14 +25,12 @@
</import>
<import componentref="jboss/jbossxb">
<compatible version="@jboss-jbossxb@"/>
- <compatible version="snapshot"/>
</import>
<import componentref="jboss/microcontainer">
- <compatible version="1.0.2"/>
+ <compatible version="snapshot"/>
<compatible version="@jboss-microcontainer@"/>
</import>
<import componentref="jboss/remoting">
- <compatible version="1.4.5.GA"/>
<compatible version="2.2.0.Alpha2"/>
<compatible version="@jboss-remoting@"/>
</import>
@@ -41,6 +39,7 @@
</import>
<export>
+ <include input="jbossws-client.jar"/>
<include input="jboss-jaxrpc.jar"/>
<include input="jboss-jaxws.jar"/>
<include input="jboss-saaj.jar"/>
Modified: branches/jbossws-1.2.0/build/version.properties
===================================================================
--- branches/jbossws-1.2.0/build/version.properties 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/build/version.properties 2007-01-29 09:16:37 UTC (rev 2172)
@@ -17,8 +17,8 @@
apache-xmlsec=1.3.0
ibm-wsdl4j=1.5.2jboss
javassist=3.4.GA
-jboss-jbossxb=1.0.0.CR7
-jboss-microcontainer=snapshot
+jboss-jbossxb=snapshot
+jboss-microcontainer=1.0.2
jboss-remoting=2.0.0.GA
sun-jaxb=2.0.3
Modified: branches/jbossws-1.2.0/integration-jboss42/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss42/build.xml 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-jboss42/build.xml 2007-01-29 09:16:37 UTC (rev 2172)
@@ -164,10 +164,6 @@
<include name="jboss-saaj.jar"/>
</fileset>
</copy>
- <!-- Copy jboss-xml-binding.jar -->
- <copy todir="${jboss42.home}//../../../thirdparty/jboss/jbossxb/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss42.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss42.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
</target>
<!-- ================================================================== -->
Modified: branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java 2007-01-29 09:16:37 UTC (rev 2172)
@@ -31,9 +31,10 @@
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.BeanMetaData;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.JAXWSDeployment;
+import org.jboss.ws.core.UnifiedVirtualFile;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
+import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
/**
@@ -46,8 +47,8 @@
{
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws Exception
{
- URL webservicesURL = getWebservicesDescriptor(di);
- UnifiedDeploymentInfo udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_EJB21, webservicesURL);
+ UnifiedVirtualFile vfsWebservices = getWebservicesFile(di);
+ UnifiedDeploymentInfo udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_EJB21, vfsWebservices);
DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
return udi;
}
@@ -62,7 +63,7 @@
// Check if we have a webservices.xml descriptor
if (isWebserviceDeployment == false)
{
- isWebserviceDeployment = getWebservicesDescriptor(di) != null;
+ isWebserviceDeployment = getWebservicesFile(di) != null;
}
// Check if the ejb-jar contains annotated endpoints
@@ -94,12 +95,10 @@
return isWebserviceDeployment;
}
- /**
- * Get the resource name of the webservices.xml descriptor.
- */
- protected URL getWebservicesDescriptor(DeploymentInfo di)
+ protected UnifiedVirtualFile getWebservicesFile(DeploymentInfo di)
{
- return di.localCl.findResource("META-INF/webservices.xml");
+ URL url = di.localCl.findResource("META-INF/webservices.xml");
+ return url != null ? new ResourceLoaderAdapter(di.localCl) : null;
}
protected URL generateWebDeployment(DeploymentInfo di, UnifiedMetaData wsMetaData) throws IOException
Modified: branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-01-29 09:16:37 UTC (rev 2172)
@@ -33,6 +33,7 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.WebMetaData;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.UnifiedVirtualFile;
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
import org.jboss.ws.core.server.JAXWSDeployment;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
@@ -40,6 +41,7 @@
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -62,7 +64,7 @@
// Check if we have a webservices.xml descriptor
if (isWebserviceDeployment == false)
{
- if (getWebservicesDescriptor(di) != null)
+ if (getWebservicesFile(di) != null)
{
di.context.put("UnifiedDeploymentInfo.Type", UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE);
isWebserviceDeployment = true;
@@ -104,8 +106,8 @@
DeploymentType type = (DeploymentType)di.context.get("UnifiedDeploymentInfo.Type");
if (type == UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE)
{
- URL webservicesURL = getWebservicesDescriptor(di);
- udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE, webservicesURL);
+ UnifiedVirtualFile vfsWebservices = getWebservicesFile(di);
+ udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE, vfsWebservices);
DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
}
else if (type == UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE)
@@ -153,11 +155,9 @@
}
}
- /**
- * Get the resource name of the webservices.xml descriptor.
- */
- protected URL getWebservicesDescriptor(DeploymentInfo di)
+ protected UnifiedVirtualFile getWebservicesFile(DeploymentInfo di)
{
- return di.localCl.findResource("WEB-INF/webservices.xml");
+ URL url = di.localCl.findResource("WEB-INF/webservices.xml");
+ return url != null ? new ResourceLoaderAdapter(di.localCl) : null;
}
}
Modified: branches/jbossws-1.2.0/integration-jboss50/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/build.xml 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-jboss50/build.xml 2007-01-29 09:16:37 UTC (rev 2172)
@@ -173,10 +173,6 @@
<include name="jboss-saaj.jar"/>
</fileset>
</copy>
- <!-- Copy jboss-xml-binding.jar -->
- <copy todir="${jboss50.home}//../../../thirdparty/jboss/jbossxb/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss50.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss50.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
</target>
<!-- ================================================================== -->
Modified: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java 2007-01-29 09:16:37 UTC (rev 2172)
@@ -34,10 +34,17 @@
import org.jboss.ejb3.SessionContainer;
import org.jboss.ejb3.mdb.MessagingContainer;
import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.metadata.EjbPortComponentMetaData;
+import org.jboss.metadata.MessageDrivenMetaData;
+import org.jboss.metadata.SessionMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedEjbPortComponentMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedMessageDrivenMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedSessionMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
/**
* Build container independent application meta data
@@ -49,23 +56,11 @@
{
// logging support
private static Logger log = Logger.getLogger(ApplicationMetaDataAdaptor.class);
-
- public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(DeploymentUnit unit)
+
+ public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(DeploymentUnit unit, Ejb3Deployment ejb3Deployment)
{
UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
- buildUnifiedBeanMetaData(umd, unit);
- //umd.setConfigName(apmd.getConfigName());
- //umd.setConfigFile(apmd.getConfigFile());
- //umd.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
- //umd.setSecurityDomain(apmd.getSecurityDomain());
- //umd.setWsdlPublishLocationMap(apmd.getWsdlPublishLocationMap());
- return umd;
- }
-
- private static void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd, DeploymentUnit unit)
- {
List<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
- Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
Iterator<Container> it = ejb3Deployment.getEjbContainers().values().iterator();
while (it.hasNext())
{
@@ -77,6 +72,7 @@
}
}
umd.setEnterpriseBeans(beans);
+ return umd;
}
private static UnifiedBeanMetaData buildUnifiedBeanMetaData(EJBContainer container)
@@ -89,7 +85,7 @@
else if (container instanceof MessagingContainer)
{
ubmd = new UnifiedMessageDrivenMetaData();
- log.warn ("No implemented: initialize MDB destination");
+ log.warn("No implemented: initialize MDB destination");
//((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessagingContainer)container).getDestination());
}
@@ -97,23 +93,82 @@
{
ubmd.setEjbName(container.getEjbName());
ubmd.setEjbClass(container.getBeanClassName());
-// ubmd.setServiceEndpoint(container.getServiceEndpoint());
-// ubmd.setHome(container.getHome());
-// ubmd.setLocalHome(container.getLocalHome());
-// ubmd.setJndiName(container.getJndiName());
-// ubmd.setLocalJndiName(container.getLocalJndiName());
+ }
+ return ubmd;
+ }
-// EjbPortComponentMetaData pcmd = container.getPortComponent();
-// if (pcmd != null)
-// {
-// UnifiedEjbPortComponentMetaData upcmd = new UnifiedEjbPortComponentMetaData();
-// upcmd.setPortComponentName(pcmd.getPortComponentName());
-// upcmd.setPortComponentURI(pcmd.getPortComponentURI());
-// upcmd.setAuthMethod(pcmd.getAuthMethod());
-// upcmd.setTransportGuarantee(pcmd.getTransportGuarantee());
-// ubmd.setPortComponent(upcmd);
-// }
+ public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(DeploymentUnit unit, ApplicationMetaData apmd)
+ {
+ UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
+ buildUnifiedBeanMetaData(umd, apmd);
+ umd.setConfigName(apmd.getConfigName());
+ umd.setConfigFile(apmd.getConfigFile());
+ umd.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
+ umd.setSecurityDomain(apmd.getSecurityDomain());
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
+ return umd;
+ }
+
+ private static PublishLocationAdapter getPublishLocationAdpater(final ApplicationMetaData apmd)
+ {
+ return new PublishLocationAdapter() {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ return apmd.getWsdlPublishLocationByName(name);
+ }
+ };
+ }
+
+ private static void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd, ApplicationMetaData metaData)
+ {
+ List<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
+ Iterator it = metaData.getEnterpriseBeans();
+ while (it.hasNext())
+ {
+ BeanMetaData bmd = (BeanMetaData)it.next();
+ UnifiedBeanMetaData ubmd = buildUnifiedBeanMetaData(bmd);
+ if (ubmd != null)
+ {
+ beans.add(ubmd);
+ }
}
+ umd.setEnterpriseBeans(beans);
+ }
+
+ private static UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd)
+ {
+ UnifiedBeanMetaData ubmd = null;
+ if (bmd instanceof SessionMetaData)
+ {
+ ubmd = new UnifiedSessionMetaData();
+ }
+ else if (bmd instanceof MessageDrivenMetaData)
+ {
+ ubmd = new UnifiedMessageDrivenMetaData();
+ ((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
+ }
+
+ if (ubmd != null)
+ {
+ ubmd.setEjbName(bmd.getEjbName());
+ ubmd.setEjbClass(bmd.getEjbClass());
+ ubmd.setServiceEndpoint(bmd.getServiceEndpoint());
+ ubmd.setHome(bmd.getHome());
+ ubmd.setLocalHome(bmd.getLocalHome());
+ ubmd.setJndiName(bmd.getJndiName());
+ ubmd.setLocalJndiName(bmd.getLocalJndiName());
+
+ EjbPortComponentMetaData pcmd = bmd.getPortComponent();
+ if (pcmd != null)
+ {
+ UnifiedEjbPortComponentMetaData upcmd = new UnifiedEjbPortComponentMetaData();
+ upcmd.setPortComponentName(pcmd.getPortComponentName());
+ upcmd.setPortComponentURI(pcmd.getPortComponentURI());
+ upcmd.setAuthMethod(pcmd.getAuthMethod());
+ upcmd.setTransportGuarantee(pcmd.getTransportGuarantee());
+ ubmd.setPortComponent(upcmd);
+ }
+ }
return ubmd;
}
}
Modified: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-29 09:16:37 UTC (rev 2172)
@@ -28,6 +28,7 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
@@ -80,8 +81,14 @@
{
if (unit.getAttachment(Ejb3Deployment.class) != null)
{
- udi.metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(unit);
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ udi.metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(unit, ejb3Deployment);
}
+ else if (unit.getAttachment(ApplicationMetaData.class) != null)
+ {
+ ApplicationMetaData appMetaData = unit.getAttachment(ApplicationMetaData.class);
+ udi.metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(unit, appMetaData);
+ }
else
{
if (unit.getAllMetaData(WebMetaData.class).size() > 0)
Modified: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java 2007-01-29 09:16:37 UTC (rev 2172)
@@ -25,7 +25,8 @@
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
@@ -47,7 +48,8 @@
@Override
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit) throws DeploymentException
{
- UnifiedDeploymentInfo udi = new JAXRPCDeployment(getDeploymentType(), null);
+ VirtualFileAdaptor vfWebservices = new VirtualFileAdaptor(getWebServicesFile(unit));
+ UnifiedDeploymentInfo udi = new JAXRPCDeployment(getDeploymentType(), vfWebservices);
DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
return udi;
}
@@ -55,14 +57,13 @@
@Override
public boolean isWebServiceDeployment(DeploymentUnit unit)
{
- boolean isWebServiceDeployment = false;
+ boolean hasAppMetaData = unit.getAllMetaData(ApplicationMetaData.class).size() > 0;
+ return hasAppMetaData && getWebServicesFile(unit) != null;
+ }
- Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
- if (ejb3Deployment != null)
- {
- isWebServiceDeployment = unit.getMetaDataFile("META-INF/webservices.xml") != null;
- }
-
- return isWebServiceDeployment;
+ private VirtualFile getWebServicesFile(DeploymentUnit unit)
+ {
+ VirtualFile vfile = unit.getMetaDataFile("webservices.xml");
+ return vfile;
}
}
\ No newline at end of file
Modified: branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerJSE.java
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerJSE.java 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerJSE.java 2007-01-29 09:16:37 UTC (rev 2172)
@@ -23,14 +23,12 @@
//$Id$
-import java.net.URL;
-import java.util.Set;
-
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.metadata.WebMetaData;
import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.UnifiedVirtualFile;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
@@ -49,36 +47,24 @@
}
@Override
- public boolean isWebServiceDeployment(DeploymentUnit unit)
+ protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit) throws DeploymentException
{
- boolean hasWebMetaData = unit.getAllMetaData(WebMetaData.class).size() > 0;
- return hasWebMetaData && getWebServicesURL(unit) != null;
+ UnifiedVirtualFile vfWebservices = getWebServicesFile(unit);
+ UnifiedDeploymentInfo udi = new JAXRPCDeployment(getDeploymentType(), vfWebservices);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
+ return udi;
}
@Override
- protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit) throws DeploymentException
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
{
- URL webservicesUrl = getWebServicesURL(unit);
- UnifiedDeploymentInfo udi = new JAXRPCDeployment(getDeploymentType(), webservicesUrl);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
- return udi;
+ boolean hasWebMetaData = unit.getAllMetaData(WebMetaData.class).size() > 0;
+ return hasWebMetaData && getWebServicesFile(unit) != null;
}
- private URL getWebServicesURL(DeploymentUnit unit)
+ private UnifiedVirtualFile getWebServicesFile(DeploymentUnit unit)
{
- URL webservicesURL = null;
VirtualFile vfile = unit.getMetaDataFile("webservices.xml");
- if (vfile != null)
- {
- try
- {
- webservicesURL = vfile.toURL();
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
- return webservicesURL;
+ return vfile != null ? new VirtualFileAdaptor(vfile) : null;
}
}
Modified: branches/jbossws-1.2.0/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
===================================================================
--- branches/jbossws-1.2.0/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2007-01-29 09:16:37 UTC (rev 2172)
@@ -38,12 +38,14 @@
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.UnifiedVirtualFile;
import org.jboss.ws.core.server.AbstractServiceEndpointServlet;
import org.jboss.ws.core.server.JAXWSDeployment;
import org.jboss.ws.core.server.KernelLocator;
import org.jboss.ws.core.server.ServiceEndpointDeployer;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
+import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
/**
* A servlet that is installed for every web service endpoint.
@@ -161,10 +163,10 @@
UnifiedDeploymentInfo udi;
URLClassLoader ctxLoader = (URLClassLoader)Thread.currentThread().getContextClassLoader();
- URL webservicesURL = ctxLoader.findResource("WEB-INF/webservices.xml");
- if (webservicesURL != null)
+ UnifiedVirtualFile vfsWebservices = getWebservicesFile(ctxLoader);
+ if (vfsWebservices != null)
{
- udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE, webservicesURL);
+ udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE, vfsWebservices);
}
else
{
@@ -175,6 +177,12 @@
return udi;
}
+ protected UnifiedVirtualFile getWebservicesFile(URLClassLoader ctxLoader)
+ {
+ URL url = ctxLoader.findResource("WEB-INF/webservices.xml");
+ return url != null ? new ResourceLoaderAdapter(ctxLoader) : null;
+ }
+
private void undeployServiceEndpoints(ServletContext servletContext)
{
UnifiedDeploymentInfo udi = (UnifiedDeploymentInfo)servletContext.getAttribute(UnifiedDeploymentInfo.class.getName());
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java 2007-01-28 09:11:18 UTC (rev 2171)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java 2007-01-29 09:16:37 UTC (rev 2172)
@@ -24,6 +24,7 @@
import java.io.InputStream;
import java.net.URL;
+import org.jboss.ws.core.UnifiedVirtualFile;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.metadata.webservices.WebservicesFactory;
import org.jboss.ws.metadata.webservices.WebservicesMetaData;
@@ -43,13 +44,14 @@
{
private WebservicesMetaData jsr109MetaData;
- public JAXRPCDeployment(DeploymentType type, URL webservicesURL)
+ public JAXRPCDeployment(DeploymentType type, UnifiedVirtualFile vfWebservices)
{
super(type);
try
{
// Unmarshall webservices.xml
+ URL webservicesURL = vfWebservices.toURL();
InputStream is = webservicesURL.openStream();
try
{
17 years, 11 months
JBossWS SVN: r2171 - branches/jbossws-1.2.0/jbossws-tests/src/main/resources.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-28 04:11:18 -0500 (Sun, 28 Jan 2007)
New Revision: 2171
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/tests-jboss50-excludes.txt
Log:
Fix benchmark excludes
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/resources/tests-jboss50-excludes.txt
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/resources/tests-jboss50-excludes.txt 2007-01-27 20:30:01 UTC (rev 2170)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/resources/tests-jboss50-excludes.txt 2007-01-28 09:11:18 UTC (rev 2171)
@@ -1,7 +1,7 @@
# Always excludes
-org/jboss/test/ws/interop.**
-org/jboss/test/ws/jaxrpc/benchmark.**
-org/jboss/test/ws/jaxws/benchmark.**
+org/jboss/test/ws/interop/**
+org/jboss/test/ws/jaxrpc/benchmark/**
+org/jboss/test/ws/jaxws/benchmark/**
# Resolve before JBoss50 goes final
org/jboss/test/ws/jaxrpc/jbas897/JBAS897TestCase.*
17 years, 11 months
JBossWS SVN: r2170 - in branches/jbossws-1.2.0: build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0-jdk14 and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-27 15:30:01 -0500 (Sat, 27 Jan 2007)
New Revision: 2170
Modified:
branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0-jdk14/config.xml
branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml
branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.2/config.xml
branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-5.0/config.xml
branches/jbossws-1.2.0/integration-jboss50/build.xml
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/tests-jboss50-excludes.txt
Log:
Exclude merged AS tests for jboss50
Modified: branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml
===================================================================
--- branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml 2007-01-27 19:44:23 UTC (rev 2169)
+++ branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml 2007-01-27 20:30:01 UTC (rev 2170)
@@ -31,17 +31,17 @@
ant $ENVIRONMENT clean deploy-jboss40
#
+# start jbossas
+#
+$SVNBASEDIR/build/etc/jboss.sh $JBOSS_INSTANCE start
+
+#
# build the testsuite
#
cd $JBOSS_INSTANCE/../../../testsuite
./build.sh clean main
#
-# start jbossas
-#
-$SVNBASEDIR/build/etc/jboss.sh $JBOSS_INSTANCE start
-
-#
# execute tests
#
./build.sh tests-webservice tests-report 2>&1 | tee $WORKSPACE/tests.out
Modified: branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0-jdk14/config.xml
===================================================================
--- branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0-jdk14/config.xml 2007-01-27 19:44:23 UTC (rev 2169)
+++ branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0-jdk14/config.xml 2007-01-27 20:30:01 UTC (rev 2170)
@@ -33,17 +33,17 @@
export JAVA_HOME=(a)hudson.jdk14@
#
+# start jbossas
+#
+$SVNBASEDIR/build/etc/jboss.sh $JBOSS_INSTANCE start
+
+#
# build the testsuite
#
cd $JBOSS_INSTANCE/../../../testsuite
./build.sh clean main
#
-# start jbossas
-#
-$SVNBASEDIR/build/etc/jboss.sh $JBOSS_INSTANCE start
-
-#
# execute tests
#
./build.sh tests-webservice tests-report 2>&1 | tee $WORKSPACE/tests.out
Modified: branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.2/config.xml
===================================================================
--- branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.2/config.xml 2007-01-27 19:44:23 UTC (rev 2169)
+++ branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.2/config.xml 2007-01-27 20:30:01 UTC (rev 2170)
@@ -31,17 +31,17 @@
ant $ENVIRONMENT clean deploy-jboss42
#
+# start jbossas
+#
+$SVNBASEDIR/build/etc/jboss.sh $JBOSS_INSTANCE start
+
+#
# build the testsuite
#
cd $JBOSS_INSTANCE/../../../testsuite
./build.sh clean main
#
-# start jbossas
-#
-$SVNBASEDIR/build/etc/jboss.sh $JBOSS_INSTANCE start
-
-#
# execute tests
#
./build.sh tests-webservice tests-report 2>&1 | tee $WORKSPACE/tests.out
Modified: branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-5.0/config.xml
===================================================================
--- branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-5.0/config.xml 2007-01-27 19:44:23 UTC (rev 2169)
+++ branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-5.0/config.xml 2007-01-27 20:30:01 UTC (rev 2170)
@@ -31,17 +31,17 @@
ant $ENVIRONMENT clean deploy-jboss50
#
+# start jbossas
+#
+$SVNBASEDIR/build/etc/jboss.sh $JBOSS_INSTANCE start
+
+#
# build the testsuite
#
cd $JBOSS_INSTANCE/../../../testsuite
./build.sh clean main
#
-# start jbossas
-#
-$SVNBASEDIR/build/etc/jboss.sh $JBOSS_INSTANCE start
-
-#
# execute tests
#
./build.sh tests-webservice tests-report 2>&1 | tee $WORKSPACE/tests.out
Modified: branches/jbossws-1.2.0/integration-jboss50/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/build.xml 2007-01-27 19:44:23 UTC (rev 2169)
+++ branches/jbossws-1.2.0/integration-jboss50/build.xml 2007-01-27 20:30:01 UTC (rev 2170)
@@ -141,8 +141,6 @@
<!-- Deploy jbossws to jboss50 -->
<target name="deploy-jboss50" depends="jboss50-jars" description="Deploy jbossws">
- <copy todir="${jboss50.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss50.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
<copy todir="${jboss50.home}/client" overwrite="true">
<fileset dir="${core.output.lib.dir}">
<include name="jboss-jaxrpc.jar"/>
@@ -175,6 +173,10 @@
<include name="jboss-saaj.jar"/>
</fileset>
</copy>
+ <!-- Copy jboss-xml-binding.jar -->
+ <copy todir="${jboss50.home}//../../../thirdparty/jboss/jbossxb/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
+ <copy todir="${jboss50.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
+ <copy todir="${jboss50.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
</target>
<!-- ================================================================== -->
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/resources/tests-jboss50-excludes.txt
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/resources/tests-jboss50-excludes.txt 2007-01-27 19:44:23 UTC (rev 2169)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/resources/tests-jboss50-excludes.txt 2007-01-27 20:30:01 UTC (rev 2170)
@@ -1,7 +1,18 @@
# Always excludes
-org/jboss/test/ws/interop/**
-org/jboss/test/ws/jaxrpc/benchmark/**
-org/jboss/test/ws/jaxws/benchmark/**
+org/jboss/test/ws/interop.**
+org/jboss/test/ws/jaxrpc/benchmark.**
+org/jboss/test/ws/jaxws/benchmark.**
+# Resolve before JBoss50 goes final
+org/jboss/test/ws/jaxrpc/jbas897/JBAS897TestCase.*
+org/jboss/test/ws/jaxrpc/jbws124/JBWS124TestCase.*
+org/jboss/test/ws/jaxrpc/jbws128/JBWS128TestCase.*
+org/jboss/test/ws/jaxrpc/jbws153/JBWS153TestCase.*
+org/jboss/test/ws/jaxrpc/jbws165/JBWS165TestCase.*
+org/jboss/test/ws/jaxrpc/jbws331/JBWS331TestCase.*
+org/jboss/test/ws/jaxrpc/jbws358/JBWS358TestCase.*
+org/jboss/test/ws/jaxrpc/jbws626/JBWS626TestCase.*
+org/jboss/test/ws/jaxrpc/jbws772/JBWS772TestCase.*
org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.*
org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.*
+
17 years, 11 months
JBossWS SVN: r2169 - branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-27 14:44:23 -0500 (Sat, 27 Jan 2007)
New Revision: 2169
Modified:
branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml
Log:
Revert
Modified: branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml
===================================================================
--- branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml 2007-01-27 19:36:35 UTC (rev 2168)
+++ branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml 2007-01-27 19:44:23 UTC (rev 2169)
@@ -10,7 +10,7 @@
SVNBASENAME=(a)svn.basename@
WORKSPACE=`pwd`
SVNBASEDIR=$WORKSPACE/(a)svn.basename@
-JBOSS_INSTANCE=@hudson.home@/jobs/AS-4.0/workspace/Branch_4_0/build/output/(a)hudson.jboss40.build@
+JBOSS_INSTANCE=@hudson.home@/jobs/AS-4.0/workspace/Branch_4_0/build/output/@hudson.jboss40.build(a)-ejb3
ENVIRONMENT="-Djbossws.integration.target=jboss40 -Djboss40.home=$JBOSS_INSTANCE"
#
17 years, 11 months
JBossWS SVN: r2168 - branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-27 14:36:35 -0500 (Sat, 27 Jan 2007)
New Revision: 2168
Modified:
branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml
Log:
Use the non ejb3 distro
Modified: branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml
===================================================================
--- branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml 2007-01-27 19:20:15 UTC (rev 2167)
+++ branches/jbossws-1.2.0/build/hudson/hudson-home/jobs/JBAS-Tests-AS-4.0/config.xml 2007-01-27 19:36:35 UTC (rev 2168)
@@ -10,7 +10,7 @@
SVNBASENAME=(a)svn.basename@
WORKSPACE=`pwd`
SVNBASEDIR=$WORKSPACE/(a)svn.basename@
-JBOSS_INSTANCE=@hudson.home@/jobs/AS-4.0/workspace/Branch_4_0/build/output/@hudson.jboss40.build(a)-ejb3
+JBOSS_INSTANCE=@hudson.home@/jobs/AS-4.0/workspace/Branch_4_0/build/output/(a)hudson.jboss40.build@
ENVIRONMENT="-Djbossws.integration.target=jboss40 -Djboss40.home=$JBOSS_INSTANCE"
#
17 years, 11 months
JBossWS SVN: r2167 - in branches/jbossws-1.2.0: integration-jboss42 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-27 14:20:15 -0500 (Sat, 27 Jan 2007)
New Revision: 2167
Modified:
branches/jbossws-1.2.0/integration-jboss40/build.xml
branches/jbossws-1.2.0/integration-jboss42/build.xml
Log:
deploy jbossxb to AS thirdparty
Modified: branches/jbossws-1.2.0/integration-jboss40/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/build.xml 2007-01-27 13:04:37 UTC (rev 2166)
+++ branches/jbossws-1.2.0/integration-jboss40/build.xml 2007-01-27 19:20:15 UTC (rev 2167)
@@ -295,8 +295,6 @@
<!-- Deploy jbossws to jboss40 -->
<target name="deploy-jboss40" depends="jboss40-jars" description="Deploy jbossws">
- <copy todir="${jboss40.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss40.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
<delete file="${jboss40.home}/client/jbossws14-client.jar"/>
<copy todir="${jboss40.home}/client" overwrite="true">
<fileset dir="${core.output.lib.dir}">
@@ -321,7 +319,7 @@
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<mkdir dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss40.output.lib.dir}/jbossws40.sar"/>
- <!-- deploy the BPEL sar -->
+ <!-- Deploy the BPEL sar -->
<copy file="${thirdparty.dir}/jbpm-bpel.sar" todir="${jboss40.home}/server/${jboss.server.instance}/deploy"/>
<!-- The JBossAS testsuite references jbosswsfrom thirdparty -->
<copy todir="${jboss40.home}/../../../thirdparty/jboss/jbossws/lib" overwrite="true">
@@ -332,12 +330,14 @@
<include name="jboss-saaj.jar"/>
</fileset>
</copy>
+ <!-- Copy jboss-xml-binding.jar -->
+ <copy todir="${jboss40.home}//../../../thirdparty/jboss/jbossxb/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
+ <copy todir="${jboss40.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
+ <copy todir="${jboss40.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
</target>
<!-- Deploy jbossws to jboss40 jdk1.4 -->
<target name="deploy-jboss40-jdk14" depends="jboss40-jars14" description="Deploy jbossws">
- <copy todir="${jboss40.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss40.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
<delete file="${jboss40.home}/client/jbossws-client.jar"/>
<copy todir="${jboss40.home}/client" overwrite="true">
<fileset dir="${core.output.lib.dir}">
@@ -362,7 +362,7 @@
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar"/>
<mkdir dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar"/>
<unjar dest="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar" src="${jboss40.output.lib.dir}/jbossws40-jdk14.sar"/>
- <!-- deploy the BPEL sar -->
+ <!-- Deploy the BPEL sar -->
<copy file="${thirdparty.dir}/jbpm-bpel.sar" todir="${jboss40.home}/server/${jboss.server.instance}/deploy"/>
<!-- The JBossAS testsuite references jbosswsfrom thirdparty -->
<copy todir="${jboss40.home}/../../../thirdparty/jboss/jbossws/lib" overwrite="true">
@@ -374,6 +374,10 @@
<include name="jboss-saaj.jar"/>
</fileset>
</copy>
+ <!-- Copy jboss-xml-binding.jar -->
+ <copy todir="${jboss40.home}//../../../thirdparty/jboss/jbossxb/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
+ <copy todir="${jboss40.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
+ <copy todir="${jboss40.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
</target>
<!-- ================================================================== -->
Modified: branches/jbossws-1.2.0/integration-jboss42/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss42/build.xml 2007-01-27 13:04:37 UTC (rev 2166)
+++ branches/jbossws-1.2.0/integration-jboss42/build.xml 2007-01-27 19:20:15 UTC (rev 2167)
@@ -135,8 +135,6 @@
<!-- Deploy jbossws to jboss42 -->
<target name="deploy-jboss42" depends="jboss42-jars" description="Deploy jbossws">
- <copy todir="${jboss42.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss42.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
<copy todir="${jboss42.home}/client" overwrite="true">
<fileset dir="${core.output.lib.dir}">
<include name="jboss-jaxrpc.jar"/>
@@ -155,7 +153,7 @@
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss42.output.lib.dir}/jbossws42.sar"/>
- <!-- deploy the BPEL sar -->
+ <!-- Deploy the BPEL sar -->
<copy file="${thirdparty.dir}/jbpm-bpel.sar" todir="${jboss42.home}/server/${jboss.server.instance}/deploy"/>
<!-- The JBossAS testsuite references jbosswsfrom thirdparty -->
<copy todir="${jboss42.home}/../../../thirdparty/jboss/jbossws/lib" overwrite="true">
@@ -166,6 +164,10 @@
<include name="jboss-saaj.jar"/>
</fileset>
</copy>
+ <!-- Copy jboss-xml-binding.jar -->
+ <copy todir="${jboss42.home}//../../../thirdparty/jboss/jbossxb/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
+ <copy todir="${jboss42.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
+ <copy todir="${jboss42.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
</target>
<!-- ================================================================== -->
17 years, 11 months