You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2008/11/12 13:42:49 UTC
svn commit: r713355 [1/5] - in /cxf/sandbox/2.2.x-continuations: ./ api/
api/src/ api/src/main/ api/src/main/java/ api/src/main/java/org/
api/src/main/java/org/apache/ api/src/main/java/org/apache/cxf/
api/src/main/java/org/apache/cxf/continuations/ rt...
Author: sergeyb
Date: Wed Nov 12 04:42:46 2008
New Revision: 713355
URL: http://svn.apache.org/viewvc?rev=713355&view=rev
Log:
Adding code bits dealing with continuations for wider audience to comment
Added:
cxf/sandbox/2.2.x-continuations/
cxf/sandbox/2.2.x-continuations/api/
cxf/sandbox/2.2.x-continuations/api/pom.xml (with props)
cxf/sandbox/2.2.x-continuations/api/src/
cxf/sandbox/2.2.x-continuations/api/src/main/
cxf/sandbox/2.2.x-continuations/api/src/main/java/
cxf/sandbox/2.2.x-continuations/api/src/main/java/org/
cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/
cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/
cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/
cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationInfo.java (with props)
cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java (with props)
cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationWrapper.java (with props)
cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/SuspendedInvocationException.java (with props)
cxf/sandbox/2.2.x-continuations/rt/
cxf/sandbox/2.2.x-continuations/rt/core/
cxf/sandbox/2.2.x-continuations/rt/core/pom.xml (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/Messages.properties (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/ServiceConstructionException.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/BeanInvoker.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Factory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/FactoryInvoker.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Messages.properties (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PerRequestFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PooledFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SessionFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SingletonFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SpringBeanFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractMultiplexDestination.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/HttpUriMapper.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/Messages.properties (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/MultipleEndpointObserver.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryMessages.properties (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/UrlUtilities.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryException.java (with props)
cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/pom.xml (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyConnectorFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyContextInspector.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPHandler.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPTransportFactory.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/Messages.properties (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ServerEngine.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ThreadingParameters.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapper.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JAXBHelper.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineFactoryBeanDefinitionParser.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/NamespaceHandler.java (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/META-INF/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/META-INF/cxf/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/META-INF/cxf/bus-extensions.xml (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/META-INF/cxf/cxf-extension-http-jetty.xml (with props)
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/META-INF/cxf/cxf.extension
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/META-INF/spring.handlers
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/META-INF/spring.schemas
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/schemas/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/schemas/configuration/
cxf/sandbox/2.2.x-continuations/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd (with props)
cxf/sandbox/2.2.x-continuations/systests/
cxf/sandbox/2.2.x-continuations/systests/pom.xml (with props)
cxf/sandbox/2.2.x-continuations/systests/src/
cxf/sandbox/2.2.x-continuations/systests/src/test/
cxf/sandbox/2.2.x-continuations/systests/src/test/java/
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/ClientServerContinuationTest.java (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/ClientServerWrappedContinuationTest.java (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/ControlWorker.java (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/HelloContinuation.java (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/HelloContinuationService.java (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/HelloImplWithContinuation.java (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/HelloImplWithWrapppedContinuation.java (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/HelloWorker.java (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/cxf.xml (with props)
cxf/sandbox/2.2.x-continuations/systests/src/test/java/org/apache/cxf/systest/jaxws/continuations/jetty-engine.xml (with props)
Added: cxf/sandbox/2.2.x-continuations/api/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/api/pom.xml?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/api/pom.xml (added)
+++ cxf/sandbox/2.2.x-continuations/api/pom.xml Wed Nov 12 04:42:46 2008
@@ -0,0 +1,264 @@
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-api</artifactId>
+ <packaging>jar</packaging>
+ <name>Apache CXF API</name>
+ <version>2.2-SNAPSHOT</version>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.1_spec</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ws.commons.schema</groupId>
+ <artifactId>XmlSchema</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-xjc</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-annotation_1.0_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.neethi</groupId>
+ <artifactId>neethi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-schemas</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-xjc-dv</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-schemas</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/schemas</outputDirectory>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-schemas</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-xsd</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+ <xsdOptions>
+ <xsdOption>
+ <xsd>${basedir}/target/schemas/schemas/wsdl/http.xsd</xsd>
+ <bindingFile>${basedir}/target/schemas/schemas/wsdl/http.xjb</bindingFile>
+ <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
+ <dependencies>
+ <dependency>${basedir}/target/schemas/schemas/wsdl/wsdl.xsd</dependency>
+ </dependencies>
+ </xsdOption>
+ <xsdOption>
+ <xsd>${basedir}/target/schemas/schemas/wsdl/ws-addr.xsd</xsd>
+ <packagename>org.apache.cxf.ws.addressing</packagename>
+ </xsdOption>
+ <xsdOption>
+ <xsd>${basedir}/target/schemas/schemas/wsdl/addressing.xsd</xsd>
+ <bindingFile>${basedir}/target/schemas/schemas/wsdl/addressing.xjb</bindingFile>
+ </xsdOption>
+ <xsdOption>
+ <xsd>${basedir}/target/schemas/schemas/configuration/security.xsd</xsd>
+ <bindingFile>${basedir}/target/schemas/schemas/configuration/security.xjb</bindingFile>
+ </xsdOption>
+ <xsdOption>
+ <xsd>${basedir}/target/schemas/schemas/wsdl/ws-addr-wsdl.xsd</xsd>
+ <bindingFile>${basedir}/target/schemas/schemas/wsdl/ws-addr-wsdl.xjb</bindingFile>
+ <extension>true</extension>
+ </xsdOption>
+ <xsdOption>
+ <xsd>${basedir}/target/schemas/schemas/wsdl/addressing200403.xsd</xsd>
+ <bindingFile>${basedir}/target/schemas/schemas/wsdl/addressing200403.xjb</bindingFile>
+ </xsdOption>
+ </xsdOptions>
+ </configuration>
+ <goals>
+ <goal>xsdtojava</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <configuration>
+ <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
+ <xsdOptions>
+ <xsdOption>
+ <xsd>${basedir}/src/test/resources/schemas/wsdl/test-conf.xsd</xsd>
+ <bindingFile>${basedir}/src/test/resources/schemas/wsdl/test-conf.xjb</bindingFile>
+ <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
+ <deleteDirs>
+ <deleteDir>${basedir}/target/generated/src/test/java/org/apache/cxf/wsdl</deleteDir>
+ </deleteDirs>
+ </xsdOption>
+ <xsdOption>
+ <xsd>${basedir}/src/test/resources/schemas/foo.xsd</xsd>
+ </xsdOption>
+ </xsdOptions>
+ </configuration>
+ <goals>
+ <goal>xsdtojava</goal>
+ </goals>
+ </execution>
+
+ </executions>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-xjc-dv</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <header>Apache CXF API</header>
+ <footer>Apache CXF API</footer>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>fastinstall</id>
+ </profile>
+ <profile>
+ <!-- default profile enables javadoc stuff -->
+ <id>everything</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/cxf/trunk/api</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cxf/trunk/api</developerConnection>
+ </scm>
+
+</project>
Propchange: cxf/sandbox/2.2.x-continuations/api/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/api/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/sandbox/2.2.x-continuations/api/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationInfo.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationInfo.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationInfo.java (added)
+++ cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationInfo.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,43 @@
+/**
+ * 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.cxf.continuations;
+
+import org.apache.cxf.message.Message;
+
+public class ContinuationInfo {
+ private Message currentMessage;
+ private Object userObject;
+
+ public ContinuationInfo(Message m) {
+ currentMessage = m;
+ }
+
+ public Message getMessage() {
+ return currentMessage;
+ }
+
+ public void setUserObject(Object object) {
+ userObject = object;
+ }
+
+ public Object getUserObject() {
+ return userObject;
+ }
+}
Propchange: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationInfo.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java (added)
+++ cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,24 @@
+/**
+ * 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.cxf.continuations;
+
+public interface ContinuationProvider {
+ ContinuationWrapper getContinuation(Object mutex);
+}
Propchange: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationWrapper.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationWrapper.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationWrapper.java (added)
+++ cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationWrapper.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,74 @@
+/**
+ * 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.cxf.continuations;
+
+public interface ContinuationWrapper {
+
+ /** Suspend handling.
+ * This method will suspend the request for the timeout or until resume is
+ * called.
+ * @param timeout. A timeout of < 0 will cause an immediate return. I timeout of 0 will wait indefinitely.
+ * @return True if resume called or false if timeout.
+ */
+ boolean suspend(long timeout);
+
+ /** Resume the request.
+ * Resume a suspended request. The passed event will be returned in the getObject method.
+ */
+ void resume();
+
+
+ /** Reset the continuation.
+ * Cancel any pending status of the continuation.
+ */
+ void reset();
+
+ /** Is this a newly created Continuation.
+ * <p>
+ * A newly created continuation has not had {@link #getEvent(long)} called on it.
+ * </p>
+ * @return True if the continuation has just been created and has not yet suspended the request.
+ */
+ boolean isNew();
+
+ /** Get the pending status?
+ * A continuation is pending while the handling of a call to suspend has not completed.
+ * For blocking continuations, pending is true only during the call to {@link #suspend(long)}.
+ * For non-blocking continuations, pending is true until a second call to {@link #suspend(long)},
+ * thus this method can be used to determine if a request is being retried.
+ * @return True if the continuation is handling a call to suspend.
+ */
+ boolean isPending();
+
+ /** Get the resumed status?
+ * @return True if the continuation is has been resumed.
+ */
+ boolean isResumed();
+
+ /** Arbitrary object associated with the continuation for context.
+ * @return An arbitrary object associated with the continuation
+ */
+ Object getObject();
+
+ /** Arbitrary object associated with the continuation for context.
+ * @param o An arbitrary object to associate with the continuation
+ */
+ void setObject(Object o);
+}
Propchange: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationWrapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/ContinuationWrapper.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/SuspendedInvocationException.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/SuspendedInvocationException.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/SuspendedInvocationException.java (added)
+++ cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/SuspendedInvocationException.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,32 @@
+/**
+ * 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.cxf.continuations;
+
+public class SuspendedInvocationException extends RuntimeException {
+
+ public SuspendedInvocationException(Throwable cause) {
+ super(cause);
+ }
+
+ public RuntimeException getRuntimeException() {
+ Throwable ex = getCause();
+ return ex instanceof RuntimeException ? (RuntimeException)ex : null;
+ }
+}
Propchange: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/SuspendedInvocationException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/api/src/main/java/org/apache/cxf/continuations/SuspendedInvocationException.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/pom.xml?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/pom.xml (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/pom.xml Wed Nov 12 04:42:46 2008
@@ -0,0 +1,90 @@
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-core</artifactId>
+ <packaging>jar</packaging>
+ <version>2.2-SNAPSHOT</version>
+ <name>Apache CXF Runtime Core</name>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ws.commons.schema</groupId>
+ <artifactId>XmlSchema</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.xml.fastinfoset</groupId>
+ <artifactId>FastInfoset</artifactId>
+ <version>1.2.2</version>
+ </dependency>
+
+ </dependencies>
+
+
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/cxf/trunk/rt/core</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cxf/trunk/rt/core</developerConnection>
+ </scm>
+
+</project>
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,125 @@
+/**
+ * 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.cxf.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Executor;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.configuration.Configurable;
+import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.interceptor.AbstractAttributedInterceptorProvider;
+import org.apache.cxf.service.invoker.Invoker;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.workqueue.SynchronousExecutor;
+
+public class ServiceImpl extends AbstractAttributedInterceptorProvider implements Service, Configurable {
+ private List<ServiceInfo> serviceInfos;
+ private DataBinding dataBinding;
+ private Executor executor;
+ private Invoker invoker;
+ private Map<QName, Endpoint> endpoints = new HashMap<QName, Endpoint>();
+
+ public ServiceImpl() {
+ this((ServiceInfo)null);
+ }
+
+ public ServiceImpl(ServiceInfo si) {
+ serviceInfos = new ArrayList<ServiceInfo>();
+ if (si != null) {
+ serviceInfos.add(si);
+ }
+ executor = SynchronousExecutor.getInstance();
+ }
+ public ServiceImpl(List<ServiceInfo> si) {
+ serviceInfos = si;
+ executor = SynchronousExecutor.getInstance();
+ }
+
+ public String getBeanName() {
+ return getName().toString();
+ }
+
+ public QName getName() {
+ return serviceInfos.get(0).getName();
+ }
+
+ public List<ServiceInfo> getServiceInfos() {
+ return serviceInfos;
+ }
+
+ public EndpointInfo getEndpointInfo(QName endpoint) {
+ for (ServiceInfo inf : serviceInfos) {
+ EndpointInfo ef = inf.getEndpoint(endpoint);
+ if (ef != null) {
+ return ef;
+ }
+ }
+ return null;
+ }
+
+
+ public Executor getExecutor() {
+ return executor;
+ }
+
+ public void setExecutor(Executor executor) {
+ this.executor = executor;
+ }
+
+ public Invoker getInvoker() {
+ return invoker;
+ }
+
+ public void setInvoker(Invoker invoker) {
+ this.invoker = invoker;
+ }
+
+ public DataBinding getDataBinding() {
+ return dataBinding;
+ }
+
+ public void setDataBinding(DataBinding dataBinding) {
+ this.dataBinding = dataBinding;
+ }
+
+ public Map<QName, Endpoint> getEndpoints() {
+ return endpoints;
+ }
+
+ public void setEndpoints(Map<QName, Endpoint> endpoints) {
+ this.endpoints = endpoints;
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ this.putAll(properties);
+ }
+
+ @Override
+ public String toString() {
+ return "[ServiceImpl " + getName() + "]";
+ }
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,68 @@
+/**
+ * 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.cxf.service;
+
+import org.apache.cxf.common.xmlschema.InvalidXmlSchemaReferenceException;
+import org.apache.cxf.common.xmlschema.SchemaCollection;
+import org.apache.cxf.service.model.MessagePartInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+
+/**
+ *
+ */
+public class ServiceModelSchemaValidator extends ServiceModelVisitor {
+
+ private SchemaCollection schemaCollection;
+ private StringBuilder complaints;
+
+ public ServiceModelSchemaValidator(ServiceInfo serviceInfo) {
+ super(serviceInfo);
+ schemaCollection = serviceInfo.getXmlSchemaCollection();
+ complaints = new StringBuilder();
+ }
+
+ public String getComplaints() {
+ return complaints.toString();
+ }
+
+ @Override
+ public void begin(MessagePartInfo part) {
+ // the unwrapped parts build for wrapped operations don't have real elements.
+ if (part.isElement() && !part.getMessageInfo().getOperation().isUnwrapped()) {
+ try {
+ schemaCollection.validateElementName(part.getName(), part.getElementQName());
+ } catch (InvalidXmlSchemaReferenceException ixsre) {
+ complaints.append(part.getName() + " part element name " + ixsre.getMessage() + "\n");
+ }
+ } else if (!part.getMessageInfo().getOperation().isUnwrapped()) {
+ if (part.getTypeQName() == null) {
+ complaints.append(part.getName() + " of message "
+ + part.getMessageInfo().getName()
+ + " part type QName null.\n");
+ } else {
+ try {
+ schemaCollection.validateTypeName(part.getName(), part.getTypeQName());
+ } catch (InvalidXmlSchemaReferenceException ixsre) {
+ complaints.append(part.getName() + " part type name " + ixsre.getMessage() + "\n");
+ }
+ }
+ }
+ }
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,171 @@
+/**
+ * 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.cxf.service;
+
+import org.apache.cxf.service.model.BindingInfo;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.FaultInfo;
+import org.apache.cxf.service.model.InterfaceInfo;
+import org.apache.cxf.service.model.MessageInfo;
+import org.apache.cxf.service.model.MessagePartInfo;
+import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.service.model.UnwrappedOperationInfo;
+
+/**
+ * Implements the Visitor pattern for the Service model.
+ * The visit order is as follows:
+ * <pre>
+ * 1) Begin the overall service info.
+ * 2) Begin the service's interface.
+ * 3) For each operation, begin the operation.
+ * 3.1) begin the input message.
+ * 3.1.1) begin and end each part of the input message.
+ * 3.2) end the input message.
+ * 3.3) begin the output message.
+ * 3.3.1) begin and end each part of the output message.
+ * 3.4) end the output message
+ * 3.5) begin each fault. (3.5-3.6 repeated for each fault)
+ * 3.5.1) begin and end each part of each fault
+ * 3.6) end each fault.
+ * 3.7) if a wrapped operation, begin the corresponding unwrapped operation.
+ * 3.8) process the entire unwrapped operation starting at (3).
+ * 3.9) end the unwrapped operation.
+ * 4) end the operation.
+ * 5) end the interface.
+ * 6) For each endpoint (= port) begin and end the EndpointInfo
+ * 7) For each binding (= BindingInfo) begin and end the BindingInfo.
+ * 8) end the service info.
+ * </pre>
+ * Unwrapped operations <i>share messages</i> with their corresponding wrapped messages,
+ * so beware of processing the same messages twice as if unique.
+ */
+public class ServiceModelVisitor {
+ protected ServiceInfo serviceInfo;
+
+ public ServiceModelVisitor(ServiceInfo serviceInfo) {
+ super();
+ this.serviceInfo = serviceInfo;
+ }
+
+ public void walk() {
+ begin(serviceInfo);
+ begin(serviceInfo.getInterface());
+
+ for (OperationInfo o : serviceInfo.getInterface().getOperations()) {
+ begin(o);
+
+ visitOperation(o);
+
+ end(o);
+ }
+
+ end(serviceInfo.getInterface());
+ for (EndpointInfo endpointInfo : serviceInfo.getEndpoints()) {
+ begin(endpointInfo);
+ end(endpointInfo);
+ }
+ for (BindingInfo bindingInfo : serviceInfo.getBindings()) {
+ begin(bindingInfo);
+ end(bindingInfo);
+ }
+ end(serviceInfo);
+ }
+
+ private void visitOperation(OperationInfo o) {
+ MessageInfo in = o.getInput();
+ if (in != null) {
+ begin(in);
+
+ for (MessagePartInfo part : in.getMessageParts()) {
+ begin(part);
+ end(part);
+ }
+
+ end(in);
+ }
+
+ MessageInfo out = o.getOutput();
+ if (out != null) {
+ begin(out);
+
+ for (MessagePartInfo part : out.getMessageParts()) {
+ begin(part);
+ end(part);
+ }
+
+ end(out);
+ }
+
+ for (FaultInfo f : o.getFaults()) {
+ begin(f);
+
+ for (MessagePartInfo part : f.getMessageParts()) {
+ begin(part);
+ end(part);
+ }
+
+ end(f);
+ }
+
+ if (o.isUnwrappedCapable()) {
+ OperationInfo uop = o.getUnwrappedOperation();
+ begin(uop);
+ visitOperation(o.getUnwrappedOperation());
+ end(uop);
+ }
+ }
+
+ public void begin(ServiceInfo service) {
+ }
+ public void begin(InterfaceInfo intf) {
+ }
+ public void begin(OperationInfo op) {
+ }
+ public void begin(UnwrappedOperationInfo op) {
+ }
+ public void begin(MessageInfo msg) {
+ }
+ public void begin(MessagePartInfo part) {
+ }
+ public void begin(FaultInfo fault) {
+ }
+ public void end(ServiceInfo service) {
+ }
+ public void end(InterfaceInfo intf) {
+ }
+ public void end(OperationInfo op) {
+ }
+ public void end(UnwrappedOperationInfo op) {
+ }
+ public void end(MessageInfo msg) {
+ }
+ public void end(MessagePartInfo part) {
+ }
+ public void end(FaultInfo fault) {
+ }
+ public void begin(EndpointInfo endpointInfo) {
+ }
+ public void end(EndpointInfo endpointInfo) {
+ }
+ private void begin(BindingInfo bindingInfo) {
+ }
+ private void end(BindingInfo bindingInfo) {
+ }
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/ServiceModelVisitor.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,76 @@
+/**
+ * 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.cxf.service.factory;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.interceptor.OutgoingChainInterceptor;
+import org.apache.cxf.interceptor.ServiceInvokerInterceptor;
+import org.apache.cxf.service.Service;
+
+public abstract class AbstractServiceFactoryBean {
+ private Bus bus;
+ private DataBinding dataBinding;
+ private Service service;
+
+ public abstract Service create();
+
+ protected void initializeDefaultInterceptors() {
+ service.getInInterceptors().add(new ServiceInvokerInterceptor());
+ service.getInInterceptors().add(new OutgoingChainInterceptor());
+ }
+
+ protected void initializeDataBindings() {
+ dataBinding.initialize(getService());
+
+ service.setDataBinding(dataBinding);
+ }
+
+ public Bus getBus() {
+ return bus;
+ }
+
+ public void setBus(Bus bus) {
+ this.bus = bus;
+ }
+
+ public DataBinding getDataBinding() {
+ if (dataBinding == null) {
+ dataBinding = createDefaultDataBinding();
+ }
+ return dataBinding;
+ }
+ protected DataBinding createDefaultDataBinding() {
+ return null;
+ }
+
+ public void setDataBinding(DataBinding dataBinding) {
+ this.dataBinding = dataBinding;
+ }
+
+ public Service getService() {
+ return service;
+ }
+
+ protected void setService(Service service) {
+ this.service = service;
+ }
+
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/Messages.properties?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/Messages.properties (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/Messages.properties Wed Nov 12 04:42:46 2008
@@ -0,0 +1,21 @@
+#
+#
+# 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.
+#
+#
+NO_METHOD_FOR_OP=No method was found for the WSDL operation {0}.
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/Messages.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/Messages.properties
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/Messages.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/ServiceConstructionException.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/ServiceConstructionException.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/ServiceConstructionException.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/ServiceConstructionException.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,39 @@
+/**
+ * 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.cxf.service.factory;
+
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.i18n.UncheckedException;
+
+public class ServiceConstructionException extends UncheckedException {
+
+ public ServiceConstructionException(Message msg, Throwable t) {
+ super(msg, t);
+ }
+
+ public ServiceConstructionException(Message msg) {
+ super(msg);
+ }
+
+ public ServiceConstructionException(Throwable cause) {
+ super(cause);
+ }
+
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/ServiceConstructionException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/factory/ServiceConstructionException.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,280 @@
+/**
+ * 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.cxf.service.invoker;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Arrays;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.continuations.ContinuationProvider;
+import org.apache.cxf.continuations.ContinuationWrapper;
+import org.apache.cxf.continuations.SuspendedInvocationException;
+import org.apache.cxf.frontend.MethodDispatcher;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.FaultMode;
+import org.apache.cxf.message.MessageContentsList;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.BindingOperationInfo;
+
+/**
+ * Abstract implementation of Invoker.
+ * <p>
+ */
+public abstract class AbstractInvoker implements Invoker {
+ private static final Logger LOG = LogUtils.getL7dLogger(AbstractInvoker.class);
+ private static final String SUSPENDED_INVOCATION_EXCEPTION_NAME = "org.mortbay.jetty.RetryRequest";
+
+ public Object invoke(Exchange exchange, Object o) {
+
+ final Object serviceObject = getServiceObject(exchange);
+ try {
+
+ BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
+ MethodDispatcher md = (MethodDispatcher)
+ exchange.get(Service.class).get(MethodDispatcher.class.getName());
+ Method m = md.getMethod(bop);
+ //Method m = (Method)bop.getOperationInfo().getProperty(Method.class.getName());
+ m = matchMethod(m, serviceObject);
+
+ List<Object> params = null;
+ if (o instanceof List) {
+ params = CastUtils.cast((List<?>)o);
+ } else if (o != null) {
+ params = new MessageContentsList(o);
+ }
+
+ return invoke(exchange, serviceObject, m, params);
+ } finally {
+ releaseServiceObject(exchange, serviceObject);
+ }
+ }
+
+ protected Object invoke(Exchange exchange, final Object serviceObject, Method m, List<Object> params) {
+ Object res;
+ try {
+ Object[] paramArray = new Object[]{};
+ if (params != null) {
+ paramArray = params.toArray();
+ }
+
+ res = performInvocation(exchange, serviceObject, m, paramArray);
+
+ if (exchange.isOneWay()) {
+ return null;
+ }
+
+ return new MessageContentsList(res);
+ } catch (InvocationTargetException e) {
+
+ Throwable t = e.getCause();
+
+ if (t == null) {
+ t = e;
+ }
+
+ checkSuspendedInvocation(exchange, serviceObject, m, params, t);
+
+ exchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);
+
+
+ for (Class<?> cl : m.getExceptionTypes()) {
+ if (cl.isInstance(t)) {
+ exchange.getInMessage().put(FaultMode.class,
+ FaultMode.CHECKED_APPLICATION_FAULT);
+ }
+ }
+
+ if (t instanceof Fault) {
+ exchange.getInMessage().put(FaultMode.class,
+ FaultMode.CHECKED_APPLICATION_FAULT);
+ throw (Fault)t;
+ }
+ throw createFault(t, m, params, true);
+ } catch (SuspendedInvocationException suspendedEx) {
+ // to avoid duplicating the same log statement
+ checkSuspendedInvocation(exchange, serviceObject, m, params, suspendedEx);
+ // unreachable
+ throw suspendedEx;
+ } catch (Fault f) {
+ exchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);
+ throw f;
+ } catch (Exception e) {
+ checkSuspendedInvocation(exchange, serviceObject, m, params, e);
+ exchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);
+ throw createFault(e, m, params, false);
+ }
+ }
+
+ protected void checkSuspendedInvocation(Exchange exchange,
+ Object serviceObject,
+ Method m,
+ List<Object> params,
+ Throwable t) {
+ // we need to check the name in case the continuation.suspend() was invoked direcktly
+ if (t instanceof SuspendedInvocationException
+ || SUSPENDED_INVOCATION_EXCEPTION_NAME.equals(t.getClass().getName())) {
+
+ if (LOG.isLoggable(Level.FINE)) {
+ LOG.log(Level.FINE, "SUSPENDED_INVOCATION_EXCEPTION",
+ new Object[]{serviceObject, m.toString(), params});
+ }
+ if (t instanceof SuspendedInvocationException) {
+ throw (SuspendedInvocationException)t;
+ } else {
+ Object cp = exchange.getInMessage().get(ContinuationProvider.class.getName());
+ if (cp != null) {
+ ContinuationWrapper cw = ((ContinuationProvider)cp).getContinuation(null);
+ if (cw != null && !cw.isNew()) {
+ synchronized (cw) {
+ cw.setObject(exchange.getInMessage());
+ }
+ }
+ }
+ throw new SuspendedInvocationException(t);
+ }
+ }
+ }
+
+ protected Fault createFault(Throwable ex, Method m, List<Object> params, boolean checked) {
+
+ if (checked) {
+ return new Fault(ex);
+ } else {
+ return new Fault(new Message("EXCEPTION_INVOKING_OBJECT",
+ LOG,
+ ex.getMessage(), m.toString(), params),
+ ex);
+ }
+ }
+
+ protected Object performInvocation(Exchange exchange, final Object serviceObject, Method m,
+ Object[] paramArray) throws Exception {
+ paramArray = insertExchange(m, paramArray, exchange);
+ if (LOG.isLoggable(Level.FINER)) {
+ LOG.log(Level.FINER, "INVOKING_METHOD", new Object[] {serviceObject,
+ m,
+ Arrays.asList(paramArray)});
+ }
+ return m.invoke(serviceObject, paramArray);
+ }
+
+ public Object[] insertExchange(Method method, Object[] params, Exchange context) {
+ Object[] newParams = params;
+ for (int i = 0; i < method.getParameterTypes().length; i++) {
+ if (method.getParameterTypes()[i].equals(Exchange.class)) {
+ newParams = new Object[params.length + 1];
+
+ for (int j = 0; j < newParams.length; j++) {
+ if (j == i) {
+ newParams[j] = context;
+ } else if (j > i) {
+ newParams[j] = params[j - 1];
+ } else {
+ newParams[j] = params[j];
+ }
+ }
+ }
+ }
+ return newParams;
+ }
+
+ /**
+ * Creates and returns a service object depending on the scope.
+ */
+ public abstract Object getServiceObject(final Exchange context);
+
+ /**
+ * Called when the invoker is done with the object. Default implementation
+ * does nothing.
+ * @param context
+ * @param obj
+ */
+ public void releaseServiceObject(final Exchange context, Object obj) {
+ }
+
+ /**
+ * Returns a Method that has the same declaring class as the class of
+ * targetObject to avoid the IllegalArgumentException when invoking the
+ * method on the target object. The methodToMatch will be returned if the
+ * targetObject doesn't have a similar method.
+ *
+ * @param methodToMatch The method to be used when finding a matching method
+ * in targetObject
+ * @param targetObject The object to search in for the method.
+ * @return The methodToMatch if no such method exist in the class of
+ * targetObject; otherwise, a method from the class of targetObject
+ * matching the matchToMethod method.
+ */
+ private static Method matchMethod(Method methodToMatch, Object targetObject) {
+ if (isJdkDynamicProxy(targetObject)) {
+ Class[] interfaces = targetObject.getClass().getInterfaces();
+ for (int i = 0; i < interfaces.length; i++) {
+ Method m = getMostSpecificMethod(methodToMatch, interfaces[i]);
+ if (!methodToMatch.equals(m)) {
+ return m;
+ }
+ }
+ }
+ return methodToMatch;
+ }
+
+ /**
+ * Return whether the given object is a J2SE dynamic proxy.
+ *
+ * @param object the object to check
+ * @see java.lang.reflect.Proxy#isProxyClass
+ */
+ public static boolean isJdkDynamicProxy(Object object) {
+ return object != null && Proxy.isProxyClass(object.getClass());
+ }
+
+ /**
+ * Given a method, which may come from an interface, and a targetClass used
+ * in the current AOP invocation, find the most specific method if there is
+ * one. E.g. the method may be IFoo.bar() and the target class may be
+ * DefaultFoo. In this case, the method may be DefaultFoo.bar(). This
+ * enables attributes on that method to be found.
+ *
+ * @param method method to be invoked, which may come from an interface
+ * @param targetClass target class for the curren invocation. May be
+ * <code>null</code> or may not even implement the method.
+ * @return the more specific method, or the original method if the
+ * targetClass doesn't specialize it or implement it or is null
+ */
+ public static Method getMostSpecificMethod(Method method, Class<?> targetClass) {
+ if (method != null && targetClass != null) {
+ try {
+ method = targetClass.getMethod(method.getName(), method.getParameterTypes());
+ } catch (NoSuchMethodException ex) {
+ // Perhaps the target class doesn't implement this method:
+ // that's fine, just use the original method
+ }
+ }
+ return method;
+ }
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/BeanInvoker.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/BeanInvoker.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/BeanInvoker.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/BeanInvoker.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,38 @@
+/**
+ * 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.cxf.service.invoker;
+
+import org.apache.cxf.message.Exchange;
+
+/**
+ * Invoker for externally created service objects.
+ *
+ */
+public class BeanInvoker extends AbstractInvoker {
+ private Object proxy;
+
+ public BeanInvoker(Object proxy) {
+ this.proxy = proxy;
+ }
+
+ public Object getServiceObject(Exchange ex) {
+ return proxy;
+ }
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/BeanInvoker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/BeanInvoker.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Factory.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Factory.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Factory.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Factory.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,45 @@
+/**
+ * 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.cxf.service.invoker;
+
+import org.apache.cxf.message.Exchange;
+
+/**
+ * Represents an object factory.
+ *
+ * Used at invoke time to find the object that the invokation will use
+ */
+public interface Factory {
+
+ /**
+ * Creates the object that will be used for the invoke
+ * @param e
+ * @return
+ * @throws Throwable
+ */
+ Object create(Exchange e) throws Throwable;
+
+ /**
+ * Post invoke, this is called to allow the factory to release
+ * the object, store it, etc...
+ * @param e
+ * @param o object created from the create method
+ */
+ void release(Exchange e, Object o);
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Factory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Factory.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/FactoryInvoker.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/FactoryInvoker.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/FactoryInvoker.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/FactoryInvoker.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,60 @@
+/**
+ * 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.cxf.service.invoker;
+
+import java.util.ResourceBundle;
+
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Exchange;
+
+/**
+ * This invoker implementation calls a Factory to create the service object.
+ *
+ */
+public class FactoryInvoker extends AbstractInvoker {
+ private static final ResourceBundle BUNDLE = BundleUtils.getBundle(FactoryInvoker.class);
+
+ private final Factory factory;
+
+ /**
+ * Create a FactoryInvoker object.
+ *
+ * @param factory the factory used to create service object.
+ */
+ public FactoryInvoker(Factory factory) {
+ this.factory = factory;
+ }
+
+ public Object getServiceObject(Exchange ex) {
+ try {
+ return factory.create(ex);
+ } catch (Fault e) {
+ throw e;
+ } catch (Throwable e) {
+ throw new Fault(new Message("CREATE_SERVICE_OBJECT_EXC", BUNDLE), e);
+ }
+ }
+
+ public void releaseServiceObject(final Exchange ex, Object obj) {
+ factory.release(ex, obj);
+ }
+}
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/FactoryInvoker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/FactoryInvoker.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Messages.properties?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Messages.properties (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Messages.properties Wed Nov 12 04:42:46 2008
@@ -0,0 +1,28 @@
+#
+#
+# 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.
+#
+#
+SVC_CLASS_IS_INTERFACE=Could not instantiate service class {0} because it is an interface.
+SVC_CLASS_IS_ABSTRACT=Could not instantiate service class {0} because it is abstract.
+COULD_NOT_INSTANTIATE=Couldn't instantiate service object.
+ILLEGAL_ACCESS=Couldn't access service object.
+CREATE_SERVICE_OBJECT_EXC=Couldn't instantiate service object.
+EXCEPTION_INVOKING_OBJECT={0} while invoking {1} with params {2}.
+SUSPENDED_INVOCATION_EXCEPTION=Invocation of method {1} on object {0} with params {2} has been suspended.
+INVOKING_METHOD=Invoking method {1} on object {0} with params {2}.
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Messages.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Messages.properties
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/Messages.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain