Author: heiko.braun(a)jboss.com
Date: 2007-07-17 17:19:50 -0400 (Tue, 17 Jul 2007)
New Revision: 3921
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/annotation/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/annotation/WebContext.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleURLPatternDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentContext.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/CommonServiceRefBinder.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefHandlerImpl.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefObjectFactory.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicEndpointInvocation.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationContext.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationHandler.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointAssociation.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointServlet.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/InvocationHandlerJSE.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextDummy.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextEJB.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextInjector.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextJSE.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericHandler.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericLogicalHandler.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericSOAPHandler.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointRegistry.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSFDeploymentException.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTest.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployer.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/XOPTestSupport.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumer.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumerFactory.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProvider.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProviderFactory.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSConsumeTask.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSProvideTask.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSConsume.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSProvide.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/package.html
Removed:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/annotation/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BackwardCompatibleContextRootDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BackwardCompatibleURLPatternDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeployment.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentContext.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicLifecycleHandler.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicService.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextPropertiesDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectInstaller.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointAssociation.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointLifecycleDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointMetricsDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointRegistryDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSDeploymentException.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeploymentAspect.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebXMLRewriter.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicEndpointInvocation.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationContext.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationHandler.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerJSE.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDummy.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextInjector.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextJSE.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicEndpointMetrics.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicEndpointRegistry.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfigMBean.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/test/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/transport/
Modified:
branches/hbraun/trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHook.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ArchiveDeployerHook.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerMDB21.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
branches/hbraun/trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
branches/hbraun/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/LifecycleHandlerImpl.java
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ManagedEndpointRegistry.java
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/PublishContractDeploymentAspect.java
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceLifecycleInvocationHandler.java
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native-config.xml
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml
branches/hbraun/trunk/integration/spi/build.xml
branches/hbraun/trunk/integration/spi/src/main/etc/wsconsume.bat
branches/hbraun/trunk/integration/spi/src/main/etc/wsconsume.sh
branches/hbraun/trunk/integration/spi/src/main/etc/wsprovide.bat
branches/hbraun/trunk/integration/spi/src/main/etc/wsprovide.sh
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerFactoryImpl.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerImpl.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java
branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/LifecycleHandlerImpl.java
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/ManagedEndpointRegistry.java
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletExt.java
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerExt.java
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java
branches/hbraun/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
branches/hbraun/trunk/jbossws-core/ant-import-tests/build-testsuite.xml
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderFactoryImpl.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerFactoryImpl.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/addressrewrite/AddressRewriteTestCase.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283EndpointImpl.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1556/EJB3Bean.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1566/c/Jaxb20StatelessTestBean.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/JBWS771TestCase.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/AddressingHandlerEnableMU.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/CustomAddressingHandler.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsdd/CustomHandler.java
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EJB3Bean.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/BareEndpointImpl.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/WrappedEndpointImpl.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean01.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean02.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean03.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface03.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java
Log:
Breakup spi and framwork
Modified:
branches/hbraun/trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
===================================================================
---
branches/hbraun/trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-17
21:19:50 UTC (rev 3921)
@@ -74,47 +74,47 @@
<!--
Each DeploymentAspectManger maintains a list of DeploymentAspects
-->
- <bean name="WSDeploymentAspectManagerJSE"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerJSE"
class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerJSE</property>
</bean>
- <bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
<!--
The container deployment aspects
-->
- <bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
+ <bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
</bean>
- <bean name="WSEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <bean name="WSEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
<property name="provides">ContainerEndpointHandler</property>
<property name="invocationHandler">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
<entry><key>JAXRPC_EJB21</key><value>org.jboss.wsf.container.jboss42.InvocationHandlerEJB21</value></entry>
<entry><key>JAXRPC_MDB21</key><value>org.jboss.wsf.container.jboss42.InvocationHandlerMDB21</value></entry>
-
<entry><key>JAXWS_JSE</key><value>org.jboss.wsf.spi.invocation.InvocationHandlerJSE</value></entry>
+
<entry><key>JAXWS_JSE</key><value>org.jboss.wsf.framework.invocation.InvocationHandlerJSE</value></entry>
<entry><key>JAXWS_EJB3</key><value>org.jboss.wsf.container.jboss40.InvocationHandlerEJB3</value></entry>
</map>
</property>
</bean>
- <bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
+ <bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect">
<property name="requires">LAST_DEPLOYMENT_ASPECT</property>
</bean>
- <bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointMetricsDeploymentAspect">
+ <bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
<property name="endpointMetrics"><inject
bean="WSEndpointMetrics"/></property>
</bean>
- <bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointNameDeploymentAspect">
+ <bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
<property name="requires">URLPattern</property>
<property name="provides">EndpointName</property>
</bean>
- <bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
+ <bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect">
<property
name="requires">EndpointName,StackEndpointHandler</property>
<property name="provides">RegisteredEndpoint</property>
</bean>
@@ -129,7 +129,7 @@
<property name="deploymentInfoAdapter"><inject
bean="WSDeploymentInfoAdapter"/></property>
</bean>
- <bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleURLPatternDeploymentAspect">
+ <bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
<property name="requires">ContextRoot,
ContainerMetaData</property>
<property name="provides">URLPattern</property>
</bean>
@@ -139,7 +139,7 @@
<property name="webXMLRewriter"><inject
bean="WSWebXMLRewriter"/></property>
</bean>
- <bean name="WSWebAppGeneratorDeploymentAspect"
class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeploymentAspect">
+ <bean name="WSWebAppGeneratorDeploymentAspect"
class="org.jboss.wsf.framework.deployment.WebAppGeneratorDeploymentAspect">
<property name="requires">URLPattern</property>
<property name="provides">WebMetaData</property>
<property name="securityHandlerEJB21"><inject
bean="WSSecurityHandlerEJB21"/></property>
@@ -154,18 +154,18 @@
<property name="applicationMetaDataAdapterEJB3"><inject
bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject
bean="WSWebMetaDataAdapter"/></property>
</bean>
- <bean name="WSEndpointMetrics"
class="org.jboss.wsf.spi.management.BasicEndpointMetrics"/>
+ <bean name="WSEndpointMetrics"
class="org.jboss.wsf.framework.management.BasicEndpointMetrics"/>
<bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
<bean name="WSServiceRefMetaDataAdapter"
class="org.jboss.wsf.container.jboss40.ServiceRefMetaDataAdapter"/>
- <bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.spi.deployment.WebAppDesciptorModifierImpl"/>
+ <bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.framework.deployment.WebAppDesciptorModifierImpl"/>
<bean name="WSWebMetaDataAdapter"
class="org.jboss.wsf.container.jboss42.WebMetaDataAdapter"/>
- <bean name="WSWebXMLRewriter"
class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
+ <bean name="WSWebXMLRewriter"
class="org.jboss.wsf.framework.deployment.WebXMLRewriter">
<property name="desciptorModifier"><inject
bean="WSWebAppDesciptorModifier"/></property>
</bean>
<!-- Deployment aspect installers -->
- <bean name="WSDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSDeploymentAspectInstallerJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -181,7 +181,7 @@
</set>
</property>
</bean>
- <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHook.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHook.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHook.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -33,12 +33,12 @@
import org.jboss.mx.util.MBeanProxy;
import org.jboss.mx.util.MBeanProxyCreationException;
import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.wsf.spi.deployment.BasicDeployment;
-import org.jboss.wsf.spi.deployment.BasicEndpoint;
+import org.jboss.wsf.framework.deployment.BasicDeployment;
+import org.jboss.wsf.framework.deployment.BasicEndpoint;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
/**
* An abstract web service deployer.
@@ -82,7 +82,7 @@
}
catch (Exception ex)
{
- throw new WSDeploymentException("Cannot load Deployment class: " +
deploymentClass);
+ throw new WSFDeploymentException("Cannot load Deployment class: " +
deploymentClass);
}
}
@@ -96,7 +96,7 @@
}
catch (Exception ex)
{
- throw new WSDeploymentException("Cannot load Endpoint class: " +
endpointClass);
+ throw new WSFDeploymentException("Cannot load Endpoint class: " +
endpointClass);
}
}
@@ -132,7 +132,7 @@
interceptor.addPhaseOneHook(this);
}
}
-
+
if (phaseTwoInterceptors != null)
{
for (ObjectName oname : phaseTwoInterceptors)
@@ -144,10 +144,10 @@
}
catch (MBeanProxyCreationException e)
{
- throw new WSDeploymentException(e);
+ throw new WSFDeploymentException(e);
}
}
-
+
/** Add the hooks to the interceptors
*/
public void stop()
@@ -163,7 +163,7 @@
interceptor.removePhaseOneHook(this);
}
}
-
+
if (phaseTwoInterceptors != null)
{
for (ObjectName oname : phaseTwoInterceptors)
@@ -175,7 +175,7 @@
}
catch (MBeanProxyCreationException e)
{
- throw new WSDeploymentException(e);
+ throw new WSFDeploymentException(e);
}
}
}
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -36,7 +36,7 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedSessionMetaData;
@@ -84,13 +84,13 @@
MBeanServer server = MBeanServerLocator.locateJBoss();
ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName,
server);
if (ejb3Module == null)
- throw new WSDeploymentException("Cannot obtain EJB3 module: " +
objectName);
+ throw new WSFDeploymentException("Cannot obtain EJB3 module: " +
objectName);
return ejb3Module;
}
catch (MBeanProxyCreationException ex)
{
- throw new WSDeploymentException("Cannot obtain proxy to EJB3
module");
+ throw new WSFDeploymentException("Cannot obtain proxy to EJB3
module");
}
}
}
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ArchiveDeployerHook.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ArchiveDeployerHook.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ArchiveDeployerHook.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -31,7 +31,7 @@
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -136,7 +136,7 @@
}
catch (Exception ex)
{
- throw new WSDeploymentException(ex);
+ throw new WSFDeploymentException(ex);
}
}
return wsMetaData;
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -42,7 +42,7 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.invocation.BasicInvocationHandler;
+import org.jboss.wsf.framework.invocation.BasicInvocationHandler;
import org.jboss.wsf.spi.invocation.HandlerCallback;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.SecurityAdaptor;
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -39,9 +39,9 @@
import org.jboss.injection.lang.reflect.BeanProperty;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.invocation.BasicInvocationHandler;
+import org.jboss.wsf.framework.invocation.BasicInvocationHandler;
import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.WebServiceContextEJB;
+import org.jboss.wsf.framework.invocation.WebServiceContextEJB;
import org.jboss.wsf.spi.utils.ObjectNameFactory;
/**
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerMDB21.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerMDB21.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerMDB21.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -27,7 +27,7 @@
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.BasicInvocationHandler;
+import org.jboss.wsf.framework.invocation.BasicInvocationHandler;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
@@ -41,7 +41,7 @@
{
// provide logging
private static final Logger log = Logger.getLogger(InvocationHandlerMDB21.class);
-
+
public void invoke(Endpoint ep, Invocation epInv) throws Exception
{
log.debug("Invoke: " + epInv.getJavaMethod().getName());
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -27,7 +27,7 @@
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
-import org.jboss.wsf.spi.deployment.WebXMLRewriter;
+import org.jboss.wsf.framework.deployment.WebXMLRewriter;
/**
* A deployer that modifies the web.xml meta data
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -37,7 +37,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.SecurityHandler;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
/**
* Generate a service endpoint deployment for EJB endpoints
@@ -110,13 +110,13 @@
MBeanServer server = MBeanServerLocator.locateJBoss();
ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName,
server);
if (ejb3Module == null)
- throw new WSDeploymentException("Cannot obtain EJB3 module: " +
objectName);
+ throw new WSFDeploymentException("Cannot obtain EJB3 module: " +
objectName);
return ejb3Module;
}
catch (MBeanProxyCreationException ex)
{
- throw new WSDeploymentException("Cannot obtain proxy to EJB3
module");
+ throw new WSFDeploymentException("Cannot obtain proxy to EJB3
module");
}
}
}
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -26,8 +26,8 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.JAXRPCDeployment;
-import org.jboss.wsf.spi.deployment.JAXWSDeployment;
+import org.jboss.wsf.framework.deployment.JAXRPCDeployment;
+import org.jboss.wsf.framework.deployment.JAXWSDeployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,9 +35,9 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.WebXMLRewriter;
+import org.jboss.wsf.framework.deployment.WebXMLRewriter;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
/**
* Publish the HTTP service endpoint to Tomcat
@@ -83,7 +83,7 @@
}
catch (Exception ex)
{
- WSDeploymentException.rethrow(ex);
+ WSFDeploymentException.rethrow(ex);
}
}
}
@@ -108,7 +108,7 @@
}
catch (Exception ex)
{
- WSDeploymentException.rethrow(ex);
+ WSFDeploymentException.rethrow(ex);
}
}
Modified:
branches/hbraun/trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
===================================================================
---
branches/hbraun/trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-17
21:19:50 UTC (rev 3921)
@@ -74,47 +74,47 @@
<!--
Each DeploymentAspectManger maintains a list of DeploymentAspects
-->
- <bean name="WSDeploymentAspectManagerJSE"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerJSE"
class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerJSE</property>
</bean>
- <bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
<!--
The container deployment aspects
-->
- <bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
+ <bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
</bean>
- <bean name="WSEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <bean name="WSEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
<property name="provides">ContainerEndpointHandler</property>
<property name="invocationHandler">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
<entry><key>JAXRPC_EJB21</key><value>org.jboss.wsf.container.jboss42.InvocationHandlerEJB21</value></entry>
<entry><key>JAXRPC_MDB21</key><value>org.jboss.wsf.container.jboss42.InvocationHandlerMDB21</value></entry>
-
<entry><key>JAXWS_JSE</key><value>org.jboss.wsf.spi.invocation.InvocationHandlerJSE</value></entry>
+
<entry><key>JAXWS_JSE</key><value>org.jboss.wsf.framework.invocation.InvocationHandlerJSE</value></entry>
<entry><key>JAXWS_EJB3</key><value>org.jboss.wsf.container.jboss42.InvocationHandlerEJB3</value></entry>
</map>
</property>
</bean>
- <bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
+ <bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect">
<property name="requires">LAST_DEPLOYMENT_ASPECT</property>
</bean>
- <bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointMetricsDeploymentAspect">
+ <bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
<property name="endpointMetrics"><inject
bean="WSEndpointMetrics"/></property>
</bean>
- <bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointNameDeploymentAspect">
+ <bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
<property name="requires">URLPattern</property>
<property name="provides">EndpointName</property>
</bean>
- <bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
+ <bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect">
<property name="requires">EndpointName,
StackEndpointHandler</property>
<property name="provides">RegisteredEndpoint</property>
</bean>
@@ -129,7 +129,7 @@
<property name="deploymentInfoAdapter"><inject
bean="WSDeploymentInfoAdapter"/></property>
</bean>
- <bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleURLPatternDeploymentAspect">
+ <bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
<property name="requires">ContextRoot,
ContainerMetaData</property>
<property name="provides">URLPattern</property>
</bean>
@@ -139,7 +139,7 @@
<property name="webXMLRewriter"><inject
bean="WSWebXMLRewriter"/></property>
</bean>
- <bean name="WSWebAppGeneratorDeploymentAspect"
class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeploymentAspect">
+ <bean name="WSWebAppGeneratorDeploymentAspect"
class="org.jboss.wsf.framework.deployment.WebAppGeneratorDeploymentAspect">
<property name="requires">URLPattern</property>
<property name="provides">WebMetaData</property>
<property name="securityHandlerEJB21"><inject
bean="WSSecurityHandlerEJB21"/></property>
@@ -154,17 +154,17 @@
<property name="applicationMetaDataAdapterEJB3"><inject
bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject
bean="WSWebMetaDataAdapter"/></property>
</bean>
- <bean name="WSEndpointMetrics"
class="org.jboss.wsf.spi.management.BasicEndpointMetrics"/>
+ <bean name="WSEndpointMetrics"
class="org.jboss.wsf.framework.management.BasicEndpointMetrics"/>
<bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
- <bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.spi.deployment.WebAppDesciptorModifierImpl"/>
+ <bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.framework.deployment.WebAppDesciptorModifierImpl"/>
<bean name="WSWebMetaDataAdapter"
class="org.jboss.wsf.container.jboss42.WebMetaDataAdapter"/>
- <bean name="WSWebXMLRewriter"
class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
+ <bean name="WSWebXMLRewriter"
class="org.jboss.wsf.framework.deployment.WebXMLRewriter">
<property name="desciptorModifier"><inject
bean="WSWebAppDesciptorModifier"/></property>
</bean>
<!-- Deployment aspect installers -->
- <bean name="WSDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSDeploymentAspectInstallerJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -180,7 +180,7 @@
</set>
</property>
</bean>
- <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
Modified:
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java
===================================================================
---
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -23,14 +23,14 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.BasicDeployment;
-import org.jboss.wsf.spi.deployment.BasicEndpoint;
-import org.jboss.wsf.spi.deployment.BasicService;
+import org.jboss.wsf.framework.deployment.BasicDeployment;
+import org.jboss.wsf.framework.deployment.BasicEndpoint;
+import org.jboss.wsf.framework.deployment.BasicService;
import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Service;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
//$Id$
@@ -81,7 +81,7 @@
}
catch (Exception ex)
{
- throw new WSDeploymentException("Cannot load Deployment class: " +
deploymentClass);
+ throw new WSFDeploymentException("Cannot load Deployment class: " +
deploymentClass);
}
}
@@ -95,7 +95,7 @@
}
catch (Exception ex)
{
- throw new WSDeploymentException("Cannot load Service class: " +
serviceClass);
+ throw new WSFDeploymentException("Cannot load Service class: " +
serviceClass);
}
}
@@ -109,7 +109,7 @@
}
catch (Exception ex)
{
- throw new WSDeploymentException("Cannot load Endpoint class: " +
endpointClass);
+ throw new WSFDeploymentException("Cannot load Endpoint class: " +
endpointClass);
}
}
Modified:
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java
===================================================================
---
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -31,7 +31,7 @@
import org.jboss.virtual.VirtualFile;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -136,7 +136,7 @@
}
catch (Exception ex)
{
- throw new WSDeploymentException(ex);
+ throw new WSFDeploymentException(ex);
}
}
return wsMetaData;
Modified:
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
===================================================================
---
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -44,7 +44,7 @@
import org.jboss.security.plugins.SecurityContextAssociation;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.invocation.BasicInvocationHandler;
+import org.jboss.wsf.framework.invocation.BasicInvocationHandler;
import org.jboss.wsf.spi.invocation.HandlerCallback;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.SecurityAdaptor;
Modified:
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
===================================================================
---
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -39,9 +39,9 @@
import org.jboss.injection.lang.reflect.BeanProperty;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.invocation.BasicInvocationHandler;
+import org.jboss.wsf.framework.invocation.BasicInvocationHandler;
import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.WebServiceContextEJB;
+import org.jboss.wsf.framework.invocation.WebServiceContextEJB;
import org.jboss.wsf.spi.utils.ObjectNameFactory;
/**
Modified:
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -26,8 +26,8 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.JAXRPCDeployment;
-import org.jboss.wsf.spi.deployment.JAXWSDeployment;
+import org.jboss.wsf.framework.deployment.JAXRPCDeployment;
+import org.jboss.wsf.framework.deployment.JAXWSDeployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
Modified:
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,8 +35,8 @@
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
-import org.jboss.wsf.spi.deployment.WebXMLRewriter;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.framework.deployment.WebXMLRewriter;
/**
* Publish the HTTP service endpoint to Tomcat
@@ -85,7 +85,7 @@
}
catch (Exception ex)
{
- WSDeploymentException.rethrow(ex);
+ WSFDeploymentException.rethrow(ex);
}
}
}
@@ -115,7 +115,7 @@
}
catch (Exception ex)
{
- WSDeploymentException.rethrow(ex);
+ WSFDeploymentException.rethrow(ex);
}
}
Modified:
branches/hbraun/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
branches/hbraun/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-17
21:19:50 UTC (rev 3921)
@@ -128,46 +128,46 @@
<!--
Each DeploymentAspectManger maintains a list of DeploymentAspects
-->
- <bean name="WSDeploymentAspectManagerJSE"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerJSE"
class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerJSE</property>
</bean>
- <bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
<!--
The container deployment aspects
-->
- <bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
+ <bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
</bean>
- <bean name="WSEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <bean name="WSEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
<property name="provides">ContainerEndpointHandler</property>
<property name="invocationHandler">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
<entry><key>JAXRPC_EJB21</key><value>org.jboss.wsf.container.jboss50.InvocationHandlerEJB21</value></entry>
-
<entry><key>JAXWS_JSE</key><value>org.jboss.wsf.spi.invocation.InvocationHandlerJSE</value></entry>
+
<entry><key>JAXWS_JSE</key><value>org.jboss.wsf.framework.invocation.InvocationHandlerJSE</value></entry>
<entry><key>JAXWS_EJB3</key><value>org.jboss.wsf.container.jboss50.InvocationHandlerEJB3</value></entry>
</map>
</property>
</bean>
- <bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
+ <bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect">
<property name="requires">LAST_DEPLOYMENT_ASPECT</property>
</bean>
- <bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointMetricsDeploymentAspect">
+ <bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
<property name="endpointMetrics"><inject
bean="WSEndpointMetrics"/></property>
</bean>
- <bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointNameDeploymentAspect">
+ <bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
<property name="requires">URLPattern</property>
<property name="provides">EndpointName</property>
</bean>
- <bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
+ <bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect">
<property
name="requires">EndpointName,StackEndpointHandler</property>
<property name="provides">RegisteredEndpoint</property>
</bean>
@@ -180,7 +180,7 @@
<property name="provides">ContainerMetaData</property>
</bean>
- <bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleURLPatternDeploymentAspect">
+ <bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
<property name="requires">ContextRoot,
ContainerMetaData</property>
<property name="provides">URLPattern</property>
</bean>
@@ -191,7 +191,7 @@
<property name="mainDeployer"><inject
bean="MainDeployer"/></property>
</bean>
- <bean name="WSWebAppGeneratorDeploymentAspect"
class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeploymentAspect">
+ <bean name="WSWebAppGeneratorDeploymentAspect"
class="org.jboss.wsf.framework.deployment.WebAppGeneratorDeploymentAspect">
<property name="requires">URLPattern</property>
<property name="provides">WebMetaData</property>
<property name="securityHandlerEJB21"><inject
bean="WSSecurityHandlerEJB21"/></property>
@@ -199,16 +199,16 @@
</bean>
<!-- Deployment aspect helper beans -->
- <bean name="WSEndpointMetrics"
class="org.jboss.wsf.spi.management.BasicEndpointMetrics"/>
+ <bean name="WSEndpointMetrics"
class="org.jboss.wsf.framework.management.BasicEndpointMetrics"/>
<bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
- <bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.spi.deployment.WebAppDesciptorModifierImpl"/>
- <bean name="WSWebXMLRewriter"
class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
+ <bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.framework.deployment.WebAppDesciptorModifierImpl"/>
+ <bean name="WSWebXMLRewriter"
class="org.jboss.wsf.framework.deployment.WebXMLRewriter">
<property name="desciptorModifier"><inject
bean="WSWebAppDesciptorModifier"/></property>
</bean>
<!-- Deployment aspect installers -->
- <bean name="WSDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSDeploymentAspectInstallerJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -224,7 +224,7 @@
</set>
</property>
</bean>
- <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
Modified:
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/LifecycleHandlerImpl.java
===================================================================
---
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/LifecycleHandlerImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/LifecycleHandlerImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -24,7 +24,7 @@
//$Id: LifecycleHandlerImpl.java 2923 2007-04-25 14:23:29Z thomas.diesler(a)jboss.com $
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.wsf.spi.deployment.BasicLifecycleHandler;
+import org.jboss.wsf.framework.deployment.BasicLifecycleHandler;
import org.jboss.wsf.spi.deployment.Endpoint;
/**
Modified:
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ManagedEndpointRegistry.java
===================================================================
---
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ManagedEndpointRegistry.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ManagedEndpointRegistry.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -25,19 +25,16 @@
import java.util.ArrayList;
-import javax.management.InstanceAlreadyExistsException;
import javax.management.JMException;
-import javax.management.MBeanRegistrationException;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
-import javax.management.NotCompliantMBeanException;
import javax.management.ObjectName;
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.BasicEndpointRegistry;
+import org.jboss.wsf.framework.management.BasicEndpointRegistry;
/**
* A Service Endpoint Registry
Modified:
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/PublishContractDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/PublishContractDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/PublishContractDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
/**
* A deployer that publishes the wsdl
@@ -57,7 +57,7 @@
}
catch (IOException ex)
{
- throw new WSDeploymentException(ex);
+ throw new WSFDeploymentException(ex);
}
}
}
\ No newline at end of file
Modified:
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java
===================================================================
---
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -31,7 +31,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
-import org.jboss.wsf.spi.invocation.EndpointServlet;
+import org.jboss.wsf.framework.invocation.EndpointServlet;
/**
* A servlet that is installed for every web service endpoint.
Modified:
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceLifecycleInvocationHandler.java
===================================================================
---
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceLifecycleInvocationHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceLifecycleInvocationHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
-import org.jboss.wsf.spi.invocation.InvocationHandlerJSE;
+import org.jboss.wsf.framework.invocation.InvocationHandlerJSE;
/**
* Handles invocations on JSE endpoints.
Modified:
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -33,7 +33,7 @@
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.JAXRPCDeployment;
+import org.jboss.wsf.framework.deployment.JAXRPCDeployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
@@ -54,7 +54,7 @@
UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
if (udi == null)
throw new IllegalStateException("Cannot obtain unified deployment
info");
-
+
if (udi.type == DeploymentType.JAXRPC_JSE)
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
@@ -79,10 +79,10 @@
{
throw new IllegalStateException("Invalid type: " + udi.type);
}
-
+
dep.getContext().addAttachment(UnifiedMetaData.class, umd);
}
-
+
for (Endpoint ep : dep.getService().getEndpoints())
{
ServerEndpointMetaData sepMetaData =
ep.getAttachment(ServerEndpointMetaData.class);
@@ -90,7 +90,7 @@
{
sepMetaData = getEndpointMetaData(umd, ep);
sepMetaData.setEndpoint(ep);
-
+
ep.addAttachment(ServerEndpointMetaData.class, sepMetaData);
String targetBean = ep.getTargetBeanName();
@@ -103,7 +103,7 @@
private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, Endpoint ep)
{
String epName = ep.getShortName();
-
+
ServerEndpointMetaData epMetaData = null;
for (ServiceMetaData serviceMetaData : umd.getServices())
{
Modified:
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native-config.xml
===================================================================
---
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,6 +1,6 @@
<!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig"
class="org.jboss.wsf.spi.management.BasicServerConfig">
+ <bean name="WSServerConfig"
class="org.jboss.wsf.framework.management.BasicServerConfig">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of
that SOAP address.
@@ -31,13 +31,13 @@
</bean>
<!-- Bind Service objects in client environment context -->
- <bean name="WSServiceRefHandler"
class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+ <bean name="WSServiceRefHandler"
class="org.jboss.wsf.framework.deployment.serviceref.ServiceRefHandlerImpl">
<property name="jaxrpcBinder"><inject
bean="WSServiceRefBinderJAXRPC"/></property>
<property name="jaxwsBinder"><inject
bean="WSServiceRefBinderJAXWS"/></property>
</bean>
<!-- JBoss_4_2_0_GA uses this hardcoded bean name -->
- <bean name="ServiceRefHandler"
class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+ <bean name="ServiceRefHandler"
class="org.jboss.wsf.framework.deployment.serviceref.ServiceRefHandlerImpl">
<property name="jaxrpcBinder"><inject
bean="WSServiceRefBinderJAXRPC"/></property>
<property name="jaxwsBinder"><inject
bean="WSServiceRefBinderJAXWS"/></property>
</bean>
@@ -47,7 +47,7 @@
<!--
The stack specific deployment aspects
-->
- <bean name="WSNativeContextPropertiesDeploymentAspect"
class="org.jboss.wsf.spi.deployment.ContextPropertiesDeploymentAspect">
+ <bean name="WSNativeContextPropertiesDeploymentAspect"
class="org.jboss.wsf.framework.deployment.ContextPropertiesDeploymentAspect">
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
@@ -61,7 +61,7 @@
<property name="provides">InitializedMetaDataModel</property>
</bean>
- <bean name="WSNativeEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <bean name="WSNativeEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
<property name="requires">ContainerEndpointHandler</property>
<property name="provides">StackEndpointHandler</property>
<property
name="requestHandler">org.jboss.wsf.stack.jbws.RequestHandlerImpl</property>
@@ -92,7 +92,7 @@
</bean>
<!-- Deployment aspect installers -->
- <bean name="WSNativeDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSNativeDeploymentAspectInstallerJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -105,7 +105,7 @@
</set>
</property>
</bean>
- <bean name="WSNativeDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSNativeDeploymentAspectInstallerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
Modified:
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-17
21:19:50 UTC (rev 3921)
@@ -36,7 +36,7 @@
-->
<bean name="WSDeployerHook_JAXRPC_JSE"
class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookJSE">
<property
name="deploymentClass">org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployment</property>
- <property
name="endpointClass">org.jboss.wsf.spi.deployment.BasicEndpoint</property>
+ <property
name="endpointClass">org.jboss.wsf.framework.deployment.BasicEndpoint</property>
<property name="deployerManager"><inject
bean="WSDeployerManagerJSE"/></property>
<install bean="WebServiceDeployerJSE"
method="addDeployerHook">
<parameter>
@@ -52,7 +52,7 @@
</bean>
<bean name="WSDeployerHook_JAXRPC_EJB21"
class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookEJB21">
<property
name="deploymentClass">org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployment</property>
- <property
name="endpointClass">org.jboss.wsf.spi.deployment.BasicEndpoint</property>
+ <property
name="endpointClass">org.jboss.wsf.framework.deployment.BasicEndpoint</property>
<property name="deployerManager"><inject
bean="WSDeployerManagerEJB"/></property>
<install bean="WebServiceDeployerEJB"
method="addDeployerHook">
<parameter>
@@ -68,7 +68,7 @@
</bean>
<bean name="WSDeployerHook_JAXWS_JSE"
class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookJSE">
<property
name="deploymentClass">org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployment</property>
- <property
name="endpointClass">org.jboss.wsf.spi.deployment.BasicEndpoint</property>
+ <property
name="endpointClass">org.jboss.wsf.framework.deployment.BasicEndpoint</property>
<property name="deployerManager"><inject
bean="WSDeployerManagerJSE"/></property>
<install bean="WebServiceDeployerJSE"
method="addDeployerHook">
<parameter>
@@ -84,7 +84,7 @@
</bean>
<bean name="WSDeployerHook_JAXWS_EJB3"
class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookEJB3">
<property
name="deploymentClass">org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployment</property>
- <property
name="endpointClass">org.jboss.wsf.spi.deployment.BasicEndpoint</property>
+ <property
name="endpointClass">org.jboss.wsf.framework.deployment.BasicEndpoint</property>
<property name="deployerManager"><inject
bean="WSDeployerManagerEJB"/></property>
<install bean="WebServiceDeployerEJB"
method="addDeployerHook">
<parameter>
Modified: branches/hbraun/trunk/integration/spi/build.xml
===================================================================
--- branches/hbraun/trunk/integration/spi/build.xml 2007-07-17 18:52:03 UTC (rev 3920)
+++ branches/hbraun/trunk/integration/spi/build.xml 2007-07-17 21:19:50 UTC (rev 3921)
@@ -61,7 +61,7 @@
<mkdir dir="${spi.output.classes.dir}"/>
<javac srcdir="${spi.java.dir}" sourcepath=""
destdir="${spi.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}" source="1.5"
target="1.5">
- <include name="org/jboss/wsf/spi/**"/>
+ <include name="org/jboss/wsf/**"/>
<include name="org/jboss/ws/integration/**"/>
<classpath refid="spi.thirdparty.classpath"/>
</javac>
@@ -104,7 +104,7 @@
<mkdir dir="${spi.output.lib.dir}"/>
<jar jarfile="${spi.output.lib.dir}/jbossws-spi.jar"
manifest="${spi.output.etc.dir}/default.mf">
<fileset dir="${spi.output.classes.dir}">
- <include name="org/jboss/wsf/spi/**"/>
+ <include name="org/jboss/wsf/**"/>
<include name="org/jboss/ws/integration/**"/>
</fileset>
</jar>
Modified: branches/hbraun/trunk/integration/spi/src/main/etc/wsconsume.bat
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/etc/wsconsume.bat 2007-07-17 18:52:03
UTC (rev 3920)
+++ branches/hbraun/trunk/integration/spi/src/main/etc/wsconsume.bat 2007-07-17 21:19:50
UTC (rev 3921)
@@ -52,4 +52,4 @@
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
rem Execute the JVM
-"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%"
-Dlog4j.configuration=wstools-log4j.xml -classpath "%WSCONSUME_CLASSPATH%"
org.jboss.wsf.spi.tools.cmd.WSConsume %*
+"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%"
-Dlog4j.configuration=wstools-log4j.xml -classpath "%WSCONSUME_CLASSPATH%"
org.jboss.wsf.tools.cmd.WSConsume %*
Modified: branches/hbraun/trunk/integration/spi/src/main/etc/wsconsume.sh
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/etc/wsconsume.sh 2007-07-17 18:52:03
UTC (rev 3920)
+++ branches/hbraun/trunk/integration/spi/src/main/etc/wsconsume.sh 2007-07-17 21:19:50
UTC (rev 3921)
@@ -126,4 +126,4 @@
-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-Dlog4j.configuration=wstools-log4j.xml \
-classpath "$WSCONSUME_CLASSPATH" \
- org.jboss.wsf.spi.tools.cmd.WSConsume "$@"
+ org.jboss.wsf.tools.cmd.WSConsume "$@"
Modified: branches/hbraun/trunk/integration/spi/src/main/etc/wsprovide.bat
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/etc/wsprovide.bat 2007-07-17 18:52:03
UTC (rev 3920)
+++ branches/hbraun/trunk/integration/spi/src/main/etc/wsprovide.bat 2007-07-17 21:19:50
UTC (rev 3921)
@@ -46,4 +46,4 @@
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
rem Execute the JVM
-"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%"
-Dlog4j.configuration=wstools-log4j.xml -classpath "%WSPROVIDE_CLASSPATH%"
org.jboss.wsf.spi.tools.cmd.WSProvide %*
+"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%"
-Dlog4j.configuration=wstools-log4j.xml -classpath "%WSPROVIDE_CLASSPATH%"
org.jboss.wsf.tools.cmd.WSProvide %*
Modified: branches/hbraun/trunk/integration/spi/src/main/etc/wsprovide.sh
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/etc/wsprovide.sh 2007-07-17 18:52:03
UTC (rev 3920)
+++ branches/hbraun/trunk/integration/spi/src/main/etc/wsprovide.sh 2007-07-17 21:19:50
UTC (rev 3921)
@@ -133,4 +133,4 @@
-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-Dlog4j.configuration=wstools-log4j.xml \
-classpath "$WSPROVIDE_CLASSPATH" \
- org.jboss.wsf.spi.tools.cmd.WSProvide "$@"
+ org.jboss.wsf.tools.cmd.WSProvide "$@"
Modified:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -69,7 +69,7 @@
private static ServiceRefHandler getClientSideServiceRefHandler()
{
String propName = ServiceRefHandler.class.getName();
- String defaultImpl =
"org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl";
+ String defaultImpl =
"org.jboss.wsf.framework.deployment.serviceref.ServiceRefHandlerImpl";
ServiceRefHandler handler = (ServiceRefHandler)ServiceLoader.loadService(propName,
defaultImpl);
return handler;
}
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/annotation/WebContext.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/annotation/WebContext.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/annotation/WebContext.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,95 @@
+/*
+* 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.wsf.framework.annotation;
+
+// $Id$
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Provides web context specific meta data to EJB based web service endpoints.
+ *
+ * @author thomas.diesler(a)jboss.org
+ * @since 26-Apr-2005
+ */
+@Retention(value = RetentionPolicy.RUNTIME)
+@Target(value = { ElementType.TYPE })
+public @interface WebContext {
+
+ /**
+ * The contextRoot element specifies the context root that the web service endpoint is
deployed to.
+ * If it is not specified it will be derived from the deployment short name.
+ *
+ * Applies to server side port components only.
+ */
+ String contextRoot() default "";
+
+ /**
+ * The virtual hosts that the web service endpoint is deployed to.
+ *
+ * Applies to server side port components only.
+ */
+ String[] virtualHosts() default {};
+
+ /**
+ * Relative path that is appended to the contextRoot to form fully qualified
+ * endpoint address for the web service endpoint.
+ *
+ * Applies to server side port components only.
+ */
+ String urlPattern() default "";
+
+ /**
+ * The authMethod is used to configure the authentication mechanism for the web
service.
+ * As a prerequisite to gaining access to any web service which are protected by an
authorization
+ * constraint, a user must have authenticated using the configured mechanism.
+ *
+ * Legal values for this element are "BASIC", or "CLIENT-CERT".
+ */
+ String authMethod() default "";
+
+ /**
+ * The transportGuarantee specifies that the communication
+ * between client and server should be NONE, INTEGRAL, or
+ * CONFIDENTIAL. NONE means that the application does not require any
+ * transport guarantees. A value of INTEGRAL means that the application
+ * requires that the data sent between the client and server be sent in
+ * such a way that it can't be changed in transit. CONFIDENTIAL means
+ * that the application requires that the data be transmitted in a
+ * fashion that prevents other entities from observing the contents of
+ * the transmission. In most cases, the presence of the INTEGRAL or
+ * CONFIDENTIAL flag will indicate that the use of SSL is required.
+ */
+ String transportGuarantee() default "";
+
+ /**
+ * A secure endpoint does not secure wsdl access by default.
+ * Explicitly setting secureWSDLAccess overrides this behaviour.
+ *
+ * Protect access to WSDL. See
http://jira.jboss.org/jira/browse/JBWS-723
+ */
+ boolean secureWSDLAccess() default false;
+
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/annotation/WebContext.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,88 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import java.util.StringTokenizer;
+
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * A deployer that assigns the context root to the service.
+ *
+ * If there is no explicit <context-root>, this deployer uses
+ * the first token from the <port-component-uri> element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class BackwardCompatibleContextRootDeploymentAspect extends
ContextRootDeploymentAspect
+{
+ @Override
+ protected String getExplicitContextRoot(Deployment dep)
+ {
+ String contextRoot = super.getExplicitContextRoot(dep);
+ if (contextRoot == null)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String urlPattern = getUrlPattern(dep, ep);
+ if (urlPattern != null)
+ {
+ StringTokenizer st = new StringTokenizer(urlPattern, "/");
+ if (st.countTokens() > 1)
+ {
+ String firstToken = st.nextToken();
+ if (contextRoot != null && contextRoot.equals(firstToken) ==
false)
+ throw new IllegalStateException("All endpoints must share the
same <context-root>: " + contextRoot + "!=" + firstToken);
+
+ contextRoot = firstToken;
+ }
+ }
+ }
+ }
+ return contextRoot;
+ }
+
+ private String getUrlPattern(Deployment dep, Endpoint ep)
+ {
+ String urlPattern = null;
+
+ UnifiedApplicationMetaData appMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName())
!= null)
+ {
+ UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
+ UnifiedEjbPortComponentMetaData pcmd = bmd.getPortComponent();
+ if (pcmd != null)
+ {
+ urlPattern = pcmd.getPortComponentURI();
+ }
+ }
+
+ return urlPattern;
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleURLPatternDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleURLPatternDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleURLPatternDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,66 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.framework.deployment.URLPatternDeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+import java.util.StringTokenizer;
+
+
+/**
+ * A deployer that assigns the URLPattern to endpoints.
+ *
+ * This deployer uses the first token from the <port-component-uri>
+ * as the context root.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public class BackwardCompatibleURLPatternDeploymentAspect extends
URLPatternDeploymentAspect
+{
+
+ @Override
+ protected String getExplicitPattern(Deployment dep, Endpoint ep)
+ {
+ String contextRoot = dep.getService().getContextRoot();
+ if (contextRoot == null)
+ throw new IllegalStateException("Cannot obtain context root");
+
+ String urlPattern = super.getExplicitPattern(dep, ep);
+ if (urlPattern != null)
+ {
+ if (urlPattern.startsWith("/") == false)
+ urlPattern = "/" + urlPattern;
+
+ StringTokenizer st = new StringTokenizer(urlPattern, "/");
+ if (st.countTokens() > 1 && urlPattern.startsWith(contextRoot))
+ {
+ urlPattern = urlPattern.substring(contextRoot.length());
+ }
+ }
+ return urlPattern;
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleURLPatternDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,133 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentContext;
+import org.jboss.wsf.spi.deployment.Service;
+
+//$Id$
+
+
+/**
+ * A general web service deployment dep.
+ *
+ * It has no notion of J2EE deployment packages.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicDeployment implements Deployment
+{
+ // The context for this deployment dep
+ private DeploymentContext context;
+ // The root file for this deployment
+ private UnifiedVirtualFile rootFile;
+ // A deployment has one service
+ private Service service;
+ // The type of this deployment
+ private DeploymentType type;
+ // The state for this deployment
+ private DeploymentState state;
+ // The deployment class loader
+ private ClassLoader initialLoader;
+ // The runtime class loader
+ private ClassLoader runtimeLoader;
+
+ public BasicDeployment()
+ {
+ context = new BasicDeploymentContext();
+ service = new BasicService(this);
+ state = DeploymentState.UNDEFINED;
+ }
+
+ public DeploymentContext getContext()
+ {
+ return context;
+ }
+
+ public void setContext(DeploymentContext context)
+ {
+ this.context = context;
+ }
+
+ public UnifiedVirtualFile getRootFile()
+ {
+ return rootFile;
+ }
+
+ public void setRootFile(UnifiedVirtualFile rootFile)
+ {
+ this.rootFile = rootFile;
+ }
+
+ public void setInitialClassLoader(ClassLoader classLoader)
+ {
+ this.initialLoader = classLoader;
+ }
+
+ public ClassLoader getInitialClassLoader()
+ {
+ return initialLoader;
+ }
+
+ public void setRuntimeClassLoader(ClassLoader classLoader)
+ {
+ this.runtimeLoader = classLoader;
+ }
+
+ public ClassLoader getRuntimeClassLoader()
+ {
+ return runtimeLoader;
+ }
+
+ public Service getService()
+ {
+ return service;
+ }
+
+ public void setService(Service service)
+ {
+ this.service = service;
+ }
+
+ public DeploymentState getState()
+ {
+ return state;
+ }
+
+ public void setState(DeploymentState deploymentState)
+ {
+ this.state = deploymentState;
+ }
+
+ public DeploymentType getType()
+ {
+ return type;
+ }
+
+ public void setType(DeploymentType deploymentType)
+ {
+ this.type = deploymentType;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,258 @@
+/*
+ * 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.wsf.framework.deployment;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+
+/**
+ * A general service deployment manger.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicDeploymentAspectManager implements DeploymentAspectManager
+{
+ // provide logging
+ private static final Logger log =
Logger.getLogger(BasicDeploymentAspectManager.class);
+
+ private String name;
+ private Set<DeploymentAspect> unsortedAspects = new
HashSet<DeploymentAspect>();
+ private List<DeploymentAspect> sortedAspects;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public List<DeploymentAspect> getDeploymentAspects()
+ {
+ if (sortedAspects == null)
+ {
+ sortedAspects = new ArrayList<DeploymentAspect>();
+ List<DeploymentAspect> allAspects = new
ArrayList<DeploymentAspect>(unsortedAspects);
+
+ // Add aspects with no requirements first
+ Iterator<DeploymentAspect> itAll = allAspects.iterator();
+ while (itAll.hasNext())
+ {
+ DeploymentAspect aspect = itAll.next();
+ if (aspect.getRequires() == null)
+ {
+ sortedAspects.add(aspect);
+ itAll.remove();
+ }
+ }
+
+ // Add aspects that have requirements that already added aspects provide
+ itAll = allAspects.iterator();
+ while (itAll.hasNext())
+ {
+ DeploymentAspect aspect = itAll.next();
+ int index = getAspectIndex(aspect);
+ if (index != -1)
+ {
+ sortedAspects.add(index, aspect);
+ itAll.remove();
+
+ itAll = allAspects.iterator();
+ }
+ }
+
+ // Add LAST_DEPLOYMENT_ASPECT
+ itAll = allAspects.iterator();
+ while (itAll.hasNext())
+ {
+ DeploymentAspect aspect = itAll.next();
+ if (LAST_DEPLOYMENT_ASPECT.equals(aspect.getRequires()))
+ {
+ sortedAspects.add(aspect);
+ itAll.remove();
+ }
+ }
+
+ if (allAspects.size() != 0)
+ {
+ Set<String> providedConditions = new HashSet<String>();
+ for (int i = 0; i < sortedAspects.size(); i++)
+ {
+ DeploymentAspect sortedAspect = sortedAspects.get(i);
+ providedConditions.addAll(sortedAspect.getProvidesAsSet());
+ }
+
+ throw new IllegalStateException("Cannot add: " + allAspects +
"\n provided: " + providedConditions);
+ }
+
+ for (DeploymentAspect aspect : sortedAspects)
+ log.info(name + ": " + aspect);
+ }
+
+ return sortedAspects;
+ }
+
+ private int getAspectIndex(DeploymentAspect aspect)
+ {
+ int index = -1;
+ Set<String> providedConditions = new HashSet<String>();
+ for (int i = 0; i < sortedAspects.size(); i++)
+ {
+ DeploymentAspect sortedAspect = sortedAspects.get(i);
+ providedConditions.addAll(sortedAspect.getProvidesAsSet());
+ if (providedConditions.containsAll(aspect.getRequiresAsSet()))
+ {
+ index = i + 1;
+ break;
+ }
+ }
+ return index;
+ }
+
+ public void addDeploymentAspect(DeploymentAspect aspect)
+ {
+ if (sortedAspects != null)
+ throw new IllegalStateException("Cannot add deployment aspects to an
already sorted list: " + sortedAspects);
+
+ unsortedAspects.add(aspect);
+ }
+
+ /**
+ * Iterate over the registered deployers calls create on each.
+ * Iterate over the registered deployers again and calls start on each.
+ * If start fails it automaticall calls destroy in the reverse order
+ * starting with the deployer that failed
+ */
+ public void deploy(Deployment dep)
+ {
+ // create the deployment
+ Set<String> providedConditions = new HashSet<String>();
+ for (int i = 0; i < getDeploymentAspects().size(); i++)
+ {
+ DeploymentAspect aspect = getDeploymentAspects().get(i);
+
+ // Check that all required aspects are met
+ Set<String> requiredSet = aspect.getRequiresAsSet();
+ requiredSet.remove(LAST_DEPLOYMENT_ASPECT);
+ if (providedConditions.containsAll(requiredSet) == false)
+ throw new IllegalStateException("Required conditions '" +
aspect.getRequires() + "' not satisfied by '" + providedConditions +
"' for: " + aspect);
+
+ logInvocation(aspect, "Create");
+ aspect.create(dep);
+
+ providedConditions.addAll(aspect.getProvidesAsSet());
+ }
+
+ dep.setState(DeploymentState.CREATED);
+
+ // start the deployment
+ for (int i = 0; i < getDeploymentAspects().size(); i++)
+ {
+ DeploymentAspect aspect = getDeploymentAspects().get(i);
+ try
+ {
+ logInvocation(aspect, "Start");
+ aspect.start(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ while (i-- >= 0)
+ {
+ // destroy the deployment
+ failsafeDestroy(aspect, dep);
+ }
+ throw rte;
+ }
+ }
+
+ dep.setState(DeploymentState.STARTED);
+ }
+
+ public void undeploy(Deployment dep)
+ {
+ // stop the deployment
+ for (int i = getDeploymentAspects().size(); 0 < i; i--)
+ {
+ DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
+ failsafeStop(aspect, dep);
+ }
+
+ dep.setState(DeploymentState.STOPPED);
+
+ // destroy the deployment
+ for (int i = getDeploymentAspects().size(); 0 < i; i--)
+ {
+ DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
+ failsafeDestroy(aspect, dep);
+ }
+
+ dep.setState(DeploymentState.DESTROYED);
+ }
+
+ private void failsafeStop(DeploymentAspect aspect, Deployment dep)
+ {
+ try
+ {
+ logInvocation(aspect, "Stop");
+ aspect.stop(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ WSFDeploymentException.rethrow(rte);
+ }
+ }
+
+ private void failsafeDestroy(DeploymentAspect aspect, Deployment dep)
+ {
+ try
+ {
+ logInvocation(aspect, "Destroy");
+ aspect.destroy(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ WSFDeploymentException.rethrow(rte);
+ }
+ }
+
+ private void logInvocation(DeploymentAspect aspect, String method)
+ {
+ String name = aspect.getClass().getName();
+ name = name.substring(name.lastIndexOf(".") + 1);
+ log.debug(name + ":" + method);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentContext.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentContext.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentContext.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,77 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.spi.deployment.DeploymentContext;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * A general web service deployment context.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicDeploymentContext implements DeploymentContext
+{
+ private Map<Class, Object> attachments = new HashMap<Class, Object>();
+ private Map<String, Object> properties = new HashMap<String, Object>();
+
+ public <T> T getAttachment(Class<T> clazz)
+ {
+ return (T)attachments.get(clazz);
+ }
+
+ public <T> T addAttachment(Class<T> clazz, Object obj)
+ {
+ return (T)attachments.put(clazz, obj);
+ }
+
+ public <T> T removeAttachment(Class<T> key)
+ {
+ return (T)attachments.remove(key);
+ }
+
+ public Set<String> getProperties()
+ {
+ return properties.keySet();
+ }
+
+ public Object getProperty(String key)
+ {
+ return properties.get(key);
+ }
+
+ public void removeProperty(String key)
+ {
+ properties.remove(key);
+ }
+
+ public void setProperty(String key, Object value)
+ {
+ properties.put(key, value);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentContext.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,267 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.LifecycleHandler;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+
+import javax.management.ObjectName;
+import java.util.*;
+
+/**
+ * A general JAXWS endpoint.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicEndpoint implements Endpoint
+{
+ private Service service;
+ private ObjectName name;
+ private String shortName;
+ private String urlPattern;
+ private String targetBean;
+ private EndpointState state;
+ private RequestHandler requestHandler;
+ private InvocationHandler invocationHandler;
+ private LifecycleHandler lifecycleHandler;
+ private Map<Class, Object> attachments = new HashMap<Class, Object>();
+ private Map<String, Object> properties = new HashMap<String, Object>();
+ private EndpointMetrics metrics;
+ private List<BindingCustomization> bindingCustomizsations = new
ArrayList<BindingCustomization>();
+
+ public BasicEndpoint()
+ {
+ this.state = EndpointState.UNDEFINED;
+ }
+
+ public Service getService()
+ {
+ return service;
+ }
+
+ public void setService(Service service)
+ {
+ assertEndpointSetterAccess();
+ this.service = service;
+ }
+
+ public String getTargetBeanName()
+ {
+ return targetBean;
+ }
+
+ public void setTargetBeanName(String targetBean)
+ {
+ assertEndpointSetterAccess();
+ this.targetBean = targetBean;
+ }
+
+ public Class getTargetBeanClass()
+ {
+ if (targetBean == null)
+ throw new IllegalStateException("Target bean not set");
+
+ ClassLoader classLoader = service.getDeployment().getRuntimeClassLoader();
+ if (classLoader == null)
+ classLoader = service.getDeployment().getInitialClassLoader();
+
+ if (classLoader == null)
+ throw new IllegalStateException("Deployment classloader not set");
+
+ Class beanClass;
+ try
+ {
+ beanClass = classLoader.loadClass(targetBean);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSFDeploymentException(ex);
+ }
+ return beanClass;
+ }
+
+ public ObjectName getName()
+ {
+ return name;
+ }
+
+ public void setName(ObjectName name)
+ {
+ assertEndpointSetterAccess();
+ this.name = name;
+ }
+
+ public String getShortName()
+ {
+ return shortName;
+ }
+
+ public void setShortName(String shortName)
+ {
+ assertEndpointSetterAccess();
+ this.shortName = shortName;
+ }
+
+ public String getURLPattern()
+ {
+ return urlPattern;
+ }
+
+ public void setURLPattern(String urlPattern)
+ {
+ assertEndpointSetterAccess();
+ this.urlPattern = urlPattern;
+ }
+
+ public EndpointState getState()
+ {
+ return state;
+ }
+
+ public void setState(EndpointState state)
+ {
+ this.state = state;
+ }
+
+ public RequestHandler getRequestHandler()
+ {
+ return requestHandler;
+ }
+
+ public void setRequestHandler(RequestHandler handler)
+ {
+ assertEndpointSetterAccess();
+ this.requestHandler = handler;
+ }
+
+ public LifecycleHandler getLifecycleHandler()
+ {
+ return lifecycleHandler;
+ }
+
+ public void setLifecycleHandler(LifecycleHandler handler)
+ {
+ assertEndpointSetterAccess();
+ this.lifecycleHandler = handler;
+ }
+
+ public InvocationHandler getInvocationHandler()
+ {
+ return invocationHandler;
+ }
+
+ public void setInvocationHandler(InvocationHandler handler)
+ {
+ assertEndpointSetterAccess();
+ this.invocationHandler = handler;
+ }
+
+ public List<BindingCustomization> getBindingCustomizations()
+ {
+ return Collections.unmodifiableList(bindingCustomizsations);
+ }
+
+ /* Get a concrete binding customization */
+ public BindingCustomization getBindingCustomization(BindingCustomization
customization)
+ {
+ BindingCustomization match = null;
+
+ Iterator<BindingCustomization> it = bindingCustomizsations.iterator();
+ while(it.hasNext())
+ {
+ BindingCustomization bc = it.next();
+ if(bc.getClass().equals(customization.getClass()))
+ {
+ match = bc;
+ }
+ }
+
+ return match;
+ }
+
+ public void addBindingCustomization(BindingCustomization customization)
+ {
+ assertEndpointSetterAccess();
+ bindingCustomizsations.add(customization);
+ }
+
+ public <T> T addAttachment(Class<T> key, Object value)
+ {
+ return (T)attachments.put(key, value);
+ }
+
+ public <T> T getAttachment(Class<T> key)
+ {
+ return (T)attachments.get(key);
+ }
+
+ public <T> T removeAttachment(Class<T> key)
+ {
+ return (T)attachments.get(key);
+ }
+
+ public Set<String> getProperties()
+ {
+ return properties.keySet();
+ }
+
+ public Object getProperty(String key)
+ {
+ return properties.get(key);
+ }
+
+ public void removeProperty(String key)
+ {
+ properties.remove(key);
+ }
+
+ public void setProperty(String key, Object value)
+ {
+ properties.put(key, value);
+ }
+
+ public EndpointMetrics getEndpointMetrics()
+ {
+ return metrics;
+ }
+
+ public void setEndpointMetrics(EndpointMetrics metrics)
+ {
+ assertEndpointSetterAccess();
+ metrics.setEndpoint(this);
+ this.metrics = metrics;
+
+ }
+
+ private void assertEndpointSetterAccess()
+ {
+ if (state == EndpointState.STARTED)
+ throw new IllegalStateException("Cannot modify endpoint properties in
state: " + state);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,95 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
+import org.jboss.wsf.spi.deployment.LifecycleHandler;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+/**
+ * A basic lifecycle handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2006
+ */
+public class BasicLifecycleHandler implements LifecycleHandler
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(getClass());
+
+ public void create(Endpoint ep)
+ {
+ log.debug("Create: " + ep.getName());
+
+ InvocationHandler invHandler = ep.getInvocationHandler();
+ if (invHandler == null)
+ throw new IllegalStateException("Invocation handler not available");
+
+ invHandler.create(ep);
+ ep.setState(EndpointState.CREATED);
+ }
+
+ public void start(Endpoint ep)
+ {
+ log.debug("Start: " + ep.getName());
+
+ EndpointState state = ep.getState();
+ if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
+ throw new IllegalStateException("Cannot start endpoint in state: " +
state);
+
+ ep.getInvocationHandler().start(ep);
+
+ if (ep.getEndpointMetrics() != null)
+ ep.getEndpointMetrics().start();
+
+ ep.setState(EndpointState.STARTED);
+ }
+
+ public void stop(Endpoint ep)
+ {
+ log.debug("Stop: " + ep.getName());
+
+ EndpointState state = ep.getState();
+ if (state != EndpointState.STARTED)
+ throw new IllegalStateException("Cannot stop endpoint in state: " +
state);
+
+ ep.getInvocationHandler().stop(ep);
+
+ if (ep.getEndpointMetrics() != null)
+ ep.getEndpointMetrics().stop();
+
+ ep.setState(EndpointState.STOPPED);
+ }
+
+ public void destroy(Endpoint ep)
+ {
+ log.debug("Destroy: " + ep.getName());
+
+ ep.getInvocationHandler().destroy(ep);
+
+ ep.setState(EndpointState.DESTROYED);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,100 @@
+/*
+ * 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.wsf.framework.deployment;
+
+// $Id$
+
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+import java.util.LinkedList;
+import java.util.List;
+
+
+/**
+ * A general service.
+ *
+ * Maintains a named set of Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicService implements Service
+{
+ private Deployment dep;
+ private List<Endpoint> endpoints = new LinkedList<Endpoint>();
+ private String contextRoot;
+
+ public BasicService(Deployment dep)
+ {
+ this.dep = dep;
+ this.dep.setService(this);
+ }
+
+ public Deployment getDeployment()
+ {
+ return dep;
+ }
+
+ public void setDeployment(Deployment dep)
+ {
+ this.dep = dep;
+ }
+
+ public void addEndpoint(Endpoint endpoint)
+ {
+ endpoints.add(endpoint);
+ }
+
+ public List<Endpoint> getEndpoints()
+ {
+ return endpoints;
+ }
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+
+ public void setContextRoot(String contextRoot)
+ {
+ this.contextRoot = contextRoot;
+ }
+
+ public Endpoint getEndpointByName(String shortName)
+ {
+ if (shortName == null)
+ throw new IllegalArgumentException("shortName cannot be null");
+
+ Endpoint retEndpoint = null;
+ for (Endpoint ep : endpoints)
+ {
+ if (ep.getShortName().equals(shortName))
+ {
+ retEndpoint = ep;
+ break;
+ }
+ }
+ return retEndpoint;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,63 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+
+import java.util.Iterator;
+import java.util.Map;
+
+
+/**
+ * Populate deployment context properties
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class ContextPropertiesDeploymentAspect extends DeploymentAspect
+{
+ // The configured service endpoint servlet
+ private Map<String,String> contextProperties;
+
+ public Map<String, String> getContextProperties()
+ {
+ return contextProperties;
+ }
+
+ public void setContextProperties(Map<String, String> contextProperties)
+ {
+ this.contextProperties = contextProperties;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ Iterator<String> it = contextProperties.keySet().iterator();
+ while (it.hasNext())
+ {
+ String key = it.next();
+ String value = contextProperties.get(key);
+ dep.getContext().setProperty(key, value);
+ }
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,110 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.framework.annotation.WebContext;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
+
+/**
+ * A deployer that assigns the context root to the service
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ContextRootDeploymentAspect extends DeploymentAspect
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ String contextRoot = dep.getService().getContextRoot();
+ if (contextRoot == null)
+ {
+ contextRoot = getExplicitContextRoot(dep);
+ if (contextRoot == null)
+ contextRoot = getImplicitContextRoot(dep);
+
+ // Always prefix with '/'
+ if (contextRoot.startsWith("/") == false)
+ contextRoot = "/" + contextRoot;
+
+ dep.getService().setContextRoot(contextRoot);
+ }
+ }
+
+ protected String getExplicitContextRoot(Deployment dep)
+ {
+ String contextRoot = null;
+
+ // #1 Use the explicit context root from the web meta data
+ UnifiedWebMetaData webMetaData =
dep.getContext().getAttachment(UnifiedWebMetaData.class);
+ if (webMetaData != null)
+ contextRoot = webMetaData.getContextRoot();
+
+ // #2 Use the explicit context root from @WebContext.contextRoot
+ if (contextRoot == null)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ Class implClass = ep.getTargetBeanClass();
+ WebContext anWebContext =
(WebContext)implClass.getAnnotation(WebContext.class);
+ if (anWebContext != null && anWebContext.contextRoot().length() >
0)
+ {
+ if (contextRoot != null &&
contextRoot.equals(anWebContext.contextRoot()) == false)
+ throw new IllegalStateException("Context root must be the same for
all deployed endpoints");
+
+ contextRoot = anWebContext.contextRoot();
+ }
+ }
+ }
+
+ // #3 Use the explicit context root from webservices/context-root
+ UnifiedApplicationMetaData appMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (contextRoot == null && appMetaData != null)
+ {
+ contextRoot = appMetaData.getWebServiceContextRoot();
+ }
+
+ return contextRoot;
+ }
+
+ /** Use the implicit context root derived from the deployment name
+ */
+ protected String getImplicitContextRoot(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ String simpleName = udi.simpleName;
+ String contextRoot = simpleName.substring(0, simpleName.length() - 4);
+ if (udi.parent != null)
+ {
+ simpleName = udi.parent.simpleName;
+ contextRoot = simpleName.substring(0, simpleName.length() - 4) + "-" +
contextRoot;
+ }
+ return contextRoot;
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,61 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+
+import java.util.Set;
+
+/**
+ * A deployment aspect installer.
+ *
+ * Use this installer with microkernel version 1.x
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class DeploymentAspectInstaller
+{
+ private DeploymentAspectManager manager;
+ private Set<DeploymentAspect> aspects;
+
+ public void setManager(DeploymentAspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public void setAspects(Set<DeploymentAspect> aspects)
+ {
+ this.aspects = aspects;
+ }
+
+ public void create()
+ {
+ for (DeploymentAspect aspect : aspects)
+ {
+ manager.addDeploymentAspect(aspect);
+ }
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,145 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.LifecycleHandler;
+
+/**
+ * A deployer that assigns the handlers to the Endpoint
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class EndpointHandlerDeploymentAspect extends DeploymentAspect
+{
+ private String requestHandler;
+ private String lifecycleHandler;
+
+ private Map<String, String> invocationHandlerMap = new HashMap<String,
String>();
+
+ public void setLifecycleHandler(String handler)
+ {
+ this.lifecycleHandler = handler;
+ }
+
+ public void setRequestHandler(String handler)
+ {
+ this.requestHandler = handler;
+ }
+
+ public void setInvocationHandler(Map<String, String> handlers)
+ {
+ this.invocationHandlerMap = handlers;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ if (requestHandler != null)
+ ep.setRequestHandler(getRequestHandler(dep));
+
+ if (lifecycleHandler != null)
+ ep.setLifecycleHandler(getLifecycleHandler(dep));
+
+ if (invocationHandlerMap != null)
+ {
+ InvocationHandler invocationHandler = getInvocationHandler(ep);
+ if (invocationHandler != null)
+ ep.setInvocationHandler(invocationHandler);
+ }
+ }
+ }
+
+ private RequestHandler getRequestHandler(Deployment dep)
+ {
+ try
+ {
+ Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(requestHandler);
+ return (RequestHandler)handlerClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Cannot load request handler: " +
requestHandler);
+ }
+ }
+
+ private LifecycleHandler getLifecycleHandler(Deployment dep)
+ {
+ try
+ {
+ Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(lifecycleHandler);
+ return (LifecycleHandler)handlerClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Cannot load lifecycle handler: " +
lifecycleHandler);
+ }
+ }
+
+ private InvocationHandler getInvocationHandler(Endpoint ep)
+ {
+ Deployment dep = ep.getService().getDeployment();
+ String key = dep.getType().toString();
+
+ // Use a special key for MDB endpoints
+ UnifiedApplicationMetaData uapp =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (uapp != null)
+ {
+ UnifiedBeanMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
+ if (bmd instanceof UnifiedMessageDrivenMetaData)
+ {
+ key = "JAXRPC_MDB21";
+ }
+ }
+
+ InvocationHandler invocationHandler = null;
+ String className = invocationHandlerMap.get(key);
+ if (className != null)
+ {
+ try
+ {
+ Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(className);
+ invocationHandler = (InvocationHandler)handlerClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Cannot load invocation handler: "
+ className);
+ }
+ }
+ return invocationHandler;
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,93 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import org.jboss.wsf.spi.deployment.*;
+
+//$Id$
+
+
+/**
+ * A deployer that that calls the endpoint lifecycle handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class EndpointLifecycleDeploymentAspect extends DeploymentAspect
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ getLifecycleHandler(ep, true).create(ep);
+ }
+ }
+
+ @Override
+ public void start(Deployment dep)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ getLifecycleHandler(ep, true).start(ep);
+ }
+ }
+
+ @Override
+ public void stop(Deployment dep)
+ {
+ Service service = dep.getService();
+ if (service != null)
+ {
+ for (Endpoint ep : service.getEndpoints())
+ {
+ LifecycleHandler lifecycleHandler = getLifecycleHandler(ep, false);
+ if (lifecycleHandler != null)
+ lifecycleHandler.stop(ep);
+ }
+ }
+ }
+
+ @Override
+ public void destroy(Deployment dep)
+ {
+ Service service = dep.getService();
+ if (service != null)
+ {
+ for (Endpoint ep : service.getEndpoints())
+ {
+ LifecycleHandler lifecycleHandler = getLifecycleHandler(ep, false);
+ if (lifecycleHandler != null)
+ lifecycleHandler.destroy(ep);
+ }
+ }
+ }
+
+ private LifecycleHandler getLifecycleHandler(Endpoint ep, boolean assertHandler)
+ {
+ LifecycleHandler lifecycleHandler = ep.getLifecycleHandler();
+ if (lifecycleHandler == null && assertHandler)
+ throw new IllegalStateException("LifecycleHandler not initialised");
+
+ return lifecycleHandler;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,54 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * A deployer that assigns the metrics to the Endpoint
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 20-Jun-2007
+ */
+public class EndpointMetricsDeploymentAspect extends DeploymentAspect
+{
+ private EndpointMetrics metrics;
+
+ public void setEndpointMetrics(EndpointMetrics metrics)
+ {
+ this.metrics = metrics;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ ep.setEndpointMetrics(metrics);
+ }
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,70 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.wsf.spi.utils.ObjectNameFactory;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * A deployer that assigns the complete name to the Endpoint
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class EndpointNameDeploymentAspect extends DeploymentAspect
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ String contextRoot = dep.getService().getContextRoot();
+ if (contextRoot == null || contextRoot.startsWith("/") == false)
+ throw new IllegalStateException("Context root expected to start with
leading slash: " + contextRoot);
+
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ StringBuilder name = new StringBuilder(Endpoint.SEPID_DOMAIN + ":");
+ name.append(Endpoint.SEPID_PROPERTY_CONTEXT + "=" +
contextRoot.substring(1) + ",");
+ name.append(Endpoint.SEPID_PROPERTY_ENDPOINT + "=" +
ep.getShortName());
+
+ // Append the JMS destination, for an MDB endpoint
+ UnifiedApplicationMetaData uapp =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (uapp != null)
+ {
+ UnifiedBeanMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
+ if (bmd instanceof UnifiedMessageDrivenMetaData)
+ {
+ String destName =
((UnifiedMessageDrivenMetaData)bmd).getDestinationJndiName();
+ name.append(",jms=" + destName);
+ }
+ }
+
+ ep.setName(ObjectNameFactory.create(name.toString()));
+ }
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,55 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * A deployer that registers the endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class EndpointRegistryDeploymentAspect extends DeploymentAspect
+{
+ public void create(Deployment dep)
+ {
+ EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ registry.register(ep);
+ }
+ }
+
+ public void destroy(Deployment dep)
+ {
+ EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ registry.unregister(ep);
+ }
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
+
+/**
+ * The container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class JAXRPCClientDeployment extends UnifiedDeploymentInfo
+{
+
+ public JAXRPCClientDeployment(DeploymentType type)
+ {
+ super(type);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,88 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import java.io.InputStream;
+import java.net.URL;
+
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+
+// $Id$
+
+/**
+ * The container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class JAXRPCDeployment extends UnifiedDeploymentInfo
+{
+ private WebservicesMetaData wsMetaData;
+
+ public JAXRPCDeployment(DeploymentType type, WebservicesMetaData wsMetaData)
+ {
+ super(type);
+ this.wsMetaData = wsMetaData;
+ }
+
+ public JAXRPCDeployment(DeploymentType type, UnifiedVirtualFile vfWebservices)
+ {
+ super(type);
+
+ try
+ {
+ // Unmarshall webservices.xml
+ URL webservicesURL = vfWebservices.toURL();
+ InputStream is = webservicesURL.openStream();
+ try
+ {
+ Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
+ ObjectModelFactory factory = new WebservicesFactory(webservicesURL);
+ wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(is, factory, null);
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException(ex);
+ }
+ }
+
+ public WebservicesMetaData getWebservicesMetaData()
+ {
+ return wsMetaData;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,41 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
+
+/**
+ * The container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 29-Jun-2006
+ */
+public class JAXWSDeployment extends UnifiedDeploymentInfo
+{
+ public JAXWSDeployment(DeploymentType type)
+ {
+ super(type);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,108 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.framework.annotation.WebContext;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * A deployer that assigns the URLPattern to endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public class URLPatternDeploymentAspect extends DeploymentAspect
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String urlPattern = ep.getURLPattern();
+ if (urlPattern == null)
+ {
+ urlPattern = getExplicitPattern(dep, ep);
+ if (urlPattern == null)
+ urlPattern = getImplicitPattern(dep, ep);
+
+ // Always prefix with '/'
+ if (urlPattern.startsWith("/") == false)
+ urlPattern = "/" + urlPattern;
+
+ ep.setURLPattern(urlPattern);
+ }
+ }
+ }
+
+ protected String getExplicitPattern(Deployment dep, Endpoint ep)
+ {
+ String urlPattern = null;
+
+ // #1 For JSE lookup the url-pattern from the servlet mappings
+ UnifiedWebMetaData webMetaData =
dep.getContext().getAttachment(UnifiedWebMetaData.class);
+ if (webMetaData != null)
+ {
+ String epName = ep.getShortName();
+ urlPattern = webMetaData.getServletMappings().get(epName);
+ if (urlPattern == null)
+ throw new IllegalStateException("Cannot obtain servlet mapping for:
" + epName);
+ }
+
+ // #2 Use the explicit urlPattern from port-component/port-component-uri
+ UnifiedApplicationMetaData appMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName())
!= null)
+ {
+ UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
+ UnifiedEjbPortComponentMetaData pcmd = bmd.getPortComponent();
+ if (pcmd != null)
+ {
+ urlPattern = pcmd.getPortComponentURI();
+ }
+ }
+
+ // #3 For EJB use @WebContext.urlPattern
+ if (urlPattern == null)
+ {
+ Class beanClass = ep.getTargetBeanClass();
+ WebContext anWebContext =
(WebContext)beanClass.getAnnotation(WebContext.class);
+ if (anWebContext != null && anWebContext.urlPattern().length() > 0)
+ urlPattern = anWebContext.urlPattern();
+ }
+
+ return urlPattern;
+ }
+
+ protected String getImplicitPattern(Deployment dep, Endpoint ep)
+ {
+ // #4 Fallback to the ejb-name
+ String urlPattern = ep.getShortName();
+ return urlPattern;
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,165 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * Modifies web.xml for jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class WebAppDesciptorModifierImpl implements WebAppDesciptorModifier
+{
+ // logging support
+ private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
+
+ public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws
ClassNotFoundException
+ {
+ RewriteResults results = new RewriteResults();
+ Element root = webXml.getRootElement();
+
+ String propKey = SERVLET_CLASS;
+ String servletClass = (String)dep.getContext().getProperty(propKey);
+ if (servletClass == null)
+ throw new IllegalStateException("Cannot obtain context property: " +
propKey);
+
+ propKey = CONTEXT_PARAMETER_MAP;
+ Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
+ if (contextParams != null)
+ {
+ for (Map.Entry<String, String> entry : contextParams.entrySet())
+ {
+ Element contextParam = root.addElement("context-param");
+ contextParam.addElement("param-name").addText(entry.getKey());
+ contextParam.addElement("param-value").addText(entry.getValue());
+ }
+ }
+
+ propKey = SERVLET_CONTEXT_LISTENER;
+ String listenerClass = (String)dep.getContext().getProperty(propKey);
+ if (listenerClass != null)
+ {
+ Element listener = root.addElement("listener");
+ listener.addElement("listener-class").setText(listenerClass);
+ }
+
+ for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
+ {
+ Element servlet = (Element)it.next();
+ String linkName = servlet.element("servlet-name").getTextTrim();
+
+ // find the servlet-class
+ Element classElement = servlet.element("servlet-class");
+
+ // JSP
+ if (classElement == null)
+ continue;
+
+ String orgServletClassName = classElement.getTextTrim();
+
+ // Get the servlet class
+ Class orgServletClass = null;
+ try
+ {
+ ClassLoader loader = dep.getInitialClassLoader();
+ orgServletClass = loader.loadClass(orgServletClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClassName);
+ }
+
+ String targetBeanName = null;
+
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet))
+ {
+ for (Iterator itParam = servlet.elementIterator("init-param");
itParam.hasNext();)
+ {
+ Element elParam = (Element)itParam.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ String paramValue =
elParam.element("param-value").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ {
+ targetBeanName = paramValue;
+ }
+ }
+ }
+ else
+ {
+ // Check if it is a real servlet that we can ignore
+ if (orgServletClass != null &&
javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
+ {
+ log.info("Ignore servlet: " + orgServletClassName);
+ continue;
+ }
+ else if (orgServletClassName.endsWith("Servlet"))
+ {
+ log.info("Ignore <servlet-class> that ends with
'Servlet': " + orgServletClassName);
+ continue;
+ }
+
+ classElement.setText(servletClass);
+
+ // add additional init params
+ if (orgServletClassName.equals(servletClass) == false)
+ {
+ targetBeanName = orgServletClassName;
+ Element paramElement = servlet.addElement("init-param");
+
paramElement.addElement("param-name").addText(Endpoint.SEPID_DOMAIN_ENDPOINT);
+ paramElement.addElement("param-value").addText(targetBeanName);
+ }
+ }
+
+ if (targetBeanName == null)
+ throw new IllegalStateException("Cannot obtain service endpoint bean
for: " + linkName);
+
+ // remember the target bean name
+ results.sepTargetMap.put(linkName, targetBeanName);
+ }
+
+ return results;
+ }
+
+ // Return true if the web.xml is already modified
+ private boolean isAlreadyModified(Element servlet)
+ {
+ for (Iterator it = servlet.elementIterator("init-param"); it.hasNext();)
+ {
+ Element elParam = (Element)it.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ return true;
+ }
+ return false;
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,273 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
+import org.jboss.wsf.framework.annotation.WebContext;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.wsf.spi.deployment.*;
+
+/**
+ * A deployer that generates a webapp for an EJB endpoint
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class WebAppGeneratorDeploymentAspect extends DeploymentAspect
+{
+ private SecurityHandler securityHandlerEJB21;
+ private SecurityHandler securityHandlerEJB3;
+
+ public void setSecurityHandlerEJB21(SecurityHandler handler)
+ {
+ this.securityHandlerEJB21 = handler;
+ }
+
+ public void setSecurityHandlerEJB3(SecurityHandler handler)
+ {
+ this.securityHandlerEJB3 = handler;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ if (udi == null)
+ throw new IllegalStateException("Cannot obtain unified deployement
info");
+
+ if (dep.getType().toString().endsWith("EJB21"))
+ {
+ udi.webappURL = generatWebDeployment(dep, securityHandlerEJB21);
+ }
+ else if (dep.getType().toString().endsWith("EJB3"))
+ {
+ udi.webappURL = generatWebDeployment(dep, securityHandlerEJB3);
+ }
+ }
+
+ private URL generatWebDeployment(Deployment dep, SecurityHandler securityHandler)
+ {
+ Document webDoc = createWebAppDescriptor(dep, securityHandler);
+ Document jbossDoc = createJBossWebAppDescriptor(dep, securityHandler);
+
+ File tmpWar = null;
+ try
+ {
+ ServerConfig config = ServerConfigFactory.getInstance().getServerConfig();
+ File tmpdir = new File(config.getServerTempDir().getCanonicalPath() +
"/deploy");
+
+ UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ String deploymentName = udi.getCanonicalName().replace('/',
'-');
+ tmpWar = File.createTempFile(deploymentName, ".war", tmpdir);
+ tmpWar.delete();
+
+ File webInf = new File(tmpWar, "WEB-INF");
+ webInf.mkdirs();
+
+ File webXml = new File(webInf, "web.xml");
+ FileWriter fw = new FileWriter(webXml);
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ XMLWriter writer = new XMLWriter(fw, format);
+ writer.write(webDoc);
+ writer.close();
+
+ File jbossWebXml = new File(webInf, "jboss-web.xml");
+ fw = new FileWriter(jbossWebXml);
+ writer = new XMLWriter(fw, format);
+ writer.write(jbossDoc);
+ writer.close();
+
+ return tmpWar.toURL();
+ }
+ catch (IOException e)
+ {
+ throw new WSFDeploymentException("Failed to create webservice.war",
e);
+ }
+ }
+
+ private Document createWebAppDescriptor(Deployment dep, SecurityHandler
securityHandler)
+ {
+ UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+
+ Document document = DocumentHelper.createDocument();
+ Element webApp = document.addElement("web-app");
+
+ /*
+ <servlet>
+ <servlet-name>
+ <servlet-class>
+ </servlet>
+ */
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ Element servlet = webApp.addElement("servlet");
+ servlet.addElement("servlet-name").addText(ep.getShortName());
+ servlet.addElement("servlet-class").addText(ep.getTargetBeanName());
+ }
+
+ /*
+ <servlet-mapping>
+ <servlet-name>
+ <url-pattern>
+ </servlet-mapping>
+ */
+ ArrayList urlPatters = new ArrayList();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ Element servletMapping = webApp.addElement("servlet-mapping");
+ servletMapping.addElement("servlet-name").addText(ep.getShortName());
+ servletMapping.addElement("url-pattern").addText(ep.getURLPattern());
+ }
+
+ String authMethod = null;
+
+ // Add web-app/security-constraint for each port component
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String ejbName = ep.getShortName();
+
+ Boolean secureWSDLAccess = null;
+ String transportGuarantee = null;
+ String beanAuthMethod = null;
+
+ WebContext anWebContext =
(WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
+ if(anWebContext != null)
+ {
+ if (anWebContext.authMethod().length() > 0)
+ beanAuthMethod = anWebContext.authMethod();
+ if (anWebContext.transportGuarantee().length() > 0)
+ transportGuarantee = anWebContext.transportGuarantee();
+ if (anWebContext.secureWSDLAccess())
+ secureWSDLAccess = anWebContext.secureWSDLAccess();
+ }
+
+ UnifiedApplicationMetaData appMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) !=
null)
+ {
+ UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
+ UnifiedEjbPortComponentMetaData pc = bmd.getPortComponent();
+ if (pc != null)
+ {
+ beanAuthMethod = pc.getAuthMethod();
+ transportGuarantee = pc.getTransportGuarantee();
+ secureWSDLAccess = pc.getSecureWSDLAccess();
+ }
+ }
+
+ if (beanAuthMethod != null || transportGuarantee != null)
+ {
+ /*
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>TestUnAuthPort</web-resource-name>
+ <url-pattern>/HSTestRoot/TestUnAuth/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ */
+ Element securityConstraint =
webApp.addElement("security-constraint");
+ Element wrc =
securityConstraint.addElement("web-resource-collection");
+ wrc.addElement("web-resource-name").addText(ejbName);
+ wrc.addElement("url-pattern").addText(ep.getURLPattern());
+ if (Boolean.TRUE.equals(secureWSDLAccess))
+ {
+ wrc.addElement("http-method").addText("GET");
+ }
+ wrc.addElement("http-method").addText("POST");
+
+ // Optional auth-constraint
+ if (beanAuthMethod != null)
+ {
+ // Only the first auth-method gives the war login-config/auth-method
+ if (authMethod == null)
+ authMethod = beanAuthMethod;
+
+ Element authConstraint =
securityConstraint.addElement("auth-constraint").addElement("role-name").addText("*");
+ }
+ // Optional user-data-constraint
+ if (transportGuarantee != null)
+ {
+ Element userData =
securityConstraint.addElement("user-data-constraint");
+
userData.addElement("transport-guarantee").addText(transportGuarantee);
+ }
+ }
+ }
+
+ // Optional login-config/auth-method
+ if (authMethod != null)
+ {
+ Element loginConfig = webApp.addElement("login-config");
+ loginConfig.addElement("auth-method").addText(authMethod);
+
loginConfig.addElement("realm-name").addText("EJBServiceEndpointServlet
Realm");
+
+ securityHandler.addSecurityRoles(webApp, dep);
+ }
+
+ return document;
+ }
+
+ private Document createJBossWebAppDescriptor(Deployment dep, SecurityHandler
securityHandler)
+ {
+ Document document = DocumentHelper.createDocument();
+
+ /* Create a jboss-web
+ <jboss-web>
+ <security-domain>java:/jaas/cts</security-domain>
+ <context-root>/ws/ejbN/</context-root>
+ <virtual-host>some.domain.com</virtual-host>
+ </jboss-web>
+ */
+ Element jbossWeb = document.addElement("jboss-web");
+
+ securityHandler.addSecurityDomain(jbossWeb, dep);
+
+ // Get the context root for this deployment
+ String contextRoot = dep.getService().getContextRoot();
+ if (contextRoot == null)
+ throw new WSFDeploymentException("Cannot obtain context root");
+
+ jbossWeb.addElement("context-root").addText(contextRoot);
+
+ return document;
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,122 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.xml.ws.WebServiceException;
+
+import org.dom4j.Document;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.XMLWriter;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier.RewriteResults;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
+import org.jboss.wsf.spi.utils.IOUtils;
+
+/**
+ * The rewriter for web.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public class WebXMLRewriter
+{
+ private WebAppDesciptorModifier desciptorModifier;
+
+ public WebAppDesciptorModifier getDesciptorModifier()
+ {
+ return desciptorModifier;
+ }
+
+ public void setDesciptorModifier(WebAppDesciptorModifier desciptorModifier)
+ {
+ this.desciptorModifier = desciptorModifier;
+ }
+
+ public RewriteResults rewriteWebXml(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ if (udi == null)
+ throw new IllegalStateException("Cannot obtain unified deployment
info");
+
+ URL warURL = udi.webappURL;
+ File warFile = new File(warURL.getFile());
+ if (warFile.isDirectory() == false)
+ throw new WebServiceException("Expected a war directory: " + warURL);
+
+ File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
+ if (webXML.isFile() == false)
+ throw new WebServiceException("Cannot find web.xml: " + webXML);
+
+ try
+ {
+ // After redeployment there might be a stale copy of the original
web.xml.org,
we delete it
+ File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
+ orgWebXML.delete();
+
+ // Rename the web.xml
+ if (webXML.renameTo(orgWebXML) == false)
+ throw new WebServiceException("Cannot rename web.xml: " +
orgWebXML);
+
+ FileInputStream stream = new FileInputStream(orgWebXML);
+ return rewriteWebXml(stream, webXML, dep);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+
+ private RewriteResults rewriteWebXml(InputStream source, File destFile, Deployment
dep) throws Exception
+ {
+ if (destFile == null)
+ {
+ destFile = File.createTempFile("jbossws-alt-web", "xml",
IOUtils.createTempDirectory());
+ destFile.deleteOnExit();
+ }
+
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(source);
+
+ RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
+ results.webXML = destFile.toURL();
+
+ FileOutputStream fos = new FileOutputStream(destFile);
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ XMLWriter writer = new XMLWriter(fos, format);
+ writer.write(document);
+ writer.close();
+
+ return results;
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/CommonServiceRefBinder.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/CommonServiceRefBinder.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/CommonServiceRefBinder.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,229 @@
+/*
+ * 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.wsf.framework.deployment.serviceref;
+
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
+import org.jboss.util.naming.Util;
+import org.jboss.logging.Logger;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.Referenceable;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.namespace.QName;
+import javax.jws.HandlerChain;
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+/**
+ * A generic ServiceRefBinder that knows how to deal with JAX-WS services.
+ * Subclasses need to provide a stack specific {@link Referenceable} that can be bound
into JNDI.
+ * <p/>
+ * This works in conjunction with a ServiceObjectFactory that knows how to assemble
+ * the Service after JNDI lookup on the client side.
+ *
+ * @see javax.naming.spi.ObjectFactory
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 12, 2007
+ */
+public abstract class CommonServiceRefBinder implements ServiceRefBinder
+{
+ // logging support
+ private static Logger log = Logger.getLogger(CommonServiceRefBinder.class);
+
+ private ClassLoader loader = null;
+
+ public void setupServiceRef(Context encCtx, String encName, AnnotatedElement
anElement, UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws
NamingException
+ {
+ WebServiceRef wsref = null;
+
+ if(null == loader)
+ throw new IllegalArgumentException("There needs to be a classloader
available");
+
+ // Build the list of @WebServiceRef relevant annotations
+ List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
+
+ if(anElement!=null)
+ {
+ for (Annotation an : anElement.getAnnotations())
+ {
+ if (an instanceof WebServiceRef)
+ wsrefList.add((WebServiceRef)an);
+
+ if (an instanceof WebServiceRefs)
+ {
+ WebServiceRefs wsrefs = (WebServiceRefs)an;
+ for (WebServiceRef aux : wsrefs.value())
+ wsrefList.add(aux);
+ }
+ }
+ }
+
+ // Use the single @WebServiceRef
+ if (wsrefList.size() == 1)
+ {
+ wsref = wsrefList.get(0);
+ }
+ else
+ {
+ for (WebServiceRef aux : wsrefList)
+ {
+ if (encName.endsWith("/" + aux.name()))
+ {
+ wsref = aux;
+ break;
+ }
+ }
+ }
+
+ Class targetClass = null;
+ if (anElement instanceof Field)
+ {
+ targetClass = ((Field)anElement).getType();
+ }
+ else if (anElement instanceof Method)
+ {
+ targetClass = ((Method)anElement).getParameterTypes()[0];
+ }
+ else
+ {
+ if( wsref!=null && (wsref.type() != Object.class) )
+ targetClass = wsref.type();
+ }
+
+ String targetClassName = (targetClass != null ? targetClass.getName() : null);
+ String externalName = encCtx.getNameInNamespace() + "/" + encName;
+ log.debug("setupServiceRef [jndi=" + externalName + ",target="
+ targetClassName + "]");
+
+ String serviceImplClass = null;
+
+ // #1 Use the explicit @WebServiceRef.value
+ if (wsref != null && wsref.value() != Object.class)
+ serviceImplClass = wsref.value().getName();
+
+ // #2 Use the target ref type
+ if (serviceImplClass == null && targetClass != null &&
Service.class.isAssignableFrom(targetClass))
+ serviceImplClass = targetClass.getName();
+
+ // #3 Use <service-interface>
+ if (serviceImplClass == null && serviceRef.getServiceInterface() != null)
+ serviceImplClass = serviceRef.getServiceInterface();
+
+ // #4 Use javax.xml.ws.Service
+ if (serviceImplClass == null)
+ serviceImplClass = Service.class.getName();
+
+ // #1 Use the explicit @WebServiceRef.type
+ if (wsref != null && wsref.type() != Object.class)
+ targetClassName = wsref.type().getName();
+
+
+ // #2 Use the target ref type
+ if (targetClassName == null && targetClass != null &&
Service.class.isAssignableFrom(targetClass) == false)
+ targetClassName = targetClass.getName();
+
+ // Set the wsdlLocation if there is no override already
+ if (serviceRef.getWsdlOverride() == null && wsref != null &&
wsref.wsdlLocation().length() > 0)
+ serviceRef.setWsdlOverride(wsref.wsdlLocation());
+
+ // Set the handlerChain from @HandlerChain on the annotated element
+ String handlerChain = serviceRef.getHandlerChain();
+ if (anElement != null)
+ {
+ HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
+ if (handlerChain == null && anHandlerChain != null &&
anHandlerChain.file().length() > 0)
+ handlerChain = anHandlerChain.file();
+ }
+
+ // Resolve path to handler chain
+ if (handlerChain != null)
+ {
+ try
+ {
+ new URL(handlerChain);
+ }
+ catch (MalformedURLException ex)
+ {
+ Class declaringClass = null;
+ if (anElement instanceof Field)
+ declaringClass = ((Field)anElement).getDeclaringClass();
+ else if (anElement instanceof Method)
+ declaringClass = ((Method)anElement).getDeclaringClass();
+ else if (anElement instanceof Class)
+ declaringClass = (Class)anElement;
+
+ handlerChain = declaringClass.getPackage().getName().replace('.',
'/') + "/" + handlerChain;
+ }
+
+ serviceRef.setHandlerChain(handlerChain);
+ }
+
+ // Extract service QName for target service
+ if(null == serviceRef.getServiceQName())
+ {
+ try
+ {
+ Class serviceClass = loader.loadClass(serviceImplClass);
+ if(serviceClass.getAnnotation(WebServiceClient.class) !=null)
+ {
+ WebServiceClient clientDecl =
(WebServiceClient)serviceClass.getAnnotation(WebServiceClient.class);
+ serviceRef.setServiceQName( new QName(clientDecl.targetNamespace(),
clientDecl.name()));
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ WSFException.rethrow("Cannot extract service QName for target
service", e);
+ }
+ }
+
+ // Do not use rebind, the binding should be unique
+ // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
+ Referenceable serviceReferenceable = buildServiceReferenceable(serviceImplClass,
targetClassName, serviceRef);
+ Util.bind(encCtx, encName, serviceReferenceable);
+
+ }
+
+ /**
+ * Subclasses should provide a stack specific ServiceReferenceable.
+ *
+ * @param serviceImplClass
+ * @param targetClassName
+ * @param serviceRef
+ * @return a Referenceable that can be used by a stack specific {@link
javax.naming.spi.ObjectFactory} on the client side
+ * to create a web service stub
+ * */
+ protected abstract Referenceable buildServiceReferenceable(
+ String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData
serviceRef
+ );
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/CommonServiceRefBinder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefHandlerImpl.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefHandlerImpl.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefHandlerImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,181 @@
+/*
+ * 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.wsf.framework.deployment.serviceref;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.*;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.io.File;
+import java.lang.reflect.AnnotatedElement;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Bind service refs in the client's ENC
+ * for every service-ref element in the deployment descriptor.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Heiko.Braun(a)jboss.com
+ *
+ * @since 04-Nov-2006
+ */
+public class ServiceRefHandlerImpl implements ServiceRefHandler
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
+
+ private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
+
+ enum Type {JAXRPC, JAXWS};
+
+ /* binds jaxrpc deployments */
+ private ServiceRefBinder jaxrpcBinder;
+
+ /*binds jaxws deployments */
+ private ServiceRefBinder jaxwsBinder;
+
+ public void setJaxrpcBinder(ServiceRefBinder binder)
+ {
+ this.jaxrpcBinder = binder;
+ }
+
+ public void setJaxwsBinder(ServiceRefBinder binder)
+ {
+ this.jaxwsBinder = binder;
+ }
+
+ public ServiceRefMetaData newServiceRefMetaData()
+ {
+ return new UnifiedServiceRefMetaData();
+ }
+
+ public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ClassLoader loader, ServiceRefMetaData sref) throws NamingException
+ {
+ if (sref.isProcessed())
+ {
+ log.debug("Attempt to rebind the service-ref: " +
sref.getServiceRefName());
+ return;
+ }
+
+ // In case of an .war deployment the associated root file doesn't point to
+ // the expanded war file structure and thus breaks service-ref usage for servlet
clients.
+ // This needs to be fixed in org.jboss.web.AbstractWebDeployer (JBOSS_AS/server
module)
+ if(vfsRoot instanceof URLLoaderAdapter)
+ {
+ URLLoaderAdapter ula = (URLLoaderAdapter)vfsRoot;
+ URL rootURL = ula.toURL();
+ if("file".equals( rootURL.getProtocol()) &&
rootURL.getFile().endsWith(".war") )
+ {
+ String fileName = rootURL.getFile();
+
+ if( ! new File(fileName).exists() ) // might be an exploded directory
+ {
+ // There is a filename convention for exploded directories
+ fileName = fileName.substring(0, fileName.indexOf(".war")) +
"-exp.war";
+
+ File expandedDirectory = new File(fileName);
+ if(! expandedDirectory.exists())
+ throw new WSFException("Failed to bind service-ref, the deployment
root expandedDirectory doesn't exist: " + fileName);
+
+ // update the rootFile
+ try
+ {
+ vfsRoot = new URLLoaderAdapter(expandedDirectory.toURL());
+ }
+ catch (MalformedURLException e){}
+ }
+
+ }
+ }
+
+ UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
+ serviceRef.setVfsRoot(vfsRoot);
+ try
+ {
+ if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
+ {
+ jaxrpcBinder.setupServiceRef(encCtx, encName, null, serviceRef, loader);
+ }
+ else
+ {
+ AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
+ jaxwsBinder.setupServiceRef(encCtx, encName, anElement, serviceRef, loader);
+ }
+ }
+ finally
+ {
+ sref.setProcessed(true);
+ }
+ }
+
+ public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ return objectFactory.newChild(ref, navigator, namespaceURI, localName, attrs);
+ }
+
+ public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ objectFactory.setValue(ref, navigator, namespaceURI, localName, value);
+ }
+
+ private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader
loader) throws NamingException
+ {
+ // The service-ref-type is JAXWS specific
+ String serviceRefType = serviceRef.getServiceRefType();
+ if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
+ return Type.JAXWS;
+
+ // The mapping-file is JAXRPC specific
+ if (serviceRef.getMappingFile() != null)
+ return Type.JAXRPC;
+
+ String siName = serviceRef.getServiceInterface();
+ if (siName == null)
+ throw new IllegalStateException("<service-interface> cannot be
null");
+
+ if (siName.equals("javax.xml.rpc.Service"))
+ return Type.JAXRPC;
+
+ try
+ {
+ Class siClass = loader.loadClass(siName);
+ if (javax.xml.ws.Service.class.isAssignableFrom(siClass))
+ return Type.JAXWS;
+ else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
+ return Type.JAXRPC;
+ else throw new IllegalStateException("Illegal service interface: " +
siName);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalStateException("Cannot load <service-interface>:
" + siName);
+ }
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefObjectFactory.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefObjectFactory.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefObjectFactory.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,305 @@
+/*
+ * 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.wsf.framework.deployment.serviceref;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.integration.ServiceRefElement;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A object model factory for <service-ref>
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ */
+public class ServiceRefObjectFactory
+{
+ public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (ref instanceof UnifiedHandlerChainsMetaData)
+ child = newChild((UnifiedHandlerChainsMetaData)ref, navigator, namespaceURI,
localName, attrs);
+ else if (ref instanceof UnifiedHandlerMetaData)
+ child = newChild((UnifiedHandlerMetaData)ref, navigator, namespaceURI,
localName, attrs);
+ else if (ref instanceof UnifiedPortComponentRefMetaData)
+ child = newChild((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI,
localName, attrs);
+ else if (ref instanceof UnifiedServiceRefMetaData)
+ child = newChild((UnifiedServiceRefMetaData)ref, navigator, namespaceURI,
localName, attrs);
+ return child;
+ }
+
+ public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (ref instanceof UnifiedCallPropertyMetaData)
+ setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName,
value);
+ else if (ref instanceof UnifiedHandlerChainMetaData)
+ setValue((UnifiedHandlerChainMetaData)ref, navigator, namespaceURI, localName,
value);
+ else if (ref instanceof UnifiedHandlerMetaData)
+ setValue((UnifiedHandlerMetaData)ref, navigator, namespaceURI, localName,
value);
+ else if (ref instanceof UnifiedInitParamMetaData)
+ setValue((UnifiedInitParamMetaData)ref, navigator, namespaceURI, localName,
value);
+ else if (ref instanceof UnifiedPortComponentRefMetaData)
+ setValue((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI,
localName, value);
+ else if (ref instanceof UnifiedServiceRefMetaData)
+ setValue((UnifiedServiceRefMetaData)ref, navigator, namespaceURI, localName,
value);
+ else if (ref instanceof UnifiedCallPropertyMetaData)
+ setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName,
value);
+ else if (ref instanceof UnifiedStubPropertyMetaData)
+ setValue((UnifiedStubPropertyMetaData)ref, navigator, namespaceURI, localName,
value);
+ }
+
+ private void setValue(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ /* Standard properties */
+ if (localName.equals("service-ref-name"))
+ {
+ ref.setServiceRefName(value);
+ }
+ else if (localName.equals("service-interface"))
+ {
+ ref.setServiceInterface(value);
+ }
+ else if (localName.equals("service-ref-type"))
+ {
+ ref.setServiceRefType(value);
+ }
+ else if (localName.equals("wsdl-file"))
+ {
+ ref.setWsdlFile(value);
+ }
+ else if (localName.equals("jaxrpc-mapping-file"))
+ {
+ ref.setMappingFile(value);
+ }
+ else if (localName.equals("service-qname"))
+ {
+ ref.setServiceQName(getQNameValue(navigator, value));
+ }
+
+ /* JBoss properties */
+ else if (localName.equals("service-impl-class"))
+ {
+ ref.setServiceImplClass(value);
+ }
+ else if (localName.equals("config-name"))
+ {
+ ref.setConfigName(value);
+ }
+ else if (localName.equals("config-file"))
+ {
+ ref.setConfigFile(value);
+ }
+ else if (localName.equals("wsdl-override"))
+ {
+ ref.setWsdlOverride(value);
+ }
+ else if (localName.equals("handler-chain"))
+ {
+ ref.setHandlerChain(value);
+ }
+ }
+
+ private Object newChild(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("port-component-ref"))
+ {
+ child = new UnifiedPortComponentRefMetaData(ref);
+ ref.addPortComponentRef((UnifiedPortComponentRefMetaData)child);
+ }
+ else if (localName.equals("handler"))
+ {
+ child = new UnifiedHandlerMetaData();
+ ref.addHandler((UnifiedHandlerMetaData)child);
+ }
+ else if (localName.equals("handler-chains"))
+ {
+ child = new UnifiedHandlerChainsMetaData();
+ ref.setHandlerChains((UnifiedHandlerChainsMetaData)child);
+ }
+ else if (localName.equals("call-property"))
+ {
+ child = new UnifiedCallPropertyMetaData();
+ ref.addCallProperty((UnifiedCallPropertyMetaData)child);
+ }
+ return child;
+ }
+
+ private Object newChild(UnifiedHandlerChainsMetaData ref, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("handler-chain"))
+ {
+ child = new UnifiedHandlerChainMetaData();
+ ref.addHandlerChain((UnifiedHandlerChainMetaData)child);
+ }
+ return child;
+ }
+
+ private void setValue(UnifiedPortComponentRefMetaData pcref, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("service-endpoint-interface"))
+ {
+ pcref.setServiceEndpointInterface(value);
+ }
+ else if (localName.equals("enable-mtom"))
+ {
+ pcref.setEnableMTOM(Boolean.valueOf(value));
+ }
+ else if (localName.equals("port-component-link"))
+ {
+ pcref.setPortComponentLink(value);
+ }
+ else if (localName.equals("port-qname"))
+ {
+ pcref.setPortQName(getQNameValue(navigator, value));
+ }
+ else if (localName.equals("config-name"))
+ {
+ pcref.setConfigName(value);
+ }
+ else if (localName.equals("config-file"))
+ {
+ pcref.setConfigFile(value);
+ }
+ }
+
+ private Object newChild(UnifiedPortComponentRefMetaData ref, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("call-property"))
+ {
+ child = new UnifiedCallPropertyMetaData();
+ ref.addCallProperty((UnifiedCallPropertyMetaData)child);
+ }
+ if (localName.equals("stub-property"))
+ {
+ child = new UnifiedStubPropertyMetaData();
+ ref.addStubProperty((UnifiedStubPropertyMetaData)child);
+ }
+ return child;
+ }
+
+ private void setValue(UnifiedHandlerChainMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("service-name-pattern"))
+ {
+ ref.setServiceNamePattern(getQNameValue(navigator, value));
+ }
+ else if (localName.equals("port-name-pattern"))
+ {
+ ref.setPortNamePattern(getQNameValue(navigator, value));
+ }
+ else if (localName.equals("protocol-binding"))
+ {
+ ref.setProtocolBindings(value);
+ }
+ }
+
+ private void setValue(UnifiedHandlerMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("handler-name"))
+ {
+ ref.setHandlerName(value);
+ }
+ else if (localName.equals("handler-class"))
+ {
+ ref.setHandlerClass(value);
+ }
+ else if (localName.equals("soap-header"))
+ {
+ ref.addSoapHeader(getQNameValue(navigator, value));
+ }
+ else if (localName.equals("soap-role"))
+ {
+ ref.addSoapRole(value);
+ }
+ else if (localName.equals("port-name"))
+ {
+ ref.addPortName(value);
+ }
+ }
+
+ private Object newChild(UnifiedHandlerMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("init-param"))
+ {
+ child = new UnifiedInitParamMetaData();
+ ref.addInitParam((UnifiedInitParamMetaData)child);
+ }
+ return child;
+ }
+
+ private void setValue(UnifiedInitParamMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("param-name"))
+ {
+ ref.setParamName(value);
+ }
+ else if (localName.equals("param-value"))
+ {
+ ref.setParamValue(value);
+ }
+ }
+
+ private void setValue(UnifiedCallPropertyMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("prop-name"))
+ {
+ ref.setPropName(value);
+ }
+ else if (localName.equals("prop-value"))
+ {
+ ref.setPropValue(value);
+ }
+ }
+
+ private void setValue(UnifiedStubPropertyMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("prop-name"))
+ {
+ ref.setPropName(value);
+ }
+ else if (localName.equals("prop-value"))
+ {
+ ref.setPropValue(value);
+ }
+ }
+
+ private QName getQNameValue(UnmarshallingContext navigator, String value)
+ {
+ QName qname = (value.startsWith("{") ? QName.valueOf(value) :
navigator.resolveQName(value));
+ return qname;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/serviceref/ServiceRefObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicEndpointInvocation.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicEndpointInvocation.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicEndpointInvocation.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,88 @@
+/*
+ * 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.wsf.framework.invocation;
+
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
+import java.lang.reflect.Method;
+
+//$Id$
+
+/**
+ * A general endpoint invocation.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicEndpointInvocation implements Invocation
+{
+ private InvocationContext invocationContext;
+ private Method javaMethod;
+ private Object[] args;
+ private Object returnValue;
+
+ public BasicEndpointInvocation()
+ {
+ this.invocationContext = new BasicInvocationContext();
+ }
+
+ public InvocationContext getInvocationContext()
+ {
+ return invocationContext;
+ }
+
+ public void setInvocationContext(InvocationContext invocationContext)
+ {
+ this.invocationContext = invocationContext;
+ }
+
+ public Method getJavaMethod()
+ {
+ return javaMethod;
+ }
+
+ public void setJavaMethod(Method javaMethod)
+ {
+ this.javaMethod = javaMethod;
+ }
+
+ public Object[] getArgs()
+ {
+ return args;
+ }
+
+ public void setArgs(Object[] args)
+ {
+ this.args = args;
+ }
+
+ public Object getReturnValue()
+ {
+ return returnValue;
+ }
+
+ public void setReturnValue(Object returnValue)
+ {
+ this.returnValue = returnValue;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicEndpointInvocation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationContext.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationContext.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationContext.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,65 @@
+/*
+ * 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.wsf.framework.invocation;
+
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A basic invocation context.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicInvocationContext implements InvocationContext
+{
+ private Object targetBean;
+ private Map<Class, Object> attachments = new HashMap<Class, Object>();
+
+ public Object getTargetBean()
+ {
+ return targetBean;
+ }
+
+ public void setTargetBean(Object targetBean)
+ {
+ this.targetBean = targetBean;
+ }
+
+
+ public <T> T addAttachment(Class<T> key, Object value)
+ {
+ return (T)attachments.put(key, value);
+ }
+
+ public <T> T getAttachment(Class<T> key)
+ {
+ return (T)attachments.get(key);
+ }
+
+ public <T> T removeAttachment(Class<T> key)
+ {
+ return (T)attachments.get(key);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationContext.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationHandler.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationHandler.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,120 @@
+/*
+ * 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.wsf.framework.invocation;
+
+// $Id$
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.UndeclaredThrowableException;
+
+import javax.management.MBeanException;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.utils.JavaUtils;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.framework.invocation.BasicEndpointInvocation;
+
+/**
+ * Handles invocations on endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class BasicInvocationHandler implements InvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(BasicInvocationHandler.class);
+
+ public Invocation createInvocation()
+ {
+ return new BasicEndpointInvocation();
+ }
+
+ protected Method getImplMethod(Class implClass, Method seiMethod) throws
ClassNotFoundException, NoSuchMethodException
+ {
+ String methodName = seiMethod.getName();
+ Class[] paramTypes = seiMethod.getParameterTypes();
+ for (int i = 0; i < paramTypes.length; i++)
+ {
+ Class paramType = paramTypes[i];
+ if (JavaUtils.isPrimitive(paramType) == false)
+ {
+ String paramTypeName = paramType.getName();
+ paramType = JavaUtils.loadJavaType(paramTypeName);
+ paramTypes[i] = paramType;
+ }
+ }
+
+ Method implMethod = implClass.getMethod(methodName, paramTypes);
+ return implMethod;
+ }
+
+ public void create(Endpoint ep)
+ {
+ log.debug("Create: " + ep.getName());
+ }
+
+ public void start(Endpoint ep)
+ {
+ log.debug("Start: " + ep.getName());
+ }
+
+ public void stop(Endpoint ep)
+ {
+ log.debug("Stop: " + ep.getName());
+ }
+
+ public void destroy(Endpoint ep)
+ {
+ log.debug("Destroy: " + ep.getName());
+ }
+
+ protected void handleInvocationException(Throwable th) throws Exception
+ {
+ if (th instanceof MBeanException)
+ {
+ throw ((MBeanException)th).getTargetException();
+ }
+
+ if (th instanceof InvocationTargetException)
+ {
+ // Unwrap the throwable raised by the service endpoint implementation
+ Throwable targetEx = ((InvocationTargetException)th).getTargetException();
+ handleInvocationException(targetEx);
+ }
+
+ if (th instanceof Exception)
+ {
+ throw (Exception)th;
+ }
+
+ if (th instanceof Error)
+ {
+ throw (Error)th;
+ }
+
+ throw new UndeclaredThrowableException(th);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/BasicInvocationHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointAssociation.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointAssociation.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointAssociation.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,53 @@
+/*
+ * 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.wsf.framework.invocation;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+// $Id$
+
+
+/**
+ * Associates the endpoint meta data with the current thead.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public final class EndpointAssociation
+{
+ private static final ThreadLocal<Endpoint> endpoint = new
ThreadLocal<Endpoint>();
+
+ public static void setEndpoint(Endpoint ep)
+ {
+ endpoint.set(ep);
+ }
+
+ public static Endpoint getEndpoint()
+ {
+ return endpoint.get();
+ }
+
+ public static void removeEndpoint()
+ {
+ endpoint.remove();
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointAssociation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointServlet.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointServlet.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointServlet.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,117 @@
+/*
+ * 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.wsf.framework.invocation;
+
+// $Id$
+
+import java.io.IOException;
+
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.utils.ObjectNameFactory;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.framework.invocation.EndpointAssociation;
+
+/**
+ * The JAX-WS dispatcher servlet.
+ *
+ * @author WS Development Team
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class EndpointServlet extends HttpServlet
+{
+ protected Endpoint endpoint;
+ protected EndpointRegistry epRegistry;
+
+ public void init(ServletConfig servletConfig) throws ServletException
+ {
+ super.init(servletConfig);
+ epRegistry = EndpointRegistryFactory.getEndpointRegistry();
+ }
+
+ public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ if (endpoint == null)
+ {
+ String contextPath = req.getContextPath();
+ initServiceEndpoint(contextPath);
+ }
+
+ try
+ {
+ EndpointAssociation.setEndpoint(endpoint);
+ RequestHandler requestHandler = (RequestHandler)endpoint.getRequestHandler();
+ requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
+ }
+ finally
+ {
+ EndpointAssociation.removeEndpoint();
+ }
+ }
+
+ /** Initialize the service endpoint
+ */
+ protected void initServiceEndpoint(String contextPath)
+ {
+ if (contextPath.startsWith("/"))
+ contextPath = contextPath.substring(1);
+
+ String servletName = getServletName();
+ for (ObjectName sepId : epRegistry.getEndpoints())
+ {
+ String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
+ String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+ if (servletName.equals(propEndpoint) &&
contextPath.equals(propContext))
+ {
+ endpoint = epRegistry.getEndpoint(sepId);
+ break;
+ }
+ }
+
+ if (endpoint == null)
+ {
+ ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath +
","
+ + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
+ throw new WebServiceException("Cannot obtain endpoint for: " +
oname);
+ }
+
+ // Set the runtime classloader for JSE endpoints, this should be the tomcat
classloader
+ Deployment dep = endpoint.getService().getDeployment();
+ if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() ==
DeploymentType.JAXWS_JSE)
+ {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ dep.setRuntimeClassLoader(classLoader);
+ }
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/EndpointServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/InvocationHandlerJSE.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/InvocationHandlerJSE.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/InvocationHandlerJSE.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,85 @@
+/*
+ * 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.wsf.framework.invocation;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+import org.jboss.wsf.framework.invocation.BasicInvocationHandler;
+
+/**
+ * Handles invocations on JSE endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerJSE extends BasicInvocationHandler
+{
+ protected Object getTargetBean(Endpoint ep, Invocation epInv)
+ {
+ InvocationContext invCtx = epInv.getInvocationContext();
+ Object targetBean = invCtx.getTargetBean();
+ if (targetBean == null)
+ {
+ try
+ {
+ Class epImpl = ep.getTargetBeanClass();
+ targetBean = epImpl.newInstance();
+ invCtx.setTargetBean(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Canot get target bean instance",
ex);
+ }
+ }
+ return targetBean;
+ }
+
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ try
+ {
+ Object targetBean = getTargetBean(ep, epInv);
+
+ InvocationContext invContext = epInv.getInvocationContext();
+ WebServiceContext wsContext =
invContext.getAttachment(WebServiceContext.class);
+ if (wsContext != null)
+ {
+ new WebServiceContextInjector().injectContext(targetBean,
(WebServiceContext)wsContext);
+ }
+
+ Method method = getImplMethod(targetBean.getClass(), epInv.getJavaMethod());
+ Object retObj = method.invoke(targetBean, epInv.getArgs());
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/InvocationHandlerJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextDummy.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextDummy.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextDummy.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,63 @@
+/*
+ * 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.wsf.framework.invocation;
+
+// $Id$
+
+import java.security.Principal;
+
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.invocation.AbstractWebServiceContext;
+
+/**
+ * A WebServiceContext implementation that has no access to
+ * a security context.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 29-Jun-2007
+ */
+public class WebServiceContextDummy extends AbstractWebServiceContext
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WebServiceContextDummy.class);
+
+ public WebServiceContextDummy(MessageContext msgContext)
+ {
+ super(msgContext);
+ }
+
+ @Override
+ public Principal getUserPrincipal()
+ {
+ log.warn("No security context available");
+ return null;
+ }
+
+ @Override
+ public boolean isUserInRole(String role)
+ {
+ log.warn("No security context available");
+ return false;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextDummy.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextEJB.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextEJB.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextEJB.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,60 @@
+/*
+ * 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.wsf.framework.invocation;
+
+// $Id$
+
+import org.jboss.wsf.spi.invocation.AbstractWebServiceContext;
+
+import java.security.Principal;
+
+import javax.ejb.EJBContext;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * A WebServiceContext implementation that delegates to the EJBContext.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jan-2007
+ */
+public class WebServiceContextEJB extends AbstractWebServiceContext
+{
+ private EJBContext ejbContext;
+
+ public WebServiceContextEJB(MessageContext msgContext, EJBContext ejbContext)
+ {
+ super(msgContext);
+ this.ejbContext = ejbContext;
+ }
+
+ public Principal getUserPrincipal()
+ {
+ Principal principal = ejbContext.getCallerPrincipal();
+ return principal;
+ }
+
+ public boolean isUserInRole(String role)
+ {
+ boolean isUserInRole = ejbContext.isCallerInRole(role);
+ return isUserInRole;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextEJB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextInjector.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextInjector.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextInjector.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,82 @@
+/*
+ * 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.wsf.framework.invocation;
+
+// $Id$
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Inject the JAXWS WebServiceContext
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Jan-2007
+ */
+public class WebServiceContextInjector
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(WebServiceContextInjector.class);
+
+ public void injectContext(Object epInstance, WebServiceContext wsContext)
+ {
+ try
+ {
+ // scan fields that are marked with @Resource
+ Field[] fields = epInstance.getClass().getDeclaredFields();
+ for (Field field : fields)
+ {
+ Class type = field.getType();
+ if (type == WebServiceContext.class &&
field.isAnnotationPresent(Resource.class))
+ {
+ field.setAccessible(true);
+ field.set(epInstance, wsContext);
+ }
+ }
+
+ // scan methods that are marked with @Resource
+ Method[] methods = epInstance.getClass().getDeclaredMethods();
+ for (Method method : methods)
+ {
+ Class[] paramTypes = method.getParameterTypes();
+ if (paramTypes.length == 1 && paramTypes[0] ==
WebServiceContext.class && method.isAnnotationPresent(Resource.class))
+ {
+ method.setAccessible(true);
+ method.invoke(epInstance, new Object[] { wsContext });
+ }
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ log.warn("Cannot inject WebServiceContext", ex);
+ }
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextInjector.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextJSE.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextJSE.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextJSE.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,64 @@
+/*
+ * 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.wsf.framework.invocation;
+
+// $Id$
+
+import org.jboss.wsf.spi.invocation.AbstractWebServiceContext;
+
+import java.security.Principal;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * A WebServiceContext implementation that delegates to the HttpServletRequest.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jan-2007
+ */
+public class WebServiceContextJSE extends AbstractWebServiceContext
+{
+ private HttpServletRequest httpRequest;
+
+ public WebServiceContextJSE(MessageContext msgContext)
+ {
+ super(msgContext);
+ httpRequest = (HttpServletRequest)msgContext.get(MessageContext.SERVLET_REQUEST);
+ if (httpRequest == null)
+ throw new IllegalStateException("Cannot obtain HTTPServletRequest from
message context");
+ }
+
+ @Override
+ public Principal getUserPrincipal()
+ {
+ Principal principal = httpRequest.getUserPrincipal();
+ return principal;
+ }
+
+ @Override
+ public boolean isUserInRole(String role)
+ {
+ boolean isUserInRole = httpRequest.isUserInRole(role);
+ return isUserInRole;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/WebServiceContextJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericHandler.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericHandler.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,81 @@
+/*
+ * 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.wsf.framework.jaxws.handler;
+
+// $Id$
+
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * A generic jaxws handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 13-Aug-2006
+ */
+public abstract class GenericHandler implements Handler
+{
+ private String handlerName;
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public void setHandlerName(String handlerName)
+ {
+ this.handlerName = handlerName;
+ }
+
+ public boolean handleMessage(MessageContext msgContext)
+ {
+ Boolean outbound =
(Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot obtain required property: " +
MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
+ }
+
+ protected boolean handleOutbound(MessageContext msgContext)
+ {
+ return true;
+ }
+
+ protected boolean handleInbound(MessageContext msgContext)
+ {
+ return true;
+ }
+
+ public boolean handleFault(MessageContext messagecontext)
+ {
+ return true;
+ }
+
+ public void close(MessageContext messageContext)
+ {
+ }
+
+ public String toString()
+ {
+ return (handlerName != null ? handlerName : super.toString());
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericLogicalHandler.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericLogicalHandler.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericLogicalHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.framework.jaxws.handler;
+
+// $Id$
+
+import javax.xml.ws.handler.LogicalHandler;
+import javax.xml.ws.handler.LogicalMessageContext;
+
+/**
+ * A generic jaxws logical handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 13-Aug-2006
+ */
+public class GenericLogicalHandler<C extends LogicalMessageContext> extends
GenericHandler implements LogicalHandler
+{
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericLogicalHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericSOAPHandler.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericSOAPHandler.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericSOAPHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,58 @@
+/*
+ * 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.wsf.framework.jaxws.handler;
+
+// $Id$
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+
+
+/**
+ * A generic jaxws soap handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 13-Aug-2006
+ */
+public abstract class GenericSOAPHandler<C extends LogicalMessageContext> extends
GenericHandler implements SOAPHandler
+{
+ // The header blocks that can be processed by this Handler instance
+ private Set<QName> headers = new HashSet<QName>();
+
+ /** Gets the header blocks that can be processed by this Handler instance.
+ */
+ public Set<QName> getHeaders()
+ {
+ return headers;
+ }
+
+ /** Sets the header blocks that can be processed by this Handler instance.
+ */
+ public void setHeaders(Set<QName> headers)
+ {
+ this.headers = headers;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/jaxws/handler/GenericSOAPHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,172 @@
+/*
+ * 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.wsf.framework.management;
+
+// $Id$
+
+import java.util.Date;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointMetrics;
+
+/**
+ * Service Endpoint Metrics
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Dec-2005
+ */
+public class BasicEndpointMetrics implements EndpointMetrics
+{
+ private Endpoint endpoint;
+
+ private Date startTime;
+ private Date stopTime;
+ private long requestCount;
+ private long responseCount;
+ private long faultCount;
+ private long maxProcessingTime;
+ private long minProcessingTime;
+ private long avgProcessingTime;
+ private long totalProcessingTime;
+
+ public Endpoint getEndpoint()
+ {
+ return endpoint;
+ }
+
+ public void setEndpoint(Endpoint endpoint)
+ {
+ this.endpoint = endpoint;
+ }
+
+ public void start()
+ {
+ startTime = new Date();
+ stopTime = null;
+ requestCount = 0;
+ responseCount = 0;
+ faultCount = 0;
+ maxProcessingTime = 0;
+ minProcessingTime = 0;
+ avgProcessingTime = 0;
+ totalProcessingTime = 0;
+ }
+
+ public void stop()
+ {
+ stopTime = new Date();
+ }
+
+ public long processRequestMessage()
+ {
+ requestCount++;
+ return System.currentTimeMillis();
+ }
+
+ public void processResponseMessage(long beginTime)
+ {
+ responseCount++;
+ processAnyMessage(beginTime);
+ }
+
+ public void processFaultMessage(long beginTime)
+ {
+ faultCount++;
+ processAnyMessage(beginTime);
+ }
+
+ private void processAnyMessage(long beginTime)
+ {
+ if (beginTime > 0)
+ {
+ long procTime = System.currentTimeMillis() - beginTime;
+
+ if (minProcessingTime == 0)
+ minProcessingTime = procTime;
+
+ maxProcessingTime = Math.max(maxProcessingTime, procTime);
+ minProcessingTime = Math.min(minProcessingTime, procTime);
+ totalProcessingTime = totalProcessingTime + procTime;
+ avgProcessingTime = totalProcessingTime / (responseCount + faultCount);
+ }
+ }
+
+ public Date getStartTime()
+ {
+ return startTime;
+ }
+
+ public Date getStopTime()
+ {
+ return stopTime;
+ }
+
+ public long getMinProcessingTime()
+ {
+ return minProcessingTime;
+ }
+
+ public long getMaxProcessingTime()
+ {
+ return maxProcessingTime;
+ }
+
+ public long getAverageProcessingTime()
+ {
+ return avgProcessingTime;
+ }
+
+ public long getTotalProcessingTime()
+ {
+ return totalProcessingTime;
+ }
+
+ public long getRequestCount()
+ {
+ return requestCount;
+ }
+
+ public long getFaultCount()
+ {
+ return faultCount;
+ }
+
+ public long getResponseCount()
+ {
+ return responseCount;
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nEndpoint Metrics: " +
endpoint.getName());
+ buffer.append("\n startTime=" + startTime);
+ buffer.append("\n stopTime=" + stopTime);
+ buffer.append("\n requestCount=" + requestCount);
+ buffer.append("\n responseCount=" + responseCount);
+ buffer.append("\n faultCount=" + faultCount);
+ buffer.append("\n maxProcessingTime=" + maxProcessingTime);
+ buffer.append("\n minProcessingTime=" + minProcessingTime);
+ buffer.append("\n avgProcessingTime=" + avgProcessingTime);
+ buffer.append("\n totalProcessingTime=" + totalProcessingTime);
+ return buffer.toString();
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointRegistry.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointRegistry.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointRegistry.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,108 @@
+/*
+ * 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.wsf.framework.management;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+
+/**
+ * A general endpoint registry.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicEndpointRegistry implements EndpointRegistry
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(BasicEndpointRegistry.class);
+
+ private Map<ObjectName, Endpoint> endpoints = new HashMap<ObjectName,
Endpoint>();
+
+ public Endpoint getEndpoint(ObjectName epName)
+ {
+ if (epName == null)
+ throw new IllegalArgumentException("Endpoint name cannot be null");
+
+ if (isRegistered(epName) == false)
+ throw new IllegalStateException("Endpoint not registered: " +
epName);
+
+ Endpoint endpoint = endpoints.get(epName);
+ return endpoint;
+ }
+
+ public Endpoint resolvePortComponentLink(String pcLink)
+ {
+ throw new NotImplementedException();
+ }
+
+ public boolean isRegistered(ObjectName epName)
+ {
+ if (epName == null)
+ throw new IllegalArgumentException("Endpoint name cannot be null");
+
+ return endpoints.get(epName) != null;
+ }
+
+ public Set<ObjectName> getEndpoints()
+ {
+ return endpoints.keySet();
+ }
+
+ public void register(Endpoint endpoint)
+ {
+ if (endpoint == null)
+ throw new IllegalArgumentException("Endpoint cannot be null");
+
+ ObjectName epName = endpoint.getName();
+ if (epName == null)
+ throw new IllegalStateException("Endpoint name cannot be null for: " +
endpoint);
+
+ if (isRegistered(epName))
+ throw new IllegalStateException("Endpoint already registered: " +
epName);
+
+ log.info("register: " + epName);
+ endpoints.put(epName, endpoint);
+ }
+
+ public void unregister(Endpoint endpoint)
+ {
+ if (endpoint == null)
+ throw new IllegalArgumentException("Endpoint cannot be null");
+
+ ObjectName epName = endpoint.getName();
+ if (isRegistered(epName) == false)
+ throw new IllegalStateException("Endpoint not registered: " +
epName);
+
+ log.info("remove: " + epName);
+ endpoints.remove(epName);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointRegistry.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,240 @@
+/*
+ * 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.wsf.framework.management;
+
+//$Id$
+
+import java.io.File;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.utils.ObjectNameFactory;
+
+/**
+ * Basic implementation of a ServerConfig
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author darran.lofthouse(a)jboss.com
+ * @since 08-May-2006
+ */
+public class BasicServerConfig implements BasicServerConfigMBean
+{
+ private static final Logger log = Logger.getLogger(BasicServerConfig.class);
+
+ // The webservice host name that will be used when updating the wsdl
+ private String webServiceHost = UNDEFINED_HOSTNAME;
+ // The webservice port that will be used when updating the wsdl
+ private int webServicePort;
+ // The webservice port that will be used when updating the wsdl
+ private int webServiceSecurePort;
+ // Whether we should always modify the soap address to the deployed endpoing location
+ private boolean modifySOAPAddress;
+ // The MBeanServer
+ private MBeanServer server;
+
+ public String getWebServiceHost()
+ {
+ return webServiceHost;
+ }
+
+ public void setWebServiceHost(String host) throws UnknownHostException
+ {
+ if (host == null || host.trim().length() == 0)
+ {
+ log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
+ host = UNDEFINED_HOSTNAME;
+ }
+ if ("0.0.0.0".equals(host))
+ {
+ InetAddress localHost = InetAddress.getLocalHost();
+ log.debug("Using local host: " + localHost.getHostName());
+ host = localHost.getHostName();
+ }
+ this.webServiceHost = host;
+ }
+
+ public void setWebServicePort(int port)
+ {
+ this.webServicePort = port;
+ }
+
+ public void setWebServiceSecurePort(int port)
+ {
+ this.webServiceSecurePort = port;
+ }
+
+ public boolean isModifySOAPAddress()
+ {
+ return modifySOAPAddress;
+ }
+
+ public void setModifySOAPAddress(boolean modify)
+ {
+ this.modifySOAPAddress = modify;
+ }
+
+ public File getServerTempDir()
+ {
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File tmpdir = (File)server.getAttribute(oname, "ServerTempDir");
+ return tmpdir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public File getServerDataDir()
+ {
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File tmpdir = (File)server.getAttribute(oname, "ServerDataDir");
+ return tmpdir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public int getWebServicePort()
+ {
+ if (webServicePort <= 0)
+ webServicePort = getConnectorPort("HTTP/1.1", false);
+
+ int localPort = webServicePort;
+ if (localPort <= 0)
+ {
+ // Do not initialize webServicePort with the default, the connector port may
become available later
+ log.warn("Unable to calculate 'WebServicePort', using default
'8080'");
+ localPort = 8080;
+ }
+
+ return localPort;
+ }
+
+ public int getWebServiceSecurePort()
+ {
+ if (webServiceSecurePort <= 0)
+ webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
+
+ int localPort = webServiceSecurePort;
+ if (localPort <= 0)
+ {
+ // Do not initialize webServiceSecurePort with the default, the connector port
may become available later
+ log.warn("Unable to calculate 'WebServiceSecurePort', using default
'8443'");
+ localPort = 8443;
+ }
+
+ return localPort;
+ }
+
+ public void create() throws Exception
+ {
+ MBeanServer server = getMBeanServer();
+ if (server != null)
+ {
+ server.registerMBean(this, BasicServerConfigMBean.OBJECT_NAME);
+ }
+ }
+
+ public void destroy() throws Exception
+ {
+ MBeanServer server = getMBeanServer();
+ if (server != null)
+ {
+ server.unregisterMBean(BasicServerConfigMBean.OBJECT_NAME);
+ }
+ }
+
+ private int getConnectorPort(final String protocol, final boolean secure)
+ {
+ int port = -1;
+
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
+
+ Set connectorNames = server.queryNames(connectors, null);
+ for (Object current : connectorNames)
+ {
+ ObjectName currentName = (ObjectName)current;
+
+ try
+ {
+ int connectorPort = (Integer)server.getAttribute(currentName,
"port");
+ boolean connectorSecure = (Boolean)server.getAttribute(currentName,
"secure");
+ String connectorProtocol = (String)server.getAttribute(currentName,
"protocol");
+
+ if (protocol.equals(connectorProtocol) && secure ==
connectorSecure)
+ {
+ if (port > -1)
+ {
+ log.warn("Found multiple connectors for protocol='" +
protocol + "' and secure='" + secure + "', using first port
found '" + port + "'");
+ }
+ else
+ {
+ port = connectorPort;
+ }
+ }
+ }
+ catch (AttributeNotFoundException ignored)
+ {
+ }
+ }
+
+ return port;
+ }
+ catch (JMException e)
+ {
+ return -1;
+ }
+ }
+
+ private MBeanServer getMBeanServer()
+ {
+ if (server == null)
+ {
+ for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator();
i.hasNext();)
+ {
+ server = (MBeanServer)i.next();
+ }
+ }
+ return server;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,33 @@
+/*
+ * 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.wsf.framework.management;
+
+import javax.management.ObjectName;
+
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.utils.ObjectNameFactory;
+
+public interface BasicServerConfigMBean extends ServerConfig
+{
+ /** The object name in the MBean server */
+ ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServerConfig");
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,280 @@
+/*
+ * 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.wsf.framework.transport.jms;
+
+// $Id:JMSTransportSupport.java 915 2006-09-08 08:40:45Z thomas.diesler(a)jboss.com $
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBException;
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+import javax.jms.BytesMessage;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.xml.soap.SOAPException;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NestedRuntimeException;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.framework.invocation.BasicInvocationContext;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+
+/**
+ * The abstract base class for MDBs that want to act as web service endpoints.
+ * A subclass should only need to implement the service endpoint interface.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public abstract class JMSTransportSupport implements MessageDrivenBean, MessageListener
+{
+ // logging support
+ protected Logger log = Logger.getLogger(JMSTransportSupport.class);
+
+ //private MessageDrivenContext mdbCtx;
+ private QueueConnectionFactory queueFactory;
+
+ /**
+ * All messages come in here, if it is a BytesMessage we pass it on for further
processing.
+ */
+ public void onMessage(Message message)
+ {
+ try
+ {
+ String msgStr = null;
+ if (message instanceof BytesMessage)
+ {
+ msgStr = getMessageStr((BytesMessage)message);
+ }
+ else if (message instanceof TextMessage)
+ {
+ msgStr = ((TextMessage)message).getText();
+ }
+ else
+ {
+ log.warn("Invalid message type: " + message);
+ return;
+ }
+
+ log.debug("Incomming SOAP message: " + msgStr);
+
+ String fromName = null;
+ Destination destination = message.getJMSDestination();
+ if (destination instanceof Queue)
+ fromName = "queue/" + ((Queue)destination).getQueueName();
+ if (destination instanceof Topic)
+ fromName = "topic/" + ((Topic)destination).getTopicName();
+
+ InputStream inputStream = new ByteArrayInputStream(msgStr.getBytes());
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream(1024);
+ processSOAPMessage(fromName, inputStream, outputStream);
+
+ msgStr = new String(outputStream.toByteArray());
+ log.debug("Outgoing SOAP message: " + msgStr);
+
+ if (msgStr.length() > 0)
+ {
+ Queue replyQueue = getReplyQueue(message);
+ if (replyQueue != null)
+ {
+ sendResponse(replyQueue, msgStr);
+ }
+ else
+ {
+ log.warn("No reply queue, ignore response message");
+ }
+ }
+ else
+ {
+ log.debug("SOAP response message is null");
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new EJBException(e);
+ }
+ }
+
+ protected void processSOAPMessage(String fromName, InputStream inputStream,
OutputStream outStream) throws SOAPException, IOException, RemoteException
+ {
+ EndpointRegistry epRegistry = EndpointRegistryFactory.getEndpointRegistry();
+ Endpoint endpoint = getEndpointForDestination(epRegistry, fromName);
+
+ if (endpoint == null)
+ throw new IllegalStateException("Cannot find endpoint for: " +
fromName);
+
+ log.debug("dipatchMessage: " + endpoint.getName());
+
+ RequestHandler reqHandler = endpoint.getRequestHandler();
+
+ try
+ {
+ BasicInvocationContext invContext = new BasicInvocationContext();
+ invContext.setTargetBean(this);
+
+ reqHandler.handleRequest(endpoint, inputStream, outStream, invContext);
+ }
+ catch (Exception ex)
+ {
+ throw new RemoteException("Cannot process SOAP request", ex);
+ }
+ }
+
+ // The destination jndiName is encoded in the service object name under key
'jms'
+ private Endpoint getEndpointForDestination(EndpointRegistry epRegistry, String
fromName)
+ {
+ Endpoint endpoint = null;
+ for (ObjectName oname : epRegistry.getEndpoints())
+ {
+ Endpoint aux = epRegistry.getEndpoint(oname);
+ String jmsProp = aux.getName().getKeyProperty("jms");
+ if (jmsProp != null && jmsProp.equals(fromName))
+ {
+ endpoint = aux;
+ break;
+ }
+ }
+ return endpoint;
+ }
+
+ private String getMessageStr(BytesMessage message) throws Exception
+ {
+ byte[] buffer = new byte[8 * 1024];
+ ByteArrayOutputStream out = new ByteArrayOutputStream(buffer.length);
+ int read = message.readBytes(buffer);
+ while (read != -1)
+ {
+ out.write(buffer, 0, read);
+ read = message.readBytes(buffer);
+ }
+
+ byte[] msgBytes = out.toByteArray();
+ return new String(msgBytes);
+ }
+
+ /**
+ * Get the reply queue.
+ */
+ protected Queue getReplyQueue(Message message) throws JMSException
+ {
+ Queue replyQueue = (Queue)message.getJMSReplyTo();
+ return replyQueue;
+ }
+
+ /**
+ * Respond to the call by sending a message to the reply queue
+ */
+ protected void sendResponse(Queue replyQueue, String msgStr) throws SOAPException,
IOException, JMSException
+ {
+ QueueConnection qc = queueFactory.createQueueConnection();
+ QueueSession session = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+ QueueSender sender = null;
+ try
+ {
+ sender = session.createSender(replyQueue);
+ TextMessage responseMessage = session.createTextMessage(msgStr);
+ sender.send(responseMessage);
+ log.info("Sent response");
+ }
+ finally
+ {
+ try
+ {
+ sender.close();
+ }
+ catch (JMSException ignored)
+ {
+ }
+ try
+ {
+ session.close();
+ }
+ catch (JMSException ignored)
+ {
+ }
+ try
+ {
+ qc.close();
+ }
+ catch (JMSException ignored)
+ {
+ }
+ }
+ }
+
+ // MDB lifecycle methods
********************************************************************************************
+
+ public void ejbCreate()
+ {
+ try
+ {
+ InitialContext ctx = new InitialContext();
+ queueFactory =
(QueueConnectionFactory)ctx.lookup("java:/ConnectionFactory");
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ /**
+ * A container invokes this method before it ends the life of the message-driven
object.
+ */
+ public void ejbRemove() throws EJBException
+ {
+ }
+
+ /**
+ * Set the associated message-driven context.
+ */
+ public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
+ {
+ //this.mdbCtx = ctx;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BackwardCompatibleContextRootDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BackwardCompatibleContextRootDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BackwardCompatibleContextRootDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,86 +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.wsf.spi.deployment;
-
-//$Id: BackwardCompatibleContextRootDeployer.java 3576 2007-06-14 09:23:52Z
thomas.diesler(a)jboss.com $
-
-import java.util.StringTokenizer;
-
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-
-/**
- * A deployer that assigns the context root to the service.
- *
- * If there is no explicit <context-root>, this deployer uses
- * the first token from the <port-component-uri> element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class BackwardCompatibleContextRootDeploymentAspect extends
ContextRootDeploymentAspect
-{
- @Override
- protected String getExplicitContextRoot(Deployment dep)
- {
- String contextRoot = super.getExplicitContextRoot(dep);
- if (contextRoot == null)
- {
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- String urlPattern = getUrlPattern(dep, ep);
- if (urlPattern != null)
- {
- StringTokenizer st = new StringTokenizer(urlPattern, "/");
- if (st.countTokens() > 1)
- {
- String firstToken = st.nextToken();
- if (contextRoot != null && contextRoot.equals(firstToken) ==
false)
- throw new IllegalStateException("All endpoints must share the
same <context-root>: " + contextRoot + "!=" + firstToken);
-
- contextRoot = firstToken;
- }
- }
- }
- }
- return contextRoot;
- }
-
- private String getUrlPattern(Deployment dep, Endpoint ep)
- {
- String urlPattern = null;
-
- UnifiedApplicationMetaData appMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName())
!= null)
- {
- UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
- UnifiedEjbPortComponentMetaData pcmd = bmd.getPortComponent();
- if (pcmd != null)
- {
- urlPattern = pcmd.getPortComponentURI();
- }
- }
-
- return urlPattern;
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BackwardCompatibleURLPatternDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BackwardCompatibleURLPatternDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BackwardCompatibleURLPatternDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,62 +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.wsf.spi.deployment;
-
-//$Id: BackwardCompatibleURLPatternDeployer.java 3576 2007-06-14 09:23:52Z
thomas.diesler(a)jboss.com $
-
-import java.util.StringTokenizer;
-
-
-/**
- * A deployer that assigns the URLPattern to endpoints.
- *
- * This deployer uses the first token from the <port-component-uri>
- * as the context root.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2007
- */
-public class BackwardCompatibleURLPatternDeploymentAspect extends
URLPatternDeploymentAspect
-{
-
- @Override
- protected String getExplicitPattern(Deployment dep, Endpoint ep)
- {
- String contextRoot = dep.getService().getContextRoot();
- if (contextRoot == null)
- throw new IllegalStateException("Cannot obtain context root");
-
- String urlPattern = super.getExplicitPattern(dep, ep);
- if (urlPattern != null)
- {
- if (urlPattern.startsWith("/") == false)
- urlPattern = "/" + urlPattern;
-
- StringTokenizer st = new StringTokenizer(urlPattern, "/");
- if (st.countTokens() > 1 && urlPattern.startsWith(contextRoot))
- {
- urlPattern = urlPattern.substring(contextRoot.length());
- }
- }
- return urlPattern;
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeployment.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeployment.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeployment.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,130 +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.wsf.spi.deployment;
-
-import org.jboss.ws.integration.UnifiedVirtualFile;
-
-//$Id$
-
-
-/**
- * A general web service deployment dep.
- *
- * It has no notion of J2EE deployment packages.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicDeployment implements Deployment
-{
- // The context for this deployment dep
- private DeploymentContext context;
- // The root file for this deployment
- private UnifiedVirtualFile rootFile;
- // A deployment has one service
- private Service service;
- // The type of this deployment
- private DeploymentType type;
- // The state for this deployment
- private DeploymentState state;
- // The deployment class loader
- private ClassLoader initialLoader;
- // The runtime class loader
- private ClassLoader runtimeLoader;
-
- public BasicDeployment()
- {
- context = new BasicDeploymentContext();
- service = new BasicService(this);
- state = DeploymentState.UNDEFINED;
- }
-
- public DeploymentContext getContext()
- {
- return context;
- }
-
- public void setContext(DeploymentContext context)
- {
- this.context = context;
- }
-
- public UnifiedVirtualFile getRootFile()
- {
- return rootFile;
- }
-
- public void setRootFile(UnifiedVirtualFile rootFile)
- {
- this.rootFile = rootFile;
- }
-
- public void setInitialClassLoader(ClassLoader classLoader)
- {
- this.initialLoader = classLoader;
- }
-
- public ClassLoader getInitialClassLoader()
- {
- return initialLoader;
- }
-
- public void setRuntimeClassLoader(ClassLoader classLoader)
- {
- this.runtimeLoader = classLoader;
- }
-
- public ClassLoader getRuntimeClassLoader()
- {
- return runtimeLoader;
- }
-
- public Service getService()
- {
- return service;
- }
-
- public void setService(Service service)
- {
- this.service = service;
- }
-
- public DeploymentState getState()
- {
- return state;
- }
-
- public void setState(DeploymentState deploymentState)
- {
- this.state = deploymentState;
- }
-
- public DeploymentType getType()
- {
- return type;
- }
-
- public void setType(DeploymentType deploymentType)
- {
- this.type = deploymentType;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,254 +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.wsf.spi.deployment;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
-
-/**
- * A general service deployment manger.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicDeploymentAspectManager implements DeploymentAspectManager
-{
- // provide logging
- private static final Logger log =
Logger.getLogger(BasicDeploymentAspectManager.class);
-
- private String name;
- private Set<DeploymentAspect> unsortedAspects = new
HashSet<DeploymentAspect>();
- private List<DeploymentAspect> sortedAspects;
-
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public List<DeploymentAspect> getDeploymentAspects()
- {
- if (sortedAspects == null)
- {
- sortedAspects = new ArrayList<DeploymentAspect>();
- List<DeploymentAspect> allAspects = new
ArrayList<DeploymentAspect>(unsortedAspects);
-
- // Add aspects with no requirements first
- Iterator<DeploymentAspect> itAll = allAspects.iterator();
- while (itAll.hasNext())
- {
- DeploymentAspect aspect = itAll.next();
- if (aspect.getRequires() == null)
- {
- sortedAspects.add(aspect);
- itAll.remove();
- }
- }
-
- // Add aspects that have requirements that already added aspects provide
- itAll = allAspects.iterator();
- while (itAll.hasNext())
- {
- DeploymentAspect aspect = itAll.next();
- int index = getAspectIndex(aspect);
- if (index != -1)
- {
- sortedAspects.add(index, aspect);
- itAll.remove();
-
- itAll = allAspects.iterator();
- }
- }
-
- // Add LAST_DEPLOYMENT_ASPECT
- itAll = allAspects.iterator();
- while (itAll.hasNext())
- {
- DeploymentAspect aspect = itAll.next();
- if (LAST_DEPLOYMENT_ASPECT.equals(aspect.getRequires()))
- {
- sortedAspects.add(aspect);
- itAll.remove();
- }
- }
-
- if (allAspects.size() != 0)
- {
- Set<String> providedConditions = new HashSet<String>();
- for (int i = 0; i < sortedAspects.size(); i++)
- {
- DeploymentAspect sortedAspect = sortedAspects.get(i);
- providedConditions.addAll(sortedAspect.getProvidesAsSet());
- }
-
- throw new IllegalStateException("Cannot add: " + allAspects +
"\n provided: " + providedConditions);
- }
-
- for (DeploymentAspect aspect : sortedAspects)
- log.info(name + ": " + aspect);
- }
-
- return sortedAspects;
- }
-
- private int getAspectIndex(DeploymentAspect aspect)
- {
- int index = -1;
- Set<String> providedConditions = new HashSet<String>();
- for (int i = 0; i < sortedAspects.size(); i++)
- {
- DeploymentAspect sortedAspect = sortedAspects.get(i);
- providedConditions.addAll(sortedAspect.getProvidesAsSet());
- if (providedConditions.containsAll(aspect.getRequiresAsSet()))
- {
- index = i + 1;
- break;
- }
- }
- return index;
- }
-
- public void addDeploymentAspect(DeploymentAspect aspect)
- {
- if (sortedAspects != null)
- throw new IllegalStateException("Cannot add deployment aspects to an
already sorted list: " + sortedAspects);
-
- unsortedAspects.add(aspect);
- }
-
- /**
- * Iterate over the registered deployers calls create on each.
- * Iterate over the registered deployers again and calls start on each.
- * If start fails it automaticall calls destroy in the reverse order
- * starting with the deployer that failed
- */
- public void deploy(Deployment dep)
- {
- // create the deployment
- Set<String> providedConditions = new HashSet<String>();
- for (int i = 0; i < getDeploymentAspects().size(); i++)
- {
- DeploymentAspect aspect = getDeploymentAspects().get(i);
-
- // Check that all required aspects are met
- Set<String> requiredSet = aspect.getRequiresAsSet();
- requiredSet.remove(LAST_DEPLOYMENT_ASPECT);
- if (providedConditions.containsAll(requiredSet) == false)
- throw new IllegalStateException("Required conditions '" +
aspect.getRequires() + "' not satisfied by '" + providedConditions +
"' for: " + aspect);
-
- logInvocation(aspect, "Create");
- aspect.create(dep);
-
- providedConditions.addAll(aspect.getProvidesAsSet());
- }
-
- dep.setState(DeploymentState.CREATED);
-
- // start the deployment
- for (int i = 0; i < getDeploymentAspects().size(); i++)
- {
- DeploymentAspect aspect = getDeploymentAspects().get(i);
- try
- {
- logInvocation(aspect, "Start");
- aspect.start(dep);
- }
- catch (RuntimeException rte)
- {
- while (i-- >= 0)
- {
- // destroy the deployment
- failsafeDestroy(aspect, dep);
- }
- throw rte;
- }
- }
-
- dep.setState(DeploymentState.STARTED);
- }
-
- public void undeploy(Deployment dep)
- {
- // stop the deployment
- for (int i = getDeploymentAspects().size(); 0 < i; i--)
- {
- DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
- failsafeStop(aspect, dep);
- }
-
- dep.setState(DeploymentState.STOPPED);
-
- // destroy the deployment
- for (int i = getDeploymentAspects().size(); 0 < i; i--)
- {
- DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
- failsafeDestroy(aspect, dep);
- }
-
- dep.setState(DeploymentState.DESTROYED);
- }
-
- private void failsafeStop(DeploymentAspect aspect, Deployment dep)
- {
- try
- {
- logInvocation(aspect, "Stop");
- aspect.stop(dep);
- }
- catch (RuntimeException rte)
- {
- WSDeploymentException.rethrow(rte);
- }
- }
-
- private void failsafeDestroy(DeploymentAspect aspect, Deployment dep)
- {
- try
- {
- logInvocation(aspect, "Destroy");
- aspect.destroy(dep);
- }
- catch (RuntimeException rte)
- {
- WSDeploymentException.rethrow(rte);
- }
- }
-
- private void logInvocation(DeploymentAspect aspect, String method)
- {
- String name = aspect.getClass().getName();
- name = name.substring(name.lastIndexOf(".") + 1);
- log.debug(name + ":" + method);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentContext.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentContext.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentContext.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,75 +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.wsf.spi.deployment;
-
-//$Id$
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * A general web service deployment context.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicDeploymentContext implements DeploymentContext
-{
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
- private Map<String, Object> properties = new HashMap<String, Object>();
-
- public <T> T getAttachment(Class<T> clazz)
- {
- return (T)attachments.get(clazz);
- }
-
- public <T> T addAttachment(Class<T> clazz, Object obj)
- {
- return (T)attachments.put(clazz, obj);
- }
-
- public <T> T removeAttachment(Class<T> key)
- {
- return (T)attachments.remove(key);
- }
-
- public Set<String> getProperties()
- {
- return properties.keySet();
- }
-
- public Object getProperty(String key)
- {
- return properties.get(key);
- }
-
- public void removeProperty(String key)
- {
- properties.remove(key);
- }
-
- public void setProperty(String key, Object value)
- {
- properties.put(key, value);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,263 +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.wsf.spi.deployment;
-
-import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-import org.jboss.wsf.spi.invocation.RequestHandler;
-import org.jboss.wsf.spi.management.EndpointMetrics;
-
-import javax.management.ObjectName;
-import java.util.*;
-
-/**
- * A general JAXWS endpoint.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicEndpoint implements Endpoint
-{
- private Service service;
- private ObjectName name;
- private String shortName;
- private String urlPattern;
- private String targetBean;
- private EndpointState state;
- private RequestHandler requestHandler;
- private InvocationHandler invocationHandler;
- private LifecycleHandler lifecycleHandler;
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
- private Map<String, Object> properties = new HashMap<String, Object>();
- private EndpointMetrics metrics;
- private List<BindingCustomization> bindingCustomizsations = new
ArrayList<BindingCustomization>();
-
- public BasicEndpoint()
- {
- this.state = EndpointState.UNDEFINED;
- }
-
- public Service getService()
- {
- return service;
- }
-
- public void setService(Service service)
- {
- assertEndpointSetterAccess();
- this.service = service;
- }
-
- public String getTargetBeanName()
- {
- return targetBean;
- }
-
- public void setTargetBeanName(String targetBean)
- {
- assertEndpointSetterAccess();
- this.targetBean = targetBean;
- }
-
- public Class getTargetBeanClass()
- {
- if (targetBean == null)
- throw new IllegalStateException("Target bean not set");
-
- ClassLoader classLoader = service.getDeployment().getRuntimeClassLoader();
- if (classLoader == null)
- classLoader = service.getDeployment().getInitialClassLoader();
-
- if (classLoader == null)
- throw new IllegalStateException("Deployment classloader not set");
-
- Class beanClass;
- try
- {
- beanClass = classLoader.loadClass(targetBean);
- }
- catch (ClassNotFoundException ex)
- {
- throw new WSDeploymentException(ex);
- }
- return beanClass;
- }
-
- public ObjectName getName()
- {
- return name;
- }
-
- public void setName(ObjectName name)
- {
- assertEndpointSetterAccess();
- this.name = name;
- }
-
- public String getShortName()
- {
- return shortName;
- }
-
- public void setShortName(String shortName)
- {
- assertEndpointSetterAccess();
- this.shortName = shortName;
- }
-
- public String getURLPattern()
- {
- return urlPattern;
- }
-
- public void setURLPattern(String urlPattern)
- {
- assertEndpointSetterAccess();
- this.urlPattern = urlPattern;
- }
-
- public EndpointState getState()
- {
- return state;
- }
-
- public void setState(EndpointState state)
- {
- this.state = state;
- }
-
- public RequestHandler getRequestHandler()
- {
- return requestHandler;
- }
-
- public void setRequestHandler(RequestHandler handler)
- {
- assertEndpointSetterAccess();
- this.requestHandler = handler;
- }
-
- public LifecycleHandler getLifecycleHandler()
- {
- return lifecycleHandler;
- }
-
- public void setLifecycleHandler(LifecycleHandler handler)
- {
- assertEndpointSetterAccess();
- this.lifecycleHandler = handler;
- }
-
- public InvocationHandler getInvocationHandler()
- {
- return invocationHandler;
- }
-
- public void setInvocationHandler(InvocationHandler handler)
- {
- assertEndpointSetterAccess();
- this.invocationHandler = handler;
- }
-
- public List<BindingCustomization> getBindingCustomizations()
- {
- return Collections.unmodifiableList(bindingCustomizsations);
- }
-
- /* Get a concrete binding customization */
- public BindingCustomization getBindingCustomization(BindingCustomization
customization)
- {
- BindingCustomization match = null;
-
- Iterator<BindingCustomization> it = bindingCustomizsations.iterator();
- while(it.hasNext())
- {
- BindingCustomization bc = it.next();
- if(bc.getClass().equals(customization.getClass()))
- {
- match = bc;
- }
- }
-
- return match;
- }
-
- public void addBindingCustomization(BindingCustomization customization)
- {
- assertEndpointSetterAccess();
- bindingCustomizsations.add(customization);
- }
-
- public <T> T addAttachment(Class<T> key, Object value)
- {
- return (T)attachments.put(key, value);
- }
-
- public <T> T getAttachment(Class<T> key)
- {
- return (T)attachments.get(key);
- }
-
- public <T> T removeAttachment(Class<T> key)
- {
- return (T)attachments.get(key);
- }
-
- public Set<String> getProperties()
- {
- return properties.keySet();
- }
-
- public Object getProperty(String key)
- {
- return properties.get(key);
- }
-
- public void removeProperty(String key)
- {
- properties.remove(key);
- }
-
- public void setProperty(String key, Object value)
- {
- properties.put(key, value);
- }
-
- public EndpointMetrics getEndpointMetrics()
- {
- return metrics;
- }
-
- public void setEndpointMetrics(EndpointMetrics metrics)
- {
- assertEndpointSetterAccess();
- metrics.setEndpoint(this);
- this.metrics = metrics;
-
- }
-
- private void assertEndpointSetterAccess()
- {
- if (state == EndpointState.STARTED)
- throw new IllegalStateException("Cannot modify endpoint properties in
state: " + state);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicLifecycleHandler.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicLifecycleHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicLifecycleHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,93 +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.wsf.spi.deployment;
-
-//$Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-
-/**
- * A basic lifecycle handler
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2006
- */
-public class BasicLifecycleHandler implements LifecycleHandler
-{
- // provide logging
- protected final Logger log = Logger.getLogger(getClass());
-
- public void create(Endpoint ep)
- {
- log.debug("Create: " + ep.getName());
-
- InvocationHandler invHandler = ep.getInvocationHandler();
- if (invHandler == null)
- throw new IllegalStateException("Invocation handler not available");
-
- invHandler.create(ep);
- ep.setState(EndpointState.CREATED);
- }
-
- public void start(Endpoint ep)
- {
- log.debug("Start: " + ep.getName());
-
- EndpointState state = ep.getState();
- if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
- throw new IllegalStateException("Cannot start endpoint in state: " +
state);
-
- ep.getInvocationHandler().start(ep);
-
- if (ep.getEndpointMetrics() != null)
- ep.getEndpointMetrics().start();
-
- ep.setState(EndpointState.STARTED);
- }
-
- public void stop(Endpoint ep)
- {
- log.debug("Stop: " + ep.getName());
-
- EndpointState state = ep.getState();
- if (state != EndpointState.STARTED)
- throw new IllegalStateException("Cannot stop endpoint in state: " +
state);
-
- ep.getInvocationHandler().stop(ep);
-
- if (ep.getEndpointMetrics() != null)
- ep.getEndpointMetrics().stop();
-
- ep.setState(EndpointState.STOPPED);
- }
-
- public void destroy(Endpoint ep)
- {
- log.debug("Destroy: " + ep.getName());
-
- ep.getInvocationHandler().destroy(ep);
-
- ep.setState(EndpointState.DESTROYED);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicService.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicService.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicService.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,96 +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.wsf.spi.deployment;
-
-// $Id$
-
-import java.util.LinkedList;
-import java.util.List;
-
-
-/**
- * A general service.
- *
- * Maintains a named set of Endpoints
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicService implements Service
-{
- private Deployment dep;
- private List<Endpoint> endpoints = new LinkedList<Endpoint>();
- private String contextRoot;
-
- public BasicService(Deployment dep)
- {
- this.dep = dep;
- this.dep.setService(this);
- }
-
- public Deployment getDeployment()
- {
- return dep;
- }
-
- public void setDeployment(Deployment dep)
- {
- this.dep = dep;
- }
-
- public void addEndpoint(Endpoint endpoint)
- {
- endpoints.add(endpoint);
- }
-
- public List<Endpoint> getEndpoints()
- {
- return endpoints;
- }
-
- public String getContextRoot()
- {
- return contextRoot;
- }
-
- public void setContextRoot(String contextRoot)
- {
- this.contextRoot = contextRoot;
- }
-
- public Endpoint getEndpointByName(String shortName)
- {
- if (shortName == null)
- throw new IllegalArgumentException("shortName cannot be null");
-
- Endpoint retEndpoint = null;
- for (Endpoint ep : endpoints)
- {
- if (ep.getShortName().equals(shortName))
- {
- retEndpoint = ep;
- break;
- }
- }
- return retEndpoint;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextPropertiesDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextPropertiesDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextPropertiesDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,60 +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.wsf.spi.deployment;
-
-import java.util.Iterator;
-import java.util.Map;
-
-
-/**
- * Populate deployment context properties
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2006
- */
-public class ContextPropertiesDeploymentAspect extends DeploymentAspect
-{
- // The configured service endpoint servlet
- private Map<String,String> contextProperties;
-
- public Map<String, String> getContextProperties()
- {
- return contextProperties;
- }
-
- public void setContextProperties(Map<String, String> contextProperties)
- {
- this.contextProperties = contextProperties;
- }
-
- @Override
- public void create(Deployment dep)
- {
- Iterator<String> it = contextProperties.keySet().iterator();
- while (it.hasNext())
- {
- String key = it.next();
- String value = contextProperties.get(key);
- dep.getContext().setProperty(key, value);
- }
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,106 +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.wsf.spi.deployment;
-
-//$Id: ContextRootDeployer.java 3576 2007-06-14 09:23:52Z thomas.diesler(a)jboss.com $
-
-import org.jboss.wsf.spi.annotation.WebContext;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-
-/**
- * A deployer that assigns the context root to the service
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class ContextRootDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep)
- {
- String contextRoot = dep.getService().getContextRoot();
- if (contextRoot == null)
- {
- contextRoot = getExplicitContextRoot(dep);
- if (contextRoot == null)
- contextRoot = getImplicitContextRoot(dep);
-
- // Always prefix with '/'
- if (contextRoot.startsWith("/") == false)
- contextRoot = "/" + contextRoot;
-
- dep.getService().setContextRoot(contextRoot);
- }
- }
-
- protected String getExplicitContextRoot(Deployment dep)
- {
- String contextRoot = null;
-
- // #1 Use the explicit context root from the web meta data
- UnifiedWebMetaData webMetaData =
dep.getContext().getAttachment(UnifiedWebMetaData.class);
- if (webMetaData != null)
- contextRoot = webMetaData.getContextRoot();
-
- // #2 Use the explicit context root from @WebContext.contextRoot
- if (contextRoot == null)
- {
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- Class implClass = ep.getTargetBeanClass();
- WebContext anWebContext =
(WebContext)implClass.getAnnotation(WebContext.class);
- if (anWebContext != null && anWebContext.contextRoot().length() >
0)
- {
- if (contextRoot != null &&
contextRoot.equals(anWebContext.contextRoot()) == false)
- throw new IllegalStateException("Context root must be the same for
all deployed endpoints");
-
- contextRoot = anWebContext.contextRoot();
- }
- }
- }
-
- // #3 Use the explicit context root from webservices/context-root
- UnifiedApplicationMetaData appMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
- if (contextRoot == null && appMetaData != null)
- {
- contextRoot = appMetaData.getWebServiceContextRoot();
- }
-
- return contextRoot;
- }
-
- /** Use the implicit context root derived from the deployment name
- */
- protected String getImplicitContextRoot(Deployment dep)
- {
- UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- String simpleName = udi.simpleName;
- String contextRoot = simpleName.substring(0, simpleName.length() - 4);
- if (udi.parent != null)
- {
- simpleName = udi.parent.simpleName;
- contextRoot = simpleName.substring(0, simpleName.length() - 4) + "-" +
contextRoot;
- }
- return contextRoot;
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectInstaller.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectInstaller.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectInstaller.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,58 +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.wsf.spi.deployment;
-
-//$Id: AbstractDeployer.java 3146 2007-05-18 22:55:26Z thomas.diesler(a)jboss.com $
-
-import java.util.Set;
-
-/**
- * A deployment aspect installer.
- *
- * Use this installer with microkernel version 1.x
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class DeploymentAspectInstaller
-{
- private DeploymentAspectManager manager;
- private Set<DeploymentAspect> aspects;
-
- public void setManager(DeploymentAspectManager manager)
- {
- this.manager = manager;
- }
-
- public void setAspects(Set<DeploymentAspect> aspects)
- {
- this.aspects = aspects;
- }
-
- public void create()
- {
- for (DeploymentAspect aspect : aspects)
- {
- manager.addDeploymentAspect(aspect);
- }
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointAssociation.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointAssociation.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointAssociation.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,51 +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.wsf.spi.deployment;
-
-// $Id$
-
-
-/**
- * Associates the endpoint meta data with the current thead.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-May-2007
- */
-public final class EndpointAssociation
-{
- private static final ThreadLocal<Endpoint> endpoint = new
ThreadLocal<Endpoint>();
-
- public static void setEndpoint(Endpoint ep)
- {
- endpoint.set(ep);
- }
-
- public static Endpoint getEndpoint()
- {
- return endpoint.get();
- }
-
- public static void removeEndpoint()
- {
- endpoint.remove();
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,141 +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.wsf.spi.deployment;
-
-//$Id: EndpointHandlerDeployer.java 3828 2007-07-09 16:56:38Z heiko.braun(a)jboss.com $
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-import org.jboss.wsf.spi.invocation.RequestHandler;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
-
-/**
- * A deployer that assigns the handlers to the Endpoint
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointHandlerDeploymentAspect extends DeploymentAspect
-{
- private String requestHandler;
- private String lifecycleHandler;
-
- private Map<String, String> invocationHandlerMap = new HashMap<String,
String>();
-
- public void setLifecycleHandler(String handler)
- {
- this.lifecycleHandler = handler;
- }
-
- public void setRequestHandler(String handler)
- {
- this.requestHandler = handler;
- }
-
- public void setInvocationHandler(Map<String, String> handlers)
- {
- this.invocationHandlerMap = handlers;
- }
-
- @Override
- public void create(Deployment dep)
- {
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- if (requestHandler != null)
- ep.setRequestHandler(getRequestHandler(dep));
-
- if (lifecycleHandler != null)
- ep.setLifecycleHandler(getLifecycleHandler(dep));
-
- if (invocationHandlerMap != null)
- {
- InvocationHandler invocationHandler = getInvocationHandler(ep);
- if (invocationHandler != null)
- ep.setInvocationHandler(invocationHandler);
- }
- }
- }
-
- private RequestHandler getRequestHandler(Deployment dep)
- {
- try
- {
- Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(requestHandler);
- return (RequestHandler)handlerClass.newInstance();
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Cannot load request handler: " +
requestHandler);
- }
- }
-
- private LifecycleHandler getLifecycleHandler(Deployment dep)
- {
- try
- {
- Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(lifecycleHandler);
- return (LifecycleHandler)handlerClass.newInstance();
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Cannot load lifecycle handler: " +
lifecycleHandler);
- }
- }
-
- private InvocationHandler getInvocationHandler(Endpoint ep)
- {
- Deployment dep = ep.getService().getDeployment();
- String key = dep.getType().toString();
-
- // Use a special key for MDB endpoints
- UnifiedApplicationMetaData uapp =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
- if (uapp != null)
- {
- UnifiedBeanMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
- if (bmd instanceof UnifiedMessageDrivenMetaData)
- {
- key = "JAXRPC_MDB21";
- }
- }
-
- InvocationHandler invocationHandler = null;
- String className = invocationHandlerMap.get(key);
- if (className != null)
- {
- try
- {
- Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(className);
- invocationHandler = (InvocationHandler)handlerClass.newInstance();
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Cannot load invocation handler: "
+ className);
- }
- }
- return invocationHandler;
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointLifecycleDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointLifecycleDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointLifecycleDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,91 +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.wsf.spi.deployment;
-
-//$Id: EndpointLifecycleDeployer.java 3146 2007-05-18 22:55:26Z thomas.diesler(a)jboss.com
$
-
-
-/**
- * A deployer that that calls the endpoint lifecycle handler
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointLifecycleDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep)
- {
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- getLifecycleHandler(ep, true).create(ep);
- }
- }
-
- @Override
- public void start(Deployment dep)
- {
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- getLifecycleHandler(ep, true).start(ep);
- }
- }
-
- @Override
- public void stop(Deployment dep)
- {
- Service service = dep.getService();
- if (service != null)
- {
- for (Endpoint ep : service.getEndpoints())
- {
- LifecycleHandler lifecycleHandler = getLifecycleHandler(ep, false);
- if (lifecycleHandler != null)
- lifecycleHandler.stop(ep);
- }
- }
- }
-
- @Override
- public void destroy(Deployment dep)
- {
- Service service = dep.getService();
- if (service != null)
- {
- for (Endpoint ep : service.getEndpoints())
- {
- LifecycleHandler lifecycleHandler = getLifecycleHandler(ep, false);
- if (lifecycleHandler != null)
- lifecycleHandler.destroy(ep);
- }
- }
- }
-
- private LifecycleHandler getLifecycleHandler(Endpoint ep, boolean assertHandler)
- {
- LifecycleHandler lifecycleHandler = ep.getLifecycleHandler();
- if (lifecycleHandler == null && assertHandler)
- throw new IllegalStateException("LifecycleHandler not initialised");
-
- return lifecycleHandler;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointMetricsDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointMetricsDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointMetricsDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,51 +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.wsf.spi.deployment;
-
-//$Id: EndpointNameDeployer.java 3146 2007-05-18 22:55:26Z thomas.diesler(a)jboss.com $
-
-import org.jboss.wsf.spi.management.EndpointMetrics;
-
-/**
- * A deployer that assigns the metrics to the Endpoint
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 20-Jun-2007
- */
-public class EndpointMetricsDeploymentAspect extends DeploymentAspect
-{
- private EndpointMetrics metrics;
-
- public void setEndpointMetrics(EndpointMetrics metrics)
- {
- this.metrics = metrics;
- }
-
- @Override
- public void create(Deployment dep)
- {
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- ep.setEndpointMetrics(metrics);
- }
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,67 +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.wsf.spi.deployment;
-
-//$Id: EndpointNameDeployer.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
-
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
-import org.jboss.wsf.spi.utils.ObjectNameFactory;
-
-/**
- * A deployer that assigns the complete name to the Endpoint
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointNameDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep)
- {
- String contextRoot = dep.getService().getContextRoot();
- if (contextRoot == null || contextRoot.startsWith("/") == false)
- throw new IllegalStateException("Context root expected to start with
leading slash: " + contextRoot);
-
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- StringBuilder name = new StringBuilder(Endpoint.SEPID_DOMAIN + ":");
- name.append(Endpoint.SEPID_PROPERTY_CONTEXT + "=" +
contextRoot.substring(1) + ",");
- name.append(Endpoint.SEPID_PROPERTY_ENDPOINT + "=" +
ep.getShortName());
-
- // Append the JMS destination, for an MDB endpoint
- UnifiedApplicationMetaData uapp =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
- if (uapp != null)
- {
- UnifiedBeanMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
- if (bmd instanceof UnifiedMessageDrivenMetaData)
- {
- String destName =
((UnifiedMessageDrivenMetaData)bmd).getDestinationJndiName();
- name.append(",jms=" + destName);
- }
- }
-
- ep.setName(ObjectNameFactory.create(name.toString()));
- }
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointRegistryDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointRegistryDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,52 +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.wsf.spi.deployment;
-
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-
-/**
- * A deployer that registers the endpoints
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class EndpointRegistryDeploymentAspect extends DeploymentAspect
-{
- public void create(Deployment dep)
- {
- EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- registry.register(ep);
- }
- }
-
- public void destroy(Deployment dep)
- {
- EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- registry.unregister(ep);
- }
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,41 +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.wsf.spi.deployment;
-
-//$Id$
-
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-
-/**
- * The container independent deployment info.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class JAXRPCClientDeployment extends UnifiedDeploymentInfo
-{
-
- public JAXRPCClientDeployment(DeploymentType type)
- {
- super(type);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,87 +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.wsf.spi.deployment;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-
-// $Id$
-
-/**
- * The container independent deployment info.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class JAXRPCDeployment extends UnifiedDeploymentInfo
-{
- private WebservicesMetaData wsMetaData;
-
- public JAXRPCDeployment(DeploymentType type, WebservicesMetaData wsMetaData)
- {
- super(type);
- this.wsMetaData = wsMetaData;
- }
-
- public JAXRPCDeployment(DeploymentType type, UnifiedVirtualFile vfWebservices)
- {
- super(type);
-
- try
- {
- // Unmarshall webservices.xml
- URL webservicesURL = vfWebservices.toURL();
- InputStream is = webservicesURL.openStream();
- try
- {
- Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
- ObjectModelFactory factory = new WebservicesFactory(webservicesURL);
- wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(is, factory, null);
- }
- finally
- {
- is.close();
- }
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new IllegalStateException(ex);
- }
- }
-
- public WebservicesMetaData getWebservicesMetaData()
- {
- return wsMetaData;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,40 +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.wsf.spi.deployment;
-
-//$Id$
-
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-
-/**
- * The container independent deployment info.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 29-Jun-2006
- */
-public class JAXWSDeployment extends UnifiedDeploymentInfo
-{
- public JAXWSDeployment(DeploymentType type)
- {
- super(type);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,105 +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.wsf.spi.deployment;
-
-//$Id: URLPatternDeployer.java 3576 2007-06-14 09:23:52Z thomas.diesler(a)jboss.com $
-
-import org.jboss.wsf.spi.annotation.WebContext;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-
-/**
- * A deployer that assigns the URLPattern to endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2007
- */
-public class URLPatternDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep)
- {
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- String urlPattern = ep.getURLPattern();
- if (urlPattern == null)
- {
- urlPattern = getExplicitPattern(dep, ep);
- if (urlPattern == null)
- urlPattern = getImplicitPattern(dep, ep);
-
- // Always prefix with '/'
- if (urlPattern.startsWith("/") == false)
- urlPattern = "/" + urlPattern;
-
- ep.setURLPattern(urlPattern);
- }
- }
- }
-
- protected String getExplicitPattern(Deployment dep, Endpoint ep)
- {
- String urlPattern = null;
-
- // #1 For JSE lookup the url-pattern from the servlet mappings
- UnifiedWebMetaData webMetaData =
dep.getContext().getAttachment(UnifiedWebMetaData.class);
- if (webMetaData != null)
- {
- String epName = ep.getShortName();
- urlPattern = webMetaData.getServletMappings().get(epName);
- if (urlPattern == null)
- throw new IllegalStateException("Cannot obtain servlet mapping for:
" + epName);
- }
-
- // #2 Use the explicit urlPattern from port-component/port-component-uri
- UnifiedApplicationMetaData appMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName())
!= null)
- {
- UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
- UnifiedEjbPortComponentMetaData pcmd = bmd.getPortComponent();
- if (pcmd != null)
- {
- urlPattern = pcmd.getPortComponentURI();
- }
- }
-
- // #3 For EJB use @WebContext.urlPattern
- if (urlPattern == null)
- {
- Class beanClass = ep.getTargetBeanClass();
- WebContext anWebContext =
(WebContext)beanClass.getAnnotation(WebContext.class);
- if (anWebContext != null && anWebContext.urlPattern().length() > 0)
- urlPattern = anWebContext.urlPattern();
- }
-
- return urlPattern;
- }
-
- protected String getImplicitPattern(Deployment dep, Endpoint ep)
- {
- // #4 Fallback to the ejb-name
- String urlPattern = ep.getShortName();
- return urlPattern;
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSDeploymentException.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSDeploymentException.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSDeploymentException.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,56 +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.wsf.spi.deployment;
-
-// $Id$
-
-/**
- * A general deployment exception
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class WSDeploymentException extends RuntimeException
-{
- public WSDeploymentException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public WSDeploymentException(String message)
- {
- super(message);
- }
-
- public WSDeploymentException(Throwable cause)
- {
- super(cause);
- }
-
- public static void rethrow(Throwable cause)
- {
- if (cause instanceof WSDeploymentException)
- throw (WSDeploymentException)cause;
-
- throw new WSDeploymentException(cause);
- }
-}
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSFDeploymentException.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSFDeploymentException.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSFDeploymentException.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,56 @@
+/*
+ * 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.wsf.spi.deployment;
+
+// $Id$
+
+/**
+ * A general deployment exception
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class WSFDeploymentException extends RuntimeException
+{
+ public WSFDeploymentException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public WSFDeploymentException(String message)
+ {
+ super(message);
+ }
+
+ public WSFDeploymentException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public static void rethrow(Throwable cause)
+ {
+ if (cause instanceof WSFDeploymentException)
+ throw (WSFDeploymentException)cause;
+
+ throw new WSFDeploymentException(cause);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WSFDeploymentException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -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.
- */
-package org.jboss.wsf.spi.deployment;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.dom4j.Document;
-import org.dom4j.Element;
-import org.jboss.logging.Logger;
-
-/**
- * Modifies web.xml for jbossws
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2006
- */
-public class WebAppDesciptorModifierImpl implements WebAppDesciptorModifier
-{
- // logging support
- private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
-
- public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws
ClassNotFoundException
- {
- RewriteResults results = new RewriteResults();
- Element root = webXml.getRootElement();
-
- String propKey = SERVLET_CLASS;
- String servletClass = (String)dep.getContext().getProperty(propKey);
- if (servletClass == null)
- throw new IllegalStateException("Cannot obtain context property: " +
propKey);
-
- propKey = CONTEXT_PARAMETER_MAP;
- Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
- if (contextParams != null)
- {
- for (Map.Entry<String, String> entry : contextParams.entrySet())
- {
- Element contextParam = root.addElement("context-param");
- contextParam.addElement("param-name").addText(entry.getKey());
- contextParam.addElement("param-value").addText(entry.getValue());
- }
- }
-
- propKey = SERVLET_CONTEXT_LISTENER;
- String listenerClass = (String)dep.getContext().getProperty(propKey);
- if (listenerClass != null)
- {
- Element listener = root.addElement("listener");
- listener.addElement("listener-class").setText(listenerClass);
- }
-
- for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
- {
- Element servlet = (Element)it.next();
- String linkName = servlet.element("servlet-name").getTextTrim();
-
- // find the servlet-class
- Element classElement = servlet.element("servlet-class");
-
- // JSP
- if (classElement == null)
- continue;
-
- String orgServletClassName = classElement.getTextTrim();
-
- // Get the servlet class
- Class orgServletClass = null;
- try
- {
- ClassLoader loader = dep.getInitialClassLoader();
- orgServletClass = loader.loadClass(orgServletClassName);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + orgServletClassName);
- }
-
- String targetBeanName = null;
-
- // Nothing to do if we have an <init-param>
- if (isAlreadyModified(servlet))
- {
- for (Iterator itParam = servlet.elementIterator("init-param");
itParam.hasNext();)
- {
- Element elParam = (Element)itParam.next();
- String paramName = elParam.element("param-name").getTextTrim();
- String paramValue =
elParam.element("param-value").getTextTrim();
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
- {
- targetBeanName = paramValue;
- }
- }
- }
- else
- {
- // Check if it is a real servlet that we can ignore
- if (orgServletClass != null &&
javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
- {
- log.info("Ignore servlet: " + orgServletClassName);
- continue;
- }
- else if (orgServletClassName.endsWith("Servlet"))
- {
- log.info("Ignore <servlet-class> that ends with
'Servlet': " + orgServletClassName);
- continue;
- }
-
- classElement.setText(servletClass);
-
- // add additional init params
- if (orgServletClassName.equals(servletClass) == false)
- {
- targetBeanName = orgServletClassName;
- Element paramElement = servlet.addElement("init-param");
-
paramElement.addElement("param-name").addText(Endpoint.SEPID_DOMAIN_ENDPOINT);
- paramElement.addElement("param-value").addText(targetBeanName);
- }
- }
-
- if (targetBeanName == null)
- throw new IllegalStateException("Cannot obtain service endpoint bean
for: " + linkName);
-
- // remember the target bean name
- results.sepTargetMap.put(linkName, targetBeanName);
- }
-
- return results;
- }
-
- // Return true if the web.xml is already modified
- private boolean isAlreadyModified(Element servlet)
- {
- for (Iterator it = servlet.elementIterator("init-param"); it.hasNext();)
- {
- Element elParam = (Element)it.next();
- String paramName = elParam.element("param-name").getTextTrim();
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
- return true;
- }
- return false;
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,272 +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.wsf.spi.deployment;
-
-//$Id: WebAppGeneratorDeployer.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
-import org.dom4j.io.OutputFormat;
-import org.dom4j.io.XMLWriter;
-import org.jboss.wsf.spi.annotation.WebContext;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-
-/**
- * A deployer that generates a webapp for an EJB endpoint
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class WebAppGeneratorDeploymentAspect extends DeploymentAspect
-{
- private SecurityHandler securityHandlerEJB21;
- private SecurityHandler securityHandlerEJB3;
-
- public void setSecurityHandlerEJB21(SecurityHandler handler)
- {
- this.securityHandlerEJB21 = handler;
- }
-
- public void setSecurityHandlerEJB3(SecurityHandler handler)
- {
- this.securityHandlerEJB3 = handler;
- }
-
- @Override
- public void create(Deployment dep)
- {
- UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- if (udi == null)
- throw new IllegalStateException("Cannot obtain unified deployement
info");
-
- if (dep.getType().toString().endsWith("EJB21"))
- {
- udi.webappURL = generatWebDeployment(dep, securityHandlerEJB21);
- }
- else if (dep.getType().toString().endsWith("EJB3"))
- {
- udi.webappURL = generatWebDeployment(dep, securityHandlerEJB3);
- }
- }
-
- private URL generatWebDeployment(Deployment dep, SecurityHandler securityHandler)
- {
- Document webDoc = createWebAppDescriptor(dep, securityHandler);
- Document jbossDoc = createJBossWebAppDescriptor(dep, securityHandler);
-
- File tmpWar = null;
- try
- {
- ServerConfig config = ServerConfigFactory.getInstance().getServerConfig();
- File tmpdir = new File(config.getServerTempDir().getCanonicalPath() +
"/deploy");
-
- UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- String deploymentName = udi.getCanonicalName().replace('/',
'-');
- tmpWar = File.createTempFile(deploymentName, ".war", tmpdir);
- tmpWar.delete();
-
- File webInf = new File(tmpWar, "WEB-INF");
- webInf.mkdirs();
-
- File webXml = new File(webInf, "web.xml");
- FileWriter fw = new FileWriter(webXml);
- OutputFormat format = OutputFormat.createPrettyPrint();
- XMLWriter writer = new XMLWriter(fw, format);
- writer.write(webDoc);
- writer.close();
-
- File jbossWebXml = new File(webInf, "jboss-web.xml");
- fw = new FileWriter(jbossWebXml);
- writer = new XMLWriter(fw, format);
- writer.write(jbossDoc);
- writer.close();
-
- return tmpWar.toURL();
- }
- catch (IOException e)
- {
- throw new WSDeploymentException("Failed to create webservice.war",
e);
- }
- }
-
- private Document createWebAppDescriptor(Deployment dep, SecurityHandler
securityHandler)
- {
- UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
-
- Document document = DocumentHelper.createDocument();
- Element webApp = document.addElement("web-app");
-
- /*
- <servlet>
- <servlet-name>
- <servlet-class>
- </servlet>
- */
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- Element servlet = webApp.addElement("servlet");
- servlet.addElement("servlet-name").addText(ep.getShortName());
- servlet.addElement("servlet-class").addText(ep.getTargetBeanName());
- }
-
- /*
- <servlet-mapping>
- <servlet-name>
- <url-pattern>
- </servlet-mapping>
- */
- ArrayList urlPatters = new ArrayList();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- Element servletMapping = webApp.addElement("servlet-mapping");
- servletMapping.addElement("servlet-name").addText(ep.getShortName());
- servletMapping.addElement("url-pattern").addText(ep.getURLPattern());
- }
-
- String authMethod = null;
-
- // Add web-app/security-constraint for each port component
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- String ejbName = ep.getShortName();
-
- Boolean secureWSDLAccess = null;
- String transportGuarantee = null;
- String beanAuthMethod = null;
-
- WebContext anWebContext =
(WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
- if(anWebContext != null)
- {
- if (anWebContext.authMethod().length() > 0)
- beanAuthMethod = anWebContext.authMethod();
- if (anWebContext.transportGuarantee().length() > 0)
- transportGuarantee = anWebContext.transportGuarantee();
- if (anWebContext.secureWSDLAccess())
- secureWSDLAccess = anWebContext.secureWSDLAccess();
- }
-
- UnifiedApplicationMetaData appMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) !=
null)
- {
- UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
- UnifiedEjbPortComponentMetaData pc = bmd.getPortComponent();
- if (pc != null)
- {
- beanAuthMethod = pc.getAuthMethod();
- transportGuarantee = pc.getTransportGuarantee();
- secureWSDLAccess = pc.getSecureWSDLAccess();
- }
- }
-
- if (beanAuthMethod != null || transportGuarantee != null)
- {
- /*
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>TestUnAuthPort</web-resource-name>
- <url-pattern>/HSTestRoot/TestUnAuth/*</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>*</role-name>
- </auth-constraint>
- <user-data-constraint>
- <transport-guarantee>NONE</transport-guarantee>
- </user-data-constraint>
- </security-constraint>
- */
- Element securityConstraint =
webApp.addElement("security-constraint");
- Element wrc =
securityConstraint.addElement("web-resource-collection");
- wrc.addElement("web-resource-name").addText(ejbName);
- wrc.addElement("url-pattern").addText(ep.getURLPattern());
- if (Boolean.TRUE.equals(secureWSDLAccess))
- {
- wrc.addElement("http-method").addText("GET");
- }
- wrc.addElement("http-method").addText("POST");
-
- // Optional auth-constraint
- if (beanAuthMethod != null)
- {
- // Only the first auth-method gives the war login-config/auth-method
- if (authMethod == null)
- authMethod = beanAuthMethod;
-
- Element authConstraint =
securityConstraint.addElement("auth-constraint").addElement("role-name").addText("*");
- }
- // Optional user-data-constraint
- if (transportGuarantee != null)
- {
- Element userData =
securityConstraint.addElement("user-data-constraint");
-
userData.addElement("transport-guarantee").addText(transportGuarantee);
- }
- }
- }
-
- // Optional login-config/auth-method
- if (authMethod != null)
- {
- Element loginConfig = webApp.addElement("login-config");
- loginConfig.addElement("auth-method").addText(authMethod);
-
loginConfig.addElement("realm-name").addText("EJBServiceEndpointServlet
Realm");
-
- securityHandler.addSecurityRoles(webApp, dep);
- }
-
- return document;
- }
-
- private Document createJBossWebAppDescriptor(Deployment dep, SecurityHandler
securityHandler)
- {
- Document document = DocumentHelper.createDocument();
-
- /* Create a jboss-web
- <jboss-web>
- <security-domain>java:/jaas/cts</security-domain>
- <context-root>/ws/ejbN/</context-root>
- <virtual-host>some.domain.com</virtual-host>
- </jboss-web>
- */
- Element jbossWeb = document.addElement("jboss-web");
-
- securityHandler.addSecurityDomain(jbossWeb, dep);
-
- // Get the context root for this deployment
- String contextRoot = dep.getService().getContextRoot();
- if (contextRoot == null)
- throw new WSDeploymentException("Cannot obtain context root");
-
- jbossWeb.addElement("context-root").addText(contextRoot);
-
- return document;
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebXMLRewriter.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebXMLRewriter.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebXMLRewriter.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -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.wsf.spi.deployment;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.xml.ws.WebServiceException;
-
-import org.dom4j.Document;
-import org.dom4j.io.OutputFormat;
-import org.dom4j.io.SAXReader;
-import org.dom4j.io.XMLWriter;
-import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier.RewriteResults;
-import org.jboss.wsf.spi.utils.IOUtils;
-
-/**
- * The rewriter for web.xml
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2007
- */
-public class WebXMLRewriter
-{
- private WebAppDesciptorModifier desciptorModifier;
-
- public WebAppDesciptorModifier getDesciptorModifier()
- {
- return desciptorModifier;
- }
-
- public void setDesciptorModifier(WebAppDesciptorModifier desciptorModifier)
- {
- this.desciptorModifier = desciptorModifier;
- }
-
- public RewriteResults rewriteWebXml(Deployment dep)
- {
- UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- if (udi == null)
- throw new IllegalStateException("Cannot obtain unified deployment
info");
-
- URL warURL = udi.webappURL;
- File warFile = new File(warURL.getFile());
- if (warFile.isDirectory() == false)
- throw new WebServiceException("Expected a war directory: " + warURL);
-
- File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
- if (webXML.isFile() == false)
- throw new WebServiceException("Cannot find web.xml: " + webXML);
-
- try
- {
- // After redeployment there might be a stale copy of the original
web.xml.org,
we delete it
- File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
- orgWebXML.delete();
-
- // Rename the web.xml
- if (webXML.renameTo(orgWebXML) == false)
- throw new WebServiceException("Cannot rename web.xml: " +
orgWebXML);
-
- FileInputStream stream = new FileInputStream(orgWebXML);
- return rewriteWebXml(stream, webXML, dep);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WebServiceException(e);
- }
- }
-
- private RewriteResults rewriteWebXml(InputStream source, File destFile, Deployment
dep) throws Exception
- {
- if (destFile == null)
- {
- destFile = File.createTempFile("jbossws-alt-web", "xml",
IOUtils.createTempDirectory());
- destFile.deleteOnExit();
- }
-
- SAXReader reader = new SAXReader();
- Document document = reader.read(source);
-
- RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
- results.webXML = destFile.toURL();
-
- FileOutputStream fos = new FileOutputStream(destFile);
- OutputFormat format = OutputFormat.createPrettyPrint();
- XMLWriter writer = new XMLWriter(fos, format);
- writer.write(document);
- writer.close();
-
- return results;
- }
-}
\ No newline at end of file
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/CommonServiceRefBinder.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,228 +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.wsf.spi.deployment.serviceref;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.WSFException;
-import org.jboss.util.naming.Util;
-import org.jboss.logging.Logger;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.Referenceable;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceClient;
-import javax.xml.namespace.QName;
-import javax.jws.HandlerChain;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.annotation.Annotation;
-import java.util.List;
-import java.util.ArrayList;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-/**
- * A generic ServiceRefBinder that knows how to deal with JAX-WS services.
- * Subclasses need to provide a stack specific {@link Referenceable} that can be bound
into JNDI.
- * <p/>
- * This works in conjunction with a ServiceObjectFactory that knows how to assemble
- * the Service after JNDI lookup on the client side.
- *
- * @see javax.naming.spi.ObjectFactory
- *
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 12, 2007
- */
-public abstract class CommonServiceRefBinder implements ServiceRefBinder
-{
- // logging support
- private static Logger log = Logger.getLogger(CommonServiceRefBinder.class);
-
- private ClassLoader loader = null;
-
- public void setupServiceRef(Context encCtx, String encName, AnnotatedElement
anElement, UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws
NamingException
- {
- WebServiceRef wsref = null;
-
- if(null == loader)
- throw new IllegalArgumentException("There needs to be a classloader
available");
-
- // Build the list of @WebServiceRef relevant annotations
- List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
-
- if(anElement!=null)
- {
- for (Annotation an : anElement.getAnnotations())
- {
- if (an instanceof WebServiceRef)
- wsrefList.add((WebServiceRef)an);
-
- if (an instanceof WebServiceRefs)
- {
- WebServiceRefs wsrefs = (WebServiceRefs)an;
- for (WebServiceRef aux : wsrefs.value())
- wsrefList.add(aux);
- }
- }
- }
-
- // Use the single @WebServiceRef
- if (wsrefList.size() == 1)
- {
- wsref = wsrefList.get(0);
- }
- else
- {
- for (WebServiceRef aux : wsrefList)
- {
- if (encName.endsWith("/" + aux.name()))
- {
- wsref = aux;
- break;
- }
- }
- }
-
- Class targetClass = null;
- if (anElement instanceof Field)
- {
- targetClass = ((Field)anElement).getType();
- }
- else if (anElement instanceof Method)
- {
- targetClass = ((Method)anElement).getParameterTypes()[0];
- }
- else
- {
- if( wsref!=null && (wsref.type() != Object.class) )
- targetClass = wsref.type();
- }
-
- String targetClassName = (targetClass != null ? targetClass.getName() : null);
- String externalName = encCtx.getNameInNamespace() + "/" + encName;
- log.debug("setupServiceRef [jndi=" + externalName + ",target="
+ targetClassName + "]");
-
- String serviceImplClass = null;
-
- // #1 Use the explicit @WebServiceRef.value
- if (wsref != null && wsref.value() != Object.class)
- serviceImplClass = wsref.value().getName();
-
- // #2 Use the target ref type
- if (serviceImplClass == null && targetClass != null &&
Service.class.isAssignableFrom(targetClass))
- serviceImplClass = targetClass.getName();
-
- // #3 Use <service-interface>
- if (serviceImplClass == null && serviceRef.getServiceInterface() != null)
- serviceImplClass = serviceRef.getServiceInterface();
-
- // #4 Use javax.xml.ws.Service
- if (serviceImplClass == null)
- serviceImplClass = Service.class.getName();
-
- // #1 Use the explicit @WebServiceRef.type
- if (wsref != null && wsref.type() != Object.class)
- targetClassName = wsref.type().getName();
-
-
- // #2 Use the target ref type
- if (targetClassName == null && targetClass != null &&
Service.class.isAssignableFrom(targetClass) == false)
- targetClassName = targetClass.getName();
-
- // Set the wsdlLocation if there is no override already
- if (serviceRef.getWsdlOverride() == null && wsref != null &&
wsref.wsdlLocation().length() > 0)
- serviceRef.setWsdlOverride(wsref.wsdlLocation());
-
- // Set the handlerChain from @HandlerChain on the annotated element
- String handlerChain = serviceRef.getHandlerChain();
- if (anElement != null)
- {
- HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
- if (handlerChain == null && anHandlerChain != null &&
anHandlerChain.file().length() > 0)
- handlerChain = anHandlerChain.file();
- }
-
- // Resolve path to handler chain
- if (handlerChain != null)
- {
- try
- {
- new URL(handlerChain);
- }
- catch (MalformedURLException ex)
- {
- Class declaringClass = null;
- if (anElement instanceof Field)
- declaringClass = ((Field)anElement).getDeclaringClass();
- else if (anElement instanceof Method)
- declaringClass = ((Method)anElement).getDeclaringClass();
- else if (anElement instanceof Class)
- declaringClass = (Class)anElement;
-
- handlerChain = declaringClass.getPackage().getName().replace('.',
'/') + "/" + handlerChain;
- }
-
- serviceRef.setHandlerChain(handlerChain);
- }
-
- // Extract service QName for target service
- if(null == serviceRef.getServiceQName())
- {
- try
- {
- Class serviceClass = loader.loadClass(serviceImplClass);
- if(serviceClass.getAnnotation(WebServiceClient.class) !=null)
- {
- WebServiceClient clientDecl =
(WebServiceClient)serviceClass.getAnnotation(WebServiceClient.class);
- serviceRef.setServiceQName( new QName(clientDecl.targetNamespace(),
clientDecl.name()));
- }
- }
- catch (ClassNotFoundException e)
- {
- WSFException.rethrow("Cannot extract service QName for target
service", e);
- }
- }
-
- // Do not use rebind, the binding should be unique
- // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
- Referenceable serviceReferenceable = buildServiceReferenceable(serviceImplClass,
targetClassName, serviceRef);
- Util.bind(encCtx, encName, serviceReferenceable);
-
- }
-
- /**
- * Subclasses should provide a stack specific ServiceReferenceable.
- *
- * @param serviceImplClass
- * @param targetClassName
- * @param serviceRef
- * @return a Referenceable that can be used by a stack specific {@link
javax.naming.spi.ObjectFactory} on the client side
- * to create a web service stub
- * */
- protected abstract Referenceable buildServiceReferenceable(
- String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData
serviceRef
- );
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,180 +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.wsf.spi.deployment.serviceref;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.integration.*;
-import org.jboss.wsf.spi.WSFException;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import java.io.File;
-import java.lang.reflect.AnnotatedElement;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * Bind service refs in the client's ENC
- * for every service-ref element in the deployment descriptor.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.com
- *
- * @since 04-Nov-2006
- */
-public class ServiceRefHandlerImpl implements ServiceRefHandler
-{
- // logging support
- private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
-
- private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
-
- enum Type {JAXRPC, JAXWS};
-
- /* binds jaxrpc deployments */
- private ServiceRefBinder jaxrpcBinder;
-
- /*binds jaxws deployments */
- private ServiceRefBinder jaxwsBinder;
-
- public void setJaxrpcBinder(ServiceRefBinder binder)
- {
- this.jaxrpcBinder = binder;
- }
-
- public void setJaxwsBinder(ServiceRefBinder binder)
- {
- this.jaxwsBinder = binder;
- }
-
- public ServiceRefMetaData newServiceRefMetaData()
- {
- return new UnifiedServiceRefMetaData();
- }
-
- public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ClassLoader loader, ServiceRefMetaData sref) throws NamingException
- {
- if (sref.isProcessed())
- {
- log.debug("Attempt to rebind the service-ref: " +
sref.getServiceRefName());
- return;
- }
-
- // In case of an .war deployment the associated root file doesn't point to
- // the expanded war file structure and thus breaks service-ref usage for servlet
clients.
- // This needs to be fixed in org.jboss.web.AbstractWebDeployer (JBOSS_AS/server
module)
- if(vfsRoot instanceof URLLoaderAdapter)
- {
- URLLoaderAdapter ula = (URLLoaderAdapter)vfsRoot;
- URL rootURL = ula.toURL();
- if("file".equals( rootURL.getProtocol()) &&
rootURL.getFile().endsWith(".war") )
- {
- String fileName = rootURL.getFile();
-
- if( ! new File(fileName).exists() ) // might be an exploded directory
- {
- // There is a filename convention for exploded directories
- fileName = fileName.substring(0, fileName.indexOf(".war")) +
"-exp.war";
-
- File expandedDirectory = new File(fileName);
- if(! expandedDirectory.exists())
- throw new WSFException("Failed to bind service-ref, the deployment
root expandedDirectory doesn't exist: " + fileName);
-
- // update the rootFile
- try
- {
- vfsRoot = new URLLoaderAdapter(expandedDirectory.toURL());
- }
- catch (MalformedURLException e){}
- }
-
- }
- }
-
- UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
- serviceRef.setVfsRoot(vfsRoot);
- try
- {
- if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
- {
- jaxrpcBinder.setupServiceRef(encCtx, encName, null, serviceRef, loader);
- }
- else
- {
- AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
- jaxwsBinder.setupServiceRef(encCtx, encName, anElement, serviceRef, loader);
- }
- }
- finally
- {
- sref.setProcessed(true);
- }
- }
-
- public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- return objectFactory.newChild(ref, navigator, namespaceURI, localName, attrs);
- }
-
- public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- objectFactory.setValue(ref, navigator, namespaceURI, localName, value);
- }
-
- private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader
loader) throws NamingException
- {
- // The service-ref-type is JAXWS specific
- String serviceRefType = serviceRef.getServiceRefType();
- if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
- return Type.JAXWS;
-
- // The mapping-file is JAXRPC specific
- if (serviceRef.getMappingFile() != null)
- return Type.JAXRPC;
-
- String siName = serviceRef.getServiceInterface();
- if (siName == null)
- throw new IllegalStateException("<service-interface> cannot be
null");
-
- if (siName.equals("javax.xml.rpc.Service"))
- return Type.JAXRPC;
-
- try
- {
- Class siClass = loader.loadClass(siName);
- if (javax.xml.ws.Service.class.isAssignableFrom(siClass))
- return Type.JAXWS;
- else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
- return Type.JAXRPC;
- else throw new IllegalStateException("Illegal service interface: " +
siName);
- }
- catch (ClassNotFoundException e)
- {
- throw new IllegalStateException("Cannot load <service-interface>:
" + siName);
- }
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,305 +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.wsf.spi.deployment.serviceref;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.integration.ServiceRefElement;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A object model factory for <service-ref>
- *
- * @author Thomas.Diesler(a)jboss.com
- */
-public class ServiceRefObjectFactory
-{
- public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (ref instanceof UnifiedHandlerChainsMetaData)
- child = newChild((UnifiedHandlerChainsMetaData)ref, navigator, namespaceURI,
localName, attrs);
- else if (ref instanceof UnifiedHandlerMetaData)
- child = newChild((UnifiedHandlerMetaData)ref, navigator, namespaceURI,
localName, attrs);
- else if (ref instanceof UnifiedPortComponentRefMetaData)
- child = newChild((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI,
localName, attrs);
- else if (ref instanceof UnifiedServiceRefMetaData)
- child = newChild((UnifiedServiceRefMetaData)ref, navigator, namespaceURI,
localName, attrs);
- return child;
- }
-
- public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- if (ref instanceof UnifiedCallPropertyMetaData)
- setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName,
value);
- else if (ref instanceof UnifiedHandlerChainMetaData)
- setValue((UnifiedHandlerChainMetaData)ref, navigator, namespaceURI, localName,
value);
- else if (ref instanceof UnifiedHandlerMetaData)
- setValue((UnifiedHandlerMetaData)ref, navigator, namespaceURI, localName,
value);
- else if (ref instanceof UnifiedInitParamMetaData)
- setValue((UnifiedInitParamMetaData)ref, navigator, namespaceURI, localName,
value);
- else if (ref instanceof UnifiedPortComponentRefMetaData)
- setValue((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI,
localName, value);
- else if (ref instanceof UnifiedServiceRefMetaData)
- setValue((UnifiedServiceRefMetaData)ref, navigator, namespaceURI, localName,
value);
- else if (ref instanceof UnifiedCallPropertyMetaData)
- setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName,
value);
- else if (ref instanceof UnifiedStubPropertyMetaData)
- setValue((UnifiedStubPropertyMetaData)ref, navigator, namespaceURI, localName,
value);
- }
-
- private void setValue(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- /* Standard properties */
- if (localName.equals("service-ref-name"))
- {
- ref.setServiceRefName(value);
- }
- else if (localName.equals("service-interface"))
- {
- ref.setServiceInterface(value);
- }
- else if (localName.equals("service-ref-type"))
- {
- ref.setServiceRefType(value);
- }
- else if (localName.equals("wsdl-file"))
- {
- ref.setWsdlFile(value);
- }
- else if (localName.equals("jaxrpc-mapping-file"))
- {
- ref.setMappingFile(value);
- }
- else if (localName.equals("service-qname"))
- {
- ref.setServiceQName(getQNameValue(navigator, value));
- }
-
- /* JBoss properties */
- else if (localName.equals("service-impl-class"))
- {
- ref.setServiceImplClass(value);
- }
- else if (localName.equals("config-name"))
- {
- ref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- ref.setConfigFile(value);
- }
- else if (localName.equals("wsdl-override"))
- {
- ref.setWsdlOverride(value);
- }
- else if (localName.equals("handler-chain"))
- {
- ref.setHandlerChain(value);
- }
- }
-
- private Object newChild(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("port-component-ref"))
- {
- child = new UnifiedPortComponentRefMetaData(ref);
- ref.addPortComponentRef((UnifiedPortComponentRefMetaData)child);
- }
- else if (localName.equals("handler"))
- {
- child = new UnifiedHandlerMetaData();
- ref.addHandler((UnifiedHandlerMetaData)child);
- }
- else if (localName.equals("handler-chains"))
- {
- child = new UnifiedHandlerChainsMetaData();
- ref.setHandlerChains((UnifiedHandlerChainsMetaData)child);
- }
- else if (localName.equals("call-property"))
- {
- child = new UnifiedCallPropertyMetaData();
- ref.addCallProperty((UnifiedCallPropertyMetaData)child);
- }
- return child;
- }
-
- private Object newChild(UnifiedHandlerChainsMetaData ref, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("handler-chain"))
- {
- child = new UnifiedHandlerChainMetaData();
- ref.addHandlerChain((UnifiedHandlerChainMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedPortComponentRefMetaData pcref, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-endpoint-interface"))
- {
- pcref.setServiceEndpointInterface(value);
- }
- else if (localName.equals("enable-mtom"))
- {
- pcref.setEnableMTOM(Boolean.valueOf(value));
- }
- else if (localName.equals("port-component-link"))
- {
- pcref.setPortComponentLink(value);
- }
- else if (localName.equals("port-qname"))
- {
- pcref.setPortQName(getQNameValue(navigator, value));
- }
- else if (localName.equals("config-name"))
- {
- pcref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- pcref.setConfigFile(value);
- }
- }
-
- private Object newChild(UnifiedPortComponentRefMetaData ref, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("call-property"))
- {
- child = new UnifiedCallPropertyMetaData();
- ref.addCallProperty((UnifiedCallPropertyMetaData)child);
- }
- if (localName.equals("stub-property"))
- {
- child = new UnifiedStubPropertyMetaData();
- ref.addStubProperty((UnifiedStubPropertyMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedHandlerChainMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-name-pattern"))
- {
- ref.setServiceNamePattern(getQNameValue(navigator, value));
- }
- else if (localName.equals("port-name-pattern"))
- {
- ref.setPortNamePattern(getQNameValue(navigator, value));
- }
- else if (localName.equals("protocol-binding"))
- {
- ref.setProtocolBindings(value);
- }
- }
-
- private void setValue(UnifiedHandlerMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- if (localName.equals("handler-name"))
- {
- ref.setHandlerName(value);
- }
- else if (localName.equals("handler-class"))
- {
- ref.setHandlerClass(value);
- }
- else if (localName.equals("soap-header"))
- {
- ref.addSoapHeader(getQNameValue(navigator, value));
- }
- else if (localName.equals("soap-role"))
- {
- ref.addSoapRole(value);
- }
- else if (localName.equals("port-name"))
- {
- ref.addPortName(value);
- }
- }
-
- private Object newChild(UnifiedHandlerMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("init-param"))
- {
- child = new UnifiedInitParamMetaData();
- ref.addInitParam((UnifiedInitParamMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedInitParamMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- if (localName.equals("param-name"))
- {
- ref.setParamName(value);
- }
- else if (localName.equals("param-value"))
- {
- ref.setParamValue(value);
- }
- }
-
- private void setValue(UnifiedCallPropertyMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- if (localName.equals("prop-name"))
- {
- ref.setPropName(value);
- }
- else if (localName.equals("prop-value"))
- {
- ref.setPropValue(value);
- }
- }
-
- private void setValue(UnifiedStubPropertyMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- if (localName.equals("prop-name"))
- {
- ref.setPropName(value);
- }
- else if (localName.equals("prop-value"))
- {
- ref.setPropValue(value);
- }
- }
-
- private QName getQNameValue(UnmarshallingContext navigator, String value)
- {
- QName qname = (value.startsWith("{") ? QName.valueOf(value) :
navigator.resolveQName(value));
- return qname;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicEndpointInvocation.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicEndpointInvocation.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicEndpointInvocation.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,85 +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.wsf.spi.invocation;
-
-import java.lang.reflect.Method;
-
-//$Id$
-
-/**
- * A general endpoint invocation.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicEndpointInvocation implements Invocation
-{
- private InvocationContext invocationContext;
- private Method javaMethod;
- private Object[] args;
- private Object returnValue;
-
- public BasicEndpointInvocation()
- {
- this.invocationContext = new BasicInvocationContext();
- }
-
- public InvocationContext getInvocationContext()
- {
- return invocationContext;
- }
-
- public void setInvocationContext(InvocationContext invocationContext)
- {
- this.invocationContext = invocationContext;
- }
-
- public Method getJavaMethod()
- {
- return javaMethod;
- }
-
- public void setJavaMethod(Method javaMethod)
- {
- this.javaMethod = javaMethod;
- }
-
- public Object[] getArgs()
- {
- return args;
- }
-
- public void setArgs(Object[] args)
- {
- this.args = args;
- }
-
- public Object getReturnValue()
- {
- return returnValue;
- }
-
- public void setReturnValue(Object returnValue)
- {
- this.returnValue = returnValue;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationContext.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationContext.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationContext.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,63 +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.wsf.spi.invocation;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A basic invocation context.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicInvocationContext implements InvocationContext
-{
- private Object targetBean;
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
-
- public Object getTargetBean()
- {
- return targetBean;
- }
-
- public void setTargetBean(Object targetBean)
- {
- this.targetBean = targetBean;
- }
-
-
- public <T> T addAttachment(Class<T> key, Object value)
- {
- return (T)attachments.put(key, value);
- }
-
- public <T> T getAttachment(Class<T> key)
- {
- return (T)attachments.get(key);
- }
-
- public <T> T removeAttachment(Class<T> key)
- {
- return (T)attachments.get(key);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationHandler.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/BasicInvocationHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,117 +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.wsf.spi.invocation;
-
-// $Id$
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.UndeclaredThrowableException;
-
-import javax.management.MBeanException;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.utils.JavaUtils;
-
-/**
- * Handles invocations on endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public abstract class BasicInvocationHandler implements InvocationHandler
-{
- // provide logging
- private static final Logger log = Logger.getLogger(BasicInvocationHandler.class);
-
- public Invocation createInvocation()
- {
- return new BasicEndpointInvocation();
- }
-
- protected Method getImplMethod(Class implClass, Method seiMethod) throws
ClassNotFoundException, NoSuchMethodException
- {
- String methodName = seiMethod.getName();
- Class[] paramTypes = seiMethod.getParameterTypes();
- for (int i = 0; i < paramTypes.length; i++)
- {
- Class paramType = paramTypes[i];
- if (JavaUtils.isPrimitive(paramType) == false)
- {
- String paramTypeName = paramType.getName();
- paramType = JavaUtils.loadJavaType(paramTypeName);
- paramTypes[i] = paramType;
- }
- }
-
- Method implMethod = implClass.getMethod(methodName, paramTypes);
- return implMethod;
- }
-
- public void create(Endpoint ep)
- {
- log.debug("Create: " + ep.getName());
- }
-
- public void start(Endpoint ep)
- {
- log.debug("Start: " + ep.getName());
- }
-
- public void stop(Endpoint ep)
- {
- log.debug("Stop: " + ep.getName());
- }
-
- public void destroy(Endpoint ep)
- {
- log.debug("Destroy: " + ep.getName());
- }
-
- protected void handleInvocationException(Throwable th) throws Exception
- {
- if (th instanceof MBeanException)
- {
- throw ((MBeanException)th).getTargetException();
- }
-
- if (th instanceof InvocationTargetException)
- {
- // Unwrap the throwable raised by the service endpoint implementation
- Throwable targetEx = ((InvocationTargetException)th).getTargetException();
- handleInvocationException(targetEx);
- }
-
- if (th instanceof Exception)
- {
- throw (Exception)th;
- }
-
- if (th instanceof Error)
- {
- throw (Error)th;
- }
-
- throw new UndeclaredThrowableException(th);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,116 +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.wsf.spi.invocation;
-
-// $Id$
-
-import java.io.IOException;
-
-import javax.management.ObjectName;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.ws.WebServiceException;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.EndpointAssociation;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.utils.ObjectNameFactory;
-
-/**
- * The JAX-WS dispatcher servlet.
- *
- * @author WS Development Team
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-May-2007
- */
-public class EndpointServlet extends HttpServlet
-{
- protected Endpoint endpoint;
- protected EndpointRegistry epRegistry;
-
- public void init(ServletConfig servletConfig) throws ServletException
- {
- super.init(servletConfig);
- epRegistry = EndpointRegistryFactory.getEndpointRegistry();
- }
-
- public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
- {
- if (endpoint == null)
- {
- String contextPath = req.getContextPath();
- initServiceEndpoint(contextPath);
- }
-
- try
- {
- EndpointAssociation.setEndpoint(endpoint);
- RequestHandler requestHandler = (RequestHandler)endpoint.getRequestHandler();
- requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
- }
- finally
- {
- EndpointAssociation.removeEndpoint();
- }
- }
-
- /** Initialize the service endpoint
- */
- protected void initServiceEndpoint(String contextPath)
- {
- if (contextPath.startsWith("/"))
- contextPath = contextPath.substring(1);
-
- String servletName = getServletName();
- for (ObjectName sepId : epRegistry.getEndpoints())
- {
- String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
- String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
- if (servletName.equals(propEndpoint) &&
contextPath.equals(propContext))
- {
- endpoint = epRegistry.getEndpoint(sepId);
- break;
- }
- }
-
- if (endpoint == null)
- {
- ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath +
","
- + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
- throw new WebServiceException("Cannot obtain endpoint for: " +
oname);
- }
-
- // Set the runtime classloader for JSE endpoints, this should be the tomcat
classloader
- Deployment dep = endpoint.getService().getDeployment();
- if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() ==
DeploymentType.JAXWS_JSE)
- {
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- dep.setRuntimeClassLoader(classLoader);
- }
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerJSE.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerJSE.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerJSE.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,82 +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.wsf.spi.invocation;
-
-// $Id$
-
-import java.lang.reflect.Method;
-
-import javax.xml.ws.WebServiceContext;
-
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * Handles invocations on JSE endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerJSE extends BasicInvocationHandler
-{
- protected Object getTargetBean(Endpoint ep, Invocation epInv)
- {
- InvocationContext invCtx = epInv.getInvocationContext();
- Object targetBean = invCtx.getTargetBean();
- if (targetBean == null)
- {
- try
- {
- Class epImpl = ep.getTargetBeanClass();
- targetBean = epImpl.newInstance();
- invCtx.setTargetBean(targetBean);
- }
- catch (Exception ex)
- {
- throw new IllegalStateException("Canot get target bean instance",
ex);
- }
- }
- return targetBean;
- }
-
- public void invoke(Endpoint ep, Invocation epInv) throws Exception
- {
- try
- {
- Object targetBean = getTargetBean(ep, epInv);
-
- InvocationContext invContext = epInv.getInvocationContext();
- WebServiceContext wsContext =
invContext.getAttachment(WebServiceContext.class);
- if (wsContext != null)
- {
- new WebServiceContextInjector().injectContext(targetBean,
(WebServiceContext)wsContext);
- }
-
- Method method = getImplMethod(targetBean.getClass(), epInv.getJavaMethod());
- Object retObj = method.invoke(targetBean, epInv.getArgs());
- epInv.setReturnValue(retObj);
- }
- catch (Exception e)
- {
- handleInvocationException(e);
- }
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDummy.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDummy.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDummy.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,62 +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.wsf.spi.invocation;
-
-// $Id: WebServiceContextJSE.java 3146 2007-05-18 22:55:26Z thomas.diesler(a)jboss.com $
-
-import java.security.Principal;
-
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.logging.Logger;
-
-/**
- * A WebServiceContext implementation that has no access to
- * a security context.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 29-Jun-2007
- */
-public class WebServiceContextDummy extends AbstractWebServiceContext
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WebServiceContextDummy.class);
-
- public WebServiceContextDummy(MessageContext msgContext)
- {
- super(msgContext);
- }
-
- @Override
- public Principal getUserPrincipal()
- {
- log.warn("No security context available");
- return null;
- }
-
- @Override
- public boolean isUserInRole(String role)
- {
- log.warn("No security context available");
- return false;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,58 +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.wsf.spi.invocation;
-
-// $Id$
-
-import java.security.Principal;
-
-import javax.ejb.EJBContext;
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * A WebServiceContext implementation that delegates to the EJBContext.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Jan-2007
- */
-public class WebServiceContextEJB extends AbstractWebServiceContext
-{
- private EJBContext ejbContext;
-
- public WebServiceContextEJB(MessageContext msgContext, EJBContext ejbContext)
- {
- super(msgContext);
- this.ejbContext = ejbContext;
- }
-
- public Principal getUserPrincipal()
- {
- Principal principal = ejbContext.getCallerPrincipal();
- return principal;
- }
-
- public boolean isUserInRole(String role)
- {
- boolean isUserInRole = ejbContext.isCallerInRole(role);
- return isUserInRole;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextInjector.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextInjector.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextInjector.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,82 +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.wsf.spi.invocation;
-
-// $Id$
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import javax.annotation.Resource;
-import javax.xml.ws.WebServiceContext;
-
-import org.jboss.logging.Logger;
-
-/**
- * Inject the JAXWS WebServiceContext
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Jan-2007
- */
-public class WebServiceContextInjector
-{
- // provide logging
- private static Logger log = Logger.getLogger(WebServiceContextInjector.class);
-
- public void injectContext(Object epInstance, WebServiceContext wsContext)
- {
- try
- {
- // scan fields that are marked with @Resource
- Field[] fields = epInstance.getClass().getDeclaredFields();
- for (Field field : fields)
- {
- Class type = field.getType();
- if (type == WebServiceContext.class &&
field.isAnnotationPresent(Resource.class))
- {
- field.setAccessible(true);
- field.set(epInstance, wsContext);
- }
- }
-
- // scan methods that are marked with @Resource
- Method[] methods = epInstance.getClass().getDeclaredMethods();
- for (Method method : methods)
- {
- Class[] paramTypes = method.getParameterTypes();
- if (paramTypes.length == 1 && paramTypes[0] ==
WebServiceContext.class && method.isAnnotationPresent(Resource.class))
- {
- method.setAccessible(true);
- method.invoke(epInstance, new Object[] { wsContext });
- }
- }
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- log.warn("Cannot inject WebServiceContext", ex);
- }
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextJSE.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextJSE.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextJSE.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,62 +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.wsf.spi.invocation;
-
-// $Id$
-
-import java.security.Principal;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * A WebServiceContext implementation that delegates to the HttpServletRequest.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Jan-2007
- */
-public class WebServiceContextJSE extends AbstractWebServiceContext
-{
- private HttpServletRequest httpRequest;
-
- public WebServiceContextJSE(MessageContext msgContext)
- {
- super(msgContext);
- httpRequest = (HttpServletRequest)msgContext.get(MessageContext.SERVLET_REQUEST);
- if (httpRequest == null)
- throw new IllegalStateException("Cannot obtain HTTPServletRequest from
message context");
- }
-
- @Override
- public Principal getUserPrincipal()
- {
- Principal principal = httpRequest.getUserPrincipal();
- return principal;
- }
-
- @Override
- public boolean isUserInRole(String role)
- {
- boolean isUserInRole = httpRequest.isUserInRole(role);
- return isUserInRole;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicEndpointMetrics.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicEndpointMetrics.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicEndpointMetrics.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,171 +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.wsf.spi.management;
-
-// $Id: ServiceEndpointMetrics.java 2253 2007-02-02 14:21:44Z heiko.braun(a)jboss.com $
-
-import java.util.Date;
-
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * Service Endpoint Metrics
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-Dec-2005
- */
-public class BasicEndpointMetrics implements EndpointMetrics
-{
- private Endpoint endpoint;
-
- private Date startTime;
- private Date stopTime;
- private long requestCount;
- private long responseCount;
- private long faultCount;
- private long maxProcessingTime;
- private long minProcessingTime;
- private long avgProcessingTime;
- private long totalProcessingTime;
-
- public Endpoint getEndpoint()
- {
- return endpoint;
- }
-
- public void setEndpoint(Endpoint endpoint)
- {
- this.endpoint = endpoint;
- }
-
- public void start()
- {
- startTime = new Date();
- stopTime = null;
- requestCount = 0;
- responseCount = 0;
- faultCount = 0;
- maxProcessingTime = 0;
- minProcessingTime = 0;
- avgProcessingTime = 0;
- totalProcessingTime = 0;
- }
-
- public void stop()
- {
- stopTime = new Date();
- }
-
- public long processRequestMessage()
- {
- requestCount++;
- return System.currentTimeMillis();
- }
-
- public void processResponseMessage(long beginTime)
- {
- responseCount++;
- processAnyMessage(beginTime);
- }
-
- public void processFaultMessage(long beginTime)
- {
- faultCount++;
- processAnyMessage(beginTime);
- }
-
- private void processAnyMessage(long beginTime)
- {
- if (beginTime > 0)
- {
- long procTime = System.currentTimeMillis() - beginTime;
-
- if (minProcessingTime == 0)
- minProcessingTime = procTime;
-
- maxProcessingTime = Math.max(maxProcessingTime, procTime);
- minProcessingTime = Math.min(minProcessingTime, procTime);
- totalProcessingTime = totalProcessingTime + procTime;
- avgProcessingTime = totalProcessingTime / (responseCount + faultCount);
- }
- }
-
- public Date getStartTime()
- {
- return startTime;
- }
-
- public Date getStopTime()
- {
- return stopTime;
- }
-
- public long getMinProcessingTime()
- {
- return minProcessingTime;
- }
-
- public long getMaxProcessingTime()
- {
- return maxProcessingTime;
- }
-
- public long getAverageProcessingTime()
- {
- return avgProcessingTime;
- }
-
- public long getTotalProcessingTime()
- {
- return totalProcessingTime;
- }
-
- public long getRequestCount()
- {
- return requestCount;
- }
-
- public long getFaultCount()
- {
- return faultCount;
- }
-
- public long getResponseCount()
- {
- return responseCount;
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nEndpoint Metrics: " +
endpoint.getName());
- buffer.append("\n startTime=" + startTime);
- buffer.append("\n stopTime=" + stopTime);
- buffer.append("\n requestCount=" + requestCount);
- buffer.append("\n responseCount=" + responseCount);
- buffer.append("\n faultCount=" + faultCount);
- buffer.append("\n maxProcessingTime=" + maxProcessingTime);
- buffer.append("\n minProcessingTime=" + minProcessingTime);
- buffer.append("\n avgProcessingTime=" + avgProcessingTime);
- buffer.append("\n totalProcessingTime=" + totalProcessingTime);
- return buffer.toString();
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicEndpointRegistry.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicEndpointRegistry.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicEndpointRegistry.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,107 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.spi.management;
-
-// $Id$
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * A general endpoint registry.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicEndpointRegistry implements EndpointRegistry
-{
- // provide logging
- private static final Logger log = Logger.getLogger(BasicEndpointRegistry.class);
-
- private Map<ObjectName, Endpoint> endpoints = new HashMap<ObjectName,
Endpoint>();
-
- public Endpoint getEndpoint(ObjectName epName)
- {
- if (epName == null)
- throw new IllegalArgumentException("Endpoint name cannot be null");
-
- if (isRegistered(epName) == false)
- throw new IllegalStateException("Endpoint not registered: " +
epName);
-
- Endpoint endpoint = endpoints.get(epName);
- return endpoint;
- }
-
- public Endpoint resolvePortComponentLink(String pcLink)
- {
- throw new NotImplementedException();
- }
-
- public boolean isRegistered(ObjectName epName)
- {
- if (epName == null)
- throw new IllegalArgumentException("Endpoint name cannot be null");
-
- return endpoints.get(epName) != null;
- }
-
- public Set<ObjectName> getEndpoints()
- {
- return endpoints.keySet();
- }
-
- public void register(Endpoint endpoint)
- {
- if (endpoint == null)
- throw new IllegalArgumentException("Endpoint cannot be null");
-
- ObjectName epName = endpoint.getName();
- if (epName == null)
- throw new IllegalStateException("Endpoint name cannot be null for: " +
endpoint);
-
- if (isRegistered(epName))
- throw new IllegalStateException("Endpoint already registered: " +
epName);
-
- log.info("register: " + epName);
- endpoints.put(epName, endpoint);
- }
-
- public void unregister(Endpoint endpoint)
- {
- if (endpoint == null)
- throw new IllegalArgumentException("Endpoint cannot be null");
-
- ObjectName epName = endpoint.getName();
- if (isRegistered(epName) == false)
- throw new IllegalStateException("Endpoint not registered: " +
epName);
-
- log.info("remove: " + epName);
- endpoints.remove(epName);
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,240 +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.wsf.spi.management;
-
-//$Id$
-
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.management.AttributeNotFoundException;
-import javax.management.JMException;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.ObjectName;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.utils.ObjectNameFactory;
-
-/**
- * Basic implementation of a ServerConfig
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author darran.lofthouse(a)jboss.com
- * @since 08-May-2006
- */
-public class BasicServerConfig implements BasicServerConfigMBean
-{
- private static final Logger log = Logger.getLogger(BasicServerConfig.class);
-
- // The webservice host name that will be used when updating the wsdl
- private String webServiceHost = UNDEFINED_HOSTNAME;
- // The webservice port that will be used when updating the wsdl
- private int webServicePort;
- // The webservice port that will be used when updating the wsdl
- private int webServiceSecurePort;
- // Whether we should always modify the soap address to the deployed endpoing location
- private boolean modifySOAPAddress;
- // The MBeanServer
- private MBeanServer server;
-
- public String getWebServiceHost()
- {
- return webServiceHost;
- }
-
- public void setWebServiceHost(String host) throws UnknownHostException
- {
- if (host == null || host.trim().length() == 0)
- {
- log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
- host = UNDEFINED_HOSTNAME;
- }
- if ("0.0.0.0".equals(host))
- {
- InetAddress localHost = InetAddress.getLocalHost();
- log.debug("Using local host: " + localHost.getHostName());
- host = localHost.getHostName();
- }
- this.webServiceHost = host;
- }
-
- public void setWebServicePort(int port)
- {
- this.webServicePort = port;
- }
-
- public void setWebServiceSecurePort(int port)
- {
- this.webServiceSecurePort = port;
- }
-
- public boolean isModifySOAPAddress()
- {
- return modifySOAPAddress;
- }
-
- public void setModifySOAPAddress(boolean modify)
- {
- this.modifySOAPAddress = modify;
- }
-
- public File getServerTempDir()
- {
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File tmpdir = (File)server.getAttribute(oname, "ServerTempDir");
- return tmpdir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public File getServerDataDir()
- {
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File tmpdir = (File)server.getAttribute(oname, "ServerDataDir");
- return tmpdir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public int getWebServicePort()
- {
- if (webServicePort <= 0)
- webServicePort = getConnectorPort("HTTP/1.1", false);
-
- int localPort = webServicePort;
- if (localPort <= 0)
- {
- // Do not initialize webServicePort with the default, the connector port may
become available later
- log.warn("Unable to calculate 'WebServicePort', using default
'8080'");
- localPort = 8080;
- }
-
- return localPort;
- }
-
- public int getWebServiceSecurePort()
- {
- if (webServiceSecurePort <= 0)
- webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
-
- int localPort = webServiceSecurePort;
- if (localPort <= 0)
- {
- // Do not initialize webServiceSecurePort with the default, the connector port
may become available later
- log.warn("Unable to calculate 'WebServiceSecurePort', using default
'8443'");
- localPort = 8443;
- }
-
- return localPort;
- }
-
- public void create() throws Exception
- {
- MBeanServer server = getMBeanServer();
- if (server != null)
- {
- server.registerMBean(this, BasicServerConfigMBean.OBJECT_NAME);
- }
- }
-
- public void destroy() throws Exception
- {
- MBeanServer server = getMBeanServer();
- if (server != null)
- {
- server.unregisterMBean(BasicServerConfigMBean.OBJECT_NAME);
- }
- }
-
- private int getConnectorPort(final String protocol, final boolean secure)
- {
- int port = -1;
-
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
-
- Set connectorNames = server.queryNames(connectors, null);
- for (Object current : connectorNames)
- {
- ObjectName currentName = (ObjectName)current;
-
- try
- {
- int connectorPort = (Integer)server.getAttribute(currentName,
"port");
- boolean connectorSecure = (Boolean)server.getAttribute(currentName,
"secure");
- String connectorProtocol = (String)server.getAttribute(currentName,
"protocol");
-
- if (protocol.equals(connectorProtocol) && secure ==
connectorSecure)
- {
- if (port > -1)
- {
- log.warn("Found multiple connectors for protocol='" +
protocol + "' and secure='" + secure + "', using first port
found '" + port + "'");
- }
- else
- {
- port = connectorPort;
- }
- }
- }
- catch (AttributeNotFoundException ignored)
- {
- }
- }
-
- return port;
- }
- catch (JMException e)
- {
- return -1;
- }
- }
-
- private MBeanServer getMBeanServer()
- {
- if (server == null)
- {
- for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator();
i.hasNext();)
- {
- server = (MBeanServer)i.next();
- }
- }
- return server;
- }
-}
Deleted:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfigMBean.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfigMBean.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfigMBean.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,33 +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.wsf.spi.management;
-
-import javax.management.ObjectName;
-
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.utils.ObjectNameFactory;
-
-public interface BasicServerConfigMBean extends ServerConfig
-{
- /** The object name in the MBean server */
- ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServerConfig");
-}
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTest.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,293 @@
+/*
+ * 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.wsf.spi.test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.utils.DOMWriter;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Base class for JBossWS test cases
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public abstract class JBossWSTest extends TestCase
+{
+ // provide logging
+ protected Logger log = Logger.getLogger(getClass().getName());
+
+ private JBossWSTestHelper delegate = new JBossWSTestHelper();
+
+ public JBossWSTest()
+ {
+ }
+
+ public JBossWSTest(String name)
+ {
+ super(name);
+ }
+
+ public MBeanServerConnection getServer() throws NamingException
+ {
+ return delegate.getServer();
+ }
+
+ public boolean isTargetJBoss50()
+ {
+ return delegate.isTargetJBoss50();
+ }
+
+ public boolean isTargetJBoss42()
+ {
+ return delegate.isTargetJBoss42();
+ }
+
+ public boolean isTargetJBoss40()
+ {
+ return delegate.isTargetJBoss40();
+ }
+
+ public boolean isIntegrationNative()
+ {
+ return delegate.isIntegrationNative();
+
+ }
+
+ public boolean isIntegrationSunRI()
+ {
+ return delegate.isIntegrationSunRI();
+ }
+
+ public boolean isIntegrationXFire()
+ {
+ return delegate.isIntegrationXFire();
+ }
+
+ /** Deploy the given archive
+ */
+ public void deploy(String archive) throws Exception
+ {
+ delegate.deploy(archive);
+ }
+
+ /** Undeploy the given archive
+ */
+ public void undeploy(String archive) throws Exception
+ {
+ delegate.undeploy(archive);
+ }
+
+ public String getServerHost()
+ {
+ return delegate.getServerHost();
+ }
+
+ /** Get the client's env context for a given name.
+ */
+ protected InitialContext getInitialContext(String clientName) throws NamingException
+ {
+ InitialContext iniCtx = new InitialContext();
+ Hashtable env = iniCtx.getEnvironment();
+ env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
+ env.put("j2ee.clientName", clientName);
+ return new InitialContext(env);
+ }
+
+ /** Get the client's env context
+ */
+ protected InitialContext getInitialContext() throws NamingException
+ {
+ return getInitialContext("jbossws-client");
+ }
+
+ public boolean hasJDK15()
+ {
+ try
+ {
+ Class.forName("java.lang.Enum");
+ return true;
+ }
+ catch (ClassNotFoundException ex)
+ {
+ return false;
+ }
+ }
+
+ public static void assertEquals(Element expElement, Element wasElement, boolean
ignoreWhitespace)
+ {
+ normalizeWhitspace(expElement, ignoreWhitespace);
+ normalizeWhitspace(wasElement, ignoreWhitespace);
+ String expStr = DOMWriter.printNode(expElement, false);
+ String wasStr = DOMWriter.printNode(wasElement, false);
+ if (expStr.equals(wasStr) == false)
+ {
+ System.out.println("\nExp: " + expStr + "\nWas: " +
wasStr);
+ Logger.getLogger(JBossWSTest.class).error("\nExp: " + expStr +
"\nWas: " + wasStr);
+ }
+ assertEquals(expStr, wasStr);
+ }
+
+ public static void assertEquals(Element expElement, Element wasElement)
+ {
+ assertEquals(expElement, wasElement, false);
+ }
+
+ public static void assertEquals(Object exp, Object was)
+ {
+ if (exp instanceof Object[] && was instanceof Object[])
+ assertEqualsArray((Object[])exp, (Object[])was);
+ else if (exp instanceof byte[] && was instanceof byte[])
+ assertEqualsArray((byte[])exp, (byte[])was);
+ else if (exp instanceof boolean[] && was instanceof boolean[])
+ assertEqualsArray((boolean[])exp, (boolean[])was);
+ else if (exp instanceof short[] && was instanceof short[])
+ assertEqualsArray((short[])exp, (short[])was);
+ else if (exp instanceof int[] && was instanceof int[])
+ assertEqualsArray((int[])exp, (int[])was);
+ else if (exp instanceof long[] && was instanceof long[])
+ assertEqualsArray((long[])exp, (long[])was);
+ else if (exp instanceof float[] && was instanceof float[])
+ assertEqualsArray((float[])exp, (float[])was);
+ else if (exp instanceof double[] && was instanceof double[])
+ assertEqualsArray((double[])exp, (double[])was);
+ else TestCase.assertEquals(exp, was);
+ }
+
+ private static void assertEqualsArray(Object[] exp, Object[] was)
+ {
+ if (exp == null && was == null)
+ return;
+
+ if (exp != null && was != null)
+ {
+ if (exp.length != was.length)
+ {
+ fail("Expected <" + exp.length + "> array items, but was
<" + was.length + ">");
+ }
+ else
+ {
+ for (int i = 0; i < exp.length; i++)
+ {
+
+ Object compExp = exp[i];
+ Object compWas = was[i];
+ assertEquals(compExp, compWas);
+ }
+ }
+ }
+ else if (exp == null)
+ {
+ fail("Expected a null array, but was: " + Arrays.asList(was));
+ }
+ else if (was == null)
+ {
+ fail("Expected " + Arrays.asList(exp) + ", but was: null");
+ }
+ }
+
+ private static void assertEqualsArray(byte[] exp, byte[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(boolean[] exp, boolean[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(short[] exp, short[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(int[] exp, int[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(long[] exp, long[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(float[] exp, float[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(double[] exp, double[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ /** Removes whitespace text nodes if they have an element sibling.
+ */
+ private static void normalizeWhitspace(Element element, boolean ignoreWhitespace)
+ {
+ boolean hasChildElement = false;
+ ArrayList toDetach = new ArrayList();
+
+ String nodeName = element.getNodeName();
+ NodeList childNodes = element.getChildNodes();
+ for (int i = 0; i < childNodes.getLength(); i++)
+ {
+ Node node = childNodes.item(i);
+ if (node.getNodeType() == Node.TEXT_NODE)
+ {
+ String nodeValue = node.getNodeValue();
+ if (nodeValue.trim().length() == 0)
+ toDetach.add(node);
+ }
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ normalizeWhitspace((Element)node, ignoreWhitespace);
+ hasChildElement = true;
+ }
+ }
+
+ // remove whitespace nodes
+ if (hasChildElement || ignoreWhitespace)
+ {
+ Iterator it = toDetach.iterator();
+ while (it.hasNext())
+ {
+ Node node = (Node)it.next();
+ element.removeChild(node);
+ }
+ }
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,207 @@
+/*
+ * 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.wsf.spi.test;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Hashtable;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.xml.ws.Service;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.wsf.spi.utils.ObjectNameFactory;
+
+/**
+ * A JBossWS test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public class JBossWSTestHelper
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(JBossWSTestHelper.class);
+
+ private static MBeanServerConnection server;
+ private static String integrationTarget;
+
+ /** Deploy the given archive
+ */
+ public void deploy(String archive) throws Exception
+ {
+ URL url = getArchiveURL(archive);
+ getDeployer().deploy(url);
+ }
+
+ /** Undeploy the given archive
+ */
+ public void undeploy(String archive) throws Exception
+ {
+ URL url = getArchiveURL(archive);
+ getDeployer().undeploy(url);
+ }
+
+ /** True, if -Djbossws.integration.target=jboss50 */
+ public boolean isTargetJBoss50()
+ {
+ String target = getIntegrationTarget();
+ return "jboss50".equals(target);
+ }
+
+ /** True, if -Djbossws.integration.target=jboss42 */
+ public boolean isTargetJBoss42()
+ {
+ String target = getIntegrationTarget();
+ return "jboss42".equals(target);
+ }
+
+ /** True, if -Djbossws.integration.target=jboss40 */
+ public boolean isTargetJBoss40()
+ {
+ String target = getIntegrationTarget();
+ return "jboss40".equals(target);
+ }
+
+ public boolean isIntegrationNative()
+ {
+ String vendor = Service.class.getPackage().getImplementationVendor();
+ return vendor.startsWith("JBoss");
+ }
+
+ public boolean isIntegrationSunRI()
+ {
+ String vendor = Service.class.getPackage().getImplementationVendor();
+ return vendor.startsWith("Sun Microsystems");
+ }
+
+ public boolean isIntegrationXFire()
+ {
+ throw new NotImplementedException();
+ }
+
+ /**
+ * Get the JBoss server host from system property "jboss.bind.address"
+ * This defaults to "localhost"
+ */
+ public static String getServerHost()
+ {
+ String hostName = System.getProperty("jboss.bind.address",
"localhost");
+ return hostName;
+ }
+
+ public static MBeanServerConnection getServer()
+ {
+ if (server == null)
+ {
+ Hashtable jndiEnv = null;
+ try
+ {
+ InitialContext iniCtx = new InitialContext();
+ jndiEnv = iniCtx.getEnvironment();
+ server =
(MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ }
+ catch (NamingException ex)
+ {
+ throw new RuntimeException("Cannot obtain MBeanServerConnection using
jndi props: " + jndiEnv, ex);
+ }
+ }
+ return server;
+ }
+
+ private TestDeployer getDeployer()
+ {
+ return new TestDeployerJBoss(getServer());
+ }
+
+ public String getIntegrationTarget()
+ {
+ if (integrationTarget == null)
+ {
+ integrationTarget = System.getProperty("jbossws.integration.target");
+
+ if (integrationTarget == null)
+ throw new IllegalStateException("Cannot obtain
jbossws.integration.target");
+
+ // Read the JBoss SpecificationVersion
+ String jbossVersion = null;
+ try
+ {
+ ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ jbossVersion = (String)getServer().getAttribute(oname,
"SpecificationVersion");
+ if (jbossVersion.startsWith("5.0"))
+ jbossVersion = "jboss50";
+ else if (jbossVersion.startsWith("4.2"))
+ jbossVersion = "jboss42";
+ else if (jbossVersion.startsWith("4.0"))
+ jbossVersion = "jboss40";
+ else throw new RuntimeException("Unsupported jboss version: " +
jbossVersion);
+ }
+ catch (Throwable th)
+ {
+ // ignore, we are not running on jboss-4.2 or greater
+ }
+
+ if (jbossVersion != null && jbossVersion.equals(integrationTarget) ==
false)
+ throw new IllegalStateException("Integration target mismatch, using:
" + jbossVersion);
+ }
+ return integrationTarget;
+ }
+
+ /** Try to discover the URL for the deployment archive */
+ public URL getArchiveURL(String archive) throws MalformedURLException
+ {
+ URL url = null;
+ try
+ {
+ url = new URL(archive);
+ }
+ catch (MalformedURLException ignore)
+ {
+ // ignore
+ }
+
+ if (url == null)
+ {
+ File file = new File(archive);
+ if (file.exists())
+ url = file.toURL();
+ }
+
+ if (url == null)
+ {
+ File file = new File("libs/" + archive);
+ if (file.exists())
+ url = file.toURL();
+ }
+
+ if (url == null)
+ throw new IllegalArgumentException("Cannot obtain URL for: " +
archive);
+
+ return url;
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,136 @@
+/*
+ * 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.wsf.spi.test;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.NamingException;
+
+import org.jboss.logging.Logger;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * A test setup that deploys/undeploys archives
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public class JBossWSTestSetup extends TestSetup
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(JBossWSTestSetup.class);
+
+ private JBossWSTestHelper delegate = new JBossWSTestHelper();
+ private String[] archives = new String[0];
+
+ public JBossWSTestSetup(Class testClass, String archiveList)
+ {
+ super(new TestSuite(testClass));
+ getArchiveArray(archiveList);
+ }
+
+ public JBossWSTestSetup(Test test, String archiveList)
+ {
+ super(test);
+ getArchiveArray(archiveList);
+ }
+
+ public JBossWSTestSetup(Test test)
+ {
+ super(test);
+ }
+
+ private void getArchiveArray(String archiveList)
+ {
+ if (archiveList != null)
+ {
+ StringTokenizer st = new StringTokenizer(archiveList, ", ");
+ archives = new String[st.countTokens()];
+
+ for (int i = 0; i < archives.length; i++)
+ archives[i] = st.nextToken();
+ }
+ }
+
+ protected void setUp() throws Exception
+ {
+ // verify integration target
+ String integrationTarget = delegate.getIntegrationTarget();
+ log.debug("Integration target: " + integrationTarget);
+
+ List clientJars = new ArrayList();
+ for (int i = 0; i < archives.length; i++)
+ {
+ String archive = archives[i];
+ try
+ {
+ delegate.deploy(archive);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ delegate.undeploy(archive);
+ }
+
+ if (archive.endsWith("-client.jar"))
+ {
+ URL archiveURL = delegate.getArchiveURL(archive);
+ clientJars.add(archiveURL);
+ }
+ }
+
+ // add the client jars to the classloader
+ if (!clientJars.isEmpty())
+ {
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ URL[] urls = new URL[clientJars.size()];
+ for (int i = 0; i < clientJars.size(); i++)
+ {
+ urls[i] = (URL)clientJars.get(i);
+ }
+ URLClassLoader cl = new URLClassLoader(urls, parent);
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ protected void tearDown() throws Exception
+ {
+ for (int i = 0; i < archives.length; i++)
+ {
+ String archive = archives[archives.length - i - 1];
+ delegate.undeploy(archive);
+ }
+ }
+
+ public MBeanServerConnection getServer() throws NamingException
+ {
+ return delegate.getServer();
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployer.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployer.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployer.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,41 @@
+/*
+ * 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.wsf.spi.test;
+
+import java.net.URL;
+
+/**
+ * WS test deployer
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 16-May-2006
+ */
+public interface TestDeployer
+{
+ /** Deploy the given archive
+ */
+ void deploy(URL archive) throws Exception;
+
+ /** Undeploy the given archive
+ */
+ void undeploy(URL archive) throws Exception;
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,118 @@
+/*
+ * 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.wsf.spi.test;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+import java.security.Principal;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+
+/**
+ * A JBossWS test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public class TestDeployerJBoss implements TestDeployer
+{
+ private static final String MAIN_DEPLOYER =
"jboss.system:service=MainDeployer";
+
+ private MBeanServerConnection server;
+ private String username;
+ private String password;
+
+ public TestDeployerJBoss(MBeanServerConnection server)
+ {
+ this.server = server;
+
+ username = System.getProperty("jmx.authentication.username");
+ if ("${jmx.authentication.username}".equals(username))
+ username = null;
+
+ password = System.getProperty("jmx.authentication.password");
+ if ("${jmx.authentication.password}".equals(password))
+ password = null;
+ }
+
+ public void deploy(URL url) throws Exception
+ {
+ invokeMainDeployer("deploy", url);
+ }
+
+ public void undeploy(URL url) throws Exception
+ {
+ invokeMainDeployer("undeploy", url);
+ }
+
+ private void invokeMainDeployer(String methodName, URL url) throws Exception
+ {
+ Principal prevUsername = null;
+ Object prevPassword = null;
+
+ SecurityAdaptor securityAdaptor = SecurityAdaptorFactory.getSecurityAdaptor();
+ if (username != null || password != null)
+ {
+ prevUsername = securityAdaptor.getPrincipal();
+ prevPassword = securityAdaptor.getCredential();
+ securityAdaptor.setPrincipal(new SimplePrincipal(username));
+ securityAdaptor.setCredential(password);
+ }
+
+ try
+ {
+ server.invoke(new ObjectName(MAIN_DEPLOYER), methodName, new Object[] { url },
new String[] { "java.net.URL" });
+ }
+ finally
+ {
+ if (username != null || password != null)
+ {
+ securityAdaptor.setPrincipal(prevUsername);
+ securityAdaptor.setCredential(prevPassword);
+ }
+ }
+ }
+
+ public static class SimplePrincipal implements Principal, Serializable
+ {
+ private String name;
+
+ public SimplePrincipal(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/XOPTestSupport.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/XOPTestSupport.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/XOPTestSupport.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,106 @@
+/*
+ * 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.wsf.spi.test;
+
+// $Id$
+
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.activation.DataHandler;
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @since 22-Sep-2006
+ */
+public class XOPTestSupport
+{
+
+ public static byte[] getBytesFromFile(File file) throws IOException
+ {
+ InputStream is = new FileInputStream(file);
+
+ long length = file.length();
+ byte[] bytes = new byte[(int)length];
+
+ int offset = 0;
+ int numRead = 0;
+ while (offset < bytes.length && (numRead = is.read(bytes, offset,
bytes.length - offset)) >= 0)
+ {
+ offset += numRead;
+ }
+
+ is.close();
+ return bytes;
+ }
+
+ public static Image createTestImage(File imgFile)
+ {
+ Image image = null;
+ try
+ {
+ URL url = imgFile.toURL();
+
+ image = null;
+ try
+ {
+ image = Toolkit.getDefaultToolkit().createImage(url);
+ }
+ catch (Throwable th)
+ {
+ //log.warn("Cannot create Image: " + th);
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ return image;
+ }
+
+ public static StreamSource createTestSource()
+ {
+ return new StreamSource(new
ByteArrayInputStream("<some><nestedXml/></some>".getBytes()));
+ }
+
+ public static DataHandler createDataHandler(File imgFile)
+ {
+ try
+ {
+ URL url = imgFile.toURL();
+ return new DataHandler(url);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/test/XOPTestSupport.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumer.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumer.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumer.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,191 @@
+/*
+ * 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.wsf.tools;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.wsf.spi.utils.ServiceLoader;
+
+/**
+ * WSContractConsumer is responsible for generating JAX-WS client and server
+ * artifacts from the specified WSDL file. To implement a client, one would use
+ * the generated ___Service.java file. For a server, one only needs to provide
+ * an implementation class that implements the generated service endpoint
+ * interface.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public abstract class WSContractConsumer
+{
+ private static String DEFAULT_PROVIDER =
"org.jboss.ws.tools.jaxws.impl.SunRIConsumerFactoryImpl";
+ public static final String PROVIDER_PROPERTY =
"org.jboss.wsf.tools.ConsumerFactoryImpl";
+
+ /**
+ * Obtain a new instance of a WSContractProvider. This will use the current
+ * thread's context class loader to locate the WSContractProviderFactory
+ * implementation.
+ *
+ * @return a new WSContractProvider
+ */
+ public static WSContractConsumer newInstance()
+ {
+ return newInstance(Thread.currentThread().getContextClassLoader());
+ }
+
+ /**
+ * Obtain a new instance of a WSContractConsumer. The specified ClassLoader will be
used to
+ * locate the WebServiceImporterProvide implementation
+ *
+ * @param loader the ClassLoader to use
+ * @return a new WSContractConsumer
+ */
+ public static WSContractConsumer newInstance(ClassLoader loader)
+ {
+ ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(loader);
+ WSContractConsumerFactory factory =
(WSContractConsumerFactory)ServiceLoader.loadService(PROVIDER_PROPERTY,
DEFAULT_PROVIDER);
+ return factory.createConsumer();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(oldLoader);
+ }
+ }
+
+ /**
+ * Specifies the JAX-WS and JAXB binding files to use on import operations.
+ *
+ * @param bindingFiles list of JAX-WS or JAXB binding files
+ */
+ public abstract void setBindingFiles(List<File> bindingFiles);
+
+ /**
+ * Sets the OASIS XML Catalog file to use for entity resolution.
+ *
+ * @param catalog the OASIS XML Catalog file
+ */
+ public abstract void setCatalog(File catalog);
+
+ /**
+ * Sets the main output directory. If the directory does not exist, it will be
created.
+ *
+ * @param directory the root directory for generated files
+ */
+ public abstract void setOutputDirectory(File directory);
+
+ /**
+ * Sets the source directory. This directory will contain any generated Java source.
+ * If the directory does not exist, it will be created. If not specified,
+ * the output directory will be used instead.
+ *
+ * @param directory the root directory for generated source code
+ */
+ public abstract void setSourceDirectory(File directory);
+
+ /**
+ * Enables/Disables Java source generation.
+ *
+ * @param generateSource whether or not to generate Java source.
+ */
+ public abstract void setGenerateSource(boolean generateSource);
+
+ /**
+ * Sets the target package for generated source. If not specified the default
+ * is based off of the XML namespace.
+ *
+ * @param targetPackage the target package for generated source
+ */
+ public abstract void setTargetPackage(String targetPackage);
+
+ /**
+ * Sets the @(a)WebService.wsdlLocation and @(a)WebServiceClient.wsdlLocation attributes
to a custom value.
+ *
+ * @param wsdlLocation the custom WSDL location to use in generated source
+ */
+ public abstract void setWsdlLocation(String wsdlLocation);
+
+ /**
+ * Sets the PrintStream to use for status feedback. The simplest example
+ * would be to use System.out.
+ *
+ * @param messageStream the stream to use for status messages:
+ */
+ public abstract void setMessageStream(PrintStream messageStream);
+
+ /**
+ * Sets the additional classpath to use if/when invoking the Java compiler.
+ * Typically an implementation will use the system
<code>java.class.path</code>
+ * property. So for most normal applications this method is not needed. However,
+ * if this API is being used from an isolated classloader, then it needs to
+ * be called in order to reference all jars that are required by the
+ * implementation.
+ *
+ * @param classPath a list of strings where each entry references a
+ * single jar or directory
+ */
+ public abstract void setAdditionalCompilerClassPath(List<String> classPath);
+
+ /**
+ * Set the target JAX-WS specification target. Defaults to
<code>2.0</code>
+ * @param target the JAX-WS specification version. Allowed values are 2.0, 2.1
+ */
+ public abstract void setTarget(String target);
+
+ /**
+ * Generate the required artifacts using the specified WSDL URL. This method
+ * may be called more than once, although this is probably not desireable
+ *
+ * @param wsdl the URL of the WSDL
+ */
+ public abstract void consume(URL wsdl);
+
+ /**
+ * Generate the required artifacts using the specified WSDL. This method
+ * may be called more than once, although this is probably not desireable.
+ * The passed string is expect to either be a valid URL, or a local file path.
+ *
+ * @param wsdl a URL or local file path
+ * @throws MalformedURLException if wsdl is not a legal URL or local file
+ */
+ public void consume(String wsdl) throws MalformedURLException
+ {
+ URL url = null;
+ try
+ {
+ url = new URL(wsdl);
+ }
+ catch (MalformedURLException e)
+ {
+ File file = new File(wsdl);
+ url = file.toURL();
+ }
+
+ consume(url);
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumerFactory.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumerFactory.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumerFactory.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,40 @@
+/*
+ * 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.wsf.tools;
+
+import org.jboss.wsf.tools.WSContractConsumer;
+
+/**
+ * Creates WSContractConsumer implementations.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ */
+public interface WSContractConsumerFactory
+{
+ /**
+ * Create a new WSContractConsumer. There are no restrictions on how this
+ * should be performed.
+ *
+ * @return a new WSContractConsumer
+ */
+ public WSContractConsumer createConsumer();
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractConsumerFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProvider.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProvider.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProvider.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,157 @@
+package org.jboss.wsf.tools;
+
+import java.io.File;
+import java.io.PrintStream;
+
+import org.jboss.wsf.spi.utils.ServiceLoader;
+
+/**
+ * WSContractProvider is responsible for generating the required portable
+ * JAX-WS artifacts for a service endpoint implementation. This includes class
+ * files for wrapper types and fault beans. WSDL may be optionally generated as
+ * well using this API.
+ *
+ * <p>The following example generates class files, source files and WSDL for an
+ * endpoint:</p>
+ * <pre>
+ * WSContractProvider provider = WSContractProvider.newInstance();
+ * provider.setGenerateSource(true);
+ * provider.setGenerateWsdl(true);
+ * provider.setOutputDirectory(new File("output"));
+ * provider.setMessageStream(System.out);
+ * provider.provide(TestMe.class);
+ * </pre>
+ *
+ * <p>Thread-Safety:</p>
+ * This class expects to be thread-confined, so it can not be shared between threads.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ */
+public abstract class WSContractProvider
+{
+ private static String DEFAULT_PROVIDER =
"org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl";
+ public static final String PROVIDER_PROPERTY =
"org.jboss.wsf.tools.ProviderFactoryImpl";
+
+ protected WSContractProvider()
+ {
+
+ }
+
+ /**
+ * Obtain a new instance of a WSContractProvider. This will use the current
+ * thread's context class loader to locate the WSContractProviderFactory
+ * implementation.
+ *
+ * @return a new WSContractProvider
+ */
+ public static WSContractProvider newInstance()
+ {
+ return newInstance(Thread.currentThread().getContextClassLoader());
+ }
+
+ /**
+ * Obtain a new instance of a WSContractProvider. The specified ClassLoader will be
used to
+ * locate the WSContractProviderFactory implementation
+ *
+ * @param loader the ClassLoader to use
+ * @return a new WSContractProvider
+ */
+ public static WSContractProvider newInstance(ClassLoader loader)
+ {
+ ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(loader);
+ WSContractProviderFactory factory =
(WSContractProviderFactory)ServiceLoader.loadService(PROVIDER_PROPERTY,
DEFAULT_PROVIDER);
+ return factory.createProvider(loader);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(oldLoader);
+ }
+ }
+
+ /**
+ * Enables/Disables WSDL generation.
+ *
+ * @param generateWsdl whether or not to generate WSDL
+ */
+ public abstract void setGenerateWsdl(boolean generateWsdl);
+
+ /**
+ * Enables/Disables Java source generation.
+ *
+ * @param generateSource whether or not to generate Java source.
+ */
+ public abstract void setGenerateSource(boolean generateSource);
+
+ /**
+ * Sets the main output directory. If the directory does not exist, it will be
created.
+ *
+ * @param directory the root directory for generated files
+ */
+ public abstract void setOutputDirectory(File directory);
+
+ /**
+ * Sets the resource directory. This directory will contain any generated
+ * WSDL and XSD files. If the directory does not exist, it will be created.
+ * If not specified, the output directory will be used instead.
+ *
+ * @param directory the root directory for generated resource files
+ */
+ public abstract void setResourceDirectory(File directory);
+
+ /**
+ * Sets the source directory. This directory will contain any generated Java source.
+ * If the directory does not exist, it will be created. If not specified,
+ * the output directory will be used instead.
+ *
+ * @param directory the root directory for generated source code
+ */
+ public abstract void setSourceDirectory(File directory);
+
+ /**
+ * Sets the ClassLoader used to discover types. This defaults to the one used
+ * in instantiation.
+ *
+ * @param loader the ClassLoader to use
+ */
+ public abstract void setClassLoader(ClassLoader loader);
+
+ /**
+ * Generates artifacts using the current settings. This method may be invoked
+ * more than once (e.g. multiple endpoints).
+ *
+ * @param endpointClass the name of the endpoint implementation bean
+ * @throws RuntimeException if any error occurs during processing, or the class is not
found
+ */
+ public abstract void provide(String endpointClass);
+
+ /**
+ * Generates artifacts using the current settings. This method may be invoked
+ * more than once (e.g. multiple endpoints).
+ *
+ * @param endpointClass the endpoint implementation bean
+ * @throws RuntimeException if any error occurs during processing
+ */
+ public abstract void provide(Class<?> endpointClass);
+
+ /**
+ * Sets the PrintStream to use for status feedback. The simplest example
+ * would be to use System.out.
+ *
+ * <p>Example output:</p>
+ * <pre>
+ * Generating WSDL:
+ * TestMeService.wsdl
+ * Writing Source:
+ * org/jboss/ws/tools/jaxws/TestMe.java
+ * org/jboss/ws/tools/jaxws/TestMeResponse.java
+ * Writing Classes:
+ * org/jboss/ws/tools/jaxws/TestMe.class
+ * org/jboss/ws/tools/jaxws/TestMeResponse.class
+ * </pre>
+ * @param messageStream the stream to use for status messages:
+ */
+ public abstract void setMessageStream(PrintStream messageStream);
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProviderFactory.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProviderFactory.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProviderFactory.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,43 @@
+/*
+ * 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.wsf.tools;
+
+import org.jboss.wsf.tools.WSContractProvider;
+
+/**
+ * Creates WSContractProvider implementations.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ */
+public interface WSContractProviderFactory
+{
+ /**
+ * Create a new WSContractProvider. There are no restrictions on how this
+ * should be performed. The passed ClassLoader is the one used in
+ * {@link WSContractProvider#newInstance(ClassLoader)}. This loader
+ * should be made available to the generated WSContractProvider.
+ *
+ * @param loader the ClassLoader for type discovery
+ * @return a new WSContractProvider
+ */
+ public WSContractProvider createProvider(ClassLoader loader);
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/WSContractProviderFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSConsumeTask.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSConsumeTask.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSConsumeTask.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,323 @@
+/*
+ * 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.wsf.tools.ant;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.ExecuteJava;
+import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Path;
+import org.jboss.wsf.tools.WSContractConsumer;
+
+/**
+ * Ant task which consumes a Web Service contract.
+ *
+ * <table border="1">
+ * <tr align="left" BGCOLOR="#CCCCFF"
CLASS="TableHeadingColor"><th>Attribute</th><th>Description</th><th>Default</th></tr>
+ * <tr><td>fork</td><td>Whether or not to run the generation
task in a separate VM.</td><td>true</td></tr>
+ * <tr><td>keep</td><td>Keep/Enable Java source code
generation.</td><td>false</td></tr>
+ * <tr><td>catalog</td><td> Oasis XML Catalog file for entity
resolution</td><td>none</td></tr>
+ * <tr><td>package</td><td> The target Java package for
generated code.</td><td>generated</td></tr>
+ * <tr><td>binding</td><td>A JAX-WS or JAXB binding
file</td><td>none</td></tr>
+ * <tr><td>wsdlLocation</td><td>Value to use for
@(a)WebService.wsdlLocation</td><td>generated</td></tr>
+ * <tr><td>destdir</td><td>The output directory for generated
artifacts.</td><td>"output"</td></tr>
+ * <tr><td>sourcedestdir</td><td>The output directory for Java
source.</td><td>value of destdir</td></tr>
+ * <tr><td>target</td><td>The JAX-WS specification
target</td><td>2.0 | 2.1</td></tr>
+ * <tr><td>verbose</td><td>Enables more informational output
about cmd progress.</td><td>false</td><tr>
+ * <tr><td>wsdl*</td><td>The WSDL file or
URL</td><td>n/a</td><tr>
+ * </table>
+ * <b>* = required.</b>
+ *
+ * <p>Example:
+ *
+ * <pre>
+ * <WSConsumeTask
+ * fork="true"
+ * verbose="true"
+ * destdir="output"
+ * sourcedestdir="gen-src"
+ * keep="true"
+ * wsdllocation="handEdited.wsdl"
+ * wsdl="foo.wsdl">
+ * <binding dir="binding-files"
includes="*.xml" excludes="bad.xml"/>
+ * </wsimport>
+ * </pre>
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class WSConsumeTask extends Task
+{
+ private CommandlineJava command = new CommandlineJava();
+ private String wsdl;
+ private File destdir;
+ private File sourcedestdir;
+ private List<File> bindingFiles = new ArrayList<File>();
+ private File catalog;
+ private String wsdlLocation;
+ private String targetPackage;
+ private boolean keep;
+ private boolean verbose;
+ private boolean fork;
+ private boolean debug;
+ private String target;
+
+ // Not actually used right now
+ public void setDebug(boolean debug)
+ {
+ this.debug = debug;
+ }
+
+ public Commandline.Argument createJvmarg()
+ {
+ return command.createVmArgument();
+ }
+
+ public void setBinding(File bindingFile)
+ {
+ bindingFiles.add(bindingFile);
+ }
+
+ public void setCatalog(File catalog)
+ {
+ this.catalog = catalog;
+ }
+
+ public void setDestdir(File destdir)
+ {
+ this.destdir = destdir;
+ }
+
+ public void setFork(boolean fork)
+ {
+ this.fork = fork;
+ }
+
+ public void setKeep(boolean keep)
+ {
+ this.keep = keep;
+ }
+
+ public void setSourcedestdir(File sourcedestdir)
+ {
+ this.sourcedestdir = sourcedestdir;
+ }
+
+ public void setTarget(String target)
+ {
+ this.target = target;
+ }
+
+ public void setPackage(String targetPackage)
+ {
+ this.targetPackage = targetPackage;
+ }
+
+ public void setVerbose(boolean verbose)
+ {
+ this.verbose = verbose;
+ }
+
+ public void setWsdl(String wsdl)
+ {
+ this.wsdl = wsdl;
+ }
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ this.wsdlLocation = wsdlLocation;
+ }
+
+ public void addConfiguredBinding(FileSet fs)
+ {
+ DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+ File baseDir = ds.getBasedir();
+ for (String file : ds.getIncludedFiles())
+ {
+ bindingFiles.add(new File(baseDir, file));
+ }
+ }
+
+ public void executeNonForked()
+ {
+ ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
+ ClassLoader antLoader = this.getClass().getClassLoader();
+ Thread.currentThread().setContextClassLoader(antLoader);
+ try
+ {
+ WSContractConsumer importer = WSContractConsumer.newInstance();
+ importer.setGenerateSource(keep);
+ if (destdir != null)
+ importer.setOutputDirectory(destdir);
+ if (sourcedestdir != null)
+ importer.setSourceDirectory(sourcedestdir);
+ if (targetPackage != null)
+ importer.setTargetPackage(targetPackage);
+ if (wsdlLocation != null)
+ importer.setWsdlLocation(wsdlLocation);
+ if (catalog != null)
+ importer.setCatalog(catalog);
+ if (bindingFiles != null && bindingFiles.size() > 0)
+ importer.setBindingFiles(bindingFiles);
+ if (target != null)
+ importer.setTarget(target);
+
+ log("Consuming wsdl: " + wsdl, Project.MSG_INFO);
+
+ if (verbose)
+ {
+ importer.setMessageStream(new PrintStream(new LogOutputStream(this,
Project.MSG_INFO)));
+ }
+
+ try
+ {
+ importer.setAdditionalCompilerClassPath(getTaskClassPathStrings());
+ importer.consume(wsdl);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new BuildException(e, getLocation());
+ }
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(prevCL);
+ }
+ }
+
+ public void execute() throws BuildException
+ {
+ if (wsdl == null)
+ throw new BuildException("The wsdl attribute must be specified!",
getLocation());
+
+ if (fork)
+ executeForked();
+ else executeNonForked();
+ }
+
+ private Path getTaskClassPath()
+ {
+ // Why is everything in the Ant API a big hack???
+ ClassLoader cl = this.getClass().getClassLoader();
+ if (cl instanceof AntClassLoader)
+ {
+ return new Path(getProject(), ((AntClassLoader)cl).getClasspath());
+ }
+
+ return new Path(getProject());
+ }
+
+ private List<String> getTaskClassPathStrings()
+ {
+ // Why is everything in the Ant API a big hack???
+ List<String> strings = new ArrayList<String>();
+ ClassLoader cl = this.getClass().getClassLoader();
+ if (cl instanceof AntClassLoader)
+ {
+ for (String string :
((AntClassLoader)cl).getClasspath().split(File.pathSeparator))
+ strings.add(string);
+ }
+
+ return strings;
+ }
+
+ private void executeForked() throws BuildException
+ {
+ command.setClassname(org.jboss.wsf.tools.cmd.WSConsume.class.getName());
+
+ Path path = command.createClasspath(getProject());
+ path.append(getTaskClassPath());
+
+ if (keep)
+ command.createArgument().setValue("-k");
+
+ for (File file : bindingFiles)
+ {
+ command.createArgument().setValue("-b");
+ command.createArgument().setFile(file);
+ }
+
+ if (catalog != null)
+ {
+ command.createArgument().setValue("-c");
+ command.createArgument().setFile(catalog);
+ }
+
+ if (targetPackage != null)
+ {
+ command.createArgument().setValue("-p");
+ command.createArgument().setValue(targetPackage);
+ }
+
+ if (wsdlLocation != null)
+ {
+ command.createArgument().setValue("-w");
+ command.createArgument().setValue(wsdlLocation);
+ }
+
+ if (destdir != null)
+ {
+ command.createArgument().setValue("-o");
+ command.createArgument().setFile(destdir);
+ }
+
+ if (sourcedestdir != null)
+ {
+ command.createArgument().setValue("-s");
+ command.createArgument().setFile(sourcedestdir);
+ }
+
+ if (target != null)
+ {
+ command.createArgument().setValue("-t");
+ command.createArgument().setValue(target);
+ }
+
+ if (verbose)
+ command.createArgument().setValue("-v");
+
+ command.createArgument().setValue(wsdl);
+
+ log("Consuming wsdl: " + wsdl, Project.MSG_INFO);
+
+ if (verbose)
+ log("Command invoked: " + command.getJavaCommand().toString());
+
+ ExecuteJava execute = new ExecuteJava();
+ execute.setClasspath(path);
+ execute.setJavaCommand(command.getJavaCommand());
+ if (execute.fork(this) != 0)
+ throw new BuildException("Could not invoke WSConsumeTask",
getLocation());
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSConsumeTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSProvideTask.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSProvideTask.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSProvideTask.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,294 @@
+/*
+* 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.wsf.tools.ant;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.ExecuteJava;
+import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
+import org.jboss.wsf.tools.WSContractProvider;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.URLClassLoader;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.util.StringTokenizer;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Ant task which invokes provides a Web Service contract and portable JAX-WS wrapper
classes.
+ *
+ * <table border="1">
+ * <tr align="left" BGCOLOR="#CCCCFF"
CLASS="TableHeadingColor"><th>Attribute</th><th>Description</th><th>Default</th></tr>
+ * <tr><td>fork</td><td>Whether or not to run the generation
task in a separate VM.</td><td>true</td></tr>
+ * <tr><td>keep</td><td>Keep/Enable Java source code
generation.</td><td>false</td></tr>
+ * <tr><td>destdir</td><td>The output directory for generated
artifacts.</td><td>"output"</td></tr>
+ * <tr><td>resourcedestdir</td><td>The output directory for
resource artifacts (WSDL/XSD).</td><td>value of destdir</td></tr>
+ * <tr><td>sourcedestdir</td><td>The output directory for Java
source.</td><td>value of destdir</td></tr>
+ * <tr><td>genwsdl</td><td>Whether or not to generate
WSDL.</td><td>false</td><tr>
+ * <tr><td>verbose</td><td>Enables more informational output
about cmd progress.</td><td>false</td><tr>
+ * <tr><td>sei*</td><td>Service Endpoint
Implementation.</td><td></td><tr>
+ * <tr><td>classpath</td><td>The classpath that contains the
service endpoint implementation.</td><td>""</tr>
+ * </table>
+ * <b>* = required.</b>
+ *
+ * <p>Example:
+ *
+ * <pre>
+ * <target name="test-wsproivde"
depends="init">
+ * <taskdef name="WSProvideTask"
classname="org.jboss.wsf.tools.ant.WSProvideTask">
+ * <classpath refid="core.classpath"/>
+ * </taskdef>
+ * <WSProvideTask
+ * fork="false"
+ * keep="true"
+ * destdir="out"
+ * resourcedestdir="out-resource"
+ * sourcedestdir="out-source"
+ * genwsdl="true"
+ * verbose="true"
+ *
sei="org.jboss.test.ws.jaxws.jsr181.soapbinding.DocWrappedServiceImpl">
+ * <classpath>
+ * <pathelement
path="${tests.output.dir}/classes"/>
+ * </classpath>
+ * </WSProvideTask>
+ * </target>
+ * </pre>
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class WSProvideTask extends Task
+{
+ private Path classpath = new Path(getProject());
+ private CommandlineJava command = new CommandlineJava();
+ private String sei = null;
+ private File destdir = null;
+ private File resourcedestdir = null;
+ private File sourcedestdir = null;
+ private boolean keep = false;
+ private boolean genwsdl = false;
+ private boolean verbose = false;
+ private boolean fork = false;
+ private boolean debug = false;
+
+ // Not actually used right now
+ public void setDebug(boolean debug)
+ {
+ this.debug = debug;
+ }
+
+ public Commandline.Argument createJvmarg()
+ {
+ return command.createVmArgument();
+ }
+
+ public void setClasspath(Path classpath)
+ {
+ this.classpath = classpath;
+ }
+
+ public void setClasspathRef(Reference ref)
+ {
+ createClasspath().setRefid(ref);
+ }
+
+ public Path createClasspath()
+ {
+ return classpath;
+ }
+
+ public void setDestdir(File destdir)
+ {
+ this.destdir = destdir;
+ }
+
+ public void setKeep(boolean keep)
+ {
+ this.keep = keep;
+ }
+
+ public void setSei(String sei)
+ {
+ this.sei = sei;
+ }
+
+ public void setFork(boolean fork)
+ {
+ this.fork = fork;
+ }
+
+ public void setResourcedestdir(File resourcedestdir)
+ {
+ this.resourcedestdir = resourcedestdir;
+ }
+
+ public void setSourcedestdir(File sourcedestdir)
+ {
+ this.sourcedestdir = sourcedestdir;
+ }
+
+ public void setVerbose(boolean verbose)
+ {
+ this.verbose = verbose;
+ }
+
+ public void setGenwsdl(boolean genwsdl)
+ {
+ this.genwsdl = genwsdl;
+ }
+
+ private ClassLoader getClasspathLoader(ClassLoader parent)
+ {
+ AntClassLoader antLoader = new AntClassLoader(parent, getProject(), classpath, false);
+
+ // It's necessary to wrap it into an URLLoader in order to extract that
information
+ // within the actual provider impl.
+ // See SunRIProviderImpl for instance
+ List<URL> urls = new ArrayList<URL>();
+ StringTokenizer tok = new StringTokenizer(antLoader.getClasspath(), File.separator);
+ while(tok.hasMoreTokens())
+ {
+ try
+ {
+ urls.add(new URL(tok.nextToken()));
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalArgumentException("Failed to wrap classloader", e);
+ }
+
+ }
+
+ ClassLoader wrapper = new URLClassLoader(urls.toArray(new URL[0]), antLoader);
+ return wrapper;
+ }
+
+ public void executeNonForked()
+ {
+ ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
+ ClassLoader antLoader = this.getClass().getClassLoader();
+ Thread.currentThread().setContextClassLoader(antLoader);
+ try
+ {
+ WSContractProvider gen = WSContractProvider.newInstance(
+ getClasspathLoader(antLoader)
+ );
+ if (verbose)
+ gen.setMessageStream(new PrintStream(new LogOutputStream(this,
Project.MSG_INFO)));
+ gen.setGenerateSource(keep);
+ gen.setGenerateWsdl(genwsdl);
+ if (destdir != null)
+ gen.setOutputDirectory(destdir);
+ if (resourcedestdir != null)
+ gen.setResourceDirectory(resourcedestdir);
+ if (sourcedestdir != null)
+ gen.setSourceDirectory(sourcedestdir);
+
+ log("Generating from endpoint: " + sei, Project.MSG_INFO);
+
+ gen.provide(sei);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(prevCL);
+ }
+ }
+
+ public void execute() throws BuildException
+ {
+ if (sei == null)
+ throw new BuildException("The sei attribute must be specified!",
getLocation());
+
+ if (fork)
+ executeForked();
+ else
+ executeNonForked();
+ }
+
+ private Path getTaskClassPath()
+ {
+ // Why is everything in the Ant API a big hack???
+ ClassLoader cl = this.getClass().getClassLoader();
+ if (cl instanceof AntClassLoader)
+ {
+ return new Path(getProject(), ((AntClassLoader)cl).getClasspath());
+ }
+
+ return new Path(getProject());
+ }
+
+ private void executeForked() throws BuildException
+ {
+ command.setClassname(org.jboss.wsf.tools.cmd.WSProvide.class.getName());
+
+ Path path = command.createClasspath(getProject());
+ path.append(getTaskClassPath());
+ path.append(classpath);
+
+ if (keep)
+ command.createArgument().setValue("-k");
+
+ if (genwsdl)
+ command.createArgument().setValue("-w");
+
+ if (destdir != null)
+ {
+ command.createArgument().setValue("-o");
+ command.createArgument().setFile(destdir);
+ }
+ if (resourcedestdir != null)
+ {
+ command.createArgument().setValue("-r");
+ command.createArgument().setFile(resourcedestdir);
+ }
+ if (sourcedestdir != null)
+ {
+ command.createArgument().setValue("-s");
+ command.createArgument().setFile(sourcedestdir);
+ }
+
+ if (!verbose)
+ command.createArgument().setValue("-q");
+
+ // Always dump traces
+ command.createArgument().setValue("-t");
+ command.createArgument().setValue(sei);
+
+ if (verbose)
+ log("Command invoked: " + command.getJavaCommand().toString());
+
+ ExecuteJava execute = new ExecuteJava();
+ execute.setClasspath(path);
+ execute.setJavaCommand(command.getJavaCommand());
+ if (execute.fork(this) != 0)
+ throw new BuildException("Could not invoke WSProvideTask",
getLocation());
+ }
+}
\ No newline at end of file
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/ant/WSProvideTask.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSConsume.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSConsume.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSConsume.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,259 @@
+/*
+ * 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.wsf.tools.cmd;
+
+import gnu.getopt.Getopt;
+import gnu.getopt.LongOpt;
+import org.jboss.wsf.tools.WSContractConsumer;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * WSConsumeTask is a cmd line tool that generates portable JAX-WS artifacts
+ * from a WSDL file.
+ *
+ * <pre>
+ * usage: WSConsumeTask [options] <wsdl-url>
+ * options:
+ * -h, --help Show this help message
+ * -b, --binding=<file> One or more JAX-WS or JAXB binding files
+ * -k, --keep Keep/Generate Java source
+ * -c --catalog=<file> Oasis XML Catalog file for entity resolution
+ * -p --package=<name> The target package for generated source
+ * -w --wsdlLocation=<loc> Value to use for @(a)WebService.wsdlLocation
+ * -o, --output=<directory> The directory to put generated artifacts
+ * -s, --source=<directory> The directory to put Java source
+ * -t, --target=<2.0|2.1> The target specification target
+ * -q, --quiet Be somewhat more quiet
+ * -v, --verbose Show full exception stack traces
+ * -l, --load-consumer Load the consumer and exit (debug utility)
+ * </pre>
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class WSConsume
+{
+ private List<File> bindingFiles = new ArrayList<File>();
+ private boolean generateSource = false;
+ private File catalog = null;
+ private String targetPackage = null;
+ private String wsdlLocation = null;
+ private boolean quiet = false;
+ private boolean verbose = false;
+ private boolean loadConsumer = false;
+ private File outputDir = new File("output");
+ private File sourceDir = null;
+ private String target = null;
+
+ public static String PROGRAM_NAME = System.getProperty("program.name",
WSConsume.class.getName());
+
+ public static void main(String[] args)
+ {
+ WSConsume importer = new WSConsume();
+ URL wsdl = importer.parseArguments(args);
+ System.exit(importer.importServices(wsdl));
+ }
+
+ private URL parseArguments(String[] args)
+ {
+ String shortOpts = "b:c:p:w:o:s:t:khqvl";
+ LongOpt[] longOpts =
+ {
+ new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
+ new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
+ new LongOpt("package", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
+ new LongOpt("wsdlLocation", LongOpt.REQUIRED_ARGUMENT, null,
'w'),
+ new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
+ new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
+ new LongOpt("target", LongOpt.REQUIRED_ARGUMENT, null, 't'),
+ new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
+ new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
+ new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
+ new LongOpt("verbose", LongOpt.NO_ARGUMENT, null, 'v'),
+ new LongOpt("load-consumer", LongOpt.NO_ARGUMENT, null, 'l'),
+ };
+
+ Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
+ int c;
+ while ((c = getopt.getopt()) != -1)
+ {
+ switch (c)
+ {
+ case 'b':
+ bindingFiles.add(new File(getopt.getOptarg()));
+ break;
+ case 'k':
+ generateSource = true;
+ break;
+ case 'c':
+ catalog = new File(getopt.getOptarg());
+ break;
+ case 'p':
+ targetPackage = getopt.getOptarg();
+ break;
+ case 'w':
+ wsdlLocation = getopt.getOptarg();
+ break;
+ case 'o':
+ outputDir = new File(getopt.getOptarg());
+ break;
+ case 's':
+ sourceDir = new File(getopt.getOptarg());
+ break;
+ case 't':
+ target = getopt.getOptarg();
+ break;
+ case 'q':
+ quiet = true;
+ break;
+ case 'v':
+ verbose = true;
+ break;
+ case 'l':
+ loadConsumer = true;
+ break;
+ case 'h':
+ printHelp();
+ System.exit(0);
+ case '?':
+ System.exit(1);
+ }
+ }
+
+ // debug output
+ if(loadConsumer)
+ {
+ WSContractConsumer importer = WSContractConsumer.newInstance();
+ System.out.println("WSContractConsumer instance: " +
importer.getClass().getCanonicalName());
+ System.exit(0);
+ }
+
+ int wsdlPos = getopt.getOptind();
+ if (wsdlPos >= args.length)
+ {
+ System.err.println("Error: WSDL URL was not specified!");
+ printHelp();
+ System.exit(1);
+ }
+
+ URL url = null;
+ try
+ {
+ try
+ {
+ url = new URL(args[wsdlPos]);
+ }
+ catch (MalformedURLException e)
+ {
+ File file = new File(args[wsdlPos]);
+ url = file.toURL();
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ System.err.println("Error: Invalid URI: " + args[wsdlPos]);
+ System.exit(1);
+ }
+
+ return url;
+ }
+
+
+ private int importServices(URL wsdl)
+ {
+ WSContractConsumer importer = WSContractConsumer.newInstance();
+
+ importer.setGenerateSource(generateSource);
+ importer.setOutputDirectory(outputDir);
+ if (sourceDir != null)
+ importer.setSourceDirectory(sourceDir);
+
+ if (! quiet)
+ importer.setMessageStream(System.out);
+
+ if (catalog != null)
+ importer.setCatalog(catalog);
+
+ if (targetPackage != null)
+ importer.setTargetPackage(targetPackage);
+
+ if (wsdlLocation != null)
+ importer.setWsdlLocation(wsdlLocation);
+
+ if (bindingFiles != null && bindingFiles.size() > 0)
+ importer.setBindingFiles(bindingFiles);
+
+ if(target!=null)
+ importer.setTarget(target);
+
+ try
+ {
+ importer.consume(wsdl);
+ return 0;
+ }
+ catch (Throwable t)
+ {
+ System.err.println("Error: Could not import. (use --verbose to see full
traces)");
+ if (!verbose)
+ {
+ String message = t.getMessage();
+ if (message == null)
+ message = t.getClass().getSimpleName();
+ System.err.println("Error: " + message);
+ }
+ else
+ {
+ t.printStackTrace(System.err);
+ }
+
+ }
+
+ return 1;
+ }
+
+ private static void printHelp()
+ {
+ PrintStream out = System.out;
+ out.println("WSConsumeTask is a cmd line tool that generates portable JAX-WS
artifacts from a WSDL file.\n");
+ out.println("usage: " + PROGRAM_NAME + " [options]
<wsdl-url>\n");
+ out.println("options: ");
+ out.println(" -h, --help Show this help message");
+ out.println(" -b, --binding=<file> One or more JAX-WS or JAXB
binding files ");
+ out.println(" -k, --keep Keep/Generate Java
source");
+ out.println(" -c --catalog=<file> Oasis XML Catalog file for
entity resolution");
+ out.println(" -p --package=<name> The target package for
generated source");
+ out.println(" -w --wsdlLocation=<loc> Value to use for
@WebService.wsdlLocation");
+ out.println(" -o, --output=<directory> The directory to put
generated artifacts");
+ out.println(" -s, --source=<directory> The directory to put Java
source");
+ out.println(" -t, --target=<2.0|2.1> The JAX-WS specification
target");
+ out.println(" -q, --quiet Be somewhat more quiet");
+ out.println(" -v, --verbose Show full exception stack
traces");
+ out.println(" -l, --load-consumer Load the consumer and exit (debug
utility)");
+ out.flush();
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSConsume.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSProvide.java
===================================================================
---
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSProvide.java
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSProvide.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,239 @@
+/*
+ * 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.wsf.tools.cmd;
+
+import gnu.getopt.Getopt;
+import gnu.getopt.LongOpt;
+import org.jboss.wsf.tools.WSContractProvider;
+import org.jboss.wsf.spi.utils.JavaUtils;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * WSProvideTask is a cmd line tool that generates portable JAX-WS artifacts
+ * for a service endpoint implementation.
+ *
+ * <pre>
+ * usage: WSProvideTask [options] <endpoint class name>
+ * options:
+ * -h, --help Show this help message
+ * -k, --keep Keep/Generate Java source
+ * -w, --wsdl Enable WSDL file generation
+ * -c, --classpath=<path< The classpath that contains the endpoint
+ * -o, --output=<directory> The directory to put generated artifacts
+ * -r, --resource=<directory> The directory to put resource artifacts
+ * -s, --source=<directory> The directory to put Java source
+ * -q, --quiet Be somewhat more quiet
+ * -t, --show-traces Show full exception stack traces
+ * -l, --load-provider Load the provider and exit (debug utility)
+ * </pre>
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class WSProvide
+{
+ private boolean generateSource = false;
+ private boolean generateWsdl = false;
+ private boolean quiet = false;
+ private boolean showTraces = false;
+ private boolean loadProvider = false;
+ private ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ private File outputDir = new File("output");
+ private File resourceDir = null;
+ private File sourceDir = null;
+
+ public static String PROGRAM_NAME = System.getProperty("program.name",
WSProvide.class.getSimpleName());
+
+ public static void main(String[] args)
+ {
+ WSProvide generate = new WSProvide();
+ String endpoint = generate.parseArguments(args);
+ System.exit(generate.generate(endpoint));
+ }
+
+ private String parseArguments(String[] args)
+ {
+ String shortOpts = "hwko:r:s:c:qtl";
+ LongOpt[] longOpts =
+ {
+ new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
+ new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
+ new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
+ new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
+ new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null,
'r'),
+ new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
+ new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null,
'c'),
+ new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
+ new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
+ new LongOpt("load-provider", LongOpt.NO_ARGUMENT, null, 'l'),
+ };
+
+ Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
+ int c;
+ while ((c = getopt.getopt()) != -1)
+ {
+ switch (c)
+ {
+ case 'k':
+ generateSource = true;
+ break;
+ case 's':
+ sourceDir = new File(getopt.getOptarg());
+ break;
+ case 'r':
+ resourceDir = new File(getopt.getOptarg());
+ break;
+ case 'w':
+ generateWsdl = true;
+ break;
+ case 't':
+ showTraces = true;
+ break;
+ case 'o':
+ outputDir = new File(getopt.getOptarg());
+ break;
+ case 'q':
+ quiet = true;
+ break;
+ case 'c':
+ processClassPath(getopt.getOptarg());
+ break;
+ case 'l':
+ loadProvider = true;
+ break;
+ case 'h':
+ printHelp();
+ System.exit(0);
+ case '?':
+ System.exit(1);
+ }
+ }
+
+ // debug output
+ if(loadProvider)
+ {
+ WSContractProvider gen = WSContractProvider.newInstance(loader);
+ System.out.println("WSContractProvider instance: " +
gen.getClass().getCanonicalName());
+ System.exit(0);
+ }
+
+ int endpointPos = getopt.getOptind();
+ if (endpointPos >= args.length)
+ {
+ System.err.println("Error: endpoint implementation was not
specified!");
+ printHelp();
+ System.exit(1);
+ }
+
+ return args[endpointPos];
+ }
+
+
+ private int generate(String endpoint)
+ {
+ if (!JavaUtils.isLoaded(endpoint, loader))
+ {
+ System.err.println("Error: Could not load class [" + endpoint +
"]. Did you specify a valid --classpath?");
+ return 1;
+ }
+
+ WSContractProvider gen = WSContractProvider.newInstance(loader);
+ gen.setGenerateWsdl(generateWsdl);
+ gen.setGenerateSource(generateSource);
+ gen.setOutputDirectory(outputDir);
+ if (resourceDir != null)
+ gen.setResourceDirectory(resourceDir);
+ if (sourceDir != null)
+ gen.setSourceDirectory(sourceDir);
+
+ if (! quiet)
+ gen.setMessageStream(System.out);
+
+ try
+ {
+ gen.provide(endpoint);
+ return 0;
+ }
+ catch (Throwable t)
+ {
+ System.err.println("Error: Could not generate. (use --show-traces to see
full traces)");
+ if (!showTraces)
+ {
+ String message = t.getMessage();
+ if (message == null)
+ message = t.getClass().getSimpleName();
+ System.err.println("Error: " + message);
+ }
+ else
+ {
+ t.printStackTrace(System.err);
+ }
+
+ }
+
+ return 1;
+ }
+
+ private void processClassPath(String classPath)
+ {
+ String[] entries = classPath.split(File.pathSeparator);
+ List<URL> urls= new ArrayList<URL>(entries.length);
+ for (String entry : entries)
+ {
+ try
+ {
+ urls.add(new File(entry).toURL());
+ }
+ catch (MalformedURLException e)
+ {
+ System.err.println("Error: a classpath entry was malformed: " +
entry);
+ }
+ }
+ loader = new URLClassLoader(urls.toArray(new URL[0]), loader);
+ }
+
+ private static void printHelp()
+ {
+ PrintStream out = System.out;
+ out.println("WSProvideTask generates portable JAX-WS artifacts for an endpoint
implementation.\n");
+ out.println("usage: " + PROGRAM_NAME + " [options] <endpoint
class name>\n");
+ out.println("options: ");
+ out.println(" -h, --help Show this help message");
+ out.println(" -k, --keep Keep/Generate Java
source");
+ out.println(" -w, --wsdl Enable WSDL file
generation");
+ out.println(" -c, --classpath=<path> The classpath that contains
the endpoint");
+ out.println(" -o, --output=<directory> The directory to put
generated artifacts");
+ out.println(" -r, --resource=<directory> The directory to put
resource artifacts");
+ out.println(" -s, --source=<directory> The directory to put Java
source");
+ out.println(" -q, --quiet Be somewhat more quiet");
+ out.println(" -t, --show-traces Show full exception stack
traces");
+ out.println(" -l, --load-provider Load the provider and exit (debug
utility)");
+ out.flush();
+ }
+}
Property changes on:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/cmd/WSProvide.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/package.html
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/package.html
(rev 0)
+++
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/tools/package.html 2007-07-17
21:19:50 UTC (rev 3921)
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+A stack indepedent SPI that's provides entry points to command line tools and ANT
+tasks that generate JAX-WS artefacts from WSDL or wrapper beans and WSDL from existing
sources.
+
+<h3>Service provider responsibilities</h3>
+
+A service provider needs to implement both the factory and the actual
<code>WSContractConsumer</code>
+or <code>WSContractProvider</code>.
+The ANT tasks and the command line tools offer static client interfaces and rely on a
standard WSF service factory
+mechanism that allows pluggability of different implementations:
+
+<ul>
+ <li>See org.jboss.ws.integration.FactoryLoader</li>
+</ul>
+
+<h3>ANT tasks</h3>
+<ul>
+ <li>{@link org.jboss.wsf.spi.tools.ant.WSConsumeTask}</li>
+ <li>{@link org.jboss.wsf.spi.tools.ant.WSProvideTask}</li>
+</ul>
+
+<h3>Command line interfaces and shell scripts</h3>
+
+The shell scripts are installed with the JBossAS installation
+and can be found in the JBOSS_HOME/bin directory.
+<p/>
+
+They delegate to the following command line implementations:
+<ul>
+ <li>{@link org.jboss.wsf.spi.tools.cmd.WSConsume}</li>
+ <li>{@link org.jboss.wsf.spi.tools.cmd.WSProvide}</li>
+</ul>
+
+
+<h2>Related Documentation</h2>
+
+<ul>
+ <li>{@link org.jboss.ws.integration.FactoryLoader}
+</ul>
+
+For overviews, tutorials, examples, guides, and tool documentation, please see:
+<ul>
+ <li><a
href="http://labs.jboss.com/jbossws/">JBossWS
Userguide</a>
+</ul>
+<br>
+
+@since JBossWS 2.1
+
+</body>
+</html>
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -31,7 +31,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.framework.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationHandler;
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -30,7 +30,7 @@
import javax.xml.ws.WebServiceException;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.framework.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.wsf.spi.deployment.BasicLifecycleHandler;
+import org.jboss.wsf.framework.deployment.BasicLifecycleHandler;
import org.jboss.wsf.spi.deployment.Endpoint;
/**
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.management.MBeanServerFactory;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.management.BasicEndpointRegistry;
+import org.jboss.wsf.framework.management.BasicEndpointRegistry;
/**
* A Service Endpoint Registry
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.stack.sunri.client;
-import org.jboss.wsf.spi.deployment.serviceref.CommonServiceRefBinder;
+import org.jboss.wsf.framework.deployment.serviceref.CommonServiceRefBinder;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import javax.naming.Referenceable;
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -30,7 +30,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
import org.jboss.wsf.spi.utils.IOUtils;
//$Id$
@@ -72,7 +72,7 @@
}
catch (IOException ex)
{
- throw new WSDeploymentException(ex);
+ throw new WSFDeploymentException(ex);
}
}
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerFactoryImpl.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerFactoryImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerFactoryImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,8 +21,8 @@
*/
package org.jboss.wsf.stack.sunri.tools;
-import org.jboss.wsf.spi.tools.WSContractConsumerFactory;
-import org.jboss.wsf.spi.tools.WSContractConsumer;
+import org.jboss.wsf.tools.WSContractConsumerFactory;
+import org.jboss.wsf.tools.WSContractConsumer;
/**
* Creates a WSContractConsumer that delegates to the Sun RI.
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerImpl.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIConsumerImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.stack.sunri.tools;
-import org.jboss.wsf.spi.tools.WSContractConsumer;
+import org.jboss.wsf.tools.WSContractConsumer;
import java.io.File;
import java.io.PrintStream;
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,8 +21,8 @@
*/
package org.jboss.wsf.stack.sunri.tools;
-import org.jboss.wsf.spi.tools.WSContractProviderFactory;
-import org.jboss.wsf.spi.tools.WSContractProvider;
+import org.jboss.wsf.tools.WSContractProviderFactory;
+import org.jboss.wsf.tools.WSContractProvider;
/**
* @author Heiko.Braun(a)jboss.com
Modified:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.stack.sunri.tools;
-import org.jboss.wsf.spi.tools.WSContractProvider;
+import org.jboss.wsf.tools.WSContractProvider;
import java.io.File;
import java.io.PrintStream;
@@ -31,7 +31,6 @@
import java.net.URL;
import com.sun.tools.ws.wscompile.WsgenTool;
-import com.sun.tools.ws.wscompile.WsgenOptions;
/**
* @author Heiko.Braun(a)jboss.com
@@ -40,155 +39,155 @@
public class SunRIProviderImpl extends WSContractProvider
{
- private ClassLoader loader;
- private boolean generateWsdl = false;
- private boolean generateSource = false;
- private File outputDir = new File("output");
- private File resourceDir = null;
- private File sourceDir = null;
- private PrintStream messageStream = new NullPrintStream();
-
- public SunRIProviderImpl()
- {
- }
+ private ClassLoader loader;
+ private boolean generateWsdl = false;
+ private boolean generateSource = false;
+ private File outputDir = new File("output");
+ private File resourceDir = null;
+ private File sourceDir = null;
+ private PrintStream messageStream = new NullPrintStream();
- public void setGenerateWsdl(boolean generateWsdl)
- {
- this.generateWsdl = generateWsdl;
- }
+ public SunRIProviderImpl()
+ {
+ }
- public void setGenerateSource(boolean generateSource)
- {
- this.generateSource = generateSource;
- }
+ public void setGenerateWsdl(boolean generateWsdl)
+ {
+ this.generateWsdl = generateWsdl;
+ }
- public void setOutputDirectory(File directory)
- {
- this.outputDir = directory;
- }
+ public void setGenerateSource(boolean generateSource)
+ {
+ this.generateSource = generateSource;
+ }
- public void setResourceDirectory(File directory)
- {
- this.resourceDir = directory;
- }
+ public void setOutputDirectory(File directory)
+ {
+ this.outputDir = directory;
+ }
- public void setSourceDirectory(File directory)
- {
- this.sourceDir = directory;
- }
+ public void setResourceDirectory(File directory)
+ {
+ this.resourceDir = directory;
+ }
- public void setClassLoader(ClassLoader loader)
- {
- this.loader = loader;
- }
+ public void setSourceDirectory(File directory)
+ {
+ this.sourceDir = directory;
+ }
- public void setMessageStream(PrintStream messageStream)
- {
- this.messageStream = messageStream;
- }
+ public void setClassLoader(ClassLoader loader)
+ {
+ this.loader = loader;
+ }
- public void provide(String endpointClass)
- {
- try
- {
- provide(loader.loadClass(endpointClass));
- }
- catch (ClassNotFoundException e)
- {
- throw new IllegalArgumentException("Class not found: " + endpointClass);
- }
- }
+ public void setMessageStream(PrintStream messageStream)
+ {
+ this.messageStream = messageStream;
+ }
- public void provide(Class<?> endpointClass)
- {
- // Swap the context classloader
- // The '--classpath' switch might provide an URLClassLoader
- ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+ public void provide(String endpointClass)
+ {
+ try
+ {
+ provide(loader.loadClass(endpointClass));
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalArgumentException("Class not found: " +
endpointClass);
+ }
+ }
- if(loader!=null)
- Thread.currentThread().setContextClassLoader(loader);
+ public void provide(Class<?> endpointClass)
+ {
+ // Swap the context classloader
+ // The '--classpath' switch might provide an URLClassLoader
+ ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- List<String> args = new ArrayList<String>();
+ if(loader!=null)
+ Thread.currentThread().setContextClassLoader(loader);
- // Use the output directory as the default
- File resourceDir = (this.resourceDir != null) ? this.resourceDir : outputDir;
- File sourceDir = (this.sourceDir != null) ? this.sourceDir : outputDir;
+ try
+ {
+ List<String> args = new ArrayList<String>();
- if (generateSource) {
- args.add("-keep");
- if (sourceDir != null) {
- if (!sourceDir.exists() && !sourceDir.mkdirs())
- throw new IllegalStateException("Could not make directory: " +
sourceDir.getName());
+ // Use the output directory as the default
+ File resourceDir = (this.resourceDir != null) ? this.resourceDir : outputDir;
+ File sourceDir = (this.sourceDir != null) ? this.sourceDir : outputDir;
- args.add("-s");
- args.add(sourceDir.getAbsolutePath());
- }
- }
+ if (generateSource) {
+ args.add("-keep");
+ if (sourceDir != null) {
+ if (!sourceDir.exists() && !sourceDir.mkdirs())
+ throw new IllegalStateException("Could not make directory: "
+ sourceDir.getName());
- // -d <directory>
- if (!outputDir.exists() && !outputDir.mkdirs())
- throw new IllegalStateException("Could not make directory: " +
outputDir.getName());
+ args.add("-s");
+ args.add(sourceDir.getAbsolutePath());
+ }
+ }
- args.add("-d");
- args.add(outputDir.getAbsolutePath());
+ // -d <directory>
+ if (!outputDir.exists() && !outputDir.mkdirs())
+ throw new IllegalStateException("Could not make directory: " +
outputDir.getName());
- // -r <directory>
- if (resourceDir != null) {
- if (!resourceDir.exists() && !resourceDir.mkdirs())
- throw new IllegalStateException("Could not make directory: " +
resourceDir.getName());
- args.add("-r");
- args.add(resourceDir.getAbsolutePath());
- }
+ args.add("-d");
+ args.add(outputDir.getAbsolutePath());
- // -s <directory>
- if (sourceDir != null) {
- if (!sourceDir.exists() && !sourceDir.mkdirs())
- throw new IllegalStateException("Could not make directory: " +
sourceDir.getName());
- args.add("-s");
- args.add(sourceDir.getAbsolutePath());
- }
+ // -r <directory>
+ if (resourceDir != null) {
+ if (!resourceDir.exists() && !resourceDir.mkdirs())
+ throw new IllegalStateException("Could not make directory: " +
resourceDir.getName());
+ args.add("-r");
+ args.add(resourceDir.getAbsolutePath());
+ }
- // -verbose
- PrintStream stream = messageStream;
- if (stream != null) {
- args.add("-verbose");
- } else {
- stream = new NullPrintStream();
- }
+ // -s <directory>
+ if (sourceDir != null) {
+ if (!sourceDir.exists() && !sourceDir.mkdirs())
+ throw new IllegalStateException("Could not make directory: " +
sourceDir.getName());
+ args.add("-s");
+ args.add(sourceDir.getAbsolutePath());
+ }
- // -wsdl[:protocol]
- if (generateWsdl) {
- args.add("-wsdl");
- }
+ // -verbose
+ PrintStream stream = messageStream;
+ if (stream != null) {
+ args.add("-verbose");
+ } else {
+ stream = new NullPrintStream();
+ }
- // --classpath
- if(loader instanceof URLClassLoader)
- {
- StringBuilder builder = new StringBuilder();
- URLClassLoader urlLoader = (URLClassLoader)loader;
- for(URL url : urlLoader.getURLs())
- {
- builder.append(url.toExternalForm());
- builder.append(File.pathSeparator);
- }
+ // -wsdl[:protocol]
+ if (generateWsdl) {
+ args.add("-wsdl");
+ }
- args.add("-classpath");
- args.add(builder.toString());
- }
+ // --classpath
+ if(loader instanceof URLClassLoader)
+ {
+ StringBuilder builder = new StringBuilder();
+ URLClassLoader urlLoader = (URLClassLoader)loader;
+ for(URL url : urlLoader.getURLs())
+ {
+ builder.append(url.toExternalForm());
+ builder.append(File.pathSeparator);
+ }
- // the SEI
- args.add(endpointClass.getCanonicalName());
+ args.add("-classpath");
+ args.add(builder.toString());
+ }
- WsgenTool tool = new WsgenTool(messageStream);
- tool.run(args.toArray(new String[0]));
+ // the SEI
+ args.add(endpointClass.getCanonicalName());
- }
- finally{
- Thread.currentThread().setContextClassLoader(oldLoader);
- }
- }
+ WsgenTool tool = new WsgenTool(messageStream);
+ tool.run(args.toArray(new String[0]));
+ }
+ finally{
+ Thread.currentThread().setContextClassLoader(oldLoader);
+ }
+ }
+
}
Modified:
branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
===================================================================
---
branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,6 +1,6 @@
<!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig"
class="org.jboss.wsf.spi.management.BasicServerConfig">
+ <bean name="WSServerConfig"
class="org.jboss.wsf.framework.management.BasicServerConfig">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of
that SOAP address.
@@ -26,13 +26,13 @@
<bean name="WSEndpointRegistry"
class="org.jboss.wsf.stack.sunri.ManagedEndpointRegistry"/>
<!-- Bind Service objects in client environment context -->
- <bean name="WSServiceRefHandler"
class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+ <bean name="WSServiceRefHandler"
class="org.jboss.wsf.framework.deployment.serviceref.ServiceRefHandlerImpl">
<property name="jaxrpcBinder"><inject
bean="WSServiceRefBinderJAXRPC"/></property>
<property name="jaxwsBinder"><inject
bean="WSServiceRefBinderJAXWS"/></property>
</bean>
<!-- JBoss_4_2_0_GA uses this hardcoded bean name -->
- <bean name="ServiceRefHandler"
class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+ <bean name="ServiceRefHandler"
class="org.jboss.wsf.framework.deployment.serviceref.ServiceRefHandlerImpl">
<property name="jaxrpcBinder"><inject
bean="WSServiceRefBinderJAXRPC"/></property>
<property name="jaxwsBinder"><inject
bean="WSServiceRefBinderJAXWS"/></property>
</bean>
@@ -63,17 +63,17 @@
<!--
The stack specific deployment aspects
-->
- <bean name="WSMetroContextPropertiesDeploymentAspect"
class="org.jboss.wsf.spi.deployment.ContextPropertiesDeploymentAspect">
+ <bean name="WSMetroContextPropertiesDeploymentAspect"
class="org.jboss.wsf.framework.deployment.ContextPropertiesDeploymentAspect">
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
-
<entry><key>ServletClass</key><value>org.jboss.wsf.spi.invocation.EndpointServlet</value></entry>
+
<entry><key>ServletClass</key><value>org.jboss.wsf.framework.invocation.EndpointServlet</value></entry>
<entry><key>ServletContextListener</key><value>org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</value></entry>
</map>
</property>
</bean>
- <bean name="WSMetroEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <bean name="WSMetroEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
<property name="requires">ContainerEndpointHandler</property>
<property name="provides">StackEndpointHandler</property>
<property
name="requestHandler">org.jboss.wsf.stack.sunri.RequestHandlerImpl</property>
@@ -86,7 +86,7 @@
</bean>
<!-- Deployment aspect installers -->
- <bean name="WSMetroDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSMetroDeploymentAspectInstallerJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -96,7 +96,7 @@
</set>
</property>
</bean>
- <bean name="WSMetroDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSMetroDeploymentAspectInstallerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
Modified:
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java
===================================================================
---
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -30,7 +30,7 @@
import org.codehaus.xfire.fault.XFireFault;
import org.codehaus.xfire.service.invoker.Invoker;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.framework.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationHandler;
Modified:
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java
===================================================================
---
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -30,7 +30,7 @@
import org.codehaus.xfire.fault.XFireFault;
import org.codehaus.xfire.service.invoker.Invoker;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.framework.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
Modified:
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/LifecycleHandlerImpl.java
===================================================================
---
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/LifecycleHandlerImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/LifecycleHandlerImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.wsf.spi.deployment.BasicLifecycleHandler;
+import org.jboss.wsf.framework.deployment.BasicLifecycleHandler;
import org.jboss.wsf.spi.deployment.Endpoint;
/**
Modified:
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/ManagedEndpointRegistry.java
===================================================================
---
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/ManagedEndpointRegistry.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/ManagedEndpointRegistry.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.management.MBeanServerFactory;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.management.BasicEndpointRegistry;
+import org.jboss.wsf.framework.management.BasicEndpointRegistry;
/**
* A Service Endpoint Registry
Modified:
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletExt.java
===================================================================
---
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletExt.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletExt.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -41,7 +41,7 @@
import org.codehaus.xfire.transport.http.XFireServletController;
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.framework.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
Modified:
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerExt.java
===================================================================
---
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerExt.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerExt.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -37,7 +37,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.framework.invocation.EndpointAssociation;
/**
* An extension to the XFire servlet controller
@@ -89,17 +89,17 @@
Thread.currentThread().setContextClassLoader(ctxLoader);
}
}
-
+
/*
- * For some reason
WebAppClassLoader.getResource("WEB-INF/wsdl/TestEndpoint.wsdl")
- * fails when the war is deployed as part of an ear deployment.
- *
- * This ClassLoader falls back to the VFS to find the resource URL.
- */
+ * For some reason
WebAppClassLoader.getResource("WEB-INF/wsdl/TestEndpoint.wsdl")
+ * fails when the war is deployed as part of an ear deployment.
+ *
+ * This ClassLoader falls back to the VFS to find the resource URL.
+ */
static class VirtualFileClassLoader extends ClassLoader
{
private UnifiedVirtualFile vFile;
-
+
public VirtualFileClassLoader(UnifiedVirtualFile file, ClassLoader parent)
{
super(parent);
Modified:
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java
===================================================================
---
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -32,7 +32,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
import org.jboss.wsf.spi.utils.IOUtils;
//$Id$
@@ -88,7 +88,7 @@
}
catch (IOException ex)
{
- throw new WSDeploymentException(ex);
+ throw new WSFDeploymentException(ex);
}
}
Modified:
branches/hbraun/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
===================================================================
---
branches/hbraun/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml 2007-07-17
21:19:50 UTC (rev 3921)
@@ -1,6 +1,6 @@
<!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig"
class="org.jboss.wsf.spi.management.BasicServerConfig">
+ <bean name="WSServerConfig"
class="org.jboss.wsf.framework.management.BasicServerConfig">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of
that SOAP address.
@@ -29,7 +29,7 @@
<!--
The stack specific deployment aspects
-->
- <bean name="WSXFireContextPropertiesDeploymentAspect"
class="org.jboss.wsf.spi.deployment.ContextPropertiesDeploymentAspect">
+ <bean name="WSXFireContextPropertiesDeploymentAspect"
class="org.jboss.wsf.framework.deployment.ContextPropertiesDeploymentAspect">
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
@@ -38,7 +38,7 @@
</property>
</bean>
- <bean name="WSXFireEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <bean name="WSXFireEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
<property name="requires">ContainerEndpointHandler</property>
<property name="provides">StackEndpointHandler</property>
<property
name="requestHandler">org.jboss.wsf.stack.xfire.RequestHandlerImpl</property>
@@ -53,7 +53,7 @@
</bean>
<!-- Deployment aspect installers -->
- <bean name="WSMetroDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSMetroDeploymentAspectInstallerJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -63,7 +63,7 @@
</set>
</property>
</bean>
- <bean name="WSMetroDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSMetroDeploymentAspectInstallerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
Modified: branches/hbraun/trunk/jbossws-core/ant-import-tests/build-testsuite.xml
===================================================================
--- branches/hbraun/trunk/jbossws-core/ant-import-tests/build-testsuite.xml 2007-07-17
18:52:03 UTC (rev 3920)
+++ branches/hbraun/trunk/jbossws-core/ant-import-tests/build-testsuite.xml 2007-07-17
21:19:50 UTC (rev 3921)
@@ -72,7 +72,7 @@
<target name="wsconsume" depends="tests-init"
description="Consume JAX-WS contracts">
<!-- Define the JAX-WS wsconsume task -->
- <taskdef name="wsconsume"
classname="org.jboss.wsf.spi.tools.ant.WSConsumeTask">
+ <taskdef name="wsconsume"
classname="org.jboss.wsf.tools.ant.WSConsumeTask">
<classpath refid="ws.stack.classpath"/>
<classpath location="${spi.dir}/output/lib/jbossws-spi.jar"/>
@@ -177,7 +177,7 @@
<target name="wsprovide" depends="tests-compile"
description="Provide the JAX-WS contracts.">
<!-- Define the JAX-WS wsprovide task -->
- <taskdef name="wsprovide"
classname="org.jboss.wsf.spi.tools.ant.WSProvideTask">
+ <taskdef name="wsprovide"
classname="org.jboss.wsf.tools.ant.WSProvideTask">
<classpath refid="ws.stack.classpath"/>
<classpath refid="thirdparty.classpath"/>
<classpath location="${core.dir}/thirdparty/concurrent.jar"/>
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -23,7 +23,7 @@
// $Id$
-import org.jboss.wsf.spi.deployment.serviceref.CommonServiceRefBinder;
+import org.jboss.wsf.framework.deployment.serviceref.CommonServiceRefBinder;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import javax.naming.Referenceable;
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -49,8 +49,8 @@
import org.jboss.ws.metadata.umdm.HandlerMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.wsf.spi.jaxws.handler.GenericHandler;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -32,7 +32,7 @@
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.wsf.spi.invocation.BasicEndpointInvocation;
+import org.jboss.wsf.framework.invocation.BasicEndpointInvocation;
/** An invocation that delegates to the jbossws-core EndpointInvocation
*
@@ -46,10 +46,10 @@
EndpointInvocation epInv =
getInvocationContext().getAttachment(EndpointInvocation.class);
if (epInv == null)
throw new IllegalStateException("Cannot obtain endpoint invocation");
-
+
return epInv;
}
-
+
@Override
public void setReturnValue(Object value)
{
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -30,7 +30,6 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.rpc.server.ServletEndpointContext;
-import javax.xml.rpc.soap.SOAPFaultException;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPException;
@@ -70,8 +69,8 @@
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
-import org.jboss.wsf.spi.invocation.WebServiceContextDummy;
-import org.jboss.wsf.spi.invocation.WebServiceContextJSE;
+import org.jboss.wsf.framework.invocation.WebServiceContextDummy;
+import org.jboss.wsf.framework.invocation.WebServiceContextJSE;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.utils.JavaUtils;
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -28,7 +28,7 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import org.jboss.wsf.spi.invocation.BasicInvocationContext;
+import org.jboss.wsf.framework.invocation.BasicInvocationContext;
/**
* Implementation of ServletEndpointContext
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -24,7 +24,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
import org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPException;
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -26,7 +26,7 @@
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPMessage;
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -42,7 +42,7 @@
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* An abstract JAXWS handler that delegates to the WSSecurityDispatcher
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -43,7 +43,7 @@
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.JAXRPCDeployment;
+import org.jboss.wsf.framework.deployment.JAXRPCDeployment;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import org.jboss.ws.annotation.EndpointConfig;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderFactoryImpl.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderFactoryImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderFactoryImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.tools.jaxws.impl;
-import org.jboss.wsf.spi.tools.WSContractProvider;
-import org.jboss.wsf.spi.tools.WSContractProviderFactory;
+import org.jboss.wsf.tools.WSContractProvider;
+import org.jboss.wsf.tools.WSContractProviderFactory;
/**
* Creates a JBossWS WSContractProvider implementation.
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -25,10 +25,10 @@
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.wsf.spi.deployment.BasicDeployment;
+import org.jboss.wsf.framework.deployment.BasicDeployment;
import static org.jboss.wsf.spi.deployment.Deployment.DeploymentType.JAXWS_JSE;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.tools.WSContractProvider;
+import org.jboss.wsf.tools.WSContractProvider;
import java.io.File;
import java.io.IOException;
@@ -111,7 +111,7 @@
messageStream.println("Generating WSDL:");
UnifiedDeploymentInfo udi = createUDI(endpointClass, loader);
- builder.buildWebServiceMetaData(new BasicDeployment(), umd, udi, endpointClass,
null);
+ builder.buildWebServiceMetaData(new BasicDeployment(), umd, udi, endpointClass,
null);
try
{
generator.write();
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerFactoryImpl.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerFactoryImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerFactoryImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.tools.jaxws.impl;
-import org.jboss.wsf.spi.tools.WSContractConsumer;
-import org.jboss.wsf.spi.tools.WSContractConsumerFactory;
+import org.jboss.wsf.tools.WSContractConsumer;
+import org.jboss.wsf.tools.WSContractConsumerFactory;
/**
* Creates a WSContractConsumer that delegates to the Sun RI.
Modified:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -22,7 +22,7 @@
package org.jboss.ws.tools.jaxws.impl;
import com.sun.tools.ws.wscompile.WsimportTool;
-import org.jboss.wsf.spi.tools.WSContractConsumer;
+import org.jboss.wsf.tools.WSContractConsumer;
import java.io.File;
import java.io.PrintStream;
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/addressrewrite/AddressRewriteTestCase.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/addressrewrite/AddressRewriteTestCase.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/addressrewrite/AddressRewriteTestCase.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
-import org.jboss.wsf.spi.management.BasicServerConfigMBean;
+import org.jboss.wsf.framework.management.BasicServerConfigMBean;
import org.jboss.wsf.spi.test.JBossWSTest;
/**
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -11,7 +11,7 @@
import java.rmi.RemoteException;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.transport.jms.JMSTransportSupport;
+import org.jboss.wsf.framework.transport.jms.JMSTransportSupport;
/**
* An example of a MDB acting as a web service endpoint.
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -23,7 +23,7 @@
import junit.framework.TestCase;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.BasicEndpoint;
+import org.jboss.wsf.framework.deployment.BasicEndpoint;
import org.jboss.ws.core.jaxws.JAXBBindingCustomization;
import static org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* A client side handler
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -28,7 +28,7 @@
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
public class ProtocolHandler extends GenericSOAPHandler
{
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxws.jbws1283;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import javax.activation.DataHandler;
import javax.xml.soap.AttachmentPart;
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283EndpointImpl.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283EndpointImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283EndpointImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxws.jbws1283;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
import javax.jws.WebService;
import javax.jws.HandlerChain;
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -22,7 +22,7 @@
package org.jboss.test.ws.jaxws.jbws1283;
import junit.framework.Test;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import org.jboss.wsf.spi.test.JBossWSTest;
import org.jboss.wsf.spi.test.JBossWSTestSetup;
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1556/EJB3Bean.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1556/EJB3Bean.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1556/EJB3Bean.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -26,7 +26,7 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
@Stateless
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1566/c/Jaxb20StatelessTestBean.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1566/c/Jaxb20StatelessTestBean.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1566/c/Jaxb20StatelessTestBean.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -6,7 +6,7 @@
import org.jboss.test.ws.jaxws.jbws1566.b.BException;
import org.jboss.test.ws.jaxws.jbws1566.a.TestEnumeration;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
import javax.ejb.Stateless;
import javax.jws.WebService;
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/JBWS771TestCase.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/JBWS771TestCase.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/JBWS771TestCase.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -42,7 +42,6 @@
import org.jboss.wsf.spi.test.JBossWSTest;
import org.jboss.wsf.spi.test.JBossWSTestSetup;
-import org.jboss.wsf.spi.tools.cmd.WSConsume;
/**
* [JBWS-771] Use part names that are friendly to .NET
@@ -79,41 +78,41 @@
String result = port.submit("foo");
assertEquals("submit-foo", result);
}
-
+
public void testCancel() throws Exception
{
String result = port.cancel("foo", "bar");
assertEquals("cancel-foobar", result);
}
-
+
public void testMessagePartNames() throws Exception
{
Definition wsdl = getWSDLDefinition(wsdlURL.toExternalForm());
-
+
Message wsdlReqMessage = wsdl.getMessage(new QName(TARGET_NAMESPACE,
"IWebsvc_cancel"));
assertNotNull("Expected part with name 'parameters' in: " +
wsdlReqMessage, wsdlReqMessage.getPart("parameters"));
assertNotNull("Expected part with name 'bar' in: " +
wsdlReqMessage, wsdlReqMessage.getPart("bar"));
-
+
Message wsdlResMessage = wsdl.getMessage(new QName(TARGET_NAMESPACE,
"IWebsvc_cancelResponse"));
assertNotNull("Expected part with name 'parameters' in: " +
wsdlResMessage, wsdlResMessage.getPart("parameters"));
-
+
/*
- <binding name='IWebsvcBinding' type='tns:IWebsvc'>
- <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='cancel'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body parts='parameters' use='literal'/>
- <soap:header message='tns:IWebsvc_cancel' part='bar'
use='literal'></soap:header>
- </input>
- <output>
- <soap:body use='literal'/>
- </output>
- </operation>
- */
+ <binding name='IWebsvcBinding' type='tns:IWebsvc'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='cancel'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body parts='parameters' use='literal'/>
+ <soap:header message='tns:IWebsvc_cancel' part='bar'
use='literal'></soap:header>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ */
Binding wsdlBinding = wsdl.getBinding(new QName(TARGET_NAMESPACE,
"IWebsvcBinding"));
BindingOperation bindingOperation =
wsdlBinding.getBindingOperation("cancel", null, null);
-
+
boolean foundBody = false;
boolean foundHeader = false;
List<ExtensibilityElement> extList =
bindingOperation.getBindingInput().getExtensibilityElements();
@@ -135,13 +134,13 @@
assertTrue("Found soap:body", foundBody);
assertTrue("Found soap:header", foundHeader);
}
-
+
public void testWSConsume() throws Exception
{
System.out.println("[JBWS-1724] wsconsume cannot use part names that are
friendly to .NET");
//WSConsume.main(new String[]{"--output=tests/wsconsume",
wsdlURL.toExternalForm()});
}
-
+
private Definition getWSDLDefinition(String wsdlLocation) throws Exception
{
WSDLFactory wsdlFactory = WSDLFactory.newInstance();
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.jws.soap.SOAPBinding;
import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
@WebService(name = "EJB3Bean", serviceName = "EJB3BeanService",
targetNamespace = "http://org.jboss.ws/jbws944")
@WebContext(contextRoot = "/jaxws-jbws944", urlPattern =
"/FooBean01")
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -12,7 +12,7 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
@WebService(targetNamespace = "http://www.jboss.org/test/ws/jaxws/jbws981")
@SOAPBinding(style = SOAPBinding.Style.RPC)
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -37,7 +37,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.utils.UUIDGenerator;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
/**
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -34,7 +34,7 @@
import javax.xml.ws.handler.MessageContext.Scope;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
/**
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -30,7 +30,7 @@
import org.jboss.annotation.security.SecurityDomain;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
@WebService(name = "SecureEndpoint", serviceName =
"SecureEndpointService", targetNamespace =
"http://org.jboss.ws/wsref")
@Stateless(name = "SecureEndpoint")
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/AddressingHandlerEnableMU.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/AddressingHandlerEnableMU.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/AddressingHandlerEnableMU.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -31,7 +31,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericHandler;
/**
* A client side handler that disables mustUnderstand processing
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/CustomAddressingHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/CustomAddressingHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/CustomAddressingHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -23,16 +23,13 @@
import java.net.URISyntaxException;
-import javax.xml.namespace.QName;
-
-import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericHandler;
/**
* A client side handler for the ws-addressing
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsdd/CustomHandler.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsdd/CustomHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsdd/CustomHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -23,7 +23,7 @@
import org.jboss.ws.core.soap.TextImpl;
import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
Modified:
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
===================================================================
---
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -30,7 +30,7 @@
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.spi.test.JBossWSTest;
-import org.jboss.wsf.spi.tools.WSContractProvider;
+import org.jboss.wsf.tools.WSContractProvider;
import org.jboss.wsf.spi.utils.JavaUtils;
/**
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,7 +35,7 @@
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
@WebService(name = "TestEndpoint", targetNamespace =
"http://org.jboss.ws/jaxws/context")
@SOAPBinding(style = Style.RPC)
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EJB3Bean.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EJB3Bean.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EJB3Bean.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.jws.soap.SOAPBinding;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
// Test that the wsdl can be read from the nested deployment
@WebService(name = "TestEndpoint", serviceName =
"TestEndpointService", targetNamespace="http://eardeployment.jaxws/",
wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* A server side handler
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* A client side handler
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* A server side handler
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* A server side handler
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -27,7 +27,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* A server side handler
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericLogicalHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.LogicalMessageContext;
import javax.xml.ws.handler.MessageContext;
-import org.jboss.wsf.spi.jaxws.handler.GenericLogicalHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericLogicalHandler;
public class LogicalJAXBHandler extends GenericLogicalHandler
{
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericLogicalHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* A jaxws protocol handler
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
/**
* A jaxws protocol handler
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericLogicalHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.jaxws.samples.retail.profile.DiscountResponse;
import org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt;
import org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmtService;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
/**
* An example order management component
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -27,7 +27,7 @@
import javax.xml.ws.Response;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
@Stateless
@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification", name =
"CCVerification")
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -24,7 +24,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
public class SOAPMessageTrace extends GenericSOAPHandler
{
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -25,7 +25,7 @@
import javax.jws.HandlerChain;
import javax.jws.WebService;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
@Stateless
@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt", name =
"ProfileMgmt", serviceName = "ProfileMgmtService")
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/BareEndpointImpl.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/BareEndpointImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/BareEndpointImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.swaref;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
import javax.jws.WebService;
import javax.jws.WebMethod;
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.swaref;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
import javax.ejb.Stateless;
import javax.jws.WebService;
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/WrappedEndpointImpl.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/WrappedEndpointImpl.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/swaref/WrappedEndpointImpl.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.swaref;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
import javax.activation.DataHandler;
import javax.jws.WebMethod;
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean01.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean01.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean01.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -27,7 +27,7 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
/**
* Test the JSR-181 annotation: javax.jws.WebService
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean02.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean02.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean02.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -29,7 +29,7 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
/**
* Test the JSR-181 javax.jws.WebService annotation on an EJB3 endpoint.
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean03.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean03.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EJB3Bean03.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -25,7 +25,7 @@
import javax.ejb.Stateless;
import javax.jws.WebService;
-import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.framework.annotation.WebContext;
/**
* Test the JSR-181 annotation: javax.jws.WebService
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface03.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface03.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webservice/EndpointInterface03.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -27,8 +27,6 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import org.jboss.wsf.spi.annotation.WebContext;
-
/**
* Test the JSR-181 javax.jws.WebService annotation on an SEI
*
Modified:
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java
===================================================================
---
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java 2007-07-17
18:52:03 UTC (rev 3920)
+++
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java 2007-07-17
21:19:50 UTC (rev 3921)
@@ -22,7 +22,7 @@
package org.jboss.test.ws.jaxws.samples.xop.doclit;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
+import org.jboss.wsf.framework.jaxws.handler.GenericSOAPHandler;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;