tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r591858 [1/13] - in /openejb/trunk/openejb3: ./ assembly/openejb-tomcat/ assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/ container/openejb-core/ container/openejb-core/src/main/java/org/apache/openejb/ container/openejb-cor...
Date Sun, 04 Nov 2007 22:42:06 GMT
Author: dain
Date: Sun Nov  4 14:41:49 2007
New Revision: 591858

URL: http://svn.apache.org/viewvc?rev=591858&view=rev
Log:
Ported webservices code back to OpenEJB!

Added:
    openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWsRegistry.java
    openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/WsFactory.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/InjectionProcessor.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/DeploymentListener.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerChainInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/HandlerInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectionBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PortInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PortRefInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServletInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WsBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WsDeployer.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WsModule.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreWebDeploymentInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/WebDeploymentInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/JaxRReference.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/JaxRpcServiceReference.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/JaxWsServiceReference.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/EjbWsContext.java   (contents, props changed)
      - copied, changed from r585401, openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/EjbWebServiceContext.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/HandlerChainData.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/HandlerData.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/HandlerResolverImpl.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/PortData.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/PortRefData.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ServiceRefData.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/UriResolver.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/WsdlRepo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/WsdlRepoImpl.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/WsdlResolver.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/SunConversionTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxRpcInvocationTest.java
      - copied, changed from r585401, openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxRpcWebServiceInvocationTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxWsInvocationTest.java
      - copied, changed from r585401, openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxWsWebServiceInvocationTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/webservices/
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/webservices/HandlerResolverImplTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/webservices/ProviderWrapperTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/webservices/TestHandler.java
    openejb/trunk/openejb3/container/openejb-core/src/test/resources/handlers.xml
    openejb/trunk/openejb3/container/openejb-core/src/test/resources/handlers_bindings.xml
    openejb/trunk/openejb3/container/openejb-core/src/test/resources/handlers_mixed.xml
    openejb/trunk/openejb3/container/openejb-core/src/test/resources/handlers_port.xml
    openejb/trunk/openejb3/container/openejb-core/src/test/resources/handlers_service.xml
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ConstructorParameterOrder.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ExceptionMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Handler.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/HandlerChain.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/HandlerChains.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaWsdlMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JavaXmlTypeMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/MethodParamPartsMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PackageMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PortComponent.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PortMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceEndpointInterfaceMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceEndpointMethodMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceImplBean.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceInterfaceMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/VariableMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebserviceDescription.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/Webservices.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WsdlMessageMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WsdlReturnValueMapping.java
    openejb/trunk/openejb3/examples/ejb-examples/src/main/java/org/apache/openejb/examples/servlet/HelloEjb.java
    openejb/trunk/openejb3/examples/ejb-examples/src/main/java/org/apache/openejb/examples/servlet/HelloEjbService.java
    openejb/trunk/openejb3/examples/ejb-examples/src/main/java/org/apache/openejb/examples/servlet/HelloPojo.java
    openejb/trunk/openejb3/examples/ejb-examples/src/main/java/org/apache/openejb/examples/servlet/HelloPojoService.java
    openejb/trunk/openejb3/examples/ejb-examples/src/main/java/org/apache/openejb/examples/servlet/WebserviceClient.java
    openejb/trunk/openejb3/examples/ejb-examples/src/main/java/org/apache/openejb/examples/servlet/WebserviceServlet.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisService.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisWsContainer.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/PojoProvider.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/ReadOnlyServiceDesc.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ArrayTypeInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/AxisClientImpl.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/AxisServiceReference.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/GenericServiceEndpoint.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/GenericServiceEndpointWrapper.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/NoOverrideCallbackFilter.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/OperationInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/SeiFactory.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/SeiFactoryImpl.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ServiceEndpointMethodInterceptor.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ServiceImpl.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ServiceMethodInterceptor.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/TypeInfo.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/AbstractTestCase.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/AxisRequest.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/AxisResponse.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/AxisWsContainerTest.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/Echo.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/EchoBean.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/EchoStruct.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/server/axis/SmallEchoStruct.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/resources/
    openejb/trunk/openejb3/server/openejb-axis/src/test/resources/echo.wsdl
    openejb/trunk/openejb3/server/openejb-axis/src/test/resources/echoString-req.txt
    openejb/trunk/openejb3/server/openejb-axis2/   (with props)
    openejb/trunk/openejb3/server/openejb-axis2/pom.xml
    openejb/trunk/openejb3/server/openejb-axis2/src/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/Axis2RequestResponseTransport.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/Axis2Service.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/Axis2WsContainer.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/AxisServiceGenerator.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/HandlerLifecycleManagerFactoryImpl.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/HandlerLifecycleManagerImpl.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/WsdlQueryHandler.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/client/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/client/Axis2ClientConfigurationFactory.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/client/Axis2Config.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbEndpointController.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbInterceptor.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbMessageReceiver.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbProviderDispatcher.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbServiceDispatcher.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbWsContainer.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManager.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManagerFactory.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContainer.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContext.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleUriResolver.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleWsdlLocator.java
    openejb/trunk/openejb3/server/openejb-axis2/src/main/resources/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/resources/META-INF/
    openejb/trunk/openejb3/server/openejb-axis2/src/main/resources/META-INF/openejb-axis2.xml
    openejb/trunk/openejb3/server/openejb-axis2/src/test/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2AbstractTestCase.java
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Request.java
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Response.java
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2WsContainerTest.java
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/doclitbare/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/doclitbare/BareDocLitService.java
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/rpclit/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/rpclit/RpcLitService.java
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/simple/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/simple/HelloWorld.java
    openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/
    openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare.wsdl
    openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare_request.xml
    openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit.wsdl
    openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit_request.xml
    openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_simple.wsdl
    openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_simple_request.xml
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/CallbackMetaData.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClientHandlerResolverImpl.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClientInjectionProcessor.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClientInstance.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/HandlerChainMetaData.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/HandlerMetaData.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JaxWsProviderWrapper.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/PortRefMetaData.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/WsMetaData.java
    openejb/trunk/openejb3/server/openejb-client/src/test/java/org/apache/openejb/client/JaxWsProviderWrapperTest.java
    openejb/trunk/openejb3/server/openejb-cxf/   (with props)
    openejb/trunk/openejb3/server/openejb-cxf/pom.xml
    openejb/trunk/openejb3/server/openejb-cxf/src/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfCatalogUtils.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfEndpoint.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfService.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfServiceConfiguration.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfWsContainer.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/HttpDestination.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/HttpTransportFactory.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/JaxWsImplementorInfoImpl.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ResourceManager.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/WsdlQueryHandler.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/client/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/client/SaajInFaultInterceptor.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/client/SaajInInterceptor.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/client/SaajInterceptor.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/client/SaajOutInterceptor.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbEndpoint.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbInterceptor.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbMethodInvoker.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbWsContainer.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/pojo/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/pojo/PojoEndpoint.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/pojo/PojoWsContainer.java
    openejb/trunk/openejb3/server/openejb-cxf/src/main/resources/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/resources/META-INF/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/resources/META-INF/cxf-extension-openejb.xml
    openejb/trunk/openejb3/server/openejb-cxf/src/main/resources/META-INF/cxf.extension
    openejb/trunk/openejb3/server/openejb-cxf/src/main/resources/META-INF/org.apache.openejb.server.ServerService/
    openejb/trunk/openejb3/server/openejb-cxf/src/main/resources/META-INF/org.apache.openejb.server.ServerService/cxf
    openejb/trunk/openejb3/server/openejb-cxf/src/test/
    openejb/trunk/openejb3/server/openejb-cxf/src/test/java/
    openejb/trunk/openejb3/server/openejb-cxf/src/test/java/org/
    openejb/trunk/openejb3/server/openejb-cxf/src/test/java/org/apache/
    openejb/trunk/openejb3/server/openejb-cxf/src/test/java/org/apache/openejb/
    openejb/trunk/openejb3/server/openejb-cxf/src/test/java/org/apache/openejb/server/
    openejb/trunk/openejb3/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/
    openejb/trunk/openejb3/server/openejb-cxf/src/test/resources/
    openejb/trunk/openejb3/server/openejb-webservices/   (with props)
    openejb/trunk/openejb3/server/openejb-webservices/pom.xml
    openejb/trunk/openejb3/server/openejb-webservices/src/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/LightWeightMappingValidator.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsConstants.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsRegistry.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsServlet.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsdlVisitor.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/MessageFactoryImpl.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajFactoryFinder.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajMetaFactoryImpl.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajUniverse.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SoapConnectionFactoryImpl.java
    openejb/trunk/openejb3/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SoapFactoryImpl.java
    openejb/trunk/openejb3/server/openejb-webservices/src/test/
    openejb/trunk/openejb3/server/openejb-webservices/src/test/java/
    openejb/trunk/openejb3/server/openejb-webservices/src/test/java/org/
    openejb/trunk/openejb3/server/openejb-webservices/src/test/java/org/apache/
    openejb/trunk/openejb3/server/openejb-webservices/src/test/java/org/apache/openejb/
    openejb/trunk/openejb3/server/openejb-webservices/src/test/java/org/apache/openejb/server/
    openejb/trunk/openejb3/server/openejb-webservices/src/test/java/org/apache/openejb/server/webservices/
    openejb/trunk/openejb3/server/openejb-webservices/src/test/java/org/apache/openejb/server/webservices/saaj/
    openejb/trunk/openejb3/server/openejb-webservices/src/test/java/org/apache/openejb/server/webservices/saaj/SaajUniverseTest.java
Removed:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/EjbWebServiceContext.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxRpcWebServiceInvocationTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/JaxWsWebServiceInvocationTest.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceRefHandler.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceRefHandlerChain.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceRefHandlerChains.java
    openejb/trunk/openejb3/server/openejb-activemq/src/main/java/org/apache/openejb/App.java
    openejb/trunk/openejb3/server/openejb-activemq/src/test/java/org/apache/openejb/AppTest.java
    openejb/trunk/openejb3/server/openejb-admin/src/main/java/org/apache/openejb/App.java
    openejb/trunk/openejb3/server/openejb-admin/src/test/java/org/apache/openejb/AppTest.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/App.java
    openejb/trunk/openejb3/server/openejb-axis/src/test/java/org/apache/openejb/AppTest.java
    openejb/trunk/openejb3/server/openejb-corba/src/main/java/org/apache/openejb/App.java
    openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/App.java
    openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/App.java
    openejb/trunk/openejb3/server/openejb-http/src/test/java/org/apache/openejb/AppTest.java
    openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/App.java
    openejb/trunk/openejb3/server/openejb-server/src/test/java/org/apache/openejb/AppTest.java
    openejb/trunk/openejb3/server/openejb-telnet/src/main/java/org/apache/openejb/App.java
    openejb/trunk/openejb3/server/openejb-telnet/src/test/java/org/apache/openejb/AppTest.java
    openejb/trunk/openejb3/server/openejb-xfire/
Modified:
    openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml
    openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/NamingUtil.java
    openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/SystemComponentFactory.java
    openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatJndiBuilder.java
    openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java
    openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java
    openejb/trunk/openejb3/container/openejb-core/pom.xml
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbJarInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EnterpriseBeanBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ServiceReferenceInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WebAppInfo.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EjbModule.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/JndiEncInfoBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ReadDescriptors.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/SunConversion.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WebModule.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessInstanceManager.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/LogCategory.java
    openejb/trunk/openejb3/container/openejb-core/src/main/resources/logging.properties
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/DependenceValidationTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/OpenEjbConfigurationValidationTest.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/PersistenceUnitRefTest.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ObjectFactory.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/PortComponentRef.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/ServiceRef.java
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/web-example.xml
    openejb/trunk/openejb3/examples/ejb-examples/pom.xml
    openejb/trunk/openejb3/examples/ejb-examples/src/main/webapp/WEB-INF/web.xml
    openejb/trunk/openejb3/examples/ejb-examples/src/main/webapp/index.jsp
    openejb/trunk/openejb3/pom.xml
    openejb/trunk/openejb3/server/openejb-axis/   (props changed)
    openejb/trunk/openejb3/server/openejb-axis/pom.xml
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/EjbContainerProvider.java
    openejb/trunk/openejb3/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/HandlerChainImpl.java
    openejb/trunk/openejb3/server/openejb-client/pom.xml
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/Injection.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIResponse.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/Main.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ResponseCodes.java
    openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/JndiRequestHandler.java
    openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpRequest.java
    openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpRequestImpl.java
    openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpResponse.java
    openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpResponseImpl.java
    openejb/trunk/openejb3/server/pom.xml

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml?rev=591858&r1=591857&r2=591858&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml Sun Nov  4 14:41:49 2007
@@ -124,6 +124,11 @@
       </exclusions>
     </dependency>
     <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-cxf</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
     </dependency>

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/NamingUtil.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/NamingUtil.java?rev=591858&r1=591857&r2=591858&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/NamingUtil.java (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/NamingUtil.java Sun Nov  4 14:41:49 2007
@@ -39,6 +39,10 @@
     public static final String PROPERTIES = "properties";
     public static final String RESOURCE_ID = "resourceid";
     public static final String COMPONENT_TYPE = "componenttype";
+    public static final String WEB_SERVICE_CLASS = "webserviceclass";
+    public static final String WEB_SERVICE_QNAME = "webserviceqname";
+    public static final String WSDL_URL = "wsdlurl";
+    public static final String WSDL_REPO_URI = "wsdlrepouri";
 
     private static final AtomicInteger id = new AtomicInteger(31);
     private static final Map<String,Object> registry = new HashMap<String,Object>();
@@ -58,17 +62,46 @@
     }
 
     public static void setStaticValue(ContextResource resource, Object value) {
+        setStaticValue(resource, null, value);
+    }
+
+    public static void setStaticValue(ContextResource resource, String name, Object value) {
+        name = name != null ? "-" + name : "";
         String token = "" + id.incrementAndGet();
         registry.put(token, value);
-        resource.setProperty("static-token", token);
+        resource.setProperty("static-token" + name, token);
+    }
+
+    @SuppressWarnings({"unchecked"})
+    public static<T> T getStaticValue(Reference ref) {
+        return (T) getStaticValue(ref, null);
     }
 
-    public static Object getStaticValue(Reference ref) {
-        String token = getProperty(ref, "static-token");
+    @SuppressWarnings({"unchecked"})
+    public static <T> T getStaticValue(Reference ref, String name) {
+        name = name != null ? "-" + name : "";
+        String token = getProperty(ref, "static-token" + name);
         if (token == null) {
             return null;
         }
-        Object object = registry.get(token);
+        T object = (T) registry.get(token);
         return object;
+    }
+
+    public static Class<?> loadClass(String className) {
+        if (className == null) return null;
+        try {
+            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+            if (classLoader != null) {
+                try {
+                    Class clazz = classLoader.loadClass(className);
+                    return clazz;
+                } catch(ClassNotFoundException e) {
+                }
+            }
+            return Class.forName(className);
+        } catch (ClassNotFoundException e) {
+            return null;
+        }
     }
 }

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/SystemComponentFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/SystemComponentFactory.java?rev=591858&r1=591857&r2=591858&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/SystemComponentFactory.java (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/SystemComponentFactory.java Sun Nov  4 14:41:49 2007
@@ -17,6 +17,7 @@
  */
 package org.apache.openejb.tomcat;
 
+import static org.apache.openejb.tomcat.NamingUtil.loadClass;
 import org.apache.openejb.loader.SystemInstance;
 import static org.apache.openejb.tomcat.NamingUtil.*;
 
@@ -38,21 +39,5 @@
         // lookup the value
         Object value = SystemInstance.get().getComponent(clazz);
         return value;
-    }
-
-    private Class<?> loadClass(String className) {
-        try {
-            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-            if (classLoader != null) {
-                try {
-                    Class clazz = classLoader.loadClass(className);
-                    return clazz;
-                } catch(ClassNotFoundException e) {
-                }
-            }
-            return Class.forName(className);
-        } catch (ClassNotFoundException e) {
-            return null;
-        }
     }
 }

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatJndiBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatJndiBuilder.java?rev=591858&r1=591857&r2=591858&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatJndiBuilder.java (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatJndiBuilder.java Sun Nov  4 14:41:49 2007
@@ -17,17 +17,20 @@
  */
 package org.apache.openejb.tomcat;
 
-import org.apache.catalina.core.StandardContext;
+import static org.apache.openejb.tomcat.NamingUtil.WSDL_REPO_URI;
 import org.apache.catalina.core.NamingContextListener;
+import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.deploy.ContextEjb;
 import org.apache.catalina.deploy.ContextEnvironment;
 import org.apache.catalina.deploy.ContextResource;
 import org.apache.catalina.deploy.ContextResourceEnvRef;
+import org.apache.catalina.deploy.ContextService;
 import org.apache.catalina.deploy.ContextTransaction;
 import org.apache.catalina.deploy.NamingResources;
-import org.apache.naming.factory.Constants;
 import org.apache.naming.ContextAccessController;
+import org.apache.naming.factory.Constants;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.Injection;
 import org.apache.openejb.assembler.classic.EjbLocalReferenceInfo;
 import org.apache.openejb.assembler.classic.EjbReferenceInfo;
 import org.apache.openejb.assembler.classic.EnvEntryInfo;
@@ -38,6 +41,10 @@
 import org.apache.openejb.assembler.classic.ResourceReferenceInfo;
 import org.apache.openejb.assembler.classic.ServiceReferenceInfo;
 import org.apache.openejb.assembler.classic.WebAppInfo;
+import org.apache.openejb.assembler.classic.WsBuilder;
+import org.apache.openejb.assembler.classic.PortRefInfo;
+import org.apache.openejb.core.webservices.HandlerChainData;
+import org.apache.openejb.core.webservices.PortRefData;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.persistence.JtaEntityManager;
 import org.apache.openejb.persistence.JtaEntityManagerRegistry;
@@ -50,23 +57,32 @@
 import static org.apache.openejb.tomcat.NamingUtil.NAME;
 import static org.apache.openejb.tomcat.NamingUtil.RESOURCE_ID;
 import static org.apache.openejb.tomcat.NamingUtil.UNIT;
+import static org.apache.openejb.tomcat.NamingUtil.WEB_SERVICE_CLASS;
+import static org.apache.openejb.tomcat.NamingUtil.WEB_SERVICE_QNAME;
+import static org.apache.openejb.tomcat.NamingUtil.WSDL_URL;
 import static org.apache.openejb.tomcat.NamingUtil.setStaticValue;
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 import javax.transaction.UserTransaction;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.List;
+import java.util.ArrayList;
 
 public class TomcatJndiBuilder {
     private final StandardContext standardContext;
     private final WebAppInfo webAppInfo;
+    private final List<Injection> injections;
     private final LinkResolver<EntityManagerFactory> emfLinkResolver;
     private final boolean replaceEntry;
     private boolean useCrossClassLoaderRef = true;
     private NamingContextListener namingContextListener;
 
-    public TomcatJndiBuilder(StandardContext standardContext, WebAppInfo webAppInfo, LinkResolver<EntityManagerFactory> emfLinkResolver) {
+    public TomcatJndiBuilder(StandardContext standardContext, WebAppInfo webAppInfo,List<Injection> injections, LinkResolver<EntityManagerFactory> emfLinkResolver) {
+        this.injections = injections;
         this.standardContext = standardContext;
         this.namingContextListener = standardContext.getNamingContextListener();
         this.webAppInfo = webAppInfo;
@@ -390,9 +406,119 @@
         }
     }
 
-    @SuppressWarnings({"UnusedDeclaration"})
     public void mergeRef(NamingResources naming, ServiceReferenceInfo ref) {
-        // service refs aren't supported yet
+        ContextService service = naming.findService(ref.referenceName);
+        ContextResource resource = naming.findResource(ref.referenceName);
+        boolean addEntry = false;
+        if (resource == null) {
+            resource = new ContextResource();
+            resource.setName(ref.referenceName);
+            addEntry = true;
+        }
+
+        resource.setProperty(Constants.FACTORY, WsFactory.class.getName());
+        resource.setProperty(NAME, ref.referenceName);
+        if (ref.referenceType != null) {
+            resource.setType(ref.referenceType);
+        } else {
+            resource.setType(ref.serviceType);
+        }
+
+        if (ref.location != null) {
+            resource.setProperty(JNDI_NAME, ref.location.jndiName);
+            resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId);
+        } else {
+            resource.setProperty(WEB_SERVICE_CLASS, ref.serviceType);
+            if (ref.serviceQName != null) {
+                resource.setProperty(WEB_SERVICE_QNAME, ref.serviceQName.toString());
+            }
+
+            // add the wsdl url
+            URL wsdlURL = getWsdlUrl(ref);
+            if (wsdlURL != null) {
+                resource.setProperty(WSDL_URL, wsdlURL.toString());
+            }
+
+            if (ref.wsdlRepoUri != null) {
+                resource.setProperty(WSDL_REPO_URI, ref.wsdlRepoUri);
+            }
+
+            // add port refs
+            if (!ref.portRefs.isEmpty()) {
+                List<PortRefData> portRefs = new ArrayList<PortRefData>(ref.portRefs.size());
+                for (PortRefInfo portRefInfo : ref.portRefs) {
+                    PortRefData portRef = new PortRefData();
+                    try {
+                        portRef.setServiceEndpointInterface(standardContext.getLoader().getClassLoader().loadClass(portRefInfo.serviceEndpointInterface));
+                    } catch (Exception e) {
+                        throw new IllegalArgumentException("Could not load service endpoint interface "+ portRefInfo.serviceEndpointInterface, e);
+                    }
+                    portRef.setEnableMtom(portRefInfo.enableMtom);
+                    portRef.setPortComponentLink(portRefInfo.portComponentLink);
+                    portRef.getProperties().putAll(portRefInfo.properties);
+                    portRefs.add(portRef);
+                }
+                setStaticValue(resource, "port-refs", portRefs);
+            }
+
+            // add the handle chains
+            if (!ref.handlerChains.isEmpty()) {
+                try {
+                    List<HandlerChainData> handlerChains = null;
+                    handlerChains = WsBuilder.toHandlerChainData(ref.handlerChains, standardContext.getLoader().getClassLoader());
+                    setStaticValue(resource, "handler-chains", handlerChains);
+                    setStaticValue(resource, "injections", injections);
+                } catch (OpenEJBException e) {
+                    throw new IllegalArgumentException("Error creating handler chain for web service-ref " + ref.referenceName);
+                }
+            }
+        }
+
+        // if there was a service entry, remove it
+        if (service != null) {
+            ContextAccessController.setWritable(namingContextListener.getName(), standardContext);
+            if (!addEntry) namingContextListener.removeService(service.getName());
+            ContextAccessController.setReadOnly(namingContextListener.getName());
+        }
+
+        // add the new resource entry
+        if (addEntry) {
+            naming.addResource(resource);
+        }
+
+        // or replace the exisitng resource entry
+        if (replaceEntry) {
+            ContextAccessController.setWritable(namingContextListener.getName(), standardContext);
+            if (!addEntry) namingContextListener.removeResource(resource.getName());
+            namingContextListener.addResource(resource);
+            ContextAccessController.setReadOnly(namingContextListener.getName());
+        }
     }
 
+    private URL getWsdlUrl(ServiceReferenceInfo ref) {
+        if (ref.wsdlFile == null) return null;
+
+        URL wsdlUrl = null;
+        try {
+            wsdlUrl = new URL(ref.wsdlFile);
+        } catch (MalformedURLException e) {
+        }
+
+        if (wsdlUrl == null) {
+            wsdlUrl = standardContext.getLoader().getClassLoader().getResource(ref.wsdlFile);
+        }
+
+        if (wsdlUrl == null) {
+            try {
+                wsdlUrl = standardContext.getServletContext().getResource("/" + ref.wsdlFile);
+            } catch (MalformedURLException e) {
+            }
+        }
+
+        if (wsdlUrl == null ) {
+            throw new IllegalArgumentException("WSDL file " + ref.wsdlFile + " for web service-ref " + ref.referenceName + " not found");
+        }
+
+        return wsdlUrl;
+    }
 }

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java?rev=591858&r1=591857&r2=591858&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java Sun Nov  4 14:41:49 2007
@@ -17,38 +17,40 @@
  */
 package org.apache.openejb.tomcat;
 
+import org.apache.catalina.Container;
+import org.apache.catalina.Engine;
+import org.apache.catalina.Host;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.ServerFactory;
+import org.apache.catalina.Service;
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.core.StandardServer;
 import org.apache.openejb.OpenEJB;
-import org.apache.openejb.tomcat.installer.Paths;
-import org.apache.openejb.tomcat.installer.Installer;
 import org.apache.openejb.assembler.classic.WebAppBuilder;
 import org.apache.openejb.core.ServerFederation;
 import org.apache.openejb.core.ThreadContext;
 import org.apache.openejb.loader.Loader;
 import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.server.ServerService;
 import org.apache.openejb.server.ServiceException;
 import org.apache.openejb.server.ServiceManager;
 import org.apache.openejb.server.ejbd.EjbServer;
-import org.apache.catalina.core.StandardServer;
-import org.apache.catalina.core.StandardContext;
-import org.apache.catalina.Service;
-import org.apache.catalina.Engine;
-import org.apache.catalina.Container;
-import org.apache.catalina.Host;
-import org.apache.catalina.ServerFactory;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.Lifecycle;
+import org.apache.openejb.server.webservices.WsRegistry;
+import org.apache.openejb.tomcat.installer.Installer;
+import org.apache.openejb.tomcat.installer.Paths;
 
 import javax.servlet.ServletException;
 import javax.servlet.ServletInputStream;
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
+import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.BufferedInputStream;
 import java.util.Properties;
 
 /**
@@ -100,6 +102,13 @@
             SystemInstance.get().setComponent(WebAppBuilder.class, tomcatWebAppBuilder);
         }
 
+        // Install the Tomcat webservice registry
+        TomcatWsRegistry tomcatSoapHandler = (TomcatWsRegistry) SystemInstance.get().getComponent(WsRegistry.class);
+        if (tomcatSoapHandler == null) {
+            tomcatSoapHandler = new TomcatWsRegistry();
+            SystemInstance.get().setComponent(WsRegistry.class, tomcatSoapHandler);
+        }
+
         // Start OpenEJB
         ejbServer = new EjbServer();
         SystemInstance.get().setComponent(EjbServer.class, ejbServer);
@@ -127,6 +136,12 @@
             manager = ServiceManager.getManager();
             manager.init();
             manager.start(false);
+        } else {
+            try {
+                ServerService serverService = (ServerService) Class.forName("org.apache.openejb.server.cxf.CxfService").newInstance();
+                serverService.start();
+            } catch (Exception ignored) {
+            }
         }
 
         standardServer.addLifecycleListener(new LifecycleListener() {
@@ -189,7 +204,7 @@
                                     // context only initialized
                                     tomcatWebAppBuilder.init(standardContext);
                                 } else if (state == 1) {
-                                    // context started
+                                    // context already started
                                     standardContext.addParameter("openejb.start.late", "true");
                                     ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
                                     Thread.currentThread().setContextClassLoader(standardContext.getLoader().getClassLoader());

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java?rev=591858&r1=591857&r2=591858&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java Sun Nov  4 14:41:49 2007
@@ -22,6 +22,7 @@
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.ServerFactory;
 import org.apache.catalina.Service;
+import org.apache.catalina.Wrapper;
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.core.StandardServer;
@@ -35,6 +36,9 @@
 import org.apache.naming.ContextAccessController;
 import org.apache.naming.ContextBindings;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.Injection;
+import org.apache.openejb.spi.ContainerSystem;
+import org.apache.openejb.server.webservices.WsServlet;
 import org.apache.openejb.assembler.classic.AppInfo;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.openejb.assembler.classic.LinkResolver;
@@ -43,6 +47,7 @@
 import org.apache.openejb.assembler.classic.WebAppInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.assembler.classic.ConnectorInfo;
+import org.apache.openejb.assembler.classic.InjectionBuilder;
 import org.apache.openejb.config.AnnotationDeployer;
 import org.apache.openejb.config.AppModule;
 import org.apache.openejb.config.ConfigurationFactory;
@@ -52,12 +57,15 @@
 import org.apache.openejb.config.UnknownModuleTypeException;
 import org.apache.openejb.config.WebModule;
 import org.apache.openejb.core.ivm.naming.SystemComponentReference;
+import org.apache.openejb.core.webservices.JaxWsUtils;
+import org.apache.openejb.core.CoreWebDeploymentInfo;
+import org.apache.openejb.core.CoreContainerSystem;
+import org.apache.openejb.core.TemporaryClassLoader;
 import org.apache.openejb.jee.EnvEntry;
 import org.apache.openejb.jee.WebApp;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
-import org.apache.openjpa.lib.util.TemporaryClassLoader;
 import org.apache.xbean.finder.ResourceFinder;
 import org.apache.xbean.finder.UrlSet;
 import org.omg.CORBA.ORB;
@@ -79,6 +87,7 @@
 import java.util.Iterator;
 
 public class TomcatWebAppBuilder implements WebAppBuilder, ContextListener {
+    public static final String IGNORE_CONTEXT = TomcatWebAppBuilder.class.getName() + ".IGNORE";
     private static final Logger logger = Logger.getInstance(LogCategory.OPENEJB.createChild("tomcat"), "org.apache.openejb.util.resources");
 
     private final TreeMap<String, ContextInfo> infos = new TreeMap<String, ContextInfo>();
@@ -89,6 +98,7 @@
     private final Map<String,DeployedApplication> deployedApps = new TreeMap<String,DeployedApplication>();
     private final DeploymentLoader deploymentLoader;
     private Assembler assembler;
+    private CoreContainerSystem containerSystem;
 
     public TomcatWebAppBuilder() {
         StandardServer standardServer = (StandardServer) ServerFactory.getServer();
@@ -122,6 +132,7 @@
         configurationFactory = new ConfigurationFactory();
         deploymentLoader = new DeploymentLoader();
         assembler = (Assembler) SystemInstance.get().getComponent(org.apache.openejb.spi.Assembler.class);
+        containerSystem = (CoreContainerSystem) SystemInstance.get().getComponent(ContainerSystem.class);
     }
 
     public void start() {
@@ -201,6 +212,7 @@
 
     // context class loader is now defined, but no classes should have been loaded
     public void start(StandardContext standardContext) {
+        if (standardContext.getServletContext().getAttribute(IGNORE_CONTEXT) != null) return;
 
         Assembler assembler = getAssembler();
         if (assembler == null) {
@@ -239,8 +251,20 @@
 
         if (webAppInfo != null) {
             try {
-                TomcatJndiBuilder jndiBuilder = new TomcatJndiBuilder(standardContext, webAppInfo, contextInfo.emfLinkResolver);
+                // determind the injections
+                InjectionBuilder injectionBuilder = new InjectionBuilder(standardContext.getLoader().getClassLoader());
+                List<Injection> injections = injectionBuilder.buildInjections(webAppInfo.jndiEnc);
+
+                // merge OpenEJB jndi into Tomcat jndi
+                TomcatJndiBuilder jndiBuilder = new TomcatJndiBuilder(standardContext, webAppInfo, injections, contextInfo.emfLinkResolver);
                 jndiBuilder.mergeJndi();
+
+                // add WebDeploymentInfo to ContainerSystem
+                CoreWebDeploymentInfo webDeploymentInfo = new CoreWebDeploymentInfo();
+                webDeploymentInfo.setId(webAppInfo.moduleId);
+                webDeploymentInfo.setClassLoader(standardContext.getLoader().getClassLoader());
+                webDeploymentInfo.getInjections().addAll(injections);
+                getContainerSystem().addWebDeployment(webDeploymentInfo);
             } catch (Exception e) {
                 logger.error("Error merging OpenEJB JNDI entries in to war " + standardContext.getPath() + ": Exception: " + e.getMessage(), e);
             }
@@ -248,12 +272,50 @@
     }
 
     public void afterStart(StandardContext standardContext) {
+        if (standardContext.getServletContext().getAttribute(IGNORE_CONTEXT) != null) return;
+
+        // replace any webservices with the webservice servlet
+        // HACK: use a temp class loader because the class may have been loaded before
+        // the openejb classes were added to the system class path so the WebService anntation
+        // will not be present on the class
+        TemporaryClassLoader tempClassLoader = new TemporaryClassLoader(standardContext.getLoader().getClassLoader());
+        for (Container container : standardContext.findChildren()) {
+            if (container instanceof Wrapper) {
+                Wrapper wrapper = (Wrapper) container;
+                String servletClass = wrapper.getServletClass();
+                try {
+                    Class<?> clazz = tempClassLoader.loadClass(servletClass);
+                    if (JaxWsUtils.isWebService(clazz)) {
+                        wrapper.setServletClass(WsServlet.class.getName());
+                        if (wrapper.getServlet() != null) {
+                            wrapper.load();
+                            wrapper.unload();
+                        }
+                    }
+                } catch (Exception e) {
+                    // will be reported by the tomcat
+                }
+            }
+        }
+
         // bind extra stuff at the java:comp level which can only be
         // bound after the context is created
         ContextAccessController.setWritable(standardContext.getNamingContextListener().getName(), standardContext);
         try {
             Context comp = (Context) ContextBindings.getClassLoader().lookup("comp");
-            
+
+            // add context to WebDeploymentInfo
+            ContextInfo contextInfo = getContextInfo(standardContext);
+            for (WebAppInfo webAppInfo : contextInfo.appInfo.webApps) {
+                if (("/" + webAppInfo.contextRoot).equals(standardContext.getPath())) {
+                    CoreWebDeploymentInfo webDeploymentInfo = (CoreWebDeploymentInfo) getContainerSystem().getWebDeploymentInfo(webAppInfo.moduleId);
+                    if (webDeploymentInfo != null) {
+                        webDeploymentInfo.setJndiEnc(comp);
+                    }
+                    break;
+                }
+            }
+
             // bind TransactionManager
             TransactionManager transactionManager = SystemInstance.get().getComponent(TransactionManager.class);
             safeBind(comp, "TransactionManager", transactionManager);
@@ -280,6 +342,8 @@
     }
 
     public void afterStop(StandardContext standardContext) {
+        if (standardContext.getServletContext().getAttribute(IGNORE_CONTEXT) != null) return;
+
         ContextInfo contextInfo = getContextInfo(standardContext);
         if (contextInfo != null && contextInfo.deployer == null) {
             try {
@@ -572,6 +636,13 @@
             assembler = (Assembler) SystemInstance.get().getComponent(org.apache.openejb.spi.Assembler.class);
         }
         return assembler;
+    }
+
+    private CoreContainerSystem getContainerSystem() {
+        if (containerSystem == null) {
+            containerSystem = (CoreContainerSystem) SystemInstance.get().getComponent(ContainerSystem.class);
+        }
+        return containerSystem;
     }
 
     private String getId(StandardContext standardContext) {

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWsRegistry.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWsRegistry.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWsRegistry.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWsRegistry.java Sun Nov  4 14:41:49 2007
@@ -0,0 +1,255 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.tomcat;
+
+import static org.apache.openejb.tomcat.TomcatWebAppBuilder.IGNORE_CONTEXT;
+import org.apache.catalina.Container;
+import org.apache.catalina.Context;
+import org.apache.catalina.Engine;
+import org.apache.catalina.Host;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.ServerFactory;
+import org.apache.catalina.Service;
+import org.apache.catalina.Wrapper;
+import org.apache.catalina.authenticator.BasicAuthenticator;
+import org.apache.catalina.authenticator.DigestAuthenticator;
+import org.apache.catalina.authenticator.NonLoginAuthenticator;
+import org.apache.catalina.authenticator.SSLAuthenticator;
+import org.apache.catalina.connector.Connector;
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.core.StandardServer;
+import org.apache.catalina.deploy.LoginConfig;
+import org.apache.catalina.deploy.SecurityCollection;
+import org.apache.catalina.deploy.SecurityConstraint;
+import org.apache.openejb.server.webservices.WsRegistry;
+import org.apache.openejb.server.webservices.WsServlet;
+import org.apache.openejb.server.httpd.HttpListener;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+public class TomcatWsRegistry implements WsRegistry {
+    private final Map<String, StandardContext> webserviceContexts = new TreeMap<String, StandardContext>();
+    private Engine engine;
+    private List<Connector> connectors;
+
+    public TomcatWsRegistry() {
+        StandardServer standardServer = (StandardServer) ServerFactory.getServer();
+        for (Service service : standardServer.findServices()) {
+            if (service.getContainer() instanceof Engine) {
+                connectors = Arrays.asList(service.findConnectors());
+                engine = (Engine) service.getContainer();
+                break;
+            }
+        }
+    }
+
+    public List<String> setWsContainer(String virtualHost, String contextRoot, String servletName, HttpListener wsContainer) throws Exception {
+        if (virtualHost == null) virtualHost = engine.getDefaultHost();
+
+        Container host = engine.findChild(virtualHost);
+        if (host == null) {
+            throw new IllegalArgumentException("Invalid virtual host '" + virtualHost + "'.  Do you have a matchiing Host entry in the server.xml?");
+        }
+
+        Context context = (Context) host.findChild("/" + contextRoot);
+        if (context == null) {
+            throw new IllegalArgumentException("Could not find web application context " + contextRoot + " in host " + host.getName());
+        }
+
+        Wrapper wrapper = (Wrapper) context.findChild(servletName);
+        if (wrapper == null) {
+            throw new IllegalArgumentException("Could not find servlet " + contextRoot + " in web application context " + context.getName());
+        }
+
+        setWsContainer(context, wrapper, wsContainer);
+
+        // add service locations
+        List<String> addresses = new ArrayList<String>();
+        for (Connector connector : connectors) {
+            for (String mapping : wrapper.findMappings()) {
+                URI address = new URI(connector.getScheme(), null, host.getName(), connector.getPort(), "/" + contextRoot + mapping, "wsdl", null);
+                addresses.add(address.toString());
+            }
+        }
+        return addresses;
+    }
+
+    public void clearWsContainer(String virtualHost, String contextRoot, String servletName) {
+        if (virtualHost == null) virtualHost = engine.getDefaultHost();
+
+        Container host = engine.findChild(virtualHost);
+        if (host == null) {
+            throw new IllegalArgumentException("Invalid virtual host '" + virtualHost + "'.  Do you have a matchiing Host entry in the server.xml?");
+        }
+
+        Context context = (Context) host.findChild("/" + contextRoot);
+        if (context == null) {
+            throw new IllegalArgumentException("Could not find web application context " + contextRoot + " in host " + host.getName());
+        }
+
+        Wrapper wrapper = (Wrapper) context.findChild(servletName);
+        if (wrapper == null) {
+            throw new IllegalArgumentException("Could not find servlet " + contextRoot + " in web application context " + context.getName());
+        }
+
+        // clear the webservice ref in the servlet context
+        String webServicecontainerId = wrapper.findInitParameter(WsServlet.WEBSERVICE_CONTAINER);
+        if (webServicecontainerId != null) {
+            context.getServletContext().removeAttribute(webServicecontainerId);
+            wrapper.removeInitParameter(WsServlet.WEBSERVICE_CONTAINER);
+        }
+    }
+
+    public List<String> addWsContainer(String path, HttpListener httpListener, String virtualHost, String realmName, String transportGuarantee, String authMethod, ClassLoader classLoader) throws Exception {
+        if (path == null) throw new NullPointerException("contextRoot is null");
+        if (httpListener == null) throw new NullPointerException("httpListener is null");
+
+        // assure context root with a leading slash
+        if (!path.startsWith("/")) path = "/" + path;
+
+        // find the existing host (we do not auto-create hosts)
+        if (virtualHost == null) virtualHost = engine.getDefaultHost();
+        Container host = engine.findChild(virtualHost);
+        if (host == null) {
+            throw new IllegalArgumentException("Invalid virtual host '" + virtualHost + "'.  Do you have a matchiing Host entry in the server.xml?");
+        }
+
+        // build the context
+        StandardContext context = new StandardContext();
+        context.setPath(path);
+        context.setDocBase("");
+        context.setParentClassLoader(classLoader);
+        context.setDelegate(true);
+
+        // Tomcat has a stupid rule where a life cycle listener must set
+        // configured true, or it will treat it as a failed deployment
+        context.addLifecycleListener(new LifecycleListener() {
+            public void lifecycleEvent(LifecycleEvent event) {
+                if (event.getType().equals(Lifecycle.START_EVENT)) {
+                    Context context = (Context) event.getLifecycle();
+                    context.setConfigured(true);
+                }
+            }
+        });
+
+        // Configure security
+        if (authMethod != null) {
+            authMethod = authMethod.toUpperCase();
+        }
+        if (transportGuarantee != null) {
+            transportGuarantee = transportGuarantee.toUpperCase();
+        }
+        if (authMethod == null || "NONE".equals(authMethod)) {
+            // ignore none for now as the  NonLoginAuthenticator seems to be completely hosed
+        } else if ("BASIC".equals(authMethod) || "DIGEST".equals(authMethod) || "CLIENT-CERT".equals(authMethod)) {
+
+            //Setup a login configuration
+            LoginConfig loginConfig = new LoginConfig();
+            loginConfig.setAuthMethod(authMethod);
+            loginConfig.setRealmName(realmName);
+            context.setLoginConfig(loginConfig);
+
+            //Setup a default Security Constraint
+            SecurityCollection collection = new SecurityCollection();
+            collection.addMethod("GET");
+            collection.addMethod("POST");
+            collection.addPattern("/*");
+            collection.setName("default");
+            SecurityConstraint sc = new SecurityConstraint();
+            sc.addAuthRole("*");
+            sc.addCollection(collection);
+            sc.setAuthConstraint(true);
+            sc.setUserConstraint(transportGuarantee);
+            context.addConstraint(sc);
+            context.addSecurityRole("default");
+
+            //Set the proper authenticator
+            if ("BASIC".equals(authMethod)) {
+                context.addValve(new BasicAuthenticator());
+            } else if ("DIGEST".equals(authMethod)) {
+                context.addValve(new DigestAuthenticator());
+            } else if ("CLIENT-CERT".equals(authMethod)) {
+                context.addValve(new SSLAuthenticator());
+            } else if ("NONE".equals(authMethod)) {
+                context.addValve(new NonLoginAuthenticator());
+            }
+        } else {
+            throw new IllegalArgumentException("Invalid authMethod: " + authMethod);
+        }
+
+        // Mark this as a dynamic context that should not be inspected by the TomcatWebAppBuilder
+        context.getServletContext().setAttribute(IGNORE_CONTEXT, "true");
+
+        // build the servlet
+        Wrapper wrapper = context.createWrapper();
+        wrapper.setName("webservice");
+        wrapper.setServletClass(WsServlet.class.getName());
+        setWsContainer(context, wrapper, httpListener);
+        wrapper.addMapping("/*");
+
+
+        // add add servlet to context
+        context.addChild(wrapper);
+        context.addServletMapping("/*", "webservice");
+
+        // add context to host
+        host.addChild(context);
+        webserviceContexts.put(path, context);
+
+        // register wsdl locations for service-ref resolution
+        List<String> addresses = new ArrayList<String>();
+        for (Connector connector : connectors) {
+            URI address = new URI(connector.getScheme(), null, host.getName(), connector.getPort(), path, "wsdl", null);
+            addresses.add(address.toString());
+        }
+        return addresses;
+    }
+
+    public void removeWsContainer(String path) {
+        if (path == null) return;
+
+        // assure context root with a leading slash
+        if (!path.startsWith("/")) path = "/" + path;
+
+        StandardContext context = webserviceContexts.remove(path);
+        try {
+            context.stop();
+            context.destroy();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        Host host = (Host) context.getParent();
+        host.removeChild(context);
+    }
+
+    private void setWsContainer(Context context, Wrapper wrapper, HttpListener wsContainer) {
+        // Make up an ID for the WebServiceContainer
+        // put a reference the ID in the init-params
+        // put the WebServiceContainer in the webapp context keyed by its ID
+        String webServicecontainerID = wrapper.getName() + WsServlet.WEBSERVICE_CONTAINER + wsContainer.hashCode();
+        context.getServletContext().setAttribute(webServicecontainerID, wsContainer);
+        wrapper.addInitParameter(WsServlet.WEBSERVICE_CONTAINER, webServicecontainerID);
+    }
+}

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/WsFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/WsFactory.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/WsFactory.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/WsFactory.java Sun Nov  4 14:41:49 2007
@@ -0,0 +1,115 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.tomcat;
+
+import static org.apache.openejb.tomcat.NamingUtil.WSDL_REPO_URI;
+import org.apache.naming.ResourceRef;
+import org.apache.openejb.Injection;
+import org.apache.openejb.core.ivm.naming.JaxWsServiceReference;
+import org.apache.openejb.core.webservices.HandlerChainData;
+import org.apache.openejb.core.webservices.PortRefData;
+import static org.apache.openejb.tomcat.NamingUtil.JNDI_NAME;
+import static org.apache.openejb.tomcat.NamingUtil.WEB_SERVICE_CLASS;
+import static org.apache.openejb.tomcat.NamingUtil.WEB_SERVICE_QNAME;
+import static org.apache.openejb.tomcat.NamingUtil.WSDL_URL;
+import static org.apache.openejb.tomcat.NamingUtil.getProperty;
+import static org.apache.openejb.tomcat.NamingUtil.getStaticValue;
+import static org.apache.openejb.tomcat.NamingUtil.loadClass;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Collections;
+
+public class WsFactory extends AbstractObjectFactory {
+    public Object getObjectInstance(Object object, Name name, Context context, Hashtable environment) throws Exception {
+        // ignore non resource-refs
+        if (!(object instanceof ResourceRef)) {
+            return null;
+        }
+
+        Reference ref = (Reference) object;
+
+        Object value;
+        if (getProperty(ref, JNDI_NAME) != null) {
+            // lookup the value in JNDI
+            value = super.getObjectInstance(object, name, context, environment);
+        } else {
+            // load service class which is used to construct the port
+            String serviceClassName = getProperty(ref, WEB_SERVICE_CLASS);
+            Class<? extends Service> serviceClass = Service.class;
+            if (serviceClassName != null) {
+                serviceClass = loadClass(serviceClassName).asSubclass(Service.class);
+                if (serviceClass == null) {
+                    throw new NamingException("Could not load service type class "+ serviceClassName);
+                }
+            }
+
+            // load the reference class which is the ultimate type of the port
+            Class<?> referenceClass = loadClass(ref.getClassName());
+
+            // if ref class is a subclass of Service, use it for the service class
+            if (referenceClass != null && Service.class.isAssignableFrom(referenceClass)) {
+                serviceClass = referenceClass.asSubclass(Service.class);
+            }
+
+            // Service QName
+            QName serviceQName = null;
+            if (getProperty(ref, WEB_SERVICE_QNAME) != null) {
+                serviceQName = QName.valueOf(getProperty(ref, WEB_SERVICE_QNAME));
+            }
+
+            // WSDL URL
+            URL wsdlUrl = null;
+            if (wsdlUrl == null && getProperty(ref, WSDL_URL) != null) {
+                wsdlUrl = new URL(getProperty(ref, WSDL_URL));
+            }
+
+            // WSDL URI
+            String wsdlRepoUri = null;
+            if (wsdlRepoUri == null) {
+                wsdlRepoUri = getProperty(ref, WSDL_REPO_URI);
+            }
+
+            // port refs
+            List<PortRefData> portRefs = getStaticValue(ref, "port-refs");
+            if (portRefs == null) portRefs = Collections.emptyList();
+
+            // HandlerChain
+            List<HandlerChainData> handlerChains = getStaticValue(ref, "handler-chains");
+            if (handlerChains == null) handlerChains = Collections.emptyList();
+            List<Injection> injections = getStaticValue(ref, "injections");
+            if (injections == null) injections = Collections.emptyList();
+
+            JaxWsServiceReference serviceReference = new JaxWsServiceReference(serviceClass, referenceClass, wsdlUrl, serviceQName, wsdlRepoUri, portRefs, handlerChains, injections);
+            value = serviceReference.getObject();
+        }
+
+        return value;
+    }
+
+    protected String buildJndiName(Reference reference) throws NamingException {
+        throw new UnsupportedOperationException();
+    }
+}

Modified: openejb/trunk/openejb3/container/openejb-core/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/pom.xml?rev=591858&r1=591857&r2=591858&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/pom.xml (original)
+++ openejb/trunk/openejb3/container/openejb-core/pom.xml Sun Nov  4 14:41:49 2007
@@ -232,6 +232,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jaxr_1.0_spec</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jaxrpc_1.1_spec</artifactId>
     </dependency>
     <dependency>
@@ -320,9 +324,15 @@
       <groupId>org.codehaus.swizzle</groupId>
       <artifactId>swizzle-stream</artifactId>
     </dependency>
+
+    <!-- webservices  -->
     <dependency>
       <groupId>org.apache.axis2</groupId>
       <artifactId>axis2-jaxws-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>wsdl4j</groupId>
+      <artifactId>wsdl4j</artifactId>
     </dependency>
   </dependencies>
 

Added: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/InjectionProcessor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/InjectionProcessor.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/InjectionProcessor.java (added)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/InjectionProcessor.java Sun Nov  4 14:41:49 2007
@@ -0,0 +1,138 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb;
+
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+import org.apache.xbean.recipe.StaticRecipe;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.util.List;
+import java.util.Map;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+
+public class InjectionProcessor<T> {
+    private static final Logger logger = Logger.getInstance(LogCategory.OPENEJB, InjectionProcessor.class);
+    private final Class<? extends T> beanClass;
+    private final List<Injection> injections;
+    private final List<Method> postConstructMethods;
+    private final List<Method> preDestroyMethods;
+    private final Context context;
+    private T instance;
+
+    public InjectionProcessor(Class<? extends T> beanClass, List<Injection> injections, List<Method> postConstructMethods, List<Method> preDestroyMethods, Context context) {
+        this.beanClass = beanClass;
+        this.injections = injections;
+        this.postConstructMethods = postConstructMethods;
+        this.preDestroyMethods = preDestroyMethods;
+        this.context = context;
+    }
+
+    public T createInstance() throws OpenEJBException {
+        if (instance == null) {
+            construct();
+        }
+        return instance;
+    }
+
+    public T getInstance() {
+        return instance;
+    }
+
+    private void construct() throws OpenEJBException {
+        if (instance != null) throw new IllegalStateException("Instance already constructed");
+
+        ObjectRecipe objectRecipe = new ObjectRecipe(beanClass);
+        objectRecipe.allow(Option.FIELD_INJECTION);
+        objectRecipe.allow(Option.PRIVATE_PROPERTIES);
+        objectRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+
+        fillInjectionProperties(objectRecipe);
+
+        Object object = null;
+        try {
+            object = objectRecipe.create(beanClass.getClassLoader());
+        } catch (Exception e) {
+            throw new OpenEJBException("Error while creating bean " + beanClass.getName(), e);
+        }
+
+        Map unsetProperties = objectRecipe.getUnsetProperties();
+        if (unsetProperties.size() > 0) {
+            for (Object property : unsetProperties.keySet()) {
+                logger.warning("Injection: No such property '" + property + "' in class " + beanClass.getName());
+            }
+        }
+        instance = beanClass.cast(object);
+    }
+
+    public void postConstruct() throws OpenEJBException {
+        if (instance == null) throw new IllegalStateException("Instance has not been constructed");
+        if (postConstructMethods == null) return;
+        for (Method postConstruct : postConstructMethods) {
+            try {
+                postConstruct.invoke(instance);
+            } catch (Exception e) {
+                if (e instanceof InvocationTargetException && e.getCause() instanceof Exception) {
+                    e = (Exception) e.getCause();
+                }
+                throw new OpenEJBException("Error while calling post construct method", e);
+            }
+        }
+    }
+
+    public void preDestroy() {
+        if (instance == null) return;
+        if (preDestroyMethods == null) return;
+        for (Method preDestroy : preDestroyMethods) {
+            try {
+                preDestroy.invoke(instance);
+            } catch (Exception e) {
+                if (e instanceof InvocationTargetException && e.getCause() instanceof Exception) {
+                    e = (Exception) e.getCause();
+                }
+                logger.error("Error while calling pre destroy method", e);
+            }
+        }
+    }
+
+    private void fillInjectionProperties(ObjectRecipe objectRecipe) {
+        if (injections == null) return;
+        
+        for (Injection injection : injections) {
+            if (!injection.getTarget().isAssignableFrom(beanClass)) continue;
+            try {
+                String jndiName = injection.getJndiName();
+                Object object = context.lookup("java:comp/env/" + jndiName);
+                if (object instanceof String) {
+                    String string = (String) object;
+                    // Pass it in raw so it could be potentially converted to
+                    // another data type by an xbean-reflect property editor
+                    objectRecipe.setProperty(injection.getTarget().getName() + "/" + injection.getName(), string);
+                } else {
+                    objectRecipe.setProperty(injection.getTarget().getName() + "/" + injection.getName(), new StaticRecipe(object));
+                }
+            } catch (NamingException e) {
+                logger.warning("Injection data not found in JNDI context: jndiName='" + injection.getJndiName() + "', target=" + injection.getTarget() + "/" + injection.getName());
+            }
+        }
+    }
+}



Mime
View raw message