JBossWS SVN: r14820 - in thirdparty/cxf/branches/cxf-2.3.1/rt: management and 49 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-08-13 11:39:22 -0400 (Sat, 13 Aug 2011)
New Revision: 14820
Added:
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogLevel.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecord.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecords.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadWriteLogStorage.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadableLogStorage.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AbstractAtomBean.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullHandler.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullServer.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushBean.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngineConfigurator.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushHandler.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/Converter.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/StandardConverter.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/Deliverer.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/RetryingDeliverer.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/WebClientDeliverer.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/package-info.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/package-info.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/test/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/test/java/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/test/java/apache/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/test/java/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/test/java/apache/cxf/management/
thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/test/java/apache/cxf/management/web/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/Counter.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/CounterRepository.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/MessageHandlingTimeRecorder.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/Messages.properties
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/PerformanceCounter.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/PerformanceCounterMBean.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/Messages.properties
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistInInterceptor.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/MBServerConnectorFactory.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/Messages.properties
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeData.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataDAO.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataFilter.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataProperty.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/FilesystemExchangeDataDAO.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/StatusExchangeDataFilter.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/ManagementConsole.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/Messages.properties
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/bus-extensions.xml
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/cxf-extension-management.xml
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/cxf.extension
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/schemas/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/schemas/configuration/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/schemas/configuration/instrumentation.xsd
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/InstrumentationManagerTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/counters/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/counters/CounterRepositoryTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor2Test.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptorTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptorTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/HelloWorld.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/HelloWorldMBean.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/AnnotationTestInstrumentation.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/ModelMBeanAssemblerTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/utils/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/utils/ManagementConsoleTest.java
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/resources/
thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/resources/managed-spring.xml
Log:
importing CXF 2.3.1 tag - (per partes) because of unreliable SVN RH repo :(
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/pom.xml 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,126 @@
+<!--
+ 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-management</artifactId>
+ <packaging>jar</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF Runtime Management</name>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-testutils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-xjc-plugin</artifactId>
+ <version>${cxf.xjc-utils.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}/src/main/resources/schemas/configuration/instrumentation.xsd</xsd>
+ <extension>true</extension>
+ <extensionArgs>
+ <extensionArg>-Xdv</extensionArg>
+ </extensionArgs>
+ </xsdOption>
+ </xsdOptions>
+ </configuration>
+ <goals>
+ <goal>xsdtojava</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <extensions>
+ <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:${cxf.xjc-utils.version}</extension>
+ </extensions>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/Counter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/Counter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/Counter.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,31 @@
+/**
+ * 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.management.counters;
+
+import org.apache.cxf.management.ManagedComponent;
+
+public interface Counter extends ManagedComponent {
+
+ String PERFORMANCE_COUNTER = "Performance.Counter";
+
+ void increase(MessageHandlingTimeRecorder mhtr);
+
+ Number getNumInvocations();
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/CounterRepository.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/CounterRepository.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/CounterRepository.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,130 @@
+/**
+ * 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.management.counters;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.management.JMException;
+import javax.management.ObjectName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.management.InstrumentationManager;
+import org.apache.cxf.management.interceptor.ResponseTimeMessageInInterceptor;
+import org.apache.cxf.management.interceptor.ResponseTimeMessageInvokerInterceptor;
+import org.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptor;
+
+/* Counters are created and managed by CounterRepository
+ * If a counter which is queried form the counterRepository is not exist,
+ * the CounterRepository will create a counter and expose it to the JMX
+ * Because we can get the instance of the counter object,
+ * it is not need to qurey the counter object from JMX
+ * */
+public class CounterRepository {
+ private static final Logger LOG = LogUtils.getL7dLogger(CounterRepository.class);
+
+ private Map<ObjectName, Counter> counters;
+ private Bus bus;
+ private Lock counterCreationLock = new ReentrantLock();
+
+ public CounterRepository() {
+ counters = new ConcurrentHashMap<ObjectName, Counter>();
+ }
+
+ @Resource(name = "cxf")
+ public void setBus(Bus b) {
+ bus = b;
+ }
+
+ public Bus getBus() {
+ return bus;
+ }
+
+ public Map<ObjectName, Counter> getCounters() {
+ return counters;
+ }
+
+ @PostConstruct
+ void registerInterceptorsToBus() {
+ ResponseTimeMessageInInterceptor in = new ResponseTimeMessageInInterceptor();
+ ResponseTimeMessageInvokerInterceptor invoker = new ResponseTimeMessageInvokerInterceptor();
+ ResponseTimeMessageOutInterceptor out = new ResponseTimeMessageOutInterceptor();
+
+ bus.getInInterceptors().add(in);
+ bus.getInInterceptors().add(invoker);
+ bus.getOutInterceptors().add(out);
+ bus.setExtension(this, CounterRepository.class);
+
+ //create CounterRepositroyMoniter to writer the counter log
+
+ //if the service is stopped or removed, the counters should remove itself
+ }
+
+ public void increaseCounter(ObjectName on, MessageHandlingTimeRecorder mhtr) {
+ Counter counter = getCounter(on);
+ if (null == counter) {
+ counterCreationLock.lock();
+ try {
+ // check if the counter has been created during the locked time
+ counter = getCounter(on);
+ if (counter == null) {
+ counter = createCounter(on, mhtr);
+ counters.put(on, counter);
+ }
+ } finally {
+ counterCreationLock.unlock();
+ }
+ }
+ counter.increase(mhtr);
+ if (LOG.isLoggable(Level.FINE)) {
+ LOG.fine("Increase counter " + on + " with " + mhtr);
+ }
+ }
+
+ //find a counter
+ public Counter getCounter(ObjectName on) {
+ return counters.get(on);
+ }
+
+ public Counter createCounter(ObjectName on, MessageHandlingTimeRecorder mhtr) {
+ Counter counter = null;
+ counter = new ResponseTimeCounter(on);
+ InstrumentationManager im = bus.getExtension(InstrumentationManager.class);
+ if (null != im) {
+ try {
+ im.register(counter);
+ } catch (JMException e) {
+ LOG.log(Level.WARNING, "INSTRUMENTATION_REGISTER_FAULT_MSG",
+ new Object[]{on, e});
+ }
+ }
+ return counter;
+ }
+
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/MessageHandlingTimeRecorder.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/MessageHandlingTimeRecorder.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/MessageHandlingTimeRecorder.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,83 @@
+/**
+ * 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.management.counters;
+
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.FaultMode;
+
+/* recoder the message actually handle begin and end time */
+public class MessageHandlingTimeRecorder {
+ private Exchange exchange;
+ private long beginTime;
+ private long endTime;
+ private FaultMode faultMode;
+ private boolean oneWay;
+
+ public MessageHandlingTimeRecorder(Exchange ex) {
+ exchange = ex;
+ exchange.put(MessageHandlingTimeRecorder.class, this);
+ }
+
+ public boolean isOneWay() {
+ return oneWay;
+ }
+
+ public void setOneWay(boolean ow) {
+ oneWay = ow;
+ }
+
+ public Exchange getHandleExchange() {
+ return exchange;
+ }
+
+ public void beginHandling() {
+ beginTime = System.nanoTime() / 1000;
+ }
+
+ public void endHandling() {
+ endTime = System.nanoTime() / 1000;
+ }
+
+ public long getEndTime() {
+ return endTime;
+ }
+
+ public long getHandlingTime() {
+ return endTime - beginTime;
+ }
+
+ public FaultMode getFaultMode() {
+ return faultMode;
+ }
+
+ public void setFaultMode(FaultMode faultMode) {
+ this.faultMode = faultMode;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("MessageHandlingTimeRecorder@").append(Integer.toHexString(hashCode())).append("[");
+ sb.append("beginTime: ").append(beginTime).append(", ");
+ sb.append("endTime: ").append(endTime).append(", ");
+ sb.append("faultMode: ").append(faultMode).append("]");
+ return sb.toString();
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/Messages.properties
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/Messages.properties (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/Messages.properties 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,25 @@
+#
+#
+# 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.
+#
+#
+CANNOT_FIND_THE_COUNTERREPOSITORY = CounterRepositoryMonitor can't find the CounterRepository from bus.
+CANNOT_CREATE_LOGGER_FILE = Can''t create the logger file for the response time counters. {0}
+CANNOT_FIND_THE_COUNTER_OBJECTNAME = Can''t find the counter object name. {0}
+CANNOT_FIND_STATUS = Can''t find the status. {0}
+INSTRUMENTATION_REGISTER_FAULT_MSG=Can''t register counter with object name {0}. {1}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/PerformanceCounter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/PerformanceCounter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/PerformanceCounter.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,48 @@
+/**
+ * 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.management.counters;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.management.JMException;
+import javax.management.ObjectName;
+
+public class PerformanceCounter implements PerformanceCounterMBean, Counter {
+ private AtomicInteger invocations = new AtomicInteger();
+ private ObjectName objectName;
+
+
+ public PerformanceCounter(ObjectName on) {
+ objectName = on;
+ }
+
+ public Number getNumInvocations() {
+ return invocations.get();
+ }
+
+ public void increase(MessageHandlingTimeRecorder mhtr) {
+ invocations.getAndIncrement();
+ }
+
+ public ObjectName getObjectName() throws JMException {
+ return objectName;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/PerformanceCounterMBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/PerformanceCounterMBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/PerformanceCounterMBean.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -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.management.counters;
+
+public interface PerformanceCounterMBean {
+ Number getNumInvocations();
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,140 @@
+/**
+ * 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.management.counters;
+
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.management.ObjectName;
+
+import org.apache.cxf.message.FaultMode;
+
+public class ResponseTimeCounter implements ResponseTimeCounterMBean, Counter {
+
+ private ObjectName objectName;
+ private AtomicInteger invocations = new AtomicInteger();
+ private AtomicInteger checkedApplicationFaults = new AtomicInteger();
+ private AtomicInteger unCheckedApplicationFaults = new AtomicInteger();
+ private AtomicInteger runtimeFaults = new AtomicInteger();
+ private AtomicInteger logicalRuntimeFaults = new AtomicInteger();
+ private long totalHandlingTime;
+ private long maxHandlingTime;
+ private long minHandlingTime = Integer.MAX_VALUE;
+
+ public ResponseTimeCounter(ObjectName on) {
+ objectName = on;
+ }
+
+ public void increase(MessageHandlingTimeRecorder mhtr) {
+ invocations.getAndIncrement();
+ FaultMode faultMode = mhtr.getFaultMode();
+ if (null == faultMode) {
+ // no exception occured
+ } else {
+ switch (faultMode) {
+ case CHECKED_APPLICATION_FAULT:
+ checkedApplicationFaults.incrementAndGet();
+ break;
+ case LOGICAL_RUNTIME_FAULT:
+ logicalRuntimeFaults.incrementAndGet();
+ break;
+ case RUNTIME_FAULT:
+ runtimeFaults.incrementAndGet();
+ break;
+ case UNCHECKED_APPLICATION_FAULT:
+ unCheckedApplicationFaults.incrementAndGet();
+ break;
+ default:
+ runtimeFaults.incrementAndGet();
+ break;
+ }
+ }
+
+ long handlingTime = 0;
+ if (mhtr.isOneWay()) {
+ // We can count the response time
+ if (mhtr.getEndTime() > 0) {
+ handlingTime = mhtr.getHandlingTime();
+ }
+ } else {
+ handlingTime = mhtr.getHandlingTime();
+ }
+
+ totalHandlingTime = totalHandlingTime + handlingTime;
+ if (maxHandlingTime < handlingTime) {
+ maxHandlingTime = handlingTime;
+ }
+ if (minHandlingTime > handlingTime) {
+ minHandlingTime = handlingTime;
+ }
+ }
+
+ public void reset() {
+ invocations.set(0);
+ checkedApplicationFaults.set(0);
+ unCheckedApplicationFaults.set(0);
+ runtimeFaults.set(0);
+ logicalRuntimeFaults.set(0);
+
+ totalHandlingTime = 0;
+ maxHandlingTime = 0;
+ minHandlingTime = Integer.MAX_VALUE;
+ }
+
+ public ObjectName getObjectName() {
+ return objectName;
+ }
+
+ public Number getAvgResponseTime() {
+ return (int)(totalHandlingTime / invocations.get());
+ }
+
+ public Number getMaxResponseTime() {
+ return maxHandlingTime;
+ }
+
+ public Number getMinResponseTime() {
+ return minHandlingTime;
+ }
+
+ public Number getNumInvocations() {
+ return invocations.get();
+ }
+
+ public Number getNumCheckedApplicationFaults() {
+ return checkedApplicationFaults.get();
+ }
+
+ public Number getNumLogicalRuntimeFaults() {
+ return logicalRuntimeFaults.get();
+ }
+
+ public Number getNumRuntimeFaults() {
+ return runtimeFaults.get();
+ }
+
+ public Number getNumUnCheckedApplicationFaults() {
+ return unCheckedApplicationFaults.get();
+ }
+
+ public Number getTotalHandlingTime() {
+ return totalHandlingTime;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,31 @@
+/**
+ * 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.management.counters;
+
+public interface ResponseTimeCounterMBean {
+ Number getNumInvocations();
+ Number getNumCheckedApplicationFaults();
+ Number getNumLogicalRuntimeFaults();
+ Number getNumRuntimeFaults();
+ Number getNumUnCheckedApplicationFaults();
+ Number getAvgResponseTime();
+ Number getMaxResponseTime();
+ Number getMinResponseTime();
+ Number getTotalHandlingTime();
+}
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,150 @@
+/**
+ * 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.management.interceptor;
+
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.management.ObjectName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.management.ManagementConstants;
+import org.apache.cxf.management.counters.Counter;
+import org.apache.cxf.management.counters.CounterRepository;
+import org.apache.cxf.management.counters.MessageHandlingTimeRecorder;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.FaultMode;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.OperationInfo;
+
+public abstract class AbstractMessageResponseTimeInterceptor extends AbstractPhaseInterceptor<Message> {
+ private static final Logger LOG = LogUtils.getL7dLogger(AbstractMessageResponseTimeInterceptor.class);
+
+ AbstractMessageResponseTimeInterceptor(String phase) {
+ super(phase);
+ }
+
+ protected boolean isClient(Message msg) {
+ return msg == null ? false : Boolean.TRUE.equals(msg.get(Message.REQUESTOR_ROLE));
+ }
+
+ protected void beginHandlingMessage(Exchange ex) {
+ if (null == ex) {
+ return;
+ }
+ MessageHandlingTimeRecorder mhtr = ex.get(MessageHandlingTimeRecorder.class);
+ if (null != mhtr) {
+ mhtr.beginHandling();
+ } else {
+ mhtr = new MessageHandlingTimeRecorder(ex);
+ mhtr.beginHandling();
+ }
+ }
+
+ protected void endHandlingMessage(Exchange ex) {
+ if (null == ex) {
+ return;
+ }
+ MessageHandlingTimeRecorder mhtr = ex.get(MessageHandlingTimeRecorder.class);
+ if (null != mhtr) {
+ mhtr.endHandling();
+ mhtr.setFaultMode(ex.get(FaultMode.class));
+ increaseCounter(ex, mhtr);
+
+ } // else can't get the MessageHandling Infor
+ }
+
+ protected void setOneWayMessage(Exchange ex) {
+ MessageHandlingTimeRecorder mhtr = ex.get(MessageHandlingTimeRecorder.class);
+ if (null == mhtr) {
+ mhtr = new MessageHandlingTimeRecorder(ex);
+ } else {
+ mhtr.endHandling();
+ }
+ mhtr.setOneWay(true);
+ increaseCounter(ex, mhtr);
+ }
+
+ private void increaseCounter(Exchange ex, MessageHandlingTimeRecorder mhtr) {
+ Bus bus = ex.get(Bus.class);
+ if (null == bus) {
+ LOG.log(Level.INFO, "CAN_NOT_GET_BUS_FROM_EXCHANGE");
+ BusFactory.getThreadDefaultBus();
+ }
+
+ Message message = ex.getOutMessage();
+
+ CounterRepository cr = bus.getExtension(CounterRepository.class);
+
+ if (null == cr) {
+ LOG.log(Level.WARNING, "NO_COUNTER_REPOSITORY");
+ return;
+ } else {
+ Service service = ex.get(Service.class);
+ Endpoint endpoint = ex.get(Endpoint.class);
+
+ String serviceName = "\"" + service.getName() + "\"";
+ String portName = "\"" + endpoint.getEndpointInfo().getName().getLocalPart() + "\"";
+
+ OperationInfo opInfo = ex.get(OperationInfo.class);
+ String operationName = opInfo == null ? null : "\"" + opInfo.getName().getLocalPart() + "\"";
+
+ if (operationName == null) {
+ Object nameProperty = ex.get("org.apache.cxf.resource.operation.name");
+ if (nameProperty != null) {
+ operationName = "\"" + nameProperty.toString() + "\"";
+ }
+ }
+
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME + ":");
+ buffer.append(ManagementConstants.BUS_ID_PROP + "=" + bus.getId() + ",");
+ if (isClient(message)) {
+ buffer.append(ManagementConstants.TYPE_PROP + "=" + Counter.PERFORMANCE_COUNTER + ".Client,");
+ } else {
+ buffer.append(ManagementConstants.TYPE_PROP + "=" + Counter.PERFORMANCE_COUNTER + ".Server,");
+ }
+ buffer.append(ManagementConstants.SERVICE_NAME_PROP + "=" + serviceName + ",");
+
+ buffer.append(ManagementConstants.PORT_NAME_PROP + "=" + portName);
+ String serviceCounterName = buffer.toString();
+
+ try {
+ ObjectName serviceCounter =
+ new ObjectName(serviceCounterName);
+ cr.increaseCounter(serviceCounter, mhtr);
+ if (operationName != null) {
+ buffer.append("," + ManagementConstants.OPERATION_NAME_PROP + "=" + operationName);
+ String operationCounterName = buffer.toString();
+ ObjectName operationCounter = new ObjectName(operationCounterName);
+ cr.increaseCounter(operationCounter, mhtr);
+ }
+ } catch (Exception exception) {
+ LOG.log(Level.WARNING, "CREATE_COUNTER_OBJECTNAME_FAILED", exception);
+ }
+ }
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/Messages.properties
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/Messages.properties (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/Messages.properties 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,23 @@
+#
+#
+# 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.
+#
+#
+CAN_NOT_GET_BUS_FROM_EXCHANGE = Can't get bus instance from exchange, using default bus instead
+CREATE_COUNTER_OBJECTNAME_FAILED = Create Counter''s ObjectName failed. {0}
+NO_COUNTER_REPOSITORY = Can't find the CounterRepository from default Bus
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistInInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistInInterceptor.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistInInterceptor.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,82 @@
+/**
+ * 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.management.interceptor;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.io.CachedOutputStream;
+import org.apache.cxf.management.persistence.ExchangeData;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+
+public class PersistInInterceptor extends AbstractPhaseInterceptor<Message> {
+
+ public PersistInInterceptor() {
+ super(Phase.RECEIVE);
+ }
+
+ /**
+ * Copied from LoggingInInterceptor
+ *
+ * @param soapMessage
+ */
+ private void getSoapRequest(Message soapMessage, ExchangeData exchange) {
+ InputStream is = soapMessage.getContent(InputStream.class);
+ if (is != null) {
+ CachedOutputStream bos = new CachedOutputStream();
+ try {
+ IOUtils.copy(is, bos);
+
+ bos.flush();
+ is.close();
+
+ soapMessage.setContent(InputStream.class, bos.getInputStream());
+
+ StringBuilder builder = new StringBuilder();
+ bos.writeCacheTo(builder, bos.size());
+
+ bos.close();
+
+ exchange.setRequest(builder.toString());
+ exchange.setRequestSize(bos.size());
+
+ } catch (IOException e) {
+ throw new Fault(e);
+ }
+ }
+
+ }
+
+ public void handleMessage(Message message) throws Fault {
+
+ ExchangeData soapExchange = new ExchangeData();
+ soapExchange.setInDate(new Date());
+
+ message.setContent(ExchangeData.class, soapExchange);
+
+ getSoapRequest(message, soapExchange);
+
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/PersistOutInterceptor.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,230 @@
+/**
+ * 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.management.interceptor;
+
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.LoggingMessage;
+import org.apache.cxf.io.CacheAndWriteOutputStream;
+import org.apache.cxf.io.CachedOutputStream;
+import org.apache.cxf.io.CachedOutputStreamCallback;
+import org.apache.cxf.management.persistence.ExchangeData;
+import org.apache.cxf.management.persistence.ExchangeDataDAO;
+import org.apache.cxf.management.persistence.ExchangeDataFilter;
+import org.apache.cxf.management.persistence.ExchangeDataProperty;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.OperationInfo;
+
+public class PersistOutInterceptor extends AbstractPhaseInterceptor<Message> {
+
+ public static final String CXF_CONSOLE_ADDITIONAL_PROPERTY_PREFIX =
+ "org.apache.cxf.management.interceptor.prefix";
+
+ private ExchangeDataDAO exchangeDataDAO;
+
+ private ExchangeDataFilter exchangeDataFilter;
+
+ public PersistOutInterceptor() {
+ super(Phase.PRE_STREAM);
+ }
+
+ class PersistOutInterceptorCallback implements CachedOutputStreamCallback {
+
+ private final Message message;
+ private final OutputStream origStream;
+ private final ExchangeData exchange;
+
+ public PersistOutInterceptorCallback(final Message msg, final OutputStream os,
+ final ExchangeData ex) {
+ this.message = msg;
+ this.origStream = os;
+ this.exchange = ex;
+ }
+
+ public void onClose(CachedOutputStream cos) {
+ String id = (String)this.message.getExchange().get(LoggingMessage.ID_KEY);
+ if (id == null) {
+ id = LoggingMessage.nextId();
+ this.message.getExchange().put(LoggingMessage.ID_KEY, id);
+ }
+ try {
+ StringBuilder buffer = new StringBuilder();
+ cos.writeCacheTo(buffer, cos.size());
+ this.exchange.setResponseSize(cos.size());
+ this.exchange.setResponse(buffer.toString());
+ } catch (Exception ex) {
+ // ignore
+ }
+
+ try {
+ // empty out the cache
+ cos.lockOutputStream();
+ cos.resetOut(null, false);
+ } catch (Exception ex) {
+ // ignore
+ }
+ this.message.setContent(OutputStream.class, this.origStream);
+
+ if (PersistOutInterceptor.this.exchangeDataFilter == null
+ || PersistOutInterceptor.this.exchangeDataFilter.shouldPersist(this.exchange)) {
+ try {
+ PersistOutInterceptor.this.exchangeDataDAO.save(this.exchange);
+ } catch (Throwable e) {
+
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public void onFlush(CachedOutputStream cos) {
+
+ }
+ }
+
+ private static void addProperty(ExchangeData exchange, String key, String value) {
+
+ ExchangeDataProperty exchangeProperty = new ExchangeDataProperty();
+ exchangeProperty.setExchangeData(exchange);
+ exchangeProperty.setName(key);
+ exchangeProperty.setValue(value);
+
+ if (exchange.getProperties() == null) {
+ exchange.setProperties(new ArrayList<ExchangeDataProperty>());
+ }
+ exchange.getProperties().add(exchangeProperty);
+ }
+
+ private void addPropertiesFrom(ExchangeData exchange, Message message) {
+ for (Map.Entry<String, Object> entry : message.entrySet()) {
+ if (entry.getKey().equals(org.apache.cxf.message.Message.ENCODING)) {
+ exchange.setEncoding((String)entry.getValue());
+ } else if (entry.getKey().equals(org.apache.cxf.message.Message.REQUEST_URI)) {
+ exchange.setUri((String)entry.getValue());
+ } else if (entry.getKey().equals(org.apache.cxf.message.Message.PROTOCOL_HEADERS)) {
+
+ if (entry.getValue() instanceof Map) {
+ List userAgents = (List)((Map)entry.getValue()).get("user-agent");
+ if (userAgents != null && !userAgents.isEmpty()) {
+ exchange.setUserAgent(userAgents.get(0).toString());
+ }
+ }
+ if (entry.getValue() != null) {
+ addProperty(exchange, entry.getKey(), entry.getValue().toString());
+ }
+
+ } else if (entry.getKey().startsWith("org.apache.cxf.message.Message.")
+ && (entry.getValue() instanceof String || entry.getValue() instanceof Integer || entry
+ .getValue() instanceof Boolean)) {
+ addProperty(exchange, entry.getKey(), entry.getValue().toString());
+
+ } else if (entry.getKey().startsWith(CXF_CONSOLE_ADDITIONAL_PROPERTY_PREFIX)) {
+ addProperty(exchange, entry.getKey().substring(
+ CXF_CONSOLE_ADDITIONAL_PROPERTY_PREFIX
+ .length()), entry.getValue().toString());
+
+ }
+ }
+ }
+
+ public void handleMessage(Message message) throws Fault {
+
+ ExchangeData exchangeData = message.getExchange().getInMessage().getContent(ExchangeData.class);
+ if (exchangeData != null) {
+
+ final OutputStream os = message.getContent(OutputStream.class);
+ if (os == null) {
+ return;
+ }
+
+ try {
+
+ Service service = message.getExchange().get(Service.class);
+
+ String serviceName = String.valueOf(service.getName());
+ OperationInfo opInfo = message.getExchange().get(OperationInfo.class);
+ String operationName = opInfo == null ? null : opInfo.getName().getLocalPart();
+
+ if (operationName == null) {
+ Object nameProperty = message.getExchange().get("org.apache.cxf.resource.operation.name");
+ if (nameProperty != null) {
+ operationName = "\"" + nameProperty.toString() + "\"";
+ }
+ }
+
+ exchangeData.setServiceName(serviceName);
+ exchangeData.setOperation(operationName);
+
+ // add all additional properties
+
+ addPropertiesFrom(exchangeData, message.getExchange().getInMessage());
+ addPropertiesFrom(exchangeData, message);
+
+ } catch (Exception e) {
+ // TODO: handle exception
+ e.printStackTrace();
+
+ }
+
+ // Write the output while caching it for the log message
+ final CacheAndWriteOutputStream newOut = new CacheAndWriteOutputStream(os);
+ message.setContent(OutputStream.class, newOut);
+ newOut.registerCallback(new PersistOutInterceptorCallback(message, os, exchangeData));
+
+ exchangeData.setOutDate(new Date());
+
+ if (message.getContent(Exception.class) != null) {
+ exchangeData.setStatus("ERROR");
+
+ Exception exception = message.getContent(Exception.class);
+ StringWriter stringWriter = new StringWriter();
+ if (exception.getCause() != null) {
+ exchangeData.setExceptionType(exception.getCause().getClass().getName());
+ exception.getCause().printStackTrace(new PrintWriter(stringWriter));
+ } else {
+ exchangeData.setExceptionType(exception.getClass().getName());
+ exception.printStackTrace(new PrintWriter(stringWriter));
+ }
+ exchangeData.setStackTrace(stringWriter.toString());
+
+ } else {
+ exchangeData.setStatus("OK");
+ }
+
+ }
+ }
+
+ public void setExchangeDataDAO(ExchangeDataDAO exchangeDataDAO) {
+ this.exchangeDataDAO = exchangeDataDAO;
+ }
+
+ public void setExchangeDataFilter(ExchangeDataFilter exchangeDataFilter) {
+ this.exchangeDataFilter = exchangeDataFilter;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,44 @@
+/**
+ * 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.management.interceptor;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
+import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.interceptor.InterceptorProvider;
+
+@NoJSR250Annotations
+public class ResponseTimeFeature extends AbstractFeature {
+ private static final ResponseTimeMessageInInterceptor IN =
+ new ResponseTimeMessageInInterceptor();
+ private static final ResponseTimeMessageInvokerInterceptor INVOKER =
+ new ResponseTimeMessageInvokerInterceptor();
+ private static final ResponseTimeMessageOutInterceptor OUT =
+ new ResponseTimeMessageOutInterceptor();
+
+ @Override
+ protected void initializeProvider(InterceptorProvider provider, Bus bus) {
+ provider.getInInterceptors().add(IN);
+ provider.getInFaultInterceptors().add(IN);
+ provider.getInInterceptors().add(INVOKER);
+ provider.getOutInterceptors().add(OUT);
+
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,56 @@
+/**
+ * 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.management.interceptor;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.FaultMode;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.Phase;
+
+public class ResponseTimeMessageInInterceptor extends AbstractMessageResponseTimeInterceptor {
+
+ public ResponseTimeMessageInInterceptor() {
+ super(Phase.POST_LOGICAL);
+ }
+
+ public void handleMessage(Message message) throws Fault {
+
+ Exchange ex = message.getExchange();
+ if (isClient(message)) {
+ if (!ex.isOneWay()) {
+ endHandlingMessage(ex);
+ }
+ } else {
+ beginHandlingMessage(ex);
+ }
+ }
+
+ @Override
+ public void handleFault(Message message) {
+ Exchange ex = message.getExchange();
+ FaultMode mode = message.get(FaultMode.class);
+ if (mode == null) {
+ mode = FaultMode.RUNTIME_FAULT;
+ }
+ ex.put(FaultMode.class, mode);
+ endHandlingMessage(ex);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,56 @@
+/**
+ * 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.management.interceptor;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.ServiceInvokerInterceptor;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.FaultMode;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.Phase;
+
+/* When the message get from the server side
+ * The exchange.isOneWay() is workable when the message
+ * handler by the binging interceptor
+ * */
+public class ResponseTimeMessageInvokerInterceptor extends AbstractMessageResponseTimeInterceptor {
+
+ public ResponseTimeMessageInvokerInterceptor() {
+ super(Phase.INVOKE);
+ // this interceptor should be add before the serviceInvokerInterceptor
+ addBefore(ServiceInvokerInterceptor.class.getName());
+ }
+
+ public void handleMessage(Message message) throws Fault {
+ Exchange ex = message.getExchange();
+ if (ex.isOneWay() && !isClient(message)) {
+ setOneWayMessage(ex);
+ }
+ }
+
+ @Override
+ public void handleFault(Message message) {
+ Exchange ex = message.getExchange();
+ ex.put(FaultMode.class, message.get(FaultMode.class));
+ if (ex.isOneWay() && !isClient(message)) {
+ endHandlingMessage(ex);
+ }
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,85 @@
+/**
+ * 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.management.interceptor;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.FaultMode;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+
+public class ResponseTimeMessageOutInterceptor extends AbstractMessageResponseTimeInterceptor {
+ private EndingInterceptor ending = new EndingInterceptor();
+
+ public ResponseTimeMessageOutInterceptor() {
+ super(Phase.SEND);
+ }
+
+ public void handleMessage(Message message) throws Fault {
+ Exchange ex = message.getExchange();
+ if (Boolean.TRUE.equals(message.get(Message.PARTIAL_RESPONSE_MESSAGE))) {
+ return;
+ }
+ if (isClient(message)) {
+ if (ex.isOneWay()) {
+ message.getInterceptorChain().add(ending);
+ }
+ beginHandlingMessage(ex);
+ } else { // the message is handled by server
+ endHandlingMessage(ex);
+ }
+ }
+
+ @Override
+ public void handleFault(Message message) {
+ Exchange ex = message.getExchange();
+ if (ex.isOneWay()) {
+ // do nothing, done by the ResponseTimeInvokerInterceptor
+ } else {
+ FaultMode faultMode = message.get(FaultMode.class);
+ if (faultMode == null) {
+ // client side exceptions don't have FaultMode set un the message properties (as of 2.1.4)
+ faultMode = FaultMode.RUNTIME_FAULT;
+ }
+ ex.put(FaultMode.class, faultMode);
+ endHandlingMessage(ex);
+ }
+ }
+
+ EndingInterceptor getEndingInterceptor() {
+ return ending;
+ }
+
+ public class EndingInterceptor extends AbstractPhaseInterceptor<Message> {
+ public EndingInterceptor() {
+ super(Phase.PREPARE_SEND_ENDING);
+ }
+
+ public void handleMessage(Message message) throws Fault {
+ Exchange ex = message.getExchange();
+ endHandlingMessage(ex);
+ }
+
+ public void handleFault(Message message) throws Fault {
+ Exchange ex = message.getExchange();
+ endHandlingMessage(ex);
+ }
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,320 @@
+/**
+ * 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.management.jmx;
+
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+import javax.management.NotCompliantMBeanException;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+import javax.management.modelmbean.InvalidTargetObjectTypeException;
+import javax.management.modelmbean.ModelMBeanInfo;
+import javax.management.modelmbean.RequiredModelMBean;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.ManagedBus;
+import org.apache.cxf.buslifecycle.BusLifeCycleListener;
+import org.apache.cxf.buslifecycle.BusLifeCycleManager;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.management.InstrumentationManager;
+import org.apache.cxf.management.JMXConnectorPolicyType;
+import org.apache.cxf.management.ManagedComponent;
+import org.apache.cxf.management.ManagementConstants;
+import org.apache.cxf.management.jmx.export.runtime.ModelMBeanAssembler;
+
+/**
+ * The manager class for the JMXManagedComponent which hosts the JMXManagedComponents.
+ */
+public class InstrumentationManagerImpl extends JMXConnectorPolicyType
+ implements InstrumentationManager, BusLifeCycleListener {
+ private static final Logger LOG = LogUtils.getL7dLogger(InstrumentationManagerImpl.class);
+
+ private Bus bus;
+ private MBServerConnectorFactory mcf;
+ private MBeanServer mbs;
+ private Set<ObjectName> busMBeans = new HashSet<ObjectName>();
+ private boolean connectFailed;
+ private String persistentBusId;
+
+ /**
+ * For backward compatibility, {@link #createMBServerConnectorFactory} is <code>true</code> by default.
+ */
+ private boolean createMBServerConnectorFactory = true;
+ private String mbeanServerName = ManagementConstants.DEFAULT_DOMAIN_NAME;
+ private boolean usePlatformMBeanServer;
+
+ public InstrumentationManagerImpl() {
+ super();
+ }
+
+ public Bus getBus() {
+ return bus;
+ }
+
+ @Resource(name = "cxf")
+ public void setBus(Bus bus) {
+ this.bus = bus;
+ }
+
+ public void setServerName(String s) {
+ mbeanServerName = s;
+ }
+
+ public void setCreateMBServerConnectorFactory(boolean createMBServerConnectorFactory) {
+ this.createMBServerConnectorFactory = createMBServerConnectorFactory;
+ }
+
+ public void setUsePlatformMBeanServer(Boolean flag) {
+ usePlatformMBeanServer = flag;
+ }
+
+ @PostConstruct
+ public void register() {
+ if (null != bus) {
+ bus.setExtension(this, InstrumentationManager.class);
+ BusLifeCycleManager blcm = bus.getExtension(BusLifeCycleManager.class);
+ if (null != blcm) {
+ blcm.registerLifeCycleListener(this);
+ }
+ }
+ }
+
+ @PostConstruct
+ public void init() {
+ if (isEnabled()) {
+
+ if (mbs == null) {
+ // return platform mbean server if the option is specified.
+ if (usePlatformMBeanServer) {
+ mbs = ManagementFactory.getPlatformMBeanServer();
+ } else {
+ List<MBeanServer> servers = CastUtils
+ .cast(MBeanServerFactory.findMBeanServer(mbeanServerName));
+ if (servers.size() <= 1) {
+ mbs = MBeanServerFactory.createMBeanServer(mbeanServerName);
+ } else {
+ mbs = (MBeanServer)servers.get(0);
+ }
+ }
+ }
+
+ if (createMBServerConnectorFactory) {
+ mcf = MBServerConnectorFactory.getInstance();
+ mcf.setMBeanServer(mbs);
+ mcf.setThreaded(isThreaded());
+ mcf.setDaemon(isDaemon());
+ mcf.setServiceUrl(getJMXServiceURL());
+ try {
+ mcf.createConnector();
+ } catch (IOException ex) {
+ connectFailed = true;
+ LOG.log(Level.SEVERE, "START_CONNECTOR_FAILURE_MSG", new Object[] {ex});
+ }
+ }
+
+ if (!connectFailed && null != bus) {
+ try {
+ //Register Bus here since we can guarantee that Instrumentation
+ //infrastructure has been initialized.
+ ManagedBus mbus = new ManagedBus(bus);
+ register(mbus);
+ } catch (JMException jmex) {
+ LOG.log(Level.SEVERE, "REGISTER_FAILURE_MSG", new Object[]{bus, jmex});
+ }
+ }
+ }
+ }
+
+ public void register(Object obj, ObjectName name) throws JMException {
+ register(obj, name, false);
+ }
+
+ public void register(Object obj, ObjectName name, boolean forceRegistration) throws JMException {
+ if (!isEnabled() || connectFailed) {
+ return;
+ }
+ //Try to register as a Standard MBean
+ try {
+ registerMBeanWithServer(obj, persist(name), forceRegistration);
+ } catch (NotCompliantMBeanException e) {
+ //If this is not a "normal" MBean, then try to deploy it using JMX annotations
+ ModelMBeanAssembler assembler = new ModelMBeanAssembler();
+ ModelMBeanInfo mbi = assembler.getModelMbeanInfo(obj.getClass());
+ register(obj, name, mbi, forceRegistration);
+ }
+ }
+
+ public ObjectName register(ManagedComponent i) throws JMException {
+ ObjectName name = register(i, false);
+
+ return name;
+ }
+
+ public ObjectName register(ManagedComponent i, boolean forceRegistration) throws JMException {
+ ObjectName name = i.getObjectName();
+ register(i, name, forceRegistration);
+
+ return name;
+ }
+
+
+ public void unregister(ManagedComponent component) throws JMException {
+ ObjectName name = component.getObjectName();
+ unregister(persist(name));
+ }
+
+ public void unregister(ObjectName name) throws JMException {
+ if (!isEnabled() || connectFailed) {
+ return;
+ }
+
+ busMBeans.remove(name);
+ mbs.unregisterMBean(name);
+ }
+
+ public MBeanServer getMBeanServer() {
+ return mbs;
+ }
+
+ public void setServer(MBeanServer server) {
+ this.mbs = server;
+ }
+
+ public void shutdown() {
+ if (!isEnabled()) {
+ return;
+ }
+
+ if (mcf != null) {
+ try {
+ mcf.destroy();
+ } catch (IOException ex) {
+ LOG.log(Level.SEVERE, "STOP_CONNECTOR_FAILURE_MSG", new Object[] {ex});
+ }
+ }
+
+ //Using the array to hold the busMBeans to avoid the CurrentModificationException
+ Object[] mBeans = busMBeans.toArray();
+ for (Object name : mBeans) {
+ busMBeans.remove((ObjectName)name);
+ try {
+ unregister((ObjectName)name);
+ } catch (JMException jmex) {
+ LOG.log(Level.SEVERE, "UNREGISTER_FAILURE_MSG", new Object[]{name, jmex});
+ }
+ }
+ }
+
+ public void initComplete() {
+
+ }
+
+ public void preShutdown() {
+
+ }
+
+ public void postShutdown() {
+ this.shutdown();
+ }
+
+ private void register(Object obj, ObjectName name, ModelMBeanInfo mbi, boolean forceRegistration)
+ throws JMException {
+ RequiredModelMBean rtMBean =
+ (RequiredModelMBean)mbs.instantiate("javax.management.modelmbean.RequiredModelMBean");
+ rtMBean.setModelMBeanInfo(mbi);
+ try {
+ rtMBean.setManagedResource(obj, "ObjectReference");
+ } catch (InvalidTargetObjectTypeException itotex) {
+ throw new JMException(itotex.getMessage());
+ }
+ registerMBeanWithServer(rtMBean, persist(name), forceRegistration);
+ }
+
+ private void registerMBeanWithServer(Object obj, ObjectName name, boolean forceRegistration)
+ throws JMException {
+ ObjectInstance instance = null;
+ try {
+ instance = mbs.registerMBean(obj, name);
+ } catch (InstanceAlreadyExistsException e) {
+ if (forceRegistration) {
+ mbs.unregisterMBean(name);
+ instance = mbs.registerMBean(obj, name);
+ } else {
+ throw e;
+ }
+ }
+
+ if (instance != null) {
+ busMBeans.add(name);
+ }
+ }
+
+ public String getPersistentBusId() {
+ return persistentBusId;
+ }
+
+ public void setPersistentBusId(String id) {
+ persistentBusId = sanitize(id);
+ }
+
+ private ObjectName persist(ObjectName original) throws JMException {
+ ObjectName persisted = original;
+ if (!(persistentBusId == null
+ || "".equals(persistentBusId)
+ || persistentBusId.startsWith("${"))) {
+ String originalStr = original.toString();
+ if (originalStr.indexOf(ManagementConstants.BUS_ID_PROP) != -1) {
+ String persistedStr =
+ originalStr.replaceFirst(ManagementConstants.BUS_ID_PROP + "=" + bus.getId(),
+ ManagementConstants.BUS_ID_PROP + "=" + persistentBusId);
+ persisted = new ObjectName(persistedStr);
+ }
+ }
+ return persisted;
+ }
+
+ private String sanitize(String in) {
+ String result = null;
+ if (in != null) {
+ result = in.replace(':', '_');
+ result = result.replace('/', '_');
+ result = result.replace('\\', '_');
+ result = result.replace('?', '_');
+ result = result.replace('=', '_');
+ result = result.replace(',', '_');
+ }
+ return result;
+ }
+}
+
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/MBServerConnectorFactory.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/MBServerConnectorFactory.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/MBServerConnectorFactory.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,180 @@
+/**
+ * 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.management.jmx;
+
+import java.io.IOException;
+import java.rmi.registry.LocateRegistry;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.cxf.common.logging.LogUtils;
+
+
+
+/**
+ * Deal with the MBeanServer Connections
+ *
+ */
+public final class MBServerConnectorFactory {
+
+ public static final String DEFAULT_SERVICE_URL = "service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi";
+
+ private static final Logger LOG = LogUtils.getL7dLogger(MBServerConnectorFactory.class);
+
+ private static MBServerConnectorFactory factory;
+ private static MBeanServer server;
+
+ private static String serviceUrl = DEFAULT_SERVICE_URL;
+
+ private static Map<String, ?> environment;
+
+ private static boolean threaded;
+
+ private static boolean daemon;
+
+ private static JMXConnectorServer connectorServer;
+
+ private MBServerConnectorFactory() {
+
+ }
+
+ private int getURLLocalHostPort(String url) {
+ int portStart = url.indexOf("localhost") + 10;
+ int portEnd;
+ int port = 0;
+ if (portStart > 0) {
+ portEnd = indexNotOfNumber(url, portStart);
+ if (portEnd > portStart) {
+ final String portString = url.substring(portStart, portEnd);
+ port = Integer.parseInt(portString);
+ }
+ }
+ return port;
+ }
+
+ private static int indexNotOfNumber(String str, int index) {
+ int i = 0;
+ for (i = index; i < str.length(); i++) {
+ if (str.charAt(i) < '0' || str.charAt(i) > '9') {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public static MBServerConnectorFactory getInstance() {
+ if (factory == null) {
+ factory = new MBServerConnectorFactory();
+ }
+ return factory;
+ }
+
+ public void setMBeanServer(MBeanServer ms) {
+ server = ms;
+ }
+
+ public void setServiceUrl(String url) {
+ serviceUrl = url;
+ }
+
+ public void setEnvironment(Map<String, ?> env) {
+ environment = env;
+ }
+
+ public void setThreaded(boolean fthread) {
+ threaded = fthread;
+ }
+
+ public void setDaemon(boolean fdaemon) {
+ daemon = fdaemon;
+ }
+
+
+ public void createConnector() throws IOException {
+
+ if (server == null) {
+ server = MBeanServerFactory.createMBeanServer();
+ }
+
+ // Create the JMX service URL.
+ JMXServiceURL url = new JMXServiceURL(serviceUrl);
+
+ // if the URL is localhost, start up an Registry
+ if (serviceUrl.indexOf("localhost") > -1
+ && url.getProtocol().compareToIgnoreCase("rmi") == 0) {
+ try {
+ int port = getURLLocalHostPort(serviceUrl);
+ try {
+ LocateRegistry.createRegistry(port);
+ } catch (Exception ex) {
+ // the registry may had been created
+ LocateRegistry.getRegistry(port);
+ }
+
+ } catch (Exception ex) {
+ LOG.log(Level.SEVERE, "CREATE_REGISTRY_FAULT_MSG", new Object[]{ex});
+ }
+ }
+
+ // Create the connector server now.
+ connectorServer =
+ JMXConnectorServerFactory.newJMXConnectorServer(url, environment, server);
+
+
+ if (threaded) {
+ // Start the connector server asynchronously (in a separate thread).
+ Thread connectorThread = new Thread() {
+ public void run() {
+ try {
+ connectorServer.start();
+ } catch (IOException ex) {
+ LOG.log(Level.SEVERE, "START_CONNECTOR_FAILURE_MSG", new Object[]{ex});
+ }
+ }
+ };
+
+ connectorThread.setName("JMX Connector Thread [" + serviceUrl + "]");
+ connectorThread.setDaemon(daemon);
+ connectorThread.start();
+ } else {
+ // Start the connector server in the same thread.
+ connectorServer.start();
+ }
+
+ if (LOG.isLoggable(Level.INFO)) {
+ LOG.info("JMX connector server started: " + connectorServer);
+ }
+ }
+
+ public void destroy() throws IOException {
+ connectorServer.stop();
+ if (LOG.isLoggable(Level.INFO)) {
+ LOG.info("JMX connector server stopped: " + connectorServer);
+ }
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/Messages.properties
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/Messages.properties (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/Messages.properties 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,30 @@
+#
+#
+# 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.
+#
+#
+REGISTER_FAILURE_MSG = MBean Object {0} register to MBeanServer failed : {1}
+UNREGISTER_FAILURE_MSG = MBean Object {0} unregister to MBeanServer failed : {1}
+INSTANTIANTE_FAILURE_MSG = Instantiating the Model MBean in MBeanServer failed : {0}
+MBEAN_FAILURE_MSG = MBean option failed : {0}
+SET_MANAGED_RESOURCE_FAILURE_MSG = ModelMBean set managed resource failed : {0}
+START_CONNECTOR_FAILURE_MSG = Could not start JMX connector server : {0}
+STOP_CONNECTOR_FAILURE_MSG = Could not shutdown JMX connector server : {0}
+GET_MANAGED_INFORMATION_FAILURE_MSG = Could not get the instrumentation {0} managed information
+CREATE_REGISTRY_FAULT_MSG = Exception starting RMI registry for JMX : {0}
+OBJECT_NAME_FALUE_MSG = Get the {0} ObjectName file failed : {1}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,286 @@
+/**
+ * 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.management.jmx.export.runtime;
+
+import java.lang.reflect.Method;
+
+import javax.management.Descriptor;
+import javax.management.modelmbean.ModelMBeanInfo;
+
+import org.apache.cxf.management.annotation.ManagedAttribute;
+import org.apache.cxf.management.annotation.ManagedNotification;
+import org.apache.cxf.management.annotation.ManagedNotifications;
+import org.apache.cxf.management.annotation.ManagedOperation;
+import org.apache.cxf.management.annotation.ManagedOperationParameter;
+import org.apache.cxf.management.annotation.ManagedOperationParameters;
+import org.apache.cxf.management.annotation.ManagedResource;
+
+
+public class ModelMBeanAssembler {
+ private ModelMBeanInfoSupporter supporter = new ModelMBeanInfoSupporter();
+
+ public ManagedResource getManagedResource(Class<?> clazz) {
+ return clazz.getAnnotation(ManagedResource.class);
+ }
+
+ public ManagedAttribute getManagedAttribute(Method method) {
+ return method.getAnnotation(ManagedAttribute.class);
+ }
+
+ public ManagedOperation getManagedOperation(Method method) {
+ return method.getAnnotation(ManagedOperation.class);
+ }
+
+ public ManagedOperationParameter[] getManagedOperationParameters(Method method) {
+ ManagedOperationParameters params = method.getAnnotation(ManagedOperationParameters.class);
+ ManagedOperationParameter[] result = null;
+ if (params == null) {
+ result = new ManagedOperationParameter[0];
+ } else {
+ result = params.value();
+ }
+ return result;
+ }
+
+ public ManagedNotification[] getManagedNotifications(Class<?> clazz) {
+ ManagedNotifications notificationsAnn =
+ clazz.getAnnotation(ManagedNotifications.class);
+ ManagedNotification[] result = null;
+ if (null == notificationsAnn) {
+ return new ManagedNotification[0];
+ }
+ result = notificationsAnn.value();
+ return result;
+ }
+
+ public String getAttributeName(String methodName) {
+ if (methodName.indexOf("set") == 0) {
+ return methodName.substring(3);
+ }
+ if (methodName.indexOf("get") == 0) {
+ return methodName.substring(3);
+ }
+ if (methodName.indexOf("is") == 0) {
+ return methodName.substring(2);
+ }
+ return null;
+ }
+
+ public static boolean checkMethod(Method[] methods, String methodName) {
+ boolean result = false;
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().compareTo(methodName) == 0) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+ }
+
+ public static String getAttributeType(Method[] methods, String attributeName) {
+ String result = null;
+ String searchMethod = "get" + attributeName;
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().compareTo(searchMethod) == 0) {
+ result = methods[i].getReturnType().getName();
+ break;
+ }
+ }
+ // check it is "is " attribute
+ if (null == result) {
+ searchMethod = "is" + attributeName;
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().compareTo(searchMethod) == 0) {
+ result = methods[i].getReturnType().getName();
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+ class ManagedAttributeInfo {
+ String fname;
+ String ftype;
+ String description;
+ boolean read;
+ boolean write;
+ boolean is;
+ };
+
+
+ //get the attribut information for the method
+ public ManagedAttributeInfo getAttributInfo(Method[] methods,
+ String attributName,
+ String attributType,
+ ManagedAttribute managedAttribute) {
+ ManagedAttributeInfo mai = new ManagedAttributeInfo();
+ mai.fname = attributName;
+ mai.ftype = attributType;
+ mai.description = managedAttribute.description();
+ mai.is = checkMethod(methods, "is" + attributName);
+ mai.write = checkMethod(methods, "set" + attributName);
+
+ if (mai.is) {
+ mai.read = true;
+ } else {
+ mai.read = checkMethod(methods, "get" + attributName);
+ }
+
+ return mai;
+
+ }
+
+ Method findMethodByName(Method methods[], String methodName) {
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().compareTo(methodName) == 0) {
+ return methods[i];
+ } else {
+ continue;
+ }
+
+ }
+ return null;
+
+ }
+
+ void addAttributeOperation(Method method) {
+ Descriptor operationDescriptor =
+ supporter.buildAttributeOperationDescriptor(method.getName());
+
+ Class<?>[] types = method.getParameterTypes();
+
+ String[] paramTypes = new String[types.length];
+ String[] paramNames = new String[types.length];
+ String[] paramDescs = new String[types.length];
+
+ for (int j = 0; j < types.length; j++) {
+ paramTypes[j] = types[j].getName();
+ paramDescs[j] = "";
+ paramNames[j] = types[j].getName();
+ }
+
+ supporter.addModelMBeanMethod(method.getName(),
+ paramTypes,
+ paramNames,
+ paramDescs,
+ "",
+ method.getReturnType().getName(),
+ operationDescriptor);
+ }
+
+ public ModelMBeanInfo getModelMbeanInfo(Class<?> clazz) {
+ supporter.clear();
+ ManagedResource mr = getManagedResource(clazz);
+ if (mr == null) {
+ // the class is not need to expose to jmx
+ return null;
+ }
+ // Clazz get all the method which should be managemed
+ Descriptor mbeanDescriptor = supporter.buildMBeanDescriptor(mr);
+
+ // add the notification
+ ManagedNotification[] mns = getManagedNotifications(clazz);
+ for (int k = 0; k < mns.length; k++) {
+ supporter.addModelMBeanNotification(mns[k].notificationTypes(),
+ mns[k].name(),
+ mns[k].description(), null);
+ }
+
+ Method[] methods = clazz.getDeclaredMethods();
+
+ for (int i = 0; i < methods.length; i++) {
+ ManagedAttribute ma = getManagedAttribute(methods[i]);
+ //add Attribute to the ModelMBean
+ if (ma != null) {
+ String attributeName = getAttributeName(methods[i].getName());
+ if (!supporter.checkAttribute(attributeName)) {
+ String attributeType = getAttributeType(methods, attributeName);
+ ManagedAttributeInfo mai = getAttributInfo(methods,
+ attributeName,
+ attributeType,
+ ma);
+ Descriptor attributeDescriptor =
+ supporter.buildAttributeDescriptor(ma,
+ attributeName,
+ mai.is, mai.read, mai.write);
+
+ // should setup the description
+ supporter.addModelMBeanAttribute(mai.fname,
+ mai.ftype,
+ mai.read,
+ mai.write,
+ mai.is,
+ mai.description,
+ attributeDescriptor);
+
+ Method method;
+ // add the attribute methode to operation
+ if (mai.read) {
+ if (mai.is) {
+ method = findMethodByName(methods, "is" + attributeName);
+ } else {
+ method = findMethodByName(methods, "get" + attributeName);
+ }
+ addAttributeOperation(method);
+ }
+ if (mai.write) {
+ method = findMethodByName(methods, "set" + attributeName);
+ addAttributeOperation(method);
+ }
+ }
+
+ } else {
+ // add Operation to the ModelMBean
+ ManagedOperation mo = getManagedOperation(methods[i]);
+
+ if (mo != null) {
+ Class<?>[] types = methods[i].getParameterTypes();
+ ManagedOperationParameter[] mop = getManagedOperationParameters(methods[i]);
+ String[] paramTypes = new String[types.length];
+ String[] paramNames = new String[types.length];
+ String[] paramDescs = new String[types.length];
+
+ for (int j = 0; j < types.length; j++) {
+ paramTypes[j] = types[j].getName();
+ if (j < mop.length) {
+ paramDescs[j] = mop[j].description();
+ paramNames[j] = mop[j].name();
+ } else {
+ paramDescs[j] = "";
+ paramNames[j] = types[j].getName();
+ }
+ }
+ Descriptor operationDescriptor =
+ supporter.buildOperationDescriptor(mo, methods[i].getName());
+ supporter.addModelMBeanMethod(methods[i].getName(),
+ paramTypes,
+ paramNames,
+ paramDescs,
+ mo.description(),
+ methods[i].getReturnType().getName(),
+ operationDescriptor);
+ }
+ }
+
+ }
+ return supporter.buildModelMBeanInfo(mbeanDescriptor);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,277 @@
+/**
+ * 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.management.jmx.export.runtime;
+
+import java.lang.reflect.Constructor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+import javax.management.Descriptor;
+import javax.management.MBeanOperationInfo;
+import javax.management.MBeanParameterInfo;
+import javax.management.modelmbean.DescriptorSupport;
+import javax.management.modelmbean.ModelMBeanAttributeInfo;
+import javax.management.modelmbean.ModelMBeanConstructorInfo;
+import javax.management.modelmbean.ModelMBeanInfo;
+import javax.management.modelmbean.ModelMBeanInfoSupport;
+import javax.management.modelmbean.ModelMBeanNotificationInfo;
+import javax.management.modelmbean.ModelMBeanOperationInfo;
+
+import org.apache.cxf.management.annotation.ManagedAttribute;
+import org.apache.cxf.management.annotation.ManagedOperation;
+import org.apache.cxf.management.annotation.ManagedResource;
+
+public class ModelMBeanInfoSupporter {
+ protected Map<String, ModelMBeanAttributeInfo> attributes
+ = new HashMap<String, ModelMBeanAttributeInfo>();
+ protected Map<String, ModelMBeanNotificationInfo> notifications
+ = new HashMap<String, ModelMBeanNotificationInfo>();
+ protected Map<Constructor<?>, ModelMBeanConstructorInfo> constructors
+ = new HashMap<Constructor<?>, ModelMBeanConstructorInfo>();
+ protected Map<String, ModelMBeanOperationInfo> operations
+ = new HashMap<String, ModelMBeanOperationInfo>();
+
+ public ModelMBeanInfoSupporter() {
+
+ }
+
+ public void clear() {
+ attributes.clear();
+ notifications.clear();
+ constructors.clear();
+ operations.clear();
+ }
+ public void addModelMBeanMethod(String name,
+ String[] paramTypes,
+ String[] paramNames,
+ String[] paramDescs,
+ String description,
+ String rtype,
+ Descriptor desc) {
+ MBeanParameterInfo[] params = null;
+ if (paramTypes != null) {
+ params = new MBeanParameterInfo[ paramTypes.length ];
+ for (int i = 0; i < paramTypes.length; i++) {
+ params[i] = new MBeanParameterInfo(paramNames[i],
+ paramTypes[i], paramDescs[i]);
+ }
+ }
+
+ operations.put(name,
+ new ModelMBeanOperationInfo(name,
+ description,
+ params,
+ rtype,
+ MBeanOperationInfo.ACTION,
+ desc));
+ }
+
+ public void addModelMBeanNotification(String[] type,
+ String className,
+ String description,
+ Descriptor desc) {
+ notifications.put(className,
+ new ModelMBeanNotificationInfo(type, className, description, desc));
+ }
+
+ public boolean checkAttribute(String attributeName) {
+ return attributes.containsKey(attributeName);
+ }
+
+ public void addModelMBeanAttribute(String fname,
+ String ftype,
+ boolean read,
+ boolean write,
+ boolean is,
+ String description,
+ Descriptor desc) {
+ attributes.put(fname, new ModelMBeanAttributeInfo(fname,
+ ftype,
+ description,
+ read,
+ write,
+ is,
+ desc));
+ }
+
+
+ public void addModelMBeanConstructor(Constructor<?> c,
+ String description,
+ Descriptor desc) {
+ this.constructors.put(c,
+ new ModelMBeanConstructorInfo(description,
+ c,
+ desc));
+ }
+
+ public ModelMBeanInfo buildModelMBeanInfo(Descriptor desc) {
+
+ ModelMBeanOperationInfo[] ops =
+ (ModelMBeanOperationInfo[])operations.values().toArray(new ModelMBeanOperationInfo[0]);
+
+ ModelMBeanAttributeInfo[] atts =
+ (ModelMBeanAttributeInfo[])attributes.values().toArray(new ModelMBeanAttributeInfo[0]);
+
+ ModelMBeanConstructorInfo[] cons =
+ (ModelMBeanConstructorInfo[])constructors.values().toArray(new ModelMBeanConstructorInfo[0]);
+
+ ModelMBeanNotificationInfo[] notifs =
+ (ModelMBeanNotificationInfo[])notifications.values().toArray(new ModelMBeanNotificationInfo[0]);
+
+ return new ModelMBeanInfoSupport("javax.management.modelmbean.ModelMBeanInfo",
+ "description",
+ atts,
+ cons,
+ ops,
+ notifs, desc);
+ }
+
+
+ public Descriptor buildAttributeDescriptor(
+ ManagedAttribute ma, String attributeName, boolean is, boolean read, boolean write) {
+
+ Descriptor desc = new DescriptorSupport();
+
+ desc.setField("name", attributeName);
+
+ desc.setField("descriptorType", "attribute");
+
+ if (read) {
+ if (is) {
+ desc.setField("getMethod", "is" + attributeName);
+ } else {
+ desc.setField("getMethod", "get" + attributeName);
+ }
+ }
+
+ if (write) {
+ desc.setField("setMethod", "set" + attributeName);
+ }
+
+
+ if (ma.currencyTimeLimit() >= -1) {
+ desc.setField("currencyTimeLimit", ma.currencyTimeLimit());
+ }
+
+ if (ma.persistPolicy().length() > 0) {
+ desc.setField("persistPolicy", ma.persistPolicy());
+ }
+
+ if (ma.persistPeriod() >= -1) {
+ desc.setField("persistPeriod", ma.persistPeriod());
+ }
+
+ if (ma.defaultValue() != null) {
+ desc.setField("default", ma.defaultValue());
+ }
+
+ return desc;
+ }
+
+ public Descriptor buildOperationDescriptor(ManagedOperation mo, String operationName) {
+ Descriptor desc = new DescriptorSupport();
+
+ desc.setField("name", operationName);
+
+ desc.setField("descriptorType", "operation");
+
+ desc.setField("role", "operation");
+
+ if (mo.description() != null) {
+ desc.setField("displayName", mo.description());
+ }
+
+ if (mo.currencyTimeLimit() >= -1) {
+ desc.setField("currencyTimeLimit", mo.currencyTimeLimit());
+ }
+
+ return desc;
+ }
+
+ public Descriptor buildAttributeOperationDescriptor(String operationName) {
+
+ Descriptor desc = new DescriptorSupport();
+
+ desc.setField("name", operationName);
+
+ desc.setField("descriptorType", "operation");
+
+ if (operationName.indexOf("set") == 0) {
+ desc.setField("role", "setter");
+ } else {
+ desc.setField("role", "getter");
+ }
+
+ return desc;
+ }
+
+
+ public Descriptor buildMBeanDescriptor(ManagedResource mr) {
+ Descriptor desc = new DescriptorSupport();
+
+ if (mr.componentName() != null) {
+ desc.setField("name", mr.componentName());
+ }
+
+ desc.setField("descriptorType", "mbean");
+
+ if (mr.description() != null) {
+ desc.setField("displayName", mr.description());
+ }
+
+ if (mr.persistLocation() != null) {
+ desc.setField("persistLocation", mr.persistLocation());
+ }
+
+ if (mr.persistName() != null) {
+ desc.setField("persistName", mr.persistName());
+ }
+
+ if (mr.log()) {
+ desc.setField("log", "true");
+ } else {
+ desc.setField("log", "false");
+ }
+
+ if (mr.persistPolicy() != null) {
+ desc.setField("persistPolicy", mr.persistPolicy());
+ }
+
+ if (mr.persistPeriod() >= -1) {
+ desc.setField("persistPeriod", mr.persistPeriod());
+ }
+
+ if (mr.logFile() != null) {
+ desc.setField("logFile", mr.logFile());
+ }
+
+ if (mr.currencyTimeLimit() >= -1) {
+ desc.setField("currencyTimeLimit", mr.currencyTimeLimit());
+ }
+
+ return desc;
+
+ }
+
+
+}
+
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeData.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeData.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeData.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,186 @@
+/**
+ * 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.management.persistence;
+
+import java.util.Date;
+import java.util.List;
+
+public class ExchangeData {
+
+ private String encoding;
+
+ private String exceptionType;
+
+ private Integer id;
+
+ private Date inDate;
+
+ private String operation;
+
+ private Date outDate;
+
+ private List<ExchangeDataProperty> properties;
+
+ private String request;
+
+ private Integer requestSize;
+
+ private String response;
+
+ private Integer responseSize;
+
+ private String serviceName;
+
+ private String stackTrace;
+
+ private String status;
+
+ private String uri;
+
+ private String userAgent;
+
+ public String getEncoding() {
+ return this.encoding;
+ }
+
+ public String getExceptionType() {
+ return this.exceptionType;
+ }
+
+ public Integer getId() {
+ return this.id;
+ }
+
+ public Date getInDate() {
+ return this.inDate;
+ }
+
+ public String getOperation() {
+ return this.operation;
+ }
+
+ public Date getOutDate() {
+ return this.outDate;
+ }
+
+ public List<ExchangeDataProperty> getProperties() {
+ return this.properties;
+ }
+
+ public String getRequest() {
+ return this.request;
+ }
+
+ public Integer getRequestSize() {
+ return this.requestSize;
+ }
+
+ public String getResponse() {
+ return this.response;
+ }
+
+ public Integer getResponseSize() {
+ return this.responseSize;
+ }
+
+ public String getServiceName() {
+ return this.serviceName;
+ }
+
+ public String getStackTrace() {
+ return this.stackTrace;
+ }
+
+ public String getStatus() {
+ return this.status;
+ }
+
+ public String getUri() {
+ return this.uri;
+ }
+
+ public String getUserAgent() {
+ return this.userAgent;
+ }
+
+ public void setEncoding(String encoding) {
+ this.encoding = encoding;
+ }
+
+ public void setExceptionType(String exceptionType) {
+ this.exceptionType = exceptionType;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public void setInDate(Date inDate) {
+ this.inDate = inDate;
+ }
+
+ public void setOperation(String operation) {
+ this.operation = operation;
+ }
+
+ public void setOutDate(Date outDate) {
+ this.outDate = outDate;
+ }
+
+ public void setProperties(List<ExchangeDataProperty> properties) {
+ this.properties = properties;
+ }
+
+ public void setRequest(String request) {
+ this.request = request;
+ }
+
+ public void setRequestSize(Integer requestSize) {
+ this.requestSize = requestSize;
+ }
+
+ public void setResponse(String response) {
+ this.response = response;
+ }
+
+ public void setResponseSize(Integer responseSize) {
+ this.responseSize = responseSize;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public void setStackTrace(String stackTrace) {
+ this.stackTrace = stackTrace;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public void setUri(String uri) {
+ this.uri = uri;
+ }
+
+ public void setUserAgent(String userAgent) {
+ this.userAgent = userAgent;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataDAO.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataDAO.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataDAO.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,26 @@
+/**
+ * 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.management.persistence;
+
+
+public interface ExchangeDataDAO {
+
+ void save(ExchangeData exchangeData) throws Exception;
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataFilter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataFilter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataFilter.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -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.management.persistence;
+
+/**
+ * This interface can be implemented to indicate to PersistOutInterceptor
+ * if an ExchangeData should be persisted.
+ *
+ * @author remi
+ *
+ */
+public interface ExchangeDataFilter {
+
+ boolean shouldPersist(ExchangeData data);
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataProperty.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataProperty.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataProperty.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,63 @@
+/**
+ * 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.management.persistence;
+
+public class ExchangeDataProperty {
+
+ private Integer id;
+
+ private String name;
+
+ private ExchangeData exchangeData;
+
+ private String value;
+
+ public Integer getId() {
+ return this.id;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public ExchangeData getExchangeData() {
+ return this.exchangeData;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setExchangeData(ExchangeData exchangeData) {
+ this.exchangeData = exchangeData;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/FilesystemExchangeDataDAO.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/FilesystemExchangeDataDAO.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/FilesystemExchangeDataDAO.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,130 @@
+/**
+ * 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.management.persistence;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.StringWriter;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
+
+public class FilesystemExchangeDataDAO implements ExchangeDataDAO {
+
+ private static final Logger LOG = LogUtils.getL7dLogger(FilesystemExchangeDataDAO.class);
+
+ private String directory;
+
+ private String extension = "txt";
+
+ public void setDirectory(String directory) {
+ this.directory = directory;
+ }
+
+ public void save(ExchangeData exchange) throws Exception {
+ File file = null;
+
+ if (this.directory == null) {
+ file = File.createTempFile("cxf-management-", "." + this.extension);
+ } else {
+ file = File.createTempFile("cxf-management-", "." + this.extension, new File(this.directory));
+ }
+
+ StringWriter stringWriter = new StringWriter();
+
+ stringWriter.append("Service : ");
+ stringWriter.append(exchange.getServiceName());
+ stringWriter.append("\n");
+
+ stringWriter.append("Operation : ");
+ stringWriter.append(exchange.getOperation());
+ stringWriter.append("\n");
+
+ stringWriter.append("Status : ");
+ stringWriter.append(exchange.getStatus());
+ stringWriter.append("\n");
+
+ stringWriter.append("URI : ");
+ stringWriter.append(exchange.getUri());
+ stringWriter.append("\n");
+
+ stringWriter.append("User agent : ");
+ stringWriter.append(exchange.getUserAgent());
+ stringWriter.append("\n");
+
+ stringWriter.append("Encoding : ");
+ stringWriter.append(exchange.getEncoding());
+ stringWriter.append("\n");
+
+ stringWriter.append("Date in : ");
+ stringWriter.append(exchange.getInDate().toString());
+ stringWriter.append("\n");
+
+ stringWriter.append("Date out : ");
+ stringWriter.append(exchange.getOutDate().toString());
+ stringWriter.append("\n");
+
+ stringWriter.append("Request size : ");
+ stringWriter.append(String.valueOf(exchange.getRequestSize()));
+ stringWriter.append("\n");
+
+ stringWriter.append("Response size : ");
+ stringWriter.append(String.valueOf(exchange.getResponseSize()));
+ stringWriter.append("\n");
+
+ stringWriter.append("\n\n\nRequest : \n\n\n");
+ stringWriter.append(exchange.getRequest());
+ stringWriter.append("\n\n\n\n");
+
+ stringWriter.append("\n\n\nResponse : \n\n\n");
+ stringWriter.append(exchange.getResponse());
+ stringWriter.append("\n\n\n\n");
+
+ if ("ERROR".equals(exchange.getStatus())) {
+ stringWriter.append("\n\n\nExcepttion : ");
+ stringWriter.append(exchange.getExceptionType());
+ stringWriter.append("\nStackTrace : ");
+ stringWriter.append(exchange.getStackTrace());
+ stringWriter.append("\n\n\n\n");
+ }
+
+ stringWriter.append("\n\nProperties : \n");
+
+ if (exchange.getProperties() != null) {
+ for (ExchangeDataProperty exchangeProperty : exchange.getProperties()) {
+ stringWriter.append(exchangeProperty.getName());
+ stringWriter.append(" : ");
+ stringWriter.append(exchangeProperty.getValue());
+ stringWriter.append("\n");
+ }
+ }
+
+ FileOutputStream fileOutputStream = new FileOutputStream(file);
+
+ fileOutputStream.write(stringWriter.getBuffer().toString().getBytes());
+
+ fileOutputStream.close();
+
+ if (LOG.isLoggable(Level.FINE)) {
+ LOG.fine("Exchange data saved in " + file.getAbsolutePath());
+ }
+
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/StatusExchangeDataFilter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/StatusExchangeDataFilter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/persistence/StatusExchangeDataFilter.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,40 @@
+/**
+ * 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.management.persistence;
+
+/**
+ * This filter will only persist exchange data with a specific status.
+ *
+ * @author remi
+ *
+ */
+public class StatusExchangeDataFilter implements ExchangeDataFilter {
+
+ private String statusFilter = "ERROR";
+
+ public void setStatusFilter(String statusFilter) {
+ this.statusFilter = statusFilter;
+ }
+
+ public boolean shouldPersist(ExchangeData data) {
+
+ return data != null && this.statusFilter.equals(data.getStatus());
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/ManagementConsole.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/ManagementConsole.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/ManagementConsole.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,259 @@
+/**
+ * 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.management.utils;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanInfo;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.management.ManagementConstants;
+
+
+public final class ManagementConsole {
+ private static MBeanServerConnection mbsc;
+ private static final String DEFAULT_JMXSERVICE_URL =
+ "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi";
+ private static final Logger LOG = LogUtils.getL7dLogger(ManagementConsole.class);
+
+ String jmxServerURL;
+ String portName;
+ String serviceName;
+ String operationName;
+
+ ManagementConsole() {
+
+ }
+
+ public void getManagedObjectAttributes(ObjectName name) throws Exception {
+
+ if (mbsc == null) {
+ LOG.log(Level.SEVERE , "NO_MBEAN_SERVER");
+ return;
+ }
+ MBeanInfo info = mbsc.getMBeanInfo(name);
+ MBeanAttributeInfo[] attrs = info.getAttributes();
+ if (attrs == null) {
+ return;
+ }
+ for (int i = 0; i < attrs.length; i++) {
+ if (attrs[i].isReadable()) {
+ try {
+ Object o = mbsc.getAttribute(name, attrs[i].getName());
+ System.out.println("\t\t" + attrs[i].getName() + " = " + o);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+
+ void connectToMBserver() throws IOException {
+ jmxServerURL = jmxServerURL == null ? DEFAULT_JMXSERVICE_URL : jmxServerURL;
+ JMXServiceURL url = new JMXServiceURL(jmxServerURL);
+ JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
+ mbsc = jmxc.getMBeanServerConnection();
+ }
+
+ void listAllManagedEndpoint() {
+ try {
+ ObjectName queryEndpointName = new ObjectName(ManagementConstants.DEFAULT_DOMAIN_NAME
+ + ":type=Bus.Service.Endpoint,*");
+ Set<ObjectName> endpointNames = CastUtils.cast(mbsc.queryNames(queryEndpointName, null));
+ System.out.println("The endpoints are : ");
+ for (ObjectName oName : endpointNames) {
+ System.out.println(oName);
+ getManagedObjectAttributes(oName);
+ }
+ } catch (Exception e) {
+ LOG.log(Level.SEVERE, "FAIL_TO_LIST_ENDPOINTS", new Object[]{e});
+ }
+ }
+
+ ObjectName getEndpointObjectName()
+ throws MalformedObjectNameException, NullPointerException {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME + ":type=Bus.Service.Endpoint,");
+ buffer.append(ManagementConstants.SERVICE_NAME_PROP + "=\"" + serviceName + "\",");
+ buffer.append(ManagementConstants.PORT_NAME_PROP + "=\"" + portName + "\",*");
+ return new ObjectName(buffer.toString());
+ }
+
+ private void invokeEndpoint(String operation) {
+ ObjectName endpointName = null;
+ ObjectName queryEndpointName;
+ try {
+ queryEndpointName = getEndpointObjectName();
+ Set<ObjectName> endpointNames = CastUtils.cast(mbsc.queryNames(queryEndpointName, null));
+ // now get the ObjectName with the busId
+ Iterator it = endpointNames.iterator();
+
+ if (it.hasNext()) {
+ // only deal with the first endpoint object which retrun from the list.
+ endpointName = (ObjectName)it.next();
+ mbsc.invoke(endpointName, operation, new Object[0], new String[0]);
+ System.out.println("invoke endpoint " + endpointName
+ + " operation " + operation + " succeed!");
+ }
+
+ } catch (Exception e) {
+ if (null == endpointName) {
+ LOG.log(Level.SEVERE, "FAIL_TO_CREATE_ENDPOINT_OBEJCTNAME", new Object[]{e});
+
+ } else {
+ LOG.log(Level.SEVERE, "FAIL_TO_INVOKE_MANAGED_OBJECT_OPERATION",
+ new Object[]{endpointName, operation, e.toString()});
+ }
+ }
+ }
+
+ void startEndpoint() {
+ invokeEndpoint("start");
+ }
+
+ void stopEndpoint() {
+ invokeEndpoint("stop");
+ }
+
+ void restartEndpoint() {
+ invokeEndpoint("stop");
+ invokeEndpoint("start");
+ }
+
+
+ boolean parserArguments(String[] args) {
+ portName = "";
+ serviceName = "";
+ operationName = "";
+ boolean result = false;
+
+ int i;
+ String arg;
+ try {
+ for (i = 0; i < args.length; i++) {
+ arg = args[i];
+ if ("--port".equals(arg) || "-p".equals(arg)) {
+ portName = args[++i];
+ continue;
+ }
+ if ("--service".equals(arg) || "-s".equals(arg)) {
+ serviceName = args[++i];
+ continue;
+ }
+ if ("--jmx".equals(arg) || "-j".equals(arg)) {
+ jmxServerURL = args[++i];
+ continue;
+ }
+ if ("--operation".equals(arg) || "-o".equals(arg)) {
+ operationName = args[++i];
+ // it is the key option
+ result = true;
+ continue;
+ }
+ }
+ } catch (Exception ex) {
+ // can't paraser the argument rightly
+ return false;
+ }
+ return result;
+ }
+
+ private static void printUsage() {
+ System.out.println("Management Console for CXF Managed Endpoints");
+ System.out.println("You can start and stop the endpoints which export as JMX managed objects");
+ System.out.println("Usage: -o list ");
+ System.out.println(" -o {start|stop|restart} -p PORTQNAME -s SERVICEQNAME ");
+ System.out.println("Valid options:");
+ System.out.println(" -o [--operation] {list|start|stop|restart} call the managed endpoint "
+ + "operation");
+ System.out.println(" list: show all the managed endpoints' objectNames and");
+ System.out.println(" attributes");
+ System.out.println(" start: start the endpoint with the -p and -s "
+ + "arguments");
+ System.out.println(" stop: stop the endpoint with the -p and -s arguments");
+ System.out.println(" restart: restart the endpoint with the -p and -s "
+ + "arguments");
+
+ System.out.println(" -p [--port] arg ARG: the port Qname of the managed endpoint");
+ System.out.println(" -s [--service] arg ARG: the service Qname of the managed endpoint");
+ System.out.println(" -j [--jmx] arg ARG: the JMXServerURL for connecting to the mbean "
+ + "server");
+ System.out.println(" if not using this option, the JMXServerURL will be "
+ + "set as");
+ System.out.println(" \"service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"
+ + "\"");
+
+
+ }
+
+ public void doManagement() {
+ try {
+ connectToMBserver();
+ if ("list".equalsIgnoreCase(operationName)) {
+ listAllManagedEndpoint();
+ return;
+ }
+ if ("start".equalsIgnoreCase(operationName)) {
+ startEndpoint();
+ return;
+ }
+ if ("stop".equalsIgnoreCase(operationName)) {
+ stopEndpoint();
+ return;
+ }
+ if ("restart".equalsIgnoreCase(operationName)) {
+ restartEndpoint();
+ return;
+ }
+ printUsage();
+ } catch (IOException e) {
+ LOG.log(Level.SEVERE, "FAIL_TO_CONNECT_TO_MBEAN_SERVER", new Object[]{jmxServerURL});
+ }
+
+ }
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ ManagementConsole mc = new ManagementConsole();
+ if (mc.parserArguments(args)) {
+ mc.doManagement();
+ } else {
+ printUsage();
+ }
+
+ }
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/Messages.properties
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/Messages.properties (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/java/org/apache/cxf/management/utils/Messages.properties 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,25 @@
+#
+#
+# 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_MBEAN_SERVER = Can't find the MBeanServer, please connect to the MBeanServer first.
+FAIL_TO_CONNECT_TO_MBEAN_SERVER = Failed to connect to the MBeanServer with url {0}
+FAIL_TO_LIST_ENDPOINTS = Failed to list the endpoints, the exception is {0}.
+FAIL_TO_CREATE_ENDPOINT_OBEJCTNAME = Failed to create the endpoints objectname, error is {0}
+FAIL_TO_INVOKE_MANAGED_OBJECT_OPERATION = Failed to invoke the managed object {0}''s operation {1}, the exception is {2}.
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/bus-extensions.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/bus-extensions.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/bus-extensions.xml 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<extensions xmlns="http://cxf.apache.org/bus/extension">
+ <extension class="org.apache.cxf.management.jmx.InstrumentationManagerImpl"
+ interface="org.apache.cxf.management.InstrumentationManager"/>
+</extensions>
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/cxf-extension-management.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/cxf-extension-management.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/cxf-extension-management.xml 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:foo="http://cxf.apache.org/configuration/foo"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="org.apache.cxf.management.InstrumentationManager"
+ class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
+ <property name="bus" ref="cxf"/>
+ <property name="enabled" value="false"/>
+ <property name="threaded" value="false"/>
+ <property name="daemon" value="false"/>
+ </bean>
+
+</beans>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/cxf.extension
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/cxf.extension (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/META-INF/cxf/cxf.extension 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1 @@
+META-INF/cxf/cxf-extension-management.xml
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/schemas/configuration/instrumentation.xsd
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/schemas/configuration/instrumentation.xsd (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/main/resources/schemas/configuration/instrumentation.xsd 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<xs:schema targetNamespace="http://cxf.apache.org/management"
+ xmlns:tns="http://cxf.apache.org/management"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ jaxb:version="2.0">
+
+ <xs:complexType name="JMXConnectorPolicyType">
+ <xs:attribute name="Enabled" type="xs:boolean" use="required" />
+ <xs:attribute name="Threaded" type="xs:boolean" use="required" />
+ <xs:attribute name="Daemon" type="xs:boolean" use="required" />
+ <xs:attribute name="JMXServiceURL" type="xs:string" default="service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi"/>
+ </xs:complexType>
+
+ <xs:element name="JMXConnectorPolicy" type="tns:JMXConnectorPolicyType"/>
+
+</xs:schema>
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/InstrumentationManagerTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/InstrumentationManagerTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/InstrumentationManagerTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,88 @@
+/**
+ * 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.management;
+
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.workqueue.WorkQueueManagerImpl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class InstrumentationManagerTest extends Assert {
+ InstrumentationManager im;
+ Bus bus;
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ //test case had done the bus.shutdown
+ bus.shutdown(true);
+ }
+
+ @Test
+ public void testInstrumentationNotEnabled() {
+ SpringBusFactory factory = new SpringBusFactory();
+ bus = factory.createBus();
+ im = bus.getExtension(InstrumentationManager.class);
+ assertTrue("Instrumentation Manager should not be null", im != null);
+ MBeanServer mbs = im.getMBeanServer();
+ assertNull("MBeanServer should not be available.", mbs);
+ }
+
+ @Test
+ // try to get WorkQueue information
+ public void testWorkQueueInstrumentation() throws Exception {
+ SpringBusFactory factory = new SpringBusFactory();
+ bus = factory.createBus("managed-spring.xml", true);
+ im = bus.getExtension(InstrumentationManager.class);
+ assertTrue("Instrumentation Manager should not be null", im != null);
+ WorkQueueManagerImpl wqm = new WorkQueueManagerImpl();
+ wqm.setBus(bus);
+ wqm.getAutomaticWorkQueue();
+
+ MBeanServer mbs = im.getMBeanServer();
+ assertNotNull("MBeanServer should be available.", mbs);
+ ObjectName name = new ObjectName(ManagementConstants.DEFAULT_DOMAIN_NAME
+ + ":type=WorkQueues,*");
+ Set s = mbs.queryNames(name, null);
+ assertTrue(s.size() == 1);
+ Iterator it = s.iterator();
+ while (it.hasNext()) {
+ ObjectName n = (ObjectName)it.next();
+ Long result =
+ (Long)mbs.invoke(n, "getWorkQueueMaxSize", new Object[0], new String[0]);
+ assertEquals(result, Long.valueOf(256));
+ }
+
+ bus.shutdown(true);
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/counters/CounterRepositoryTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/counters/CounterRepositoryTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/counters/CounterRepositoryTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,150 @@
+/**
+ * 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.management.counters;
+
+import javax.management.ObjectName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.management.InstrumentationManager;
+import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class CounterRepositoryTest extends Assert {
+ private Bus bus;
+ //private InstrumentationManager im;
+ private ObjectName serviceCounter;
+ private ObjectName operationCounter;
+
+ @Before
+ public void setUp() throws Exception {
+
+ serviceCounter = new ObjectName("tandoori:type=counter,service=help");
+ operationCounter = new ObjectName("tandoori:type=counter,service=help,operation=me");
+ bus = EasyMock.createMock(Bus.class);
+ bus.getExtension(InstrumentationManager.class);
+ EasyMock.expectLastCall().andReturn(null).anyTimes();
+ EasyMock.replay(bus);
+ }
+
+ @Test
+ public void testIncreaseOneWayResponseCounter() throws Exception {
+
+ CounterRepository cr = new CounterRepository();
+ cr.setBus(bus);
+ //cr.createCounter(operationCounter, true);
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ EasyMock.expect(mhtr.isOneWay()).andReturn(true).anyTimes();
+ EasyMock.expect(mhtr.getEndTime()).andReturn((long)100000000).anyTimes();
+ EasyMock.expect(mhtr.getHandlingTime()).andReturn((long)1000).anyTimes();
+ EasyMock.expect(mhtr.getFaultMode()).andReturn(null).anyTimes();
+ EasyMock.replay(mhtr);
+ cr.increaseCounter(serviceCounter, mhtr);
+ cr.increaseCounter(operationCounter, mhtr);
+ ResponseTimeCounter opCounter = (ResponseTimeCounter) cr.getCounter(operationCounter);
+ ResponseTimeCounter sCounter = (ResponseTimeCounter) cr.getCounter(serviceCounter);
+
+ assertEquals("The operation counter isn't increased", opCounter.getNumInvocations(), 1);
+ assertEquals("The Service counter isn't increased", sCounter.getNumInvocations(), 1);
+
+ EasyMock.verify(bus);
+ EasyMock.verify(mhtr);
+ }
+
+ @Test
+ public void testIncreaseOneWayNoResponseCounter() throws Exception {
+
+ CounterRepository cr = new CounterRepository();
+ cr.setBus(bus);
+ //cr.createCounter(operationCounter, true);
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ EasyMock.expect(mhtr.isOneWay()).andReturn(true).anyTimes();
+ EasyMock.expect(mhtr.getEndTime()).andReturn((long)0).anyTimes();
+ EasyMock.expect(mhtr.getFaultMode()).andReturn(null).anyTimes();
+ EasyMock.replay(mhtr);
+ cr.increaseCounter(serviceCounter, mhtr);
+ cr.increaseCounter(operationCounter, mhtr);
+ ResponseTimeCounter opCounter = (ResponseTimeCounter) cr.getCounter(operationCounter);
+ ResponseTimeCounter sCounter = (ResponseTimeCounter) cr.getCounter(serviceCounter);
+
+ assertEquals("The operation counter isn't increased", opCounter.getNumInvocations(), 1);
+ assertEquals("The Service counter isn't increased", sCounter.getNumInvocations(), 1);
+
+ EasyMock.verify(bus);
+ EasyMock.verify(mhtr);
+ }
+
+ @Test
+ public void testIncreaseResponseCounter() throws Exception {
+ CounterRepository cr = new CounterRepository();
+ cr.setBus(bus);
+
+ MessageHandlingTimeRecorder mhtr1 = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ EasyMock.expect(mhtr1.isOneWay()).andReturn(false).anyTimes();
+ EasyMock.expect(mhtr1.getHandlingTime()).andReturn((long)1000).anyTimes();
+ EasyMock.expect(mhtr1.getFaultMode()).andReturn(null).anyTimes();
+ EasyMock.replay(mhtr1);
+ cr.createCounter(operationCounter, mhtr1);
+ cr.increaseCounter(serviceCounter, mhtr1);
+ cr.increaseCounter(operationCounter, mhtr1);
+ ResponseTimeCounter opCounter = (ResponseTimeCounter) cr.getCounter(operationCounter);
+ ResponseTimeCounter sCounter = (ResponseTimeCounter) cr.getCounter(serviceCounter);
+
+ assertEquals("The operation counter isn't increased", opCounter.getNumInvocations(), 1);
+ assertEquals("The operation counter's AvgResponseTime is wrong ",
+ opCounter.getAvgResponseTime(), 1000);
+ assertEquals("The operation counter's MaxResponseTime is wrong ",
+ opCounter.getMaxResponseTime(), (long)1000);
+ assertEquals("The operation counter's MinResponseTime is wrong ",
+ opCounter.getMinResponseTime(), (long)1000);
+ assertEquals("The Service counter isn't increased", sCounter.getNumInvocations(), 1);
+
+ MessageHandlingTimeRecorder mhtr2 = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ EasyMock.expect(mhtr2.isOneWay()).andReturn(false).anyTimes();
+ EasyMock.expect(mhtr2.getHandlingTime()).andReturn((long)2000).anyTimes();
+ EasyMock.expect(mhtr2.getFaultMode()).andReturn(null).anyTimes();
+ EasyMock.replay(mhtr2);
+ cr.increaseCounter(serviceCounter, mhtr2);
+ cr.increaseCounter(operationCounter, mhtr2);
+ assertEquals("The operation counter isn't increased", opCounter.getNumInvocations(), 2);
+ assertEquals("The operation counter's AvgResponseTime is wrong ",
+ opCounter.getAvgResponseTime(), 1500);
+ assertEquals("The operation counter's MaxResponseTime is wrong ",
+ opCounter.getMaxResponseTime(), (long)2000);
+ assertEquals("The operation counter's MinResponseTime is wrong ",
+ opCounter.getMinResponseTime(), (long)1000);
+ assertEquals("The Service counter isn't increased", sCounter.getNumInvocations(), 2);
+
+ opCounter.reset();
+ assertTrue(opCounter.getNumCheckedApplicationFaults().intValue() == 0);
+ assertTrue(opCounter.getNumInvocations().intValue() == 0);
+ assertTrue(opCounter.getNumLogicalRuntimeFaults().intValue() == 0);
+ assertTrue(opCounter.getNumRuntimeFaults().intValue() == 0);
+ assertTrue(opCounter.getNumUnCheckedApplicationFaults().intValue() == 0);
+ assertTrue(opCounter.getTotalHandlingTime().intValue() == 0);
+ assertTrue(opCounter.getMinResponseTime().longValue() == Integer.MAX_VALUE);
+ assertTrue(opCounter.getMaxResponseTime().intValue() == 0);
+
+ EasyMock.verify(bus);
+ EasyMock.verify(mhtr1);
+ EasyMock.verify(mhtr2);
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTestBase.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,132 @@
+/**
+ * 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.management.interceptor;
+
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.management.counters.CounterRepository;
+import org.apache.cxf.management.counters.MessageHandlingTimeRecorder;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.OperationInfo;
+import org.easymock.classextension.EasyMock;
+
+import org.junit.Assert;
+import org.junit.Before;
+
+
+
+public class AbstractMessageResponseTestBase extends Assert {
+ protected static final QName SERVICE_NAME = new QName("http://org.apache.cxf", "hello");
+ protected static final QName OPERATION_NAME = new QName("http://org.apache.cxf", "world");
+ protected static final QName PORT_NAME = new QName("http://org.apache.cxf", "port");
+
+ protected static final String CLIENT_SERVICE_ONAME =
+ "org.apache.cxf:type=Performance.Counter.Client,bus.id=cxf,service=\""
+ + SERVICE_NAME.toString() + "\",port=\""
+ + PORT_NAME.getLocalPart() + "\"";
+ protected static final String SERVER_SERVICE_ONAME =
+ "org.apache.cxf:type=Performance.Counter.Server,bus.id=cxf,service=\""
+ + SERVICE_NAME.toString() + "\",port=\""
+ + PORT_NAME.getLocalPart() + "\"";
+ protected ObjectName clientServiceCounterOName;
+ protected ObjectName serverServiceCounterOName;
+ protected ObjectName clientOperationCounterOName;
+ protected ObjectName serverOperationCounterOName;
+
+ protected Bus bus;
+ protected Message message;
+ protected Exchange exchange;
+ protected CounterRepository cRepository;
+
+ @Before
+ public void setUp() throws Exception {
+ message = EasyMock.createMock(Message.class);
+ exchange = EasyMock.createMock(Exchange.class);
+ bus = EasyMock.createMock(Bus.class);
+ cRepository = EasyMock.createMock(CounterRepository.class);
+ clientServiceCounterOName = new ObjectName(CLIENT_SERVICE_ONAME);
+ serverServiceCounterOName = new ObjectName(SERVER_SERVICE_ONAME);
+ clientOperationCounterOName = new ObjectName(CLIENT_SERVICE_ONAME
+ + ",operation=\"" + OPERATION_NAME.getLocalPart() + "\"");
+ serverOperationCounterOName = new ObjectName(SERVER_SERVICE_ONAME
+ + ",operation=\"" + OPERATION_NAME.getLocalPart() + "\"");
+ }
+
+ protected void setupCounterRepository(boolean increase, boolean isClient) {
+ ObjectName serviceCounterOName;
+ ObjectName operationCounterOName;
+ if (isClient) {
+ serviceCounterOName = clientServiceCounterOName;
+ operationCounterOName = clientOperationCounterOName;
+ } else {
+ serviceCounterOName = serverServiceCounterOName;
+ operationCounterOName = serverOperationCounterOName;
+ }
+ BusFactory.setDefaultBus(bus);
+ bus.getExtension(CounterRepository.class);
+ EasyMock.expectLastCall().andReturn(cRepository);
+ if (increase) {
+ EasyMock.expect(bus.getId()).andReturn(Bus.DEFAULT_BUS_ID);
+ cRepository.increaseCounter(EasyMock.eq(serviceCounterOName),
+ EasyMock.isA(MessageHandlingTimeRecorder.class));
+ EasyMock.expectLastCall();
+ cRepository.increaseCounter(EasyMock.eq(operationCounterOName),
+ EasyMock.isA(MessageHandlingTimeRecorder.class));
+ EasyMock.expectLastCall();
+ EasyMock.replay(cRepository);
+ }
+
+ EasyMock.replay(bus);
+ // increase the number
+ }
+
+ protected void setupExchangeForMessage() {
+ EasyMock.expect(exchange.get(Bus.class)).andReturn(bus);
+
+ Service service = EasyMock.createMock(Service.class);
+ EasyMock.expect(service.getName()).andReturn(SERVICE_NAME);
+ EasyMock.expect(exchange.get(Service.class)).andReturn(service);
+ EasyMock.replay(service);
+
+ Endpoint endpoint = EasyMock.createMock(Endpoint.class);
+ EndpointInfo endpointInfo = EasyMock.createMock(EndpointInfo.class);
+ EasyMock.expect(endpointInfo.getName()).andReturn(PORT_NAME);
+ EasyMock.expect(endpoint.getEndpointInfo()).andReturn(endpointInfo);
+ EasyMock.expect(exchange.get(Endpoint.class)).andReturn(endpoint);
+ EasyMock.replay(endpointInfo);
+ EasyMock.replay(endpoint);
+ setupOperationForMessage();
+ }
+
+ protected void setupOperationForMessage() {
+ OperationInfo op = EasyMock.createMock(OperationInfo.class);
+ EasyMock.expect(op.getName()).andReturn(OPERATION_NAME);
+ EasyMock.expect(exchange.get(OperationInfo.class)).andReturn(op);
+ EasyMock.replay(op);
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor2Test.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor2Test.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor2Test.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,176 @@
+/**
+ * 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.management.interceptor;
+
+import org.apache.cxf.management.counters.MessageHandlingTimeRecorder;
+import org.apache.cxf.message.FaultMode;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.service.model.OperationInfo;
+import org.easymock.classextension.EasyMock;
+
+import org.junit.Test;
+
+public class ResponseTimeMessageInInterceptor2Test extends AbstractMessageResponseTestBase {
+
+ private ResponseTimeMessageInInterceptor rtmii = new ResponseTimeMessageInInterceptor();
+
+ @Test
+ public void testClientMessageIn() {
+ // need to increase the counter and is a client
+ setupCounterRepository(true, true);
+ setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.TRUE).anyTimes();
+ EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ EasyMock.expect(exchange.get(FaultMode.class)).andReturn(null);
+ EasyMock.expect(exchange.isOneWay()).andReturn(false);
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.endHandling();
+ EasyMock.expectLastCall();
+ mhtr.setFaultMode(null);
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmii.handleMessage(message);
+ EasyMock.verify(message);
+ EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ EasyMock.verify(cRepository);
+
+ }
+
+ @Test
+ public void testClientCheckedApplicationFaultMessageIn() {
+ testClientFaultMessageIn(FaultMode.CHECKED_APPLICATION_FAULT);
+ }
+
+ @Test
+ public void testClientLogicalFaultMessageIn() {
+ testClientFaultMessageIn(FaultMode.LOGICAL_RUNTIME_FAULT);
+ }
+
+ @Test
+ public void testClientRuntimeFaultMessageIn() {
+ testClientFaultMessageIn(FaultMode.RUNTIME_FAULT);
+ }
+
+ @Test
+ public void testClientUncheckedApplicationFaultMessageIn() {
+ testClientFaultMessageIn(FaultMode.UNCHECKED_APPLICATION_FAULT);
+ }
+
+ public void testClientFaultMessageIn(FaultMode faultMode) {
+ // need to increase the counter and is a client
+ setupCounterRepository(true, true);
+ setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.TRUE).anyTimes();
+ EasyMock.expect(message.get(FaultMode.class)).andReturn(faultMode).anyTimes();
+ EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ exchange.put(FaultMode.class, faultMode);
+ EasyMock.expectLastCall();
+ EasyMock.expect(exchange.get(FaultMode.class)).andReturn(faultMode).anyTimes();
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.endHandling();
+ EasyMock.expectLastCall();
+ mhtr.setFaultMode(faultMode);
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmii.handleFault(message);
+ EasyMock.verify(message);
+ EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ EasyMock.verify(cRepository);
+
+ }
+
+
+ // it would not fire the counter increase action now
+ @Test
+ public void testServerOneWayMessageIn() {
+ // need to increase the counter and is not a client
+ //setupCounterRepository(false, false);
+ //setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.FALSE).anyTimes();
+ //EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.beginHandling();
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ //EasyMock.expect(exchange.isOneWay()).andReturn(true);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmii.handleMessage(message);
+ EasyMock.verify(message);
+ //EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ //EasyMock.verify(cRepository);
+ }
+
+ @Test
+ public void testServiceMessageIn() {
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.FALSE);
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ //EasyMock.expect(exchange.isOneWay()).andReturn(false);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(null);
+ exchange.put(EasyMock.eq(MessageHandlingTimeRecorder.class),
+ EasyMock.isA(MessageHandlingTimeRecorder.class));
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+ rtmii.handleMessage(message);
+ EasyMock.verify(message);
+ EasyMock.verify(exchange);
+
+ }
+
+ public void testIsClient() {
+ Message message1 = null;
+ Message message2 = new MessageImpl();
+ Message message3 = new MessageImpl();
+ message3.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
+ assertTrue("the message should not be client", !rtmii.isClient(message1));
+ assertTrue("the message should not be client", !rtmii.isClient(message2));
+ assertTrue("the message should be client", rtmii.isClient(message3));
+ }
+
+ @Override
+ protected void setupOperationForMessage() {
+ EasyMock.expect(exchange.get(OperationInfo.class)).andReturn(null);
+ EasyMock.expect(exchange.get("org.apache.cxf.resource.operation.name"))
+ .andReturn(OPERATION_NAME.getLocalPart());
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptorTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptorTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptorTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,168 @@
+/**
+ * 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.management.interceptor;
+
+import org.apache.cxf.management.counters.MessageHandlingTimeRecorder;
+import org.apache.cxf.message.FaultMode;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+import org.easymock.classextension.EasyMock;
+import org.junit.Test;
+
+public class ResponseTimeMessageInInterceptorTest extends AbstractMessageResponseTestBase {
+
+ private ResponseTimeMessageInInterceptor rtmii = new ResponseTimeMessageInInterceptor();
+
+ @Test
+ public void testClientMessageIn() {
+ // need to increase the counter and is a client
+ setupCounterRepository(true, true);
+ setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.TRUE).anyTimes();
+ EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ EasyMock.expect(exchange.get(FaultMode.class)).andReturn(null);
+ EasyMock.expect(exchange.isOneWay()).andReturn(false);
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.endHandling();
+ EasyMock.expectLastCall();
+ mhtr.setFaultMode(null);
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmii.handleMessage(message);
+ EasyMock.verify(message);
+ EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ EasyMock.verify(cRepository);
+
+ }
+
+ @Test
+ public void testClientCheckedApplicationFaultMessageIn() {
+ testClientFaultMessageIn(FaultMode.CHECKED_APPLICATION_FAULT);
+ }
+
+ @Test
+ public void testClientLogicalFaultMessageIn() {
+ testClientFaultMessageIn(FaultMode.LOGICAL_RUNTIME_FAULT);
+ }
+
+ @Test
+ public void testClientRuntimeFaultMessageIn() {
+ testClientFaultMessageIn(FaultMode.RUNTIME_FAULT);
+ }
+
+ @Test
+ public void testClientUncheckedApplicationFaultMessageIn() {
+ testClientFaultMessageIn(FaultMode.UNCHECKED_APPLICATION_FAULT);
+ }
+
+ public void testClientFaultMessageIn(FaultMode faultMode) {
+ // need to increase the counter and is a client
+ setupCounterRepository(true, true);
+ setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.TRUE).anyTimes();
+ EasyMock.expect(message.get(FaultMode.class)).andReturn(faultMode).anyTimes();
+ EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ exchange.put(FaultMode.class, faultMode);
+ EasyMock.expectLastCall();
+ EasyMock.expect(exchange.get(FaultMode.class)).andReturn(faultMode).anyTimes();
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.endHandling();
+ EasyMock.expectLastCall();
+ mhtr.setFaultMode(faultMode);
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmii.handleFault(message);
+ EasyMock.verify(message);
+ EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ EasyMock.verify(cRepository);
+
+ }
+
+
+ // it would not fire the counter increase action now
+ @Test
+ public void testServerOneWayMessageIn() {
+ // need to increase the counter and is not a client
+ //setupCounterRepository(false, false);
+ //setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.FALSE).anyTimes();
+ //EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.beginHandling();
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ //EasyMock.expect(exchange.isOneWay()).andReturn(true);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmii.handleMessage(message);
+ EasyMock.verify(message);
+ //EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ //EasyMock.verify(cRepository);
+ }
+
+ @Test
+ public void testServiceMessageIn() {
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.FALSE);
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ //EasyMock.expect(exchange.isOneWay()).andReturn(false);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(null);
+ exchange.put(EasyMock.eq(MessageHandlingTimeRecorder.class),
+ EasyMock.isA(MessageHandlingTimeRecorder.class));
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+ rtmii.handleMessage(message);
+ EasyMock.verify(message);
+ EasyMock.verify(exchange);
+
+ }
+
+ public void testIsClient() {
+ Message message1 = null;
+ Message message2 = new MessageImpl();
+ Message message3 = new MessageImpl();
+ message3.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
+ assertTrue("the message should not be client", !rtmii.isClient(message1));
+ assertTrue("the message should not be client", !rtmii.isClient(message2));
+ assertTrue("the message should be client", rtmii.isClient(message3));
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptorTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptorTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptorTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,59 @@
+/**
+ * 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.management.interceptor;
+
+import org.apache.cxf.management.counters.MessageHandlingTimeRecorder;
+
+import org.apache.cxf.message.Message;
+import org.easymock.classextension.EasyMock;
+import org.junit.Test;
+
+public class ResponseTimeMessageInvokerInterceptorTest extends AbstractMessageResponseTestBase {
+
+ private ResponseTimeMessageInvokerInterceptor rtmii = new ResponseTimeMessageInvokerInterceptor();
+
+ @Test
+ public void testServerOneWayMessageIn() {
+ // need to increase the counter and is not a client
+ setupCounterRepository(true, false);
+ setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.FALSE).anyTimes();
+ EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.setOneWay(true);
+ EasyMock.expectLastCall();
+ mhtr.endHandling();
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ EasyMock.expect(exchange.isOneWay()).andReturn(true);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmii.handleMessage(message);
+ EasyMock.verify(message);
+ EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ EasyMock.verify(cRepository);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptorTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,165 @@
+/**
+ * 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.management.interceptor;
+
+import org.apache.cxf.interceptor.InterceptorChain;
+import org.apache.cxf.management.counters.MessageHandlingTimeRecorder;
+import org.apache.cxf.message.FaultMode;
+import org.apache.cxf.message.Message;
+import org.easymock.classextension.EasyMock;
+import org.junit.Test;
+
+public class ResponseTimeMessageOutInterceptorTest extends AbstractMessageResponseTestBase {
+ private ResponseTimeMessageOutInterceptor rtmoi = new ResponseTimeMessageOutInterceptor();
+
+ @Test
+ public void testServerMessageOut() {
+ // need to increase the counter and is not a client
+ setupCounterRepository(true, false);
+ setupExchangeForMessage();
+ EasyMock.expect(message.get(Message.PARTIAL_RESPONSE_MESSAGE)).andReturn(Boolean.FALSE).anyTimes();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.FALSE).anyTimes();
+ EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ EasyMock.expect(exchange.get(FaultMode.class)).andReturn(null);
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.setFaultMode(null);
+ EasyMock.expectLastCall();
+ mhtr.endHandling();
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmoi.handleMessage(message);
+ EasyMock.verify(message);
+ EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ EasyMock.verify(cRepository);
+
+ }
+
+ @Test
+ public void testServerCheckedApplicationFaultMessageOut() {
+ testServerFaultMessageOut(FaultMode.CHECKED_APPLICATION_FAULT);
+ }
+
+ @Test
+ public void testServerLogicalRuntimeFaultMessageOut() {
+ testServerFaultMessageOut(FaultMode.LOGICAL_RUNTIME_FAULT);
+ }
+
+ @Test
+ public void testServerRuntimeFaultMessageOut() {
+ testServerFaultMessageOut(FaultMode.RUNTIME_FAULT);
+ }
+
+ @Test
+ public void testServerUncheckedApplicationFaultMessageOut() {
+ testServerFaultMessageOut(FaultMode.UNCHECKED_APPLICATION_FAULT);
+ }
+
+ public void testServerFaultMessageOut(FaultMode faultMode) {
+ // need to increase the counter and is not a client
+ setupCounterRepository(true, false);
+ setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.FALSE).anyTimes();
+ EasyMock.expect(message.get(FaultMode.class)).andReturn(faultMode).anyTimes();
+ EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ exchange.put(FaultMode.class, faultMode);
+ EasyMock.expectLastCall();
+ EasyMock.expect(exchange.isOneWay()).andReturn(false);
+ EasyMock.expect(exchange.get(FaultMode.class)).andReturn(faultMode).anyTimes();
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ mhtr.setFaultMode(faultMode);
+ EasyMock.expectLastCall();
+ mhtr.endHandling();
+ EasyMock.expectLastCall();
+
+ EasyMock.replay(mhtr);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr);
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmoi.handleFault(message);
+ EasyMock.verify(message);
+ EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ EasyMock.verify(mhtr);
+ EasyMock.verify(cRepository);
+
+ }
+
+ @Test
+ public void testClientOneWayMessageOut() {
+ //need to increase the counter and is a client
+ setupCounterRepository(true, true);
+ setupExchangeForMessage();
+ EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes();
+ EasyMock.expect(message.get(Message.PARTIAL_RESPONSE_MESSAGE)).andReturn(Boolean.FALSE).anyTimes();
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.TRUE).anyTimes();
+ EasyMock.expect(exchange.getOutMessage()).andReturn(message);
+ EasyMock.expect(exchange.get(FaultMode.class)).andReturn(null);
+ //MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ //mhtr.setOneWay(true);
+ //EasyMock.expectLastCall();
+
+ //EasyMock.replay(mhtr);
+ EasyMock.expect(exchange.isOneWay()).andReturn(true).anyTimes();
+ MessageHandlingTimeRecorder mhtr = EasyMock.createMock(MessageHandlingTimeRecorder.class);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(mhtr).anyTimes();
+ InterceptorChain chain = EasyMock.createMock(InterceptorChain.class);
+ EasyMock.expect(message.getInterceptorChain()).andReturn(chain);
+ chain.add(EasyMock.isA(ResponseTimeMessageOutInterceptor.EndingInterceptor.class));
+ EasyMock.expectLastCall();
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+
+ rtmoi.handleMessage(message);
+ rtmoi.getEndingInterceptor().handleMessage(message);
+
+ EasyMock.verify(message);
+ EasyMock.verify(bus);
+ EasyMock.verify(exchange);
+ //EasyMock.verify(mhtr);
+ EasyMock.verify(cRepository);
+ }
+
+ @Test
+ public void testClientMessageOut() {
+ EasyMock.expect(message.get(Message.PARTIAL_RESPONSE_MESSAGE)).andReturn(Boolean.FALSE).anyTimes();
+ EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(Boolean.TRUE);
+ EasyMock.expect(message.getExchange()).andReturn(exchange);
+ EasyMock.expect(exchange.isOneWay()).andReturn(false);
+ EasyMock.expect(exchange.get(MessageHandlingTimeRecorder.class)).andReturn(null);
+ exchange.put(EasyMock.eq(MessageHandlingTimeRecorder.class),
+ EasyMock.isA(MessageHandlingTimeRecorder.class));
+ EasyMock.replay(exchange);
+ EasyMock.replay(message);
+ rtmoi.handleMessage(message);
+ EasyMock.verify(message);
+ EasyMock.verify(exchange);
+
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/HelloWorld.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/HelloWorld.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/HelloWorld.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -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.management.jmx;
+
+public class HelloWorld implements HelloWorldMBean {
+ private String name;
+
+ public HelloWorld(String name) {
+ this.name = name;
+ }
+
+ public String sayHi() {
+ return "Wazzzuuup " + this.name;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/HelloWorldMBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/HelloWorldMBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/HelloWorldMBean.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -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.management.jmx;
+
+public interface HelloWorldMBean {
+ String sayHi();
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,184 @@
+/**
+ * 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.management.jmx;
+
+import java.lang.management.ManagementFactory;
+
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.InstanceNotFoundException;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.cxf.management.jmx.export.AnnotationTestInstrumentation;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class JMXManagedComponentManagerTest extends Assert {
+
+ private static final String NAME_ATTRIBUTE = "Name";
+ private InstrumentationManagerImpl manager;
+
+ @Before
+ public void setUp() throws Exception {
+ manager = new InstrumentationManagerImpl();
+ manager.setDaemon(false);
+ manager.setThreaded(true);
+ manager.setEnabled(true);
+ manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+ manager.init();
+ //Wait for MBeanServer connector to be initialized on separate thread.
+ Thread.sleep(2000);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ manager.shutdown();
+ }
+
+ @Test
+ public void testRegisterInstrumentation() throws Exception {
+ //manager.setDaemon(false);
+ //manager.setThreaded(false);
+ //manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+ //manager.init();
+
+ AnnotationTestInstrumentation im = new AnnotationTestInstrumentation();
+ ObjectName name = new ObjectName("org.apache.cxf:type=foo,name=bar");
+ im.setName("John Smith");
+ manager.register(im, name);
+
+ Object val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
+ assertEquals("Incorrect result", "John Smith", val);
+
+ try {
+ manager.register(im, name);
+ fail("Registering with existing name should fail.");
+ } catch (JMException jmex) {
+ //Expected
+ }
+
+ manager.register(im, name, true);
+
+ val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
+ assertEquals("Incorrect result", "John Smith", val);
+ manager.unregister(name);
+
+ im.setName("Foo Bar");
+ name = manager.register(im);
+
+ val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
+ assertEquals("Incorrect result", "Foo Bar", val);
+
+ try {
+ manager.register(im);
+ fail("Registering with existing name should fail.");
+ } catch (JMException jmex) {
+ //Expected
+ }
+
+ name = manager.register(im, true);
+
+ val = manager.getMBeanServer().getAttribute(name, NAME_ATTRIBUTE);
+ assertEquals("Incorrect result", "Foo Bar", val);
+
+ manager.unregister(im);
+ }
+
+ @Test
+ public void testRegisterStandardMBean() throws Exception {
+ ObjectName name = this.registerStandardMBean("yo!");
+ String result =
+ (String)manager.getMBeanServer().invoke(name, "sayHi", new Object[0], new String[0]);
+ assertEquals("Wazzzuuup yo!", result);
+ }
+
+ /**
+ * Simulate repeated startup and shutdown of the CXF Bus in an environment
+ * where the container and MBeanServer are not shutdown between CXF restarts.
+ */
+ @Test
+ public void testBusLifecycleListener() throws Exception {
+ // We need to destroy the manager that is automatically setup by the test.
+ this.tearDown();
+
+ MBeanServer server = ManagementFactory.getPlatformMBeanServer();
+
+ this.manager = new InstrumentationManagerImpl();
+ this.manager.setDaemon(false);
+ // Turn threading off so that we get the exception in this thread
+ // and the manager is set into a failed state if the connector
+ // cannot be created.
+ this.manager.setThreaded(false);
+ this.manager.setEnabled(true);
+ this.manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+ this.manager.setServer(server);
+ this.manager.register();
+ this.manager.init();
+
+ ObjectName name = this.registerStandardMBean("yo!");
+ String result =
+ (String)manager.getMBeanServer().invoke(name, "sayHi", new Object[0], new String[0]);
+ assertEquals("Wazzzuuup yo!", result);
+
+ try {
+ name = this.registerStandardMBean("yo!");
+ fail("registered duplicate MBean");
+ } catch (InstanceAlreadyExistsException e) {
+ // expected
+ }
+
+ this.manager.preShutdown();
+ this.manager.postShutdown();
+
+ try {
+ this.manager.getMBeanServer().invoke(name, "sayHi", new Object[0], new String[0]);
+ fail("MBean not unregistered on shutdown.");
+ } catch (InstanceNotFoundException e) {
+ // expected
+ }
+
+ this.manager = new InstrumentationManagerImpl();
+ this.manager.setDaemon(false);
+ // Turn threading off so that we get the exception in this thread
+ // and the manager is set into a failed state if the connector
+ // cannot be created.
+ this.manager.setThreaded(false);
+ this.manager.setEnabled(true);
+ this.manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+ this.manager.setServer(server);
+ this.manager.register();
+ this.manager.init();
+
+ name = this.registerStandardMBean("yoyo!");
+ result =
+ (String)manager.getMBeanServer().invoke(name, "sayHi", new Object[0], new String[0]);
+ assertEquals("Wazzzuuup yoyo!", result);
+ }
+
+ private ObjectName registerStandardMBean(String name) throws Exception {
+ final HelloWorld hw = new HelloWorld(name);
+ final ObjectName oName = new ObjectName("org.apache.cxf:type=foo,name=bar");
+ this.manager.register(hw, oName);
+ return oName;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,54 @@
+/**
+ * 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.management.jmx;
+
+
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+
+
+public class MBServerConnectorTest extends Assert {
+
+ @Test
+ public void testMBServerConnector() {
+ MBServerConnectorFactory mcf;
+ MBeanServer mbs;
+ mbs = MBeanServerFactory.createMBeanServer("test");
+ mcf = MBServerConnectorFactory.getInstance();
+ mcf.setMBeanServer(mbs);
+ mcf.setThreaded(true);
+ mcf.setDaemon(true);
+ mcf.setServiceUrl("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+ try {
+ mcf.createConnector();
+ Thread.sleep(1000);
+ mcf.destroy();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ assertFalse("Some Exception happen to MBServerConnectorTest", true);
+ }
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/AnnotationTestInstrumentation.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/AnnotationTestInstrumentation.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/AnnotationTestInstrumentation.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,110 @@
+/**
+ * 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.management.jmx.export;
+
+import javax.management.JMException;
+import javax.management.ObjectName;
+
+import org.apache.cxf.management.ManagedComponent;
+import org.apache.cxf.management.annotation.ManagedAttribute;
+import org.apache.cxf.management.annotation.ManagedNotification;
+import org.apache.cxf.management.annotation.ManagedNotifications;
+import org.apache.cxf.management.annotation.ManagedOperation;
+import org.apache.cxf.management.annotation.ManagedOperationParameter;
+import org.apache.cxf.management.annotation.ManagedOperationParameters;
+import org.apache.cxf.management.annotation.ManagedResource;
+
+@ManagedResource(componentName = "AnnotationTest", description = "My Managed Bean",
+ persistPolicy = "OnUpdate", currencyTimeLimit = 15 ,
+ log = false ,
+ logFile = "jmx.log", persistPeriod = 200,
+ persistLocation = "/local/work", persistName = "bar.jmx")
+@ManagedNotifications({@ManagedNotification(name = "My Notification",
+ notificationTypes = {"type.foo", "type.bar" }) })
+public class AnnotationTestInstrumentation implements ManagedComponent {
+
+ private String name;
+
+ private String nickName;
+
+ private int age;
+
+ private boolean isSuperman;
+
+
+ @ManagedAttribute(description = "The Age Attribute", currencyTimeLimit = 15)
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int a) {
+ this.age = a;
+ }
+
+ @ManagedOperation(currencyTimeLimit = 30)
+ public long myOperation() {
+ return 1L;
+ }
+
+ @ManagedAttribute(description = "The Name Attribute",
+ currencyTimeLimit = 20,
+ defaultValue = "bar",
+ persistPolicy = "OnUpdate")
+ public void setName(String n) {
+ this.name = n;
+ }
+
+ @ManagedAttribute(defaultValue = "bar", persistPeriod = 300)
+ public String getName() {
+ return name;
+ }
+
+ @ManagedAttribute(defaultValue = "barasd", description = "The Nick Name Attribute")
+ public String getNickName() {
+ return this.nickName;
+ }
+
+ public void setNickName(String n) {
+ this.nickName = n;
+ }
+
+ @ManagedAttribute(description = "The Is Superman Attribute")
+ public void setSuperman(boolean superman) {
+ this.isSuperman = superman;
+ }
+
+ public boolean isSuperman() {
+ return isSuperman;
+ }
+
+ @ManagedOperation(description = "Add Two Numbers Together")
+ @ManagedOperationParameters({@ManagedOperationParameter(
+ name = "x", description = "Left operand"),
+ @ManagedOperationParameter(
+ name = "y", description = "Right operand") })
+ public int add(int x, int y) {
+ return x + y;
+ }
+
+ public ObjectName getObjectName() throws JMException {
+ return new ObjectName("org.apache.cxf:type=AnnotationTestInstrumentation");
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/ModelMBeanAssemblerTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/ModelMBeanAssemblerTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/jmx/export/ModelMBeanAssemblerTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,220 @@
+/**
+ * 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.management.jmx.export;
+
+
+import javax.management.Attribute;
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanNotificationInfo;
+import javax.management.MBeanOperationInfo;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.modelmbean.ModelMBeanInfo;
+import javax.management.modelmbean.ModelMBeanOperationInfo;
+import javax.management.modelmbean.RequiredModelMBean;
+
+
+import org.apache.cxf.management.jmx.export.runtime.ModelMBeanAssembler;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+
+
+public class ModelMBeanAssemblerTest extends Assert {
+
+ protected static final String AGE_ATTRIBUTE = "Age";
+
+ protected static final String NAME_ATTRIBUTE = "Name";
+
+ protected static AnnotationTestInstrumentation ati = new AnnotationTestInstrumentation();
+
+ protected MBeanServer server;
+
+ protected ObjectName ton;
+
+ @Before
+ public final void setUp() throws Exception {
+ this.server = MBeanServerFactory.createMBeanServer();
+ try {
+ onSetUp();
+ } catch (Exception e) {
+ releaseServer();
+ throw e;
+ }
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ releaseServer();
+ onTearDown();
+ }
+
+ private void releaseServer() {
+ MBeanServerFactory.releaseMBeanServer(this.getServer());
+ }
+
+ protected void onTearDown() throws Exception {
+ // unregister the mbean client
+ server.unregisterMBean(ton);
+ }
+
+ protected void onSetUp() throws Exception {
+
+ try {
+ ton = new ObjectName("org.apache.cxf:Type=testInstrumentation");
+ } catch (MalformedObjectNameException e) {
+ e.printStackTrace();
+ } catch (NullPointerException e) {
+ e.printStackTrace();
+ }
+
+
+ //create the mbean and register it
+ ModelMBeanInfo mbi = getMBeanInfoFromAssembler();
+
+ RequiredModelMBean rtMBean;
+
+ rtMBean = (RequiredModelMBean)server.instantiate(
+ "javax.management.modelmbean.RequiredModelMBean");
+
+ rtMBean.setModelMBeanInfo(mbi);
+
+ rtMBean.setManagedResource(ati, "ObjectReference");
+
+ server.registerMBean(rtMBean, ton);
+ }
+
+ public MBeanServer getServer() {
+ return server;
+ }
+
+ //the client get and set the ModelObject and setup the ManagerBean
+ @Test
+ public void testRegisterOperations() throws Exception {
+ ModelMBeanInfo info = getMBeanInfoFromAssembler();
+ assertEquals("Incorrect number of operations registered",
+ 10, info.getOperations().length);
+ }
+
+ @Test
+ public void testGetMBeanInfo() throws Exception {
+ ModelMBeanInfo info = getMBeanInfoFromAssembler();
+ assertNotNull("MBeanInfo should not be null", info);
+ }
+
+ @Test
+ public void testGetMBeanAttributeInfo() throws Exception {
+ ModelMBeanInfo info = getMBeanInfoFromAssembler();
+ MBeanAttributeInfo[] inf = info.getAttributes();
+ assertEquals("Invalid number of Attributes returned",
+ 4, inf.length);
+
+ for (int x = 0; x < inf.length; x++) {
+ assertNotNull("MBeanAttributeInfo should not be null", inf[x]);
+ assertNotNull("Description for MBeanAttributeInfo should not be null",
+ inf[x].getDescription());
+ }
+ }
+
+ @Test
+ public void testGetMBeanOperationInfo() throws Exception {
+ ModelMBeanInfo info = getMBeanInfoFromAssembler();
+ MBeanOperationInfo[] inf = info.getOperations();
+ assertEquals("Invalid number of Operations returned",
+ 10, inf.length);
+
+ for (int x = 0; x < inf.length; x++) {
+ assertNotNull("MBeanOperationInfo should not be null", inf[x]);
+ assertNotNull("Description for MBeanOperationInfo should not be null",
+ inf[x].getDescription());
+ }
+ }
+
+ @Test
+ public void testDescriptionNotNull() throws Exception {
+ ModelMBeanInfo info = getMBeanInfoFromAssembler();
+ assertNotNull("The MBean description should not be null",
+ info.getDescription());
+ }
+
+ @Test
+ public void testSetAttribute() throws Exception {
+ getServer().setAttribute(ton, new Attribute(AGE_ATTRIBUTE, 12));
+ assertEquals("The Age should be ", 12, ati.getAge());
+ getServer().setAttribute(ton, new Attribute(NAME_ATTRIBUTE, "Rob Harrop"));
+ assertEquals("The name should be ", "Rob Harrop", ati.getName());
+ }
+
+ @Test
+ public void testGetAttribute() throws Exception {
+ ati.setName("John Smith");
+ Object val = getServer().getAttribute(ton, NAME_ATTRIBUTE);
+ assertEquals("Incorrect result", "John Smith", val);
+ }
+
+ @Test
+ public void testOperationInvocation() throws Exception {
+ Object result = getServer().invoke(ton, "add",
+ new Object[] {new Integer(20), new Integer(30)}, new String[] {"int", "int"});
+ assertEquals("Incorrect result", new Integer(50), result);
+ }
+
+ @Test
+ public void testAttributeHasCorrespondingOperations() throws Exception {
+ ModelMBeanInfo info = getMBeanInfoFromAssembler();
+
+ ModelMBeanOperationInfo myOperation = info.getOperation("myOperation");
+ assertNotNull("get operation should not be null", myOperation);
+ assertEquals("Incorrect myOperation return type", "long", myOperation.getReturnType());
+
+ ModelMBeanOperationInfo add = info.getOperation("add");
+ assertNotNull("set operation should not be null", add);
+ assertEquals("Incorrect add method description", "Add Two Numbers Together", add.getDescription());
+
+ }
+
+ @Test
+ public void testNotificationMetadata() throws Exception {
+ ModelMBeanInfo info = getMBeanInfoFromAssembler();
+ MBeanNotificationInfo[] notifications = info.getNotifications();
+ assertEquals("Incorrect number of notifications", 1, notifications.length);
+ assertEquals("Incorrect notification name", "My Notification", notifications[0].getName());
+
+ String[] notifTypes = notifications[0].getNotifTypes();
+
+ assertEquals("Incorrect number of notification types", 2, notifTypes.length);
+ assertEquals("Notification type.foo not found", "type.foo", notifTypes[0]);
+ assertEquals("Notification type.bar not found", "type.bar", notifTypes[1]);
+ }
+
+
+ protected ModelMBeanInfo getMBeanInfoFromAssembler() {
+ ModelMBeanAssembler assembler = new ModelMBeanAssembler();
+ return assembler.getModelMbeanInfo(AnnotationTestInstrumentation.class);
+ }
+
+
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/utils/ManagementConsoleTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/utils/ManagementConsoleTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/java/org/apache/cxf/management/utils/ManagementConsoleTest.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,57 @@
+/**
+ * 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.management.utils;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ManagementConsoleTest extends Assert {
+ private ManagementConsole mc = new ManagementConsole();
+
+ @Test
+ public void paraserCommandTest() {
+ String[] listArgs = new String[] {"--operation", "list"};
+ mc.parserArguments(listArgs);
+ assertEquals("It is not right operation name", "list", mc.operationName);
+ assertEquals("The portName should be cleared", "", mc.portName);
+ String[] startArgs = new String[] {"-o", "start", "--jmx",
+ "service:jmx:rmi:///jndi/rmi://localhost:1234/jmxrmi",
+ "--service",
+ "\"{http://apache.org/hello_world_soap_http}SOAPService\"",
+ "--port",
+ "\"{http://apache.org/hello_world_soap_http}SoapPort\""};
+ mc.parserArguments(startArgs);
+ assertEquals("It is not right operation name", "start", mc.operationName);
+ assertEquals("It is not right port name",
+ "\"{http://apache.org/hello_world_soap_http}SoapPort\"", mc.portName);
+ assertEquals("It is not right service name",
+ "\"{http://apache.org/hello_world_soap_http}SOAPService\"", mc.serviceName);
+ assertEquals("It is not a jmx url",
+ "service:jmx:rmi:///jndi/rmi://localhost:1234/jmxrmi",
+ mc.jmxServerURL);
+
+ String[] errorArgs = new String[] {"--op", "listAll"};
+ assertFalse("the arguments are wrong", mc.parserArguments(errorArgs));
+
+ }
+
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/resources/managed-spring.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/resources/managed-spring.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management/src/test/resources/managed-spring.xml 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:im="http://cxf.apache.org/management"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="org.apache.cxf.management.InstrumentationManager" class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
+ <property name="bus" ref="cxf" />
+ <property name="enabled" value="true"/>
+ <property name="threaded" value="false"/>
+ <property name="daemon" value="false"/>
+ <property name="JMXServiceURL" value="service:jmx:rmi:///jndi/rmi://localhost:9914/jmxrmi" />
+ </bean>
+
+</beans>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/pom.xml 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,107 @@
+<!--
+ 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-management-web</artifactId>
+ <packaging>jar</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF Runtime Web Management</name>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-core</artifactId>
+ <version>${cxf.abdera.version}</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-parser</artifactId>
+ <version>${cxf.abdera.version}</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-extensions-json</artifactId>
+ <version>${cxf.abdera.version}</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-management</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogLevel.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogLevel.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogLevel.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,89 @@
+/**
+ * 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.management.web.logging;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Level;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlTransient;
+
+/**
+ * Log level of {@link LogRecord}. Based on SLF4J being popular facade for loggers like JUL, Log4J, JCL and so
+ * on. Severities order is: FATAL > ERROR > WARN > INFO > DEBUG > TRACE.
+ * <p>
+ * Mapping of levels:
+ * <ol>
+ * <li>JUL - same as <a href="http://www.slf4j.org/apidocs/org/slf4j/bridge/SLF4JBridgeHandler.html">SLF4J
+ * approach</a>.</li>
+ * <li>Log4J - levels are identical</li>
+ * </ol>
+ */
+@XmlEnum
+public enum LogLevel {
+ ALL,
+ FATAL,
+ ERROR,
+ WARN,
+ INFO,
+ DEBUG,
+ TRACE,
+ OFF;
+
+ @XmlTransient
+ private static Map<Level, LogLevel> fromJul = new HashMap<Level, LogLevel>();
+
+ @XmlTransient
+ private static Map<LogLevel, Level> toJul = new HashMap<LogLevel, Level>();
+
+ static {
+ fromJul.put(Level.ALL, LogLevel.ALL);
+ fromJul.put(Level.SEVERE, LogLevel.ERROR);
+ fromJul.put(Level.WARNING, LogLevel.WARN);
+ fromJul.put(Level.INFO, LogLevel.INFO);
+ fromJul.put(Level.FINE, LogLevel.DEBUG);
+ fromJul.put(Level.FINER, LogLevel.DEBUG);
+ fromJul.put(Level.FINEST, LogLevel.TRACE);
+ fromJul.put(Level.OFF, LogLevel.OFF);
+
+ toJul.put(LogLevel.ALL, Level.ALL);
+ toJul.put(LogLevel.FATAL, Level.SEVERE);
+ toJul.put(LogLevel.ERROR, Level.SEVERE);
+ toJul.put(LogLevel.WARN, Level.WARNING);
+ toJul.put(LogLevel.INFO, Level.INFO);
+ toJul.put(LogLevel.DEBUG, Level.FINE);
+ toJul.put(LogLevel.TRACE, Level.FINEST);
+ toJul.put(LogLevel.OFF, Level.OFF);
+ }
+
+ /**
+ * Creates this enum from JUL {@link Level}.
+ */
+ public static LogLevel fromJUL(Level level) {
+ return fromJul.get(level);
+ }
+
+ /**
+ * Creates this JUL {@link Level} from this enum.
+ */
+ public static Level toJUL(LogLevel level) {
+ return toJul.get(level);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecord.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecord.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecord.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,195 @@
+/**
+ * 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.management.web.logging;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.text.MessageFormat;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.apache.commons.lang.Validate;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+
+/**
+ * Log entry serializable to XML. Based on common set of {@link java.util.logging.LogRecord} and
+ * {@link org.apache.log4j.spi.LoggingEvent} attributes.
+ * <p>
+ * LogRecord are never null; if some attributes are not set (e.g. logger name, or rendered cause taken from
+ * Throwable) empty strings are returned.
+ */
+@XmlRootElement(namespace = "http://cxf.apache.org/log")
+public class LogRecord {
+
+ @XmlTransient
+ private String id = "uuid:" + UUID.randomUUID().toString();
+
+ private Date eventTimestamp = new Date();
+ private LogLevel level = LogLevel.INFO;
+ private String message = "";
+ private String loggerName = "";
+ private String threadName = "";
+ private String throwable = "";
+
+ public LogRecord() {
+
+ }
+
+ public LogRecord(String id) {
+ this.id = id;
+ }
+
+ public LogRecord(LogRecord copy) {
+ this.eventTimestamp = copy.getEventTimestamp();
+ this.level = copy.getLevel();
+ this.message = copy.getMessage();
+ this.loggerName = copy.getLoggerName();
+ this.threadName = copy.getThreadName();
+ this.throwable = copy.getThrowable();
+ }
+
+ /**
+ * Creates this object from JUL LogRecord. Most attributes are copied, others are converted as follows:
+ * raw {@link java.util.logging.LogRecord#getMessage() message} is formatted with
+ * {@link java.util.logging.LogRecord#getParameters() parameters} using {@link MessageFormat}, attached
+ * {@link java.util.logging.LogRecord#getThrown() throwable} has full stack trace dumped, and log levels
+ * are mapped as specified in {@link LogRecord}.
+ *
+ * @param julRecord log record to convert.
+ * @return conversion result.
+ */
+ public static LogRecord fromJUL(java.util.logging.LogRecord julRecord) {
+ Validate.notNull(julRecord, "julRecord is null");
+ LogRecord record = new LogRecord();
+ record.setEventTimestamp(new Date(julRecord.getMillis()));
+ record.setLevel(LogLevel.fromJUL(julRecord.getLevel()));
+ record.setLoggerName(julRecord.getLoggerName());
+ if (julRecord.getThrown() != null) {
+ record.setThrowable(julRecord.getThrown());
+ }
+ if (julRecord.getParameters() != null) {
+ record.setMessage(MessageFormat.format(julRecord.getMessage(), julRecord.getParameters()));
+ } else {
+ record.setMessage(julRecord.getMessage());
+ }
+ record.setThreadName(Integer.toString(julRecord.getThreadID()));
+ return record;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ @XmlElement(namespace = "http://cxf.apache.org/log")
+ public Date getEventTimestamp() {
+ return eventTimestamp;
+ }
+
+ public void setEventTimestamp(Date eventTimestamp) {
+ Validate.notNull(eventTimestamp, "eventTimestamp is null");
+ this.eventTimestamp = eventTimestamp;
+ }
+
+ @XmlElement(namespace = "http://cxf.apache.org/log")
+ public LogLevel getLevel() {
+ return level;
+ }
+
+ public void setLevel(LogLevel level) {
+ Validate.notNull(level, "level is null");
+ this.level = level;
+ }
+
+ /**
+ * Formatted message with parameters filled in.
+ */
+ @XmlElement(namespace = "http://cxf.apache.org/log")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String renderedMessage) {
+ Validate.notNull(level, "message is null");
+ this.message = renderedMessage;
+ }
+
+ @XmlElement(namespace = "http://cxf.apache.org/log")
+ public String getLoggerName() {
+ return loggerName;
+ }
+
+ public void setLoggerName(String loggerName) {
+ Validate.notNull(level, "loggerName is null");
+ this.loggerName = loggerName;
+ }
+
+ @XmlElement(namespace = "http://cxf.apache.org/log")
+ public String getThreadName() {
+ return threadName;
+ }
+
+ public void setThreadName(String threadName) {
+ Validate.notNull(level, "threadName is null");
+ this.threadName = threadName;
+ }
+
+ /**
+ * Full stack trace of {@link Throwable} associated with log record.
+ */
+ @XmlElement(namespace = "http://cxf.apache.org/log")
+ public String getThrowable() {
+ return throwable;
+ }
+
+ public void setThrowable(String throwable) {
+ Validate.notNull(throwable, "throwable is null");
+ this.throwable = throwable;
+ }
+
+ public void setThrowable(Throwable thr) {
+ Validate.notNull(thr, "throwable is null");
+ StringWriter sw = new StringWriter();
+ thr.printStackTrace(new PrintWriter(sw));
+ this.throwable = sw.getBuffer().toString();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return EqualsBuilder.reflectionEquals(obj, this);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
+ }
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecords.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecords.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecords.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,65 @@
+/**
+ * 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.management.web.logging;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.commons.lang.Validate;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+
+/**
+ * List of {@link LogRecord}s. Necessary wrapper for {@link List} used in JAXB context.
+ */
+@XmlRootElement(namespace = "http://cxf.apache.org/log")
+public class LogRecords {
+
+ private List<LogRecord> logRecords = new ArrayList<LogRecord>();
+
+ @XmlElement(name = "logRecord", namespace = "http://cxf.apache.org/log")
+ public List<LogRecord> getLogRecords() {
+ return logRecords;
+ }
+
+ public void setLogRecords(List<LogRecord> logRecords) {
+ Validate.notNull(logRecords, "logRecords is null");
+ this.logRecords = logRecords;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return EqualsBuilder.reflectionEquals(obj, this);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadWriteLogStorage.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadWriteLogStorage.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadWriteLogStorage.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,40 @@
+/**
+ * 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.management.web.logging;
+
+import java.util.List;
+
+/**
+ * Can be used by pull-style loggers to offload/save the records to some external storage
+ *
+ */
+public interface ReadWriteLogStorage extends ReadableLogStorage {
+
+ /**
+ * Save the records
+ * @param records log records to save
+ */
+ void save(List<LogRecord> records);
+
+ /**
+ * Clear the storage
+ */
+ void clear();
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadableLogStorage.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadableLogStorage.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadableLogStorage.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,56 @@
+/**
+ * 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.management.web.logging;
+
+import java.util.List;
+
+import org.apache.cxf.jaxrs.ext.search.SearchCondition;
+
+/**
+ * Can be used by pull-style loggers to read the records from some external storage
+ *
+ */
+public interface ReadableLogStorage {
+
+
+ /**
+ * Read the records and load them into a provided list
+ * @param list the list saved records should be added to
+ * @param condition the condition loaded records must meet, can be null
+ * @param loadFrom the initial index of the storage to have records loaded from
+ * @param int maxNumberOfRecords the max number of records to load from the storage
+ */
+ void load(List<LogRecord> list,
+ SearchCondition<LogRecord> condition,
+ int loadFrom,
+ int maxNumberOfRecords);
+
+
+ /**
+ * Get the size of storage (in records)
+ * @param the size, -1 if not known, for ex, when reading from an open file containing log entries
+ */
+ int getSize();
+
+
+ /**
+ * Close the storage
+ */
+ void close();
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AbstractAtomBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AbstractAtomBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AbstractAtomBean.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,180 @@
+/**
+ * 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.management.web.logging.atom;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.logging.Handler;
+import java.util.logging.Logger;
+
+import org.apache.commons.lang.Validate;
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.management.web.logging.LogLevel;
+
+
+public abstract class AbstractAtomBean {
+
+ private List<LoggerLevel> loggers = new ArrayList<LoggerLevel>();
+ private boolean initialized;
+ private Bus bus;
+
+ /**
+ * Creates unconfigured and uninitialized bean. To configure setters must be used, then {@link #init()}
+ * must be called.
+ */
+ public AbstractAtomBean() {
+ initSingleLogger();
+ }
+
+ private void initSingleLogger() {
+ loggers = new ArrayList<LoggerLevel>();
+ loggers.add(new LoggerLevel("", "INFO"));
+ }
+
+ public void setBus(Bus bus) {
+ this.bus = bus;
+ }
+
+ public Bus getBus() {
+ return bus;
+ }
+
+ /**
+ * Set one or more loggers and levels descriptor. <br>
+ * Parsed input syntax is:
+ *
+ * <pre>
+ * loggers := <logger>(<separator><logger>)*
+ * logger := <name>[":"<level>]
+ * separator := "," | " " | "\n"
+ * </pre>
+ *
+ * Examples:
+ * <p>
+ * Two loggers and two levels: <br>
+ * <tt>org.apache.cxf:INFO, org.apache.cxf.jaxrs:DEBUG</tt>
+ * <p>
+ * Three loggers, first with default "INFO" level: <br>
+ * <tt>org.apache.cxf, org.apache.cxf.jaxrs:DEBUG, namedLogger:ERROR</tt><br>
+ * <p>
+ * One logger with default "INFO" level: <br>
+ * <tt>org.apache.cxf</tt><br>
+ */
+ public void setLoggers(String loggers) {
+ checkInit();
+ Validate.notNull(loggers, "loggers is null");
+ parseLoggers(loggers);
+ }
+
+ /**
+ * Name of logger to associate with ATOM push handler; empty string for root logger.
+ */
+ public void setLogger(String logger) {
+ checkInit();
+ Validate.notNull(logger, "logger is null");
+ if (loggers.size() != 1) {
+ initSingleLogger();
+ }
+ loggers.get(0).setLogger(logger);
+ }
+
+ /**
+ * Name of level that logger will use publishing log events to ATOM push handler; empty string for default
+ * "INFO" level.
+ */
+ public void setLevel(String level) {
+ checkInit();
+ Validate.notNull(level, "level is null");
+ if (loggers.size() != 1) {
+ initSingleLogger();
+ }
+ loggers.get(0).setLevel(level);
+ }
+
+
+ /**
+ * Initializes bean; creates ATOM handler based on current properties state, and attaches handler to
+ * logger(s).
+ */
+ public void init() {
+ checkInit();
+ initialized = true;
+ Handler h = createHandler();
+ for (int i = 0; i < loggers.size(); i++) {
+ Logger l = LogUtils.getL7dLogger(AbstractAtomBean.class, null, loggers.get(i).getLogger());
+ l.addHandler(h);
+ l.setLevel(LogLevel.toJUL(LogLevel.valueOf(loggers.get(i).getLevel())));
+ }
+ }
+
+ protected abstract Handler createHandler();
+
+ protected void checkInit() {
+ if (initialized) {
+ throw new IllegalStateException("Bean is already initialized");
+ }
+ }
+
+ private void parseLoggers(String param) {
+ loggers = new ArrayList<LoggerLevel>();
+ StringTokenizer st1 = new StringTokenizer(param, ", \t\n\r\f");
+ while (st1.hasMoreTokens()) {
+ String tok = st1.nextToken();
+ int idx = tok.indexOf(":");
+ if (idx != -1) {
+ loggers.add(new LoggerLevel(tok.substring(0, idx), tok.substring(idx + 1, tok.length())));
+ } else {
+ loggers.add(new LoggerLevel(tok, "INFO"));
+ }
+ }
+ }
+
+ protected List<LoggerLevel> getLoggers() {
+ return loggers;
+ }
+
+ protected static class LoggerLevel {
+ private String logger;
+ private String level;
+
+ public LoggerLevel(String logger, String level) {
+ this.logger = logger;
+ this.level = level;
+ }
+
+ public String getLogger() {
+ return logger;
+ }
+
+ public void setLogger(String logger) {
+ this.logger = logger;
+ }
+
+ public String getLevel() {
+ return level;
+ }
+
+ public void setLevel(String level) {
+ this.level = level;
+ }
+
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullHandler.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullHandler.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullHandler.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,61 @@
+/**
+ * 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.management.web.logging.atom;
+
+import java.util.logging.Handler;
+
+import org.apache.cxf.management.web.logging.LogRecord;
+
+
+public final class AtomPullHandler extends Handler {
+
+ private AtomPullServer engine;
+ /**
+ * Creates handler using (package private).
+ *
+ * @param engine configured engine.
+ */
+ AtomPullHandler(AtomPullServer engine) {
+ this.engine = engine;
+ }
+
+ @Override
+ public void publish(java.util.logging.LogRecord record) {
+ if (LoggingThread.isSilent()) {
+ return;
+ }
+ LoggingThread.markSilent(true);
+ try {
+ LogRecord rec = LogRecord.fromJUL(record);
+ engine.publish(rec);
+ } finally {
+ LoggingThread.markSilent(false);
+ }
+ }
+
+ @Override
+ public synchronized void close() throws SecurityException {
+ engine.close();
+ }
+
+ @Override
+ public synchronized void flush() {
+ // no-op
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullServer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullServer.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullServer.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,520 @@
+/**
+ * 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.management.web.logging.atom;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.logging.Handler;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.UriBuilder;
+
+import org.apache.abdera.model.Entry;
+import org.apache.abdera.model.Feed;
+import org.apache.cxf.Bus;
+import org.apache.cxf.jaxrs.ext.MessageContext;
+import org.apache.cxf.jaxrs.ext.search.ConditionType;
+import org.apache.cxf.jaxrs.ext.search.OrSearchCondition;
+import org.apache.cxf.jaxrs.ext.search.PrimitiveStatement;
+import org.apache.cxf.jaxrs.ext.search.SearchCondition;
+import org.apache.cxf.management.web.logging.LogLevel;
+import org.apache.cxf.management.web.logging.LogRecord;
+import org.apache.cxf.management.web.logging.ReadWriteLogStorage;
+import org.apache.cxf.management.web.logging.ReadableLogStorage;
+import org.apache.cxf.management.web.logging.atom.converter.StandardConverter;
+
+
+@Path("/logs")
+public class AtomPullServer extends AbstractAtomBean {
+
+ private List<LogRecord> records = new LinkedList<LogRecord>();
+ private WeakHashMap<Integer, Feed> feeds = new WeakHashMap<Integer, Feed>();
+ private ReadableLogStorage storage;
+ private int pageSize = 40;
+ private int maxInMemorySize = 500;
+ private boolean useArchivedFeeds;
+ private int recordsSize;
+ private volatile boolean alreadyClosed;
+ private SearchCondition<LogRecord> condition;
+
+ @Context
+ private MessageContext context;
+
+ private List<String> endpointAddresses;
+ private String serverAddress;
+
+ public void setEndpointAddress(String address) {
+ setEndpointAddresses(Collections.singletonList(address));
+ }
+
+ public void setEndpointAddresses(List<String> addresses) {
+ this.endpointAddresses = addresses;
+ }
+
+ public void setServerAddress(String address) {
+ this.serverAddress = address;
+ }
+
+ @Override
+ public void init() {
+ // the storage might've been used to save previous records or it might
+ // point to a file log entries are added to
+ if (storage != null) {
+ //-1 can be returned by read-only storage if it does not know in advance
+ // a number of records it may contain
+ recordsSize = storage.getSize();
+ }
+
+ if (storage == null || storage instanceof ReadWriteLogStorage) {
+ super.init();
+ } else {
+ // super.init() results in the additional Handler being created and publish()
+ // method being called as a result. If the storage is read-only it is assumed it points to
+ // the external source of log records thus no need to get the publish events here
+
+ // instead we create a SearchCondition the external storage will check against when
+ // loading the matching records on request
+
+ List<SearchCondition<LogRecord>> list = new LinkedList<SearchCondition<LogRecord>>();
+ for (LoggerLevel l : super.getLoggers()) {
+ LogRecord r = new LogRecord();
+ r.setLoggerName(l.getLogger());
+ r.setLevel(LogLevel.valueOf(l.getLevel()));
+ list.add(new SearchConditionImpl(r));
+ }
+ condition = new OrSearchCondition<LogRecord>(list);
+ }
+ initBusProperty();
+ }
+
+ @Override
+ protected Handler createHandler() {
+ return new AtomPullHandler(this);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void initBusProperty() {
+ if (endpointAddresses != null && serverAddress != null && getBus() != null) {
+ Bus bus = getBus();
+ synchronized (bus) {
+ Map<String, String> addresses =
+ (Map<String, String>)bus.getProperty("org.apache.cxf.extensions.logging.atom.pull");
+ if (addresses == null) {
+ addresses = new HashMap<String, String>();
+ }
+ for (String address : endpointAddresses) {
+ addresses.put(address, serverAddress + "/logs");
+ }
+ bus.setProperty("org.apache.cxf.extensions.logging.atom.pull", addresses);
+ }
+ }
+ }
+
+ @GET
+ @Produces("application/atom+xml")
+ public Feed getXmlFeed(@PathParam("id") int page) {
+ return getXmlFeedWithPage(1);
+ }
+
+ @GET
+ @Produces("application/atom+xml")
+ @Path("{id}")
+ public Feed getXmlFeedWithPage(@PathParam("id") int page) {
+
+ // lets check if the Atom reader is asking for a set of records which has already been
+ // converted to Feed
+
+ synchronized (feeds) {
+ Feed f = feeds.get(page);
+ if (f != null) {
+ return f;
+ }
+ }
+
+ Feed feed = null;
+ synchronized (records) {
+ List<LogRecord> list = getSubList(page);
+ Collections.sort(list, new LogRecordComparator());
+ feed = (Feed)new CustomFeedConverter(page).convert(list).get(0);
+ setFeedPageProperties(feed, page);
+ }
+ // if at the moment we've converted n < pageSize number of records only and
+ // persist a Feed keyed by a page then another reader requesting the same page
+ // may miss latest records which might've been added since the original request
+ if (feed.getEntries().size() == pageSize) {
+ synchronized (feeds) {
+ feeds.put(page, feed);
+ }
+ }
+ return feed;
+ }
+
+ @GET
+ @Produces({"text/html", "application/xhtml+xml" })
+ @Path("alternate/{id}")
+ public String getAlternateFeed(@PathParam("id") int page) {
+ List<LogRecord> list = getSubList(page);
+ Collections.sort(list, new LogRecordComparator());
+ return convertEntriesToHtml(list);
+
+ }
+
+ @GET
+ @Path("entry/{id}")
+ @Produces("application/atom+xml;type=entry")
+ public Entry getEntry(@PathParam("id") int index) {
+ List<LogRecord> list = getLogRecords(index);
+ return (Entry)new CustomEntryConverter(index).convert(list).get(0);
+ }
+
+ @GET
+ @Path("entry/alternate/{id}")
+ @Produces({"text/html", "application/xhtml+xml" })
+ public String getAlternateEntry(@PathParam("id") int index) {
+ List<LogRecord> logRecords = getLogRecords(index);
+ return convertEntryToHtml(logRecords.get(0));
+ }
+
+ @GET
+ @Path("records")
+ @Produces("text/plain")
+ public int getNumberOfAvailableRecords() {
+ return recordsSize;
+ }
+
+ private List<LogRecord> getLogRecords(int index) {
+ List<LogRecord> list = new LinkedList<LogRecord>();
+ if (storage != null) {
+ int storageSize = storage.getSize();
+ if (recordsSize == -1 || index < storageSize) {
+ storage.load(list, condition, index, 1);
+ } else if (index < recordsSize) {
+ list.add(records.get(index - storageSize));
+ }
+ } else {
+ list.add(records.get(index));
+ }
+ if (list.size() != 1) {
+ throw new WebApplicationException(404);
+ }
+ return list;
+ }
+
+
+ protected List<LogRecord> getSubList(int page) {
+
+ if (recordsSize == -1) {
+ // let the external storage load the records it knows about
+ List<LogRecord> list = new LinkedList<LogRecord>();
+ storage.load(list, condition, page == 1 ? 0 : (page - 1) * pageSize, pageSize);
+ return list;
+ }
+
+ if (recordsSize == 0) {
+ return records;
+ }
+
+ int fromIndex = 0;
+ int toIndex = 0;
+ // see http://tools.ietf.org/html/draft-nottingham-atompub-feed-history-07
+ if (!useArchivedFeeds) {
+ fromIndex = page == 1 ? 0 : (page - 1) * pageSize;
+ if (fromIndex > recordsSize) {
+ // this should not happen really
+ page = 1;
+ fromIndex = 0;
+ }
+ toIndex = page == 1 ? pageSize : fromIndex + pageSize;
+ if (toIndex > recordsSize) {
+ toIndex = recordsSize;
+ }
+ } else {
+ fromIndex = recordsSize - pageSize * page;
+ if (fromIndex < 0) {
+ fromIndex = 0;
+ }
+ toIndex = pageSize < recordsSize ? recordsSize : pageSize;
+ }
+
+ // if we have the storage then try to load from it
+ if (storage != null) {
+ if (fromIndex < storage.getSize()) {
+ int storageSize = storage.getSize();
+ int maxQuantityToLoad = toIndex > storageSize ? toIndex - storageSize : toIndex - fromIndex;
+ List<LogRecord> list = new LinkedList<LogRecord>();
+ storage.load(list, condition, fromIndex, maxQuantityToLoad);
+ int totalQuantity = toIndex - fromIndex;
+ if (list.size() < totalQuantity) {
+ int remaining = totalQuantity - list.size();
+ if (remaining > records.size()) {
+ remaining = records.size();
+ }
+ list.addAll(records.subList(0, remaining));
+ }
+ return list;
+ } else {
+ fromIndex -= storage.getSize();
+ toIndex -= storage.getSize();
+ }
+ }
+ return records.subList(fromIndex, toIndex);
+
+ }
+
+ protected void setFeedPageProperties(Feed feed, int page) {
+ String self = context.getUriInfo().getAbsolutePath().toString();
+ feed.addLink(self, "self");
+
+ String uri = context.getUriInfo().getBaseUriBuilder().path("logs").build().toString();
+ feed.addLink(uri + "/alternate/" + page, "alternate");
+ if (!useArchivedFeeds) {
+ if (recordsSize != -1) {
+ if (page > 2) {
+ feed.addLink(uri, "first");
+ }
+
+ if (page * pageSize < recordsSize) {
+ feed.addLink(uri + "/" + (page + 1), "next");
+ }
+
+ if (page * (pageSize + 1) < recordsSize) {
+ feed.addLink(uri + "/" + (recordsSize / pageSize + 1), "last");
+ }
+ } else if (feed.getEntries().size() == pageSize) {
+ feed.addLink(uri + "/" + (page + 1), "next");
+ }
+ if (page > 1) {
+ uri = page > 2 ? uri + "/" + (page - 1) : uri;
+ feed.addLink(uri, "previous");
+ }
+ } else {
+ feed.addLink(self, "current");
+ // TODO : add prev-archive and next-archive; next-archive should not be set if it will point to
+ // current
+ // and xmlns:fh="http://purl.org/syndication/history/1.0":archive extension but only if
+ // it is not current
+ }
+
+ }
+
+
+ public void publish(LogRecord record) {
+ if (alreadyClosed) {
+ System.err.println("AtomPullServer has been closed, the following log record can not be saved : "
+ + record.toString());
+ return;
+ }
+ synchronized (records) {
+ if (records.size() == maxInMemorySize) {
+ if (storage instanceof ReadWriteLogStorage) {
+ ((ReadWriteLogStorage)storage).save(records);
+ records.clear();
+ } else {
+ LogRecord oldRecord = records.remove(0);
+ System.err.println("The oldest log record is removed : " + oldRecord.toString());
+ }
+ }
+ records.add(record);
+ ++recordsSize;
+ }
+ }
+
+ public void setPageSize(int size) {
+ pageSize = size;
+ }
+
+ public void setMaxInMemorySize(int maxInMemorySize) {
+ this.maxInMemorySize = maxInMemorySize;
+ }
+
+ public void setStorage(ReadableLogStorage storage) {
+ this.storage = storage;
+ }
+
+ public void close() {
+ if (alreadyClosed) {
+ return;
+ }
+ alreadyClosed = true;
+ if (storage instanceof ReadWriteLogStorage) {
+ ((ReadWriteLogStorage)storage).save(records);
+ }
+ }
+
+ // TODO : this all can be done later on in a simple xslt template
+ private String convertEntriesToHtml(List<LogRecord> rs) {
+ StringBuilder sb = new StringBuilder();
+ startHtmlHeadAndBody(sb, "CXF Service Log Entries");
+ addRecordToTable(sb, rs, true);
+ sb.append("</body></html>");
+ return sb.toString();
+ }
+ // TODO : this all can be done later on in a simple xslt template
+ private String convertEntryToHtml(LogRecord r) {
+ StringBuilder sb = new StringBuilder();
+ startHtmlHeadAndBody(sb, r.getLevel().toString());
+ addRecordToTable(sb, Collections.singletonList(r), false);
+ sb.append("</body></html>");
+ return sb.toString();
+ }
+
+ private void addRecordToTable(StringBuilder sb, List<LogRecord> list, boolean forFeed) {
+ DateFormat df = new SimpleDateFormat("dd/MM/yy HH:mm:ss");
+ sb.append("<table border=\"1\">");
+ sb.append("<tr><th>Date</th><th>Level</th><th>Logger</th><th>Message</th></tr>");
+ for (LogRecord lr : list) {
+ sb.append("<tr>");
+ sb.append("<td>" + df.format(lr.getEventTimestamp()) + "</td>");
+ sb.append("<td>" + lr.getLevel().toString() + "</td>");
+ sb.append("<td>" + lr.getLoggerName() + "</td>");
+ String message = null;
+ if (lr.getMessage().length() > 0) {
+ message = lr.getThrowable().length() > 0 ? lr.getMessage() + " : " + lr.getThrowable()
+ : lr.getMessage();
+ } else if (lr.getThrowable().length() > 0) {
+ message = lr.getThrowable();
+ } else {
+ message = " ";
+ }
+ if (forFeed && lr.getThrowable().length() > 0) {
+ message = message.substring(0, message.length() / 2);
+ }
+ sb.append("<td>" + message + "</td>");
+ sb.append("</tr>");
+ }
+ sb.append("</table><br/><br/>");
+
+ }
+
+ private void startHtmlHeadAndBody(StringBuilder sb, String title) {
+ sb.append("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
+ sb.append("<head>");
+ sb.append("<meta http-equiv=\"content-type\" content=\"text/html;charset=UTF-8\"/>");
+ sb.append("<title>" + "Log record with level " + title + "</title>");
+ sb.append("</head>");
+ sb.append("<body>");
+ }
+
+ private static class SearchConditionImpl implements SearchCondition<LogRecord> {
+ private LogRecord template;
+
+ public SearchConditionImpl(LogRecord l) {
+ this.template = l;
+ }
+
+ public boolean isMet(LogRecord pojo) {
+
+ return (template.getLevel() == LogLevel.ALL
+ || pojo.getLevel().compareTo(template.getLevel()) <= 0)
+ && template.getLoggerName().equals(pojo.getLoggerName());
+ }
+
+ public LogRecord getCondition() {
+ return new LogRecord(template);
+ }
+
+ public ConditionType getConditionType() {
+ return ConditionType.CUSTOM;
+ }
+
+ public List<SearchCondition<LogRecord>> getSearchConditions() {
+ return null;
+ }
+
+ public List<LogRecord> findAll(Collection<LogRecord> pojos) {
+ List<LogRecord> list = new LinkedList<LogRecord>();
+ for (LogRecord r : pojos) {
+ if (isMet(r)) {
+ list.add(r);
+ }
+ }
+ return list;
+ }
+
+ public PrimitiveStatement getStatement() {
+ return null;
+ }
+
+ public String toSQL(String table, String... columns) {
+ return null;
+ }
+
+
+ }
+
+ private static class LogRecordComparator implements Comparator<LogRecord> {
+
+ public int compare(LogRecord r1, LogRecord r2) {
+ return r1.getEventTimestamp().compareTo(r2.getEventTimestamp()) * -1;
+ }
+
+ }
+
+ private class CustomFeedConverter extends StandardConverter {
+ private int page;
+ public CustomFeedConverter(int page) {
+ super(Output.FEED, Multiplicity.MANY, Format.CONTENT);
+ this.page = page;
+ }
+
+ @Override
+ protected void setDefaultEntryProperties(Entry entry, List<LogRecord> rs, int entryIndex) {
+ super.setDefaultEntryProperties(entry, rs, entryIndex);
+ UriBuilder builder = context.getUriInfo().getAbsolutePathBuilder().path("entry");
+ Integer realIndex = page == 1 ? entryIndex : page * pageSize + entryIndex;
+
+ entry.addLink(builder.clone().path(realIndex.toString()).build().toString(), "self");
+ entry.addLink(builder.path("alternate").path(realIndex.toString()).build().toString(),
+ "alternate");
+ }
+
+ }
+
+ private class CustomEntryConverter extends StandardConverter {
+ private String selfFragment;
+ private String altFragment;
+ public CustomEntryConverter(int index) {
+ super(Output.ENTRY, Multiplicity.ONE, Format.CONTENT);
+ this.selfFragment = "logs/entry/" + index;
+ this.altFragment = "logs/alternate/entry/" + index;
+ }
+
+ @Override
+ protected void setDefaultEntryProperties(Entry entry, List<LogRecord> rs, int entryIndex) {
+ super.setDefaultEntryProperties(entry, rs, entryIndex);
+ entry.addLink(context.getUriInfo().getBaseUriBuilder().path(selfFragment).build().toString(),
+ "self");
+ entry.addLink(context.getUriInfo().getBaseUriBuilder().path(altFragment).build().toString(),
+ "alternate");
+ }
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushBean.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,194 @@
+/**
+ * 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.management.web.logging.atom;
+
+import java.util.logging.Handler;
+
+import org.apache.commons.lang.Validate;
+import org.apache.cxf.management.web.logging.atom.converter.Converter;
+import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
+
+/**
+ * Bean used to configure {@link AtomPushHandler JUL handler} with Spring instead of properties file. See
+ * {@link AtomPushHandler} class for detailed description of parameters. Next to configuration of handler,
+ * Spring bean offers simple configuration of associated loggers that share ATOM push-style handler.
+ * <p>
+ * General rules:
+ * <ul>
+ * <li>When {@link #setDeliverer(Deliverer) deliverer} property is not set explicitly, URL must be set to
+ * create default deliverer.</li>
+ * <li>When {@link #setConverter(Converter) converter} property is not set explicitly, default converter is
+ * created.</li>
+ * <li>When {@link #setLoggers(String) loggers} property is used, it overrides pair of
+ * {@link #setLogger(String) logger} and {@link #setLevel(String) level} properties; and vice versa.</li>
+ * <li>When logger is not set, handler is attached to root logger (named ""); when level is not set for
+ * logger, default "INFO" level is used.</li>
+ * <li>When {@link #setBatchSize(String) batchSize} property is not set or set to wrong value, default batch
+ * size of "1" is used.</li>
+ * <li>When deliverer property is NOT set, use of "retryXxx" properties causes creation of retrying default
+ * deliverer.</li>
+ * </ul>
+ * Examples:
+ * <p>
+ * ATOM push handler with registered with root logger for all levels or log events, pushing one feed per event
+ * to specified URL, using default delivery and conversion methods:
+ *
+ * <pre>
+ * <bean class="org.apache.cxf.jaxrs.ext.logging.atom.AtomPushBean"
+ * init-method="init">
+ * <property name="url" value="http://localhost:9080/feed"/>
+ * <property name="level" value="ALL" />
+ * </bean>
+ * </pre>
+ *
+ * ATOM push handler registered with multiple loggers and listening for different levels (see
+ * {@link #setLoggers(String) loggers} property description for syntax details). Custom deliverer will take
+ * care of feeds, each of which carries batch of 10 log events:
+ *
+ * <pre>
+ * <bean id="soapDeliverer" ...
+ * ...
+ * <bean class="org.apache.cxf.jaxrs.ext.logging.atom.AtomPushBean"
+ * init-method="init">
+ * <property name="deliverer">
+ * <ref bean="soapDeliverer"/>
+ * </property>
+ * <property name="loggers" value="
+ * org.apache.cxf:DEBUG,
+ * org.apache.cxf.jaxrs,
+ * org.apache.cxf.bus:ERROR" />
+ * <property name="batchSize" value="10" />
+ * </bean>
+ * </pre>
+ */
+public final class AtomPushBean extends AbstractAtomBean {
+
+ private AtomPushEngineConfigurator conf = new AtomPushEngineConfigurator();
+
+ /**
+ * Creates unconfigured and uninitialized bean. To configure setters must be used, then {@link #init()}
+ * must be called.
+ */
+ public AtomPushBean() {
+ }
+
+ /**
+ * Set URL used when custom deliverer is not set (default deliverer is being created).
+ */
+ public void setUrl(String url) {
+ checkInit();
+ Validate.notNull(url, "url is null");
+ conf.setUrl(url);
+ }
+
+ /**
+ * Set initialized deliverer.
+ */
+ public void setDeliverer(Deliverer deliverer) {
+ checkInit();
+ Validate.notNull(deliverer, "deliverer is null");
+ conf.setDeliverer(deliverer);
+ }
+
+ /**
+ * Set initialized converter.
+ */
+ public void setConverter(Converter converter) {
+ checkInit();
+ Validate.notNull(converter, "converter is null");
+ conf.setConverter(converter);
+ }
+
+ /**
+ * Size of batch; empty string for default one element batch.
+ */
+ public void setBatchSize(String batchSize) {
+ checkInit();
+ Validate.notNull(batchSize, "batchSize is null");
+ conf.setBatchSize(batchSize);
+ }
+
+ /**
+ * Batch cleanup time in minutes
+ */
+ public void setBatchCleanupTime(String batchCleanupTime) {
+ checkInit();
+ Validate.notNull(batchCleanupTime, "batchCleanup is null");
+ conf.setBatchCleanupTime(batchCleanupTime);
+ }
+
+ /**
+ * Retry pause calculation strategy, either "linear" or "exponential".
+ */
+ public void setRetryPause(String retryPause) {
+ checkInit();
+ Validate.notNull(retryPause, "retryPause is null");
+ conf.setRetryPause(retryPause);
+ }
+
+ /**
+ * Retry pause time (in seconds).
+ */
+ public void setRetryPauseTime(String time) {
+ checkInit();
+ Validate.notNull(time, "time is null");
+ conf.setRetryPauseTime(time);
+ }
+
+ /**
+ * Retry timeout (in seconds).
+ */
+ public void setRetryTimeout(String timeout) {
+ checkInit();
+ Validate.notNull(timeout, "timeout is null");
+ conf.setRetryTimeout(timeout);
+ }
+
+ /**
+ * Conversion output type: "feed" or "entry".
+ */
+ public void setOutput(String output) {
+ checkInit();
+ Validate.notNull(output, "output is null");
+ conf.setOutput(output);
+ }
+
+ /**
+ * Multiplicity of subelement of output: "one" or "many".
+ */
+ public void setMultiplicity(String multiplicity) {
+ checkInit();
+ Validate.notNull(multiplicity, "multiplicity is null");
+ conf.setMultiplicity(multiplicity);
+ }
+
+ /**
+ * Entry data format: "content" or "extension".
+ */
+ public void setFormat(String format) {
+ checkInit();
+ Validate.notNull(format, "format is null");
+ conf.setFormat(format);
+ }
+
+ protected Handler createHandler() {
+ return new AtomPushHandler(conf.createEngine());
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,217 @@
+/**
+ * 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.management.web.logging.atom;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import org.apache.abdera.model.Element;
+import org.apache.commons.lang.Validate;
+import org.apache.cxf.management.web.logging.LogRecord;
+import org.apache.cxf.management.web.logging.atom.converter.Converter;
+import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
+
+/**
+ * Package private ATOM push-style engine. Engine enqueues log records as they are {@link #publish(LogRecord)
+ * published}. After queue size exceeds {@link #getBatchSize() batch size} processing of collection of these
+ * records (in size of batch size) is triggered.
+ * <p>
+ * Processing is done in separate thread not to block publishing interface. Processing is two step: first list
+ * of log records is transformed by {@link Converter converter} to ATOM {@link Element element} and then it is
+ * pushed out by {@link Deliverer deliverer} to client. Next to transport deliverer is indirectly responsible
+ * for marshaling ATOM element to XML.
+ * <p>
+ * Processing is done by single threaded {@link java.util.concurrent.Executor executor}; next batch of records
+ * is taken from queue only when currently processed batch finishes and queue has enough elements to proceed.
+ * <p>
+ * First failure of any delivery shuts engine down. To avoid this situation engine must have registered
+ * reliable deliverer or use wrapping
+ * {@link org.apache.cxf.jaxrs.ext.logging.atom.deliverer.RetryingDeliverer}.
+ */
+// TODO add internal diagnostics - log messages somewhere except for logger :D
+final class AtomPushEngine {
+ private List<LogRecord> queue = new ArrayList<LogRecord>();
+ private ExecutorService executor = Executors.newSingleThreadExecutor();
+ private int batchSize = 1;
+ private int batchTime;
+ private Converter converter;
+ private Deliverer deliverer;
+ private Timer timer;
+
+ /**
+ * Put record to publishing queue. Engine accepts published records only if is in proper state - is
+ * properly configured (has deliverer and converter registered) and is not shot down; otherwise calls to
+ * publish are ignored.
+ *
+ * @param record record to be published.
+ */
+ public synchronized void publish(LogRecord record) {
+ Validate.notNull(record, "record is null");
+ if (isValid()) {
+ if (batchSize > 1 && batchTime > 0 && timer == null) {
+ createTimerTask(batchTime * 60 * 1000);
+ }
+ queue.add(record);
+ if (queue.size() >= batchSize) {
+ publishAndReset();
+ }
+ } else {
+ handleUndeliveredRecords(Collections.singletonList(record),
+ deliverer == null ? "" : deliverer.getEndpointAddress());
+ }
+ }
+
+ protected synchronized void publishAndReset() {
+ publishBatch(queue, deliverer, converter);
+ queue = new ArrayList<LogRecord>();
+ }
+
+ /**
+ * Shuts engine down.
+ */
+ public synchronized void shutdown() {
+ cancelTimerTask();
+ if (isValid() && queue.size() > 0) {
+ publishAndReset();
+ }
+ executor.shutdown();
+ }
+
+ private boolean isValid() {
+ if (deliverer == null) {
+ // TODO report cause
+ System.err.println("deliverer is not set");
+ return false;
+ }
+ if (converter == null) {
+ System.err.println("converter is not set");
+ return false;
+ }
+ if (executor.isShutdown()) {
+ System.err.println("engine shutdown");
+ return false;
+ }
+ return true;
+ }
+
+ private void publishBatch(final List<LogRecord> batch,
+ final Deliverer d,
+ final Converter c) {
+ executor.execute(new Runnable() {
+ public void run() {
+ try {
+ LoggingThread.markSilent(true);
+ List<? extends Element> elements = c.convert(batch);
+ for (int i = 0; i < elements.size(); i++) {
+ Element element = elements.get(i);
+ if (!d.deliver(element)) {
+ System.err.println("Delivery to " + d.getEndpointAddress()
+ + " failed, shutting engine down");
+ List<LogRecord> undelivered = null;
+ if (i == 0) {
+ undelivered = batch;
+ } else {
+ int index = (batch.size() / elements.size()) * i;
+ // should not happen but just in case :-)
+ if (index < batch.size()) {
+ undelivered = batch.subList(index, batch.size());
+ }
+ }
+ handleUndeliveredRecords(undelivered, d.getEndpointAddress());
+ shutdown();
+ break;
+ }
+ }
+ } catch (InterruptedException e) {
+ // no action
+ } finally {
+ LoggingThread.markSilent(false);
+ }
+ }
+ });
+ }
+
+ protected void handleUndeliveredRecords(List<LogRecord> records, String address) {
+ // TODO : save them to some transient storage perhaps ?
+ System.err.println("The following records have been undelivered to " + address + " : ");
+ for (LogRecord r : records) {
+ System.err.println(r.toString());
+ }
+ }
+
+ public int getBatchSize() {
+ return batchSize;
+ }
+
+ public void setBatchSize(int batchSize) {
+ Validate.isTrue(batchSize > 0, "batch size is not greater than zero");
+ this.batchSize = batchSize;
+ }
+
+ public void setBatchTime(int batchTime) {
+ this.batchTime = batchTime;
+ }
+
+ /**
+ * Creates a timer task which will periodically flush the batch queue
+ * thus ensuring log records won't become too 'stale'.
+ * Ex, if we have a batch size 10 and only WARN records need to be delivered
+ * then without the periodic cleanup the consumers may not get prompt notifications
+ *
+ * @param timeout
+ */
+ protected void createTimerTask(long timeout) {
+ timer = new Timer();
+ timer.schedule(new TimerTask() {
+ public void run() {
+ publishAndReset();
+ }
+ }, timeout);
+ }
+
+ protected void cancelTimerTask() {
+ if (timer != null) {
+ timer.cancel();
+ timer = null;
+ }
+ }
+
+ public synchronized Converter getConverter() {
+ return converter;
+ }
+
+ public synchronized void setConverter(Converter converter) {
+ Validate.notNull(converter, "converter is null");
+ this.converter = converter;
+ }
+
+ public synchronized Deliverer getDeliverer() {
+ return deliverer;
+ }
+
+ public synchronized void setDeliverer(Deliverer deliverer) {
+ Validate.notNull(deliverer, "deliverer is null");
+ this.deliverer = deliverer;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngineConfigurator.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngineConfigurator.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngineConfigurator.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,213 @@
+/**
+ * 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.management.web.logging.atom;
+
+import java.lang.reflect.Constructor;
+
+import org.apache.cxf.management.web.logging.atom.converter.Converter;
+import org.apache.cxf.management.web.logging.atom.converter.StandardConverter;
+import org.apache.cxf.management.web.logging.atom.converter.StandardConverter.Format;
+import org.apache.cxf.management.web.logging.atom.converter.StandardConverter.Multiplicity;
+import org.apache.cxf.management.web.logging.atom.converter.StandardConverter.Output;
+import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
+import org.apache.cxf.management.web.logging.atom.deliverer.RetryingDeliverer;
+import org.apache.cxf.management.web.logging.atom.deliverer.WebClientDeliverer;
+
+/**
+ * Package private interpreter of incomplete input of engine configuration. Used commonly by
+ * {@link AtomPushHandler properties file} and {@link AtomPushBean spring} configuration schemes.
+ */
+// TODO extract 'general rules' of interpretation in handler and bean and put here
+final class AtomPushEngineConfigurator {
+
+ private Deliverer deliverer;
+ private Converter converter;
+ private String delivererClass;
+ private String converterClass;
+ private String batchSize;
+ private String batchCleanupTime;
+ private String delivererUrl;
+ private String retryTimeout;
+ private String retryPause;
+ private String retryPauseTime;
+ private String output;
+ private String multiplicity;
+ private String format;
+
+ public void setUrl(String url) {
+ this.delivererUrl = url;
+ }
+
+ public void setRetryTimeout(String retryTimeout) {
+ this.retryTimeout = retryTimeout;
+ }
+
+ public void setRetryPause(String retryPause) {
+ this.retryPause = retryPause;
+ }
+
+ public void setRetryPauseTime(String retryPauseTime) {
+ this.retryPauseTime = retryPauseTime;
+ }
+
+ public void setBatchCleanupTime(String cleanupTime) {
+ this.batchCleanupTime = cleanupTime;
+ }
+
+ public void setBatchSize(String batchSize) {
+ this.batchSize = batchSize;
+ }
+
+ public void setDeliverer(Deliverer deliverer) {
+ this.deliverer = deliverer;
+ }
+
+ public void setConverter(Converter converter) {
+ this.converter = converter;
+ }
+
+ public void setDelivererClass(String delivererClass) {
+ this.delivererClass = delivererClass;
+ }
+
+ public void setConverterClass(String converterClass) {
+ this.converterClass = converterClass;
+ }
+
+ public void setOutput(String output) {
+ this.output = output;
+ }
+
+ public void setMultiplicity(String multiplicity) {
+ this.multiplicity = multiplicity;
+ }
+
+ public void setFormat(String format) {
+ this.format = format;
+ }
+
+ public AtomPushEngine createEngine() {
+ Deliverer d = deliverer;
+ Converter c = converter;
+ int batch = parseInt(batchSize, 1, 1);
+ int batchTime = parseInt(batchCleanupTime, 0);
+ if (d == null) {
+ if (delivererUrl != null) {
+ if (delivererClass != null) {
+ d = createDeliverer(delivererClass, delivererUrl);
+ } else {
+ d = new WebClientDeliverer(delivererUrl);
+ }
+ } else {
+ throw new IllegalStateException("Either url, deliverer or "
+ + "deliverer class with url must be setup");
+ }
+ }
+ if (c == null) {
+ if (converterClass != null) {
+ c = createConverter(converterClass);
+ } else {
+ Output out = parseEnum(output, Output.FEED, Output.class);
+ Multiplicity defaultMul = out == Output.FEED ? Multiplicity.MANY
+ : batch > 1 ? Multiplicity.MANY : Multiplicity.ONE;
+ Multiplicity mul = parseEnum(multiplicity, defaultMul, Multiplicity.class);
+ Format form = parseEnum(format, Format.CONTENT, Format.class);
+ if (out == Output.FEED) {
+ c = new StandardConverter(out, mul, form);
+ } else {
+ c = new StandardConverter(out, mul, form);
+ }
+ if (retryPause != null) {
+ int timeout = parseInt(retryTimeout, 0, 0);
+ int pause = parseInt(retryPauseTime, 1, 30);
+ boolean linear = !retryPause.equalsIgnoreCase("exponential");
+ d = new RetryingDeliverer(d, timeout, pause, linear);
+ }
+ }
+ }
+ AtomPushEngine engine = new AtomPushEngine();
+ engine.setDeliverer(d);
+ engine.setConverter(c);
+ engine.setBatchSize(batch);
+ engine.setBatchTime(batchTime);
+ return engine;
+ }
+
+ private Deliverer createDeliverer(String clazz, String url) {
+ try {
+ Constructor<Deliverer> ctor = loadClass(clazz, Deliverer.class).getConstructor(String.class);
+ return ctor.newInstance(url);
+ } catch (Exception e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ private Converter createConverter(String clazz) {
+ try {
+ Constructor<Converter> ctor = loadClass(clazz, Converter.class).getConstructor();
+ return ctor.newInstance();
+ } catch (Exception e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private <T> Class<T> loadClass(String clazz, Class<T> ifaceClass) throws ClassNotFoundException {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ return (Class<T>)cl.loadClass(clazz);
+ } catch (ClassNotFoundException e) {
+ try {
+ // clazz could be shorted (stripped package name) retry for interface location
+ String pkg = ifaceClass.getPackage().getName();
+ String clazz2 = pkg + "." + clazz;
+ return (Class<T>)cl.loadClass(clazz2);
+ } catch (Exception e1) {
+ throw new ClassNotFoundException(e.getMessage() + " or " + e1.getMessage());
+ }
+ }
+ }
+
+ private int parseInt(String property, int defaultValue) {
+ try {
+ return Integer.parseInt(property);
+ } catch (NumberFormatException e) {
+ return defaultValue;
+ }
+ }
+
+ private int parseInt(String property, int lessThan, int defaultValue) {
+ int ret = parseInt(property, defaultValue);
+ if (ret < lessThan) {
+ ret = defaultValue;
+ }
+ return ret;
+ }
+
+ private <T extends Enum<T>> T parseEnum(String value, T defaultValue, Class<T> enumClass) {
+ if (value == null | "".equals(value)) {
+ return defaultValue;
+ }
+ try {
+ return Enum.valueOf(enumClass, value.toUpperCase());
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushHandler.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushHandler.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushHandler.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,185 @@
+/**
+ * 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.management.web.logging.atom;
+
+import java.util.logging.Handler;
+import java.util.logging.LogManager;
+
+import org.apache.cxf.management.web.logging.LogRecord;
+import org.apache.cxf.management.web.logging.atom.converter.Converter;
+import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
+
+/**
+ * Handler pushing log records in batches as Atom Feeds or Entries to registered client. Handler
+ * responsibility is to adapt to JUL framework while most of job is delegated to {@link AtomPushEngine}.
+ * <p>
+ * For simple configuration using properties file (one global root-level handler of this class) following
+ * properties prefixed with full name of this class can be used:
+ * <ul>
+ * <li><b>url</b> - URL where feeds will be pushed (mandatory parameter)</li>
+ * <li><b>batchSize</b> - integer number specifying minimal number of published log records that trigger
+ * processing and pushing ATOM document. If parameter is not set, is not greater than zero or is not a number,
+ * batch size is set to 1.</li>
+ * </ul>
+ * Conversion of log records into ATOM Elements can be tuned up using following parameters. Note that not all
+ * combinations are meaningful, see {@link org.apache.cxf.jaxrs.ext.logging.atom.converter.StandardConverter}
+ * for details:
+ * <ul>
+ * <li><b>output</b> - ATOM Element type pushed out, either "feed" or "entry"; when not specified or invalid
+ * value provided "feed" is used.</li>
+ * <li><b>multiplicity</b> - multiplicity of subelement(entries in feed for output=="feed" or log records in
+ * entry for output=="entry"), either "one" or "many"; when not specified or invalid value provided "one" is
+ * used.</li>
+ * <li><b>format</b> - method of embedding data in entry, either "content" or "extension"; when not specified
+ * or invalid value provided "content" is used.</li>
+ * </ul>
+ * By default delivery is served by WebClientDeliverer which does not support reliability of transport.
+ * Availability of any of this parameters enables retrying of default delivery. Detailed explanation of these
+ * parameter, see {@link org.apache.cxf.jaxrs.ext.logging.atom.deliverer.RetryingDeliverer} class description.
+ * <ul>
+ * <li><b>retry.pause</b> - pausing strategy of delivery retries, either <b>linear</b> or <b>exponential</b>
+ * value (mandatory parameter). If mispelled linear is used.</li>
+ * <li><b>retry.pause.time</b> - pause time (in seconds) between retries. If parameter is not set, pause is
+ * set to 30 seconds.</li>
+ * <li><b>retry.timeout</b> - maximum time (in seconds) retrying will be continued. If not set timeout is not
+ * set (infinite loop of retries).</li>
+ * </ul>
+ * Ultimate control on conversion and delivery is obtained specifying own implementation classes:
+ * <ul>
+ * <li><b>converter</b> - name of class implementing {@link Converter} class replacing default conversion and
+ * its specific parameters ("output", "multiplicity" and "format") are ignored. For classes located in same
+ * package as Converter interface only class name can be given e.g. instead of
+ * "org.apache.cxf.jaxrs.ext.logging.atom.converter.FooBarConverter" one can specify "FooBarConverter".</li>
+ * <li><b>deliverer</b> - name of class implementing {@link Deliverer} class replacing default delivery and
+ * its specific parameters ("retry.Xxx") are ignored. For classes located in same package as Deliverer
+ * interface only class name can be given e.g. instead of
+ * "org.apache.cxf.jaxrs.ext.logging.atom.deliverer.WebClientDeliverer" one can specify
+ * "WebClientDeliverer".</li>
+ * </ul>
+ * Example:
+ *
+ * <pre>
+ * handlers = org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler, java.util.logging.ConsoleHandler
+ * .level = INFO
+ *
+ * # deliver to given URL triggering after each batch of 10 log records
+ * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.url = http://localhost:9080
+ * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.batchSize = 10
+ *
+ * # enable retrying delivery every 10 seconds for 5 minutes
+ * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.retry.pause = linear
+ * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.retry.pause.time = 10
+ * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.retry.timeout = 300
+ *
+ * # output for AtomPub: push entries not feeds, each entry with one log record as "atom:extension"
+ * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.output = entry
+ * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.multiplicity = one
+ * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.format = extension
+ * ...
+ * </pre>
+ */
+public final class AtomPushHandler extends Handler {
+
+ private AtomPushEngine engine;
+ private boolean lazyConfig;
+
+ /**
+ * Creates handler with configuration taken from properties file.
+ */
+ public AtomPushHandler() {
+ // deferred configuration: configure() called from here would use utilities that attempt to log
+ // and create this handler instance in recursion; configure() will be called on first publish()
+ lazyConfig = true;
+ }
+
+ /**
+ * Creates handler with custom parameters.
+ *
+ * @param batchSize batch size, see {@link AtomPushEngine#getBatchSize()}
+ * @param converter converter transforming logs into ATOM elements
+ * @param deliverer deliverer pushing ATOM elements to client
+ */
+ public AtomPushHandler(int batchSize, Converter converter, Deliverer deliverer) {
+ engine = new AtomPushEngine();
+ engine.setBatchSize(batchSize);
+ engine.setConverter(converter);
+ engine.setDeliverer(deliverer);
+ }
+
+ /**
+ * Creates handler using (package private).
+ *
+ * @param engine configured engine.
+ */
+ AtomPushHandler(AtomPushEngine engine) {
+ this.engine = engine;
+ }
+
+ @Override
+ public synchronized void publish(java.util.logging.LogRecord record) {
+ if (LoggingThread.isSilent()) {
+ return;
+ }
+ LoggingThread.markSilent(true);
+ try {
+ if (lazyConfig) {
+ lazyConfig = false;
+ configure();
+ }
+ LogRecord rec = LogRecord.fromJUL(record);
+ engine.publish(rec);
+ } finally {
+ LoggingThread.markSilent(false);
+ }
+ }
+
+ @Override
+ public synchronized void close() throws SecurityException {
+ engine.shutdown();
+ }
+
+ @Override
+ public synchronized void flush() {
+ // no-op
+ }
+
+ /**
+ * Configuration from properties. Aligned to JUL strategy - properties file is only for simple
+ * configuration: it allows configure one root handler with its parameters. What is even more dummy, JUL
+ * does not allow to iterate over configuration properties to make interpretation automated (e.g. using
+ * commons-beanutils)
+ */
+ private void configure() {
+ LogManager manager = LogManager.getLogManager();
+ String cname = getClass().getName();
+ AtomPushEngineConfigurator conf = new AtomPushEngineConfigurator();
+ conf.setUrl(manager.getProperty(cname + ".url"));
+ conf.setDelivererClass(manager.getProperty(cname + ".deliverer"));
+ conf.setConverterClass(manager.getProperty(cname + ".converter"));
+ conf.setBatchSize(manager.getProperty(cname + ".batchSize"));
+ conf.setBatchCleanupTime(manager.getProperty(cname + ".batchCleanupTime"));
+ conf.setRetryPause(manager.getProperty(cname + ".retry.pause"));
+ conf.setRetryPauseTime(manager.getProperty(cname + ".retry.pause.time"));
+ conf.setRetryTimeout(manager.getProperty(cname + ".retry.timeout"));
+ conf.setOutput(manager.getProperty(cname + ".output"));
+ conf.setMultiplicity(manager.getProperty(cname + ".multiplicity"));
+ conf.setFormat(manager.getProperty(cname + ".format"));
+ engine = conf.createEngine();
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,51 @@
+/**
+ * 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.management.web.logging.atom;
+
+/**
+ * Helps disable logging from calls of the same thread. Motivation: log handlers in this package causes other
+ * threads (from executor) to start logging (by using JAXB that itself uses JUL) which in turn can be caught
+ * by the same handler leading to infinite loop.
+ * <p>
+ * Other approach than using thread local storage would be scanning of stack trace of current thread to see if
+ * root of call comes from same package as package of handler - it's less effective so TLS is using here.
+ */
+final class LoggingThread {
+
+ private static ThreadLocal<LoggingThread> threadLocal = new ThreadLocal<LoggingThread>() {
+ @Override
+ protected LoggingThread initialValue() {
+ return new LoggingThread();
+ }
+ };
+
+ private boolean isSilent;
+
+ private LoggingThread() {
+ }
+
+ public static void markSilent(boolean silent) {
+ LoggingThread lt = threadLocal.get();
+ lt.isSilent = silent;
+ }
+
+ public static boolean isSilent() {
+ return threadLocal.get().isSilent;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/Converter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/Converter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/Converter.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -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.management.web.logging.atom.converter;
+
+import java.util.List;
+
+import org.apache.abdera.model.Element;
+import org.apache.cxf.management.web.logging.LogRecord;
+
+/**
+ * Converts batch of log records into one or more ATOM Elements to deliver.
+ */
+public interface Converter {
+
+ /**
+ * Converts given collection.
+ *
+ * @param records not-null collection of records
+ * @return non-empty collection of ATOM Elements that represent log records
+ */
+ List<? extends Element> convert(List<LogRecord> records);
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/StandardConverter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/StandardConverter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/StandardConverter.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,356 @@
+/**
+ * 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.management.web.logging.atom.converter;
+
+import java.io.StringWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.namespace.QName;
+
+import org.apache.abdera.Abdera;
+import org.apache.abdera.factory.Factory;
+import org.apache.abdera.model.Content;
+import org.apache.abdera.model.Element;
+import org.apache.abdera.model.Entry;
+import org.apache.abdera.model.ExtensibleElement;
+import org.apache.abdera.model.Feed;
+import org.apache.commons.lang.Validate;
+import org.apache.cxf.jaxrs.ext.atom.AbstractEntryBuilder;
+import org.apache.cxf.jaxrs.ext.atom.AbstractFeedBuilder;
+import org.apache.cxf.management.web.logging.LogRecord;
+import org.apache.cxf.management.web.logging.LogRecords;
+
+/**
+ * Converter producing ATOM Feeds on standalone Entries with LogRecords or LogRecordsLists embedded as content
+ * or extension. For configuration details see constructor documentation.
+ */
+public class StandardConverter implements Converter {
+
+ /** Conversion output */
+ public enum Output {
+ FEED,
+ ENTRY
+ }
+
+ /** Quantities of entries in feed or logrecords in entry */
+ public enum Multiplicity {
+ ONE,
+ MANY
+ }
+
+ /** Entity format */
+ public enum Format {
+ CONTENT,
+ EXTENSION
+ }
+
+ private Factory factory;
+ private JAXBContext context;
+ private DateFormat df;
+ private Converter worker;
+ private AbstractFeedBuilder<List<LogRecord>> feedBuilder;
+ private AbstractEntryBuilder<List<LogRecord>> entryBuilder;
+
+ /**
+ * Creates configured converter with default post-processing of feeds/entries mandatory properties.
+ * Regardless of "format", combination of "output" and "multiplicity" flags can be interpreted as follow:
+ * <ul>
+ * <li>ENTRY ONE - for each log record one entry is produced, converter returns list of entries</li>
+ * <li>ENTRY MANY - list of log records is packed in one entry, converter return one entry.</li>
+ * <li>FEED ONE - list of log records is packed in one entry, entry is inserted to feed, converter returns
+ * one feed.</li>
+ * <li>FEED MANY - for each log record one entry is produced, entries are collected in one feed, converter
+ * returns one feed.</li>
+ * </ul>
+ *
+ * @param output whether root elements if Feed or Entry (e.g. for AtomPub).
+ * @param multiplicity for output==FEED it is multiplicity of entities in feed for output==ENTITY it is
+ * multiplicity of log records in entity.
+ * @param format log records embedded as entry content or extension.
+ */
+ public StandardConverter(Output output, Multiplicity multiplicity, Format format) {
+ this(output, multiplicity, format, null, null);
+ }
+
+ /**
+ * Creates configured converter with feeds/entries post-processing based on data provided by feed and
+ * entry builders.
+ */
+ public StandardConverter(Output output, Multiplicity multiplicity, Format format,
+ AbstractFeedBuilder<List<LogRecord>> feedBuilder,
+ AbstractEntryBuilder<List<LogRecord>> entryBuilder) {
+ Validate.notNull(output, "output is null");
+ Validate.notNull(multiplicity, "multiplicity is null");
+ Validate.notNull(format, "format is null");
+ this.feedBuilder = feedBuilder;
+ this.entryBuilder = entryBuilder;
+
+ configure(output, multiplicity, format); //NOPMD
+ df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
+ factory = Abdera.getNewFactory();
+ try {
+ context = JAXBContext.newInstance(LogRecords.class, LogRecord.class);
+ } catch (JAXBException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public List<? extends Element> convert(List<LogRecord> records) {
+ return worker.convert(records);
+ }
+
+ private void configure(final Output output, final Multiplicity multiplicity, final Format format) {
+ if (output == Output.ENTRY && multiplicity == Multiplicity.ONE) {
+ worker = new Converter() {
+ public List<Entry> convert(List<LogRecord> records) {
+ return createEntries(format, records);
+ }
+ };
+ }
+ if (output == Output.ENTRY && multiplicity == Multiplicity.MANY) {
+ worker = new Converter() {
+ public List<Entry> convert(List<LogRecord> records) {
+ // produces one entry with list of all log records
+ return Arrays.asList(createEntryFromList(format, records));
+ }
+ };
+ }
+ if (output == Output.FEED && multiplicity == Multiplicity.ONE) {
+ worker = new Converter() {
+ public List<Feed> convert(List<LogRecord> records) {
+ // produces one feed with one entry with list of all log records
+ return Arrays.asList(createFeedWithSingleEntry(format, records));
+ }
+ };
+ }
+ if (output == Output.FEED && multiplicity == Multiplicity.MANY) {
+ worker = new Converter() {
+ public List<Feed> convert(List<LogRecord> records) {
+ // produces one feed with many entries, each entry with one log record
+ return Arrays.asList(createFeed(format, records));
+ }
+ };
+ }
+ if (worker == null) {
+ throw new IllegalArgumentException("Unsupported configuration");
+ }
+ }
+
+ private List<Entry> createEntries(Format format, List<LogRecord> records) {
+ List<Entry> entries = new ArrayList<Entry>();
+ for (int i = 0; i < records.size(); i++) {
+ entries.add(createEntryFromRecord(format, records.get(i), i));
+ }
+ return entries;
+ }
+
+ private Entry createEntryFromList(Format format, List<LogRecord> records) {
+ Entry e = createEntry(records, 0);
+ if (format == Format.CONTENT) {
+ setEntryContent(e, createContent(records));
+ } else {
+ setEntryContent(e, createExtension(records));
+ }
+ return e;
+ }
+
+ private Entry createEntryFromRecord(Format format, LogRecord record, int entryIndex) {
+ Entry e = createEntry(Collections.singletonList(record), entryIndex);
+ if (format == Format.CONTENT) {
+ setEntryContent(e, createContent(record));
+ } else {
+ setEntryContent(e, createExtension(record));
+ }
+ return e;
+ }
+
+ private String createContent(LogRecord record) {
+ StringWriter writer = new StringWriter();
+ try {
+ context.createMarshaller().marshal(record, writer);
+ } catch (JAXBException e) {
+ throw new RuntimeException(e);
+ }
+ return writer.toString();
+ }
+
+ private String createContent(List<LogRecord> records) {
+ StringWriter writer = new StringWriter();
+ LogRecords list = new LogRecords();
+ list.setLogRecords(records);
+ try {
+ context.createMarshaller().marshal(list, writer);
+ } catch (JAXBException e) {
+ throw new RuntimeException(e);
+ }
+ return writer.toString();
+ }
+
+ private ExtensibleElement createExtension(LogRecord record) {
+ ExtensibleElement erec = factory.newExtensionElement(qn("logRecord"));
+
+ // forget about single line "addExtension().setText()" since
+ // javac failure "org.apache.abdera.model.Element cannot be dereferenced"
+ Element e = erec.addExtension(qn("eventTimestamp"));
+ e.setText(toAtomDateFormat(record.getEventTimestamp()));
+ e = erec.addExtension(qn("level"));
+ e.setText(record.getLevel().toString());
+ e = erec.addExtension(qn("loggerName"));
+ e.setText(record.getLoggerName());
+ e = erec.addExtension(qn("message"));
+ e.setText(record.getMessage());
+ e = erec.addExtension(qn("threadName"));
+ e.setText(record.getThreadName());
+ e = erec.addExtension(qn("throwable"));
+ e.setText(record.getThrowable());
+ return erec;
+ }
+
+ private String toAtomDateFormat(Date d) {
+ String date = df.format(d);
+ // timezone in date does not have semicolon as XML Date requires
+ // e.g we have "2009-11-23T22:03:53.996+0100"
+ // instead of "2009-11-23T22:03:53.996+01:00"
+ return date.substring(0, date.length() - 2) + ":" + date.substring(date.length() - 2);
+ }
+
+ private QName qn(String name) {
+ return new QName("http://cxf.apache.org/log", name, "log");
+ }
+
+ private ExtensibleElement createExtension(List<LogRecord> records) {
+ ExtensibleElement list = factory.newExtensionElement(qn("logRecords"));
+ for (LogRecord rec : records) {
+ list.addExtension(createExtension(rec));
+ }
+ return list;
+ }
+
+ private Entry createEntry(List<LogRecord> records, int entryIndex) {
+ Entry entry = factory.newEntry();
+ setDefaultEntryProperties(entry, records, entryIndex);
+
+ return entry;
+ }
+
+ private void setEntryContent(Entry e, String content) {
+ e.setContent(content, Content.Type.XML);
+ }
+
+ private void setEntryContent(Entry e, ExtensibleElement ext) {
+ e.addExtension(ext);
+ }
+
+ private Feed createFeedWithSingleEntry(Format format, List<LogRecord> records) {
+
+ Feed feed = factory.newFeed();
+ feed.addEntry(createEntryFromList(format, records));
+ setDefaultFeedProperties(feed, records);
+ return feed;
+ }
+
+ private Feed createFeed(Format format, List<LogRecord> records) {
+
+ Feed feed = factory.newFeed();
+ List<Entry> entries = createEntries(format, records);
+ for (Entry entry : entries) {
+ feed.addEntry(entry);
+ }
+ setDefaultFeedProperties(feed, records);
+ return feed;
+ }
+
+ protected void setDefaultFeedProperties(Feed feed, List<LogRecord> records) {
+ if (feedBuilder != null) {
+ feed.setId(feedBuilder.getId(records));
+ feed.addAuthor(feedBuilder.getAuthor(records));
+ feed.setTitle(feedBuilder.getTitle(records));
+ feed.setUpdated(feedBuilder.getUpdated(records));
+ feed.setBaseUri(feedBuilder.getBaseUri(records));
+ List<String> categories = feedBuilder.getCategories(records);
+ if (categories != null) {
+ for (String category : categories) {
+ feed.addCategory(category);
+ }
+ }
+ Map<String, String> links = feedBuilder.getLinks(records);
+ if (links != null) {
+ for (java.util.Map.Entry<String, String> mapEntry : links.entrySet()) {
+ feed.addLink(mapEntry.getKey(), mapEntry.getValue());
+ }
+ }
+ } else {
+ feed.setId("uuid:" + UUID.randomUUID().toString());
+ feed.addAuthor("CXF");
+ feed.setTitle("CXF Service Log Entries");
+ feed.setUpdated(new Date());
+ }
+ }
+
+ protected void setDefaultEntryProperties(Entry entry, List<LogRecord> records,
+ int entryIndex) {
+ if (entryBuilder != null) {
+ entry.setId(entryBuilder.getId(records));
+ entry.addAuthor(entryBuilder.getAuthor(records));
+ entry.setTitle(entryBuilder.getTitle(records));
+ entry.setUpdated(entryBuilder.getUpdated(records));
+ entry.setBaseUri(entryBuilder.getBaseUri(records));
+ entry.setSummary(entryBuilder.getSummary(records));
+ List<String> categories = entryBuilder.getCategories(records);
+ if (categories != null) {
+ for (String category : categories) {
+ entry.addCategory(category);
+ }
+ }
+ Map<String, String> links = entryBuilder.getLinks(records);
+ if (links != null) {
+ for (java.util.Map.Entry<String, String> mapEntry : links.entrySet()) {
+ entry.addLink(mapEntry.getKey(), mapEntry.getValue());
+ }
+ }
+ entry.setPublished(entryBuilder.getPublished(records));
+ entry.setSummary(entryBuilder.getSummary(records));
+ } else {
+ entry.addAuthor("CXF");
+ if (records.size() != 1) {
+ entry.setId("uuid:" + UUID.randomUUID().toString());
+ entry.setTitle(String.format("Entry with %d log record(s)",
+ records.size()));
+ } else {
+ entry.setId(records.get(0).getId());
+ entry.setTitle("Log record with level " + records.get(0).getLevel().toString());
+ entry.setSummary(records.get(0).getLoggerName() + " : " + records.get(0).getMessage());
+ }
+ if (records.size() > 0) {
+ entry.setUpdated(toAtomDateFormat(records.get(0).getEventTimestamp()));
+ }
+ }
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/Deliverer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/Deliverer.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/Deliverer.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,42 @@
+/**
+ * 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.management.web.logging.atom.deliverer;
+
+import org.apache.abdera.model.Element;
+
+/**
+ * ATOM element deliverer. Represents transport strategy e.g. using
+ * {@link org.apache.cxf.jaxrs.client.WebClient}, SOAP reliable messaging etc.
+ */
+public interface Deliverer {
+
+ /**
+ * Delivers ATOM element.
+ *
+ * @param element element to deliver.
+ * @return true if delivery successful, false otherwise.
+ */
+ boolean deliver(Element element) throws InterruptedException;
+
+ /**
+ * Returns the address of the remote endpoint this deliverer send elements to
+ * @return
+ */
+ String getEndpointAddress();
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/RetryingDeliverer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/RetryingDeliverer.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/RetryingDeliverer.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,143 @@
+/**
+ * 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.management.web.logging.atom.deliverer;
+
+import java.util.Calendar;
+import java.util.Date;
+
+import org.apache.abdera.model.Element;
+import org.apache.commons.lang.Validate;
+
+/**
+ * Wrapper on other deliverer retrying delivery in case of failure. Delivery attempts repeat in loop with some
+ * pause time between retries until successful delivery or exceeding time limit. Time delay between delivery
+ * is configurable strategy. Two predefined strategies are given: each time pause same amount of time (linear)
+ * and each next time pause time doubles (exponential).
+ */
+public final class RetryingDeliverer implements Deliverer {
+
+ private Deliverer deliverer;
+ private PauseCalculator pauser;
+ private int timeout;
+
+ /**
+ * Creates retrying deliverer with predefined retry strategy.
+ *
+ * @param worker real deliverer used to push data out.
+ * @param timeout maximum time range (in seconds) that retrial is continued; time spent on delivery call
+ * is included. No timeout (infinite loop) if set to zero.
+ * @param pause time of pause (in seconds) greater than zero.
+ * @param linear if true linear strategy (each time pause same amount of time), exponential otherwise
+ * (each next time pause time doubles).
+ */
+ public RetryingDeliverer(Deliverer worker, int timeout, int pause, boolean linear) {
+ Validate.notNull(worker, "worker is null");
+ Validate.isTrue(timeout >= 0, "timeout is negative");
+ Validate.isTrue(pause > 0, "pause is not greater than zero");
+ deliverer = worker;
+ this.timeout = timeout;
+ this.pauser = linear ? new ConstantPause(pause) : new ExponentialPause(pause);
+ }
+
+ /**
+ * Creates retrying deliverer with custom retry strategy.
+ *
+ * @param worker real deliverer used to push data out.
+ * @param timeout maximum time range (in seconds) that retrial is continued; time spent on delivery call
+ * is included. No timeout (infinite loop) if set to zero.
+ * @param strategy custom retry pausing strategy.
+ */
+ public RetryingDeliverer(Deliverer worker, int timeout, PauseCalculator strategy) {
+ Validate.notNull(worker, "worker is null");
+ Validate.notNull(strategy, "strategy is null");
+ Validate.isTrue(timeout >= 0, "timeout is negative");
+ deliverer = worker;
+ pauser = strategy;
+ this.timeout = timeout;
+ }
+
+ public boolean deliver(Element element) throws InterruptedException {
+ Calendar cal = Calendar.getInstance();
+ cal.add(Calendar.SECOND, timeout);
+ Date timeoutDate = cal.getTime();
+ while (!deliverer.deliver(element)) {
+ int sleep = pauser.nextPause();
+ cal = Calendar.getInstance();
+ cal.add(Calendar.SECOND, sleep);
+ if (timeout == 0 || timeoutDate.after(cal.getTime())) {
+ Thread.sleep(sleep * 1000);
+ } else {
+ pauser.reset();
+ return false;
+ }
+ }
+ pauser.reset();
+ return true;
+ }
+
+ /** Calculates time of subsequent pauses between delivery attempts. */
+ public interface PauseCalculator {
+
+ /** Time of next pause (in seconds). */
+ int nextPause();
+
+ /** Restarts calculation. */
+ void reset();
+ }
+
+ private static class ConstantPause implements PauseCalculator {
+ private int pause;
+
+ public ConstantPause(int pause) {
+ this.pause = pause;
+ }
+
+ public int nextPause() {
+ return pause;
+ }
+
+ public void reset() {
+ }
+ }
+
+ private static class ExponentialPause implements PauseCalculator {
+ private int pause;
+ private int current;
+
+ public ExponentialPause(int pause) {
+ this.pause = pause;
+ current = pause;
+ }
+
+ public int nextPause() {
+ int c = current;
+ current *= 2;
+ return c;
+ }
+
+ public void reset() {
+ current = pause;
+ }
+ }
+
+ public String getEndpointAddress() {
+ return deliverer.getEndpointAddress();
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/WebClientDeliverer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/WebClientDeliverer.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/WebClientDeliverer.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,62 @@
+/**
+ * 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.management.web.logging.atom.deliverer;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.abdera.model.Element;
+import org.apache.abdera.model.Feed;
+import org.apache.commons.lang.Validate;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.jaxrs.provider.AtomEntryProvider;
+import org.apache.cxf.jaxrs.provider.AtomFeedProvider;
+
+/**
+ * Marshaling and delivering based on JAXRS' WebClient.
+ */
+public final class WebClientDeliverer implements Deliverer {
+ private WebClient wc;
+
+ @SuppressWarnings("unchecked")
+ public WebClientDeliverer(String deliveryAddress) {
+ Validate.notEmpty(deliveryAddress, "deliveryAddress is empty or null");
+ List<?> providers = Arrays.asList(new AtomFeedProvider(), new AtomEntryProvider());
+ wc = WebClient.create(deliveryAddress, providers);
+ }
+
+ public WebClientDeliverer(WebClient wc) {
+ Validate.notNull(wc, "wc is null");
+ this.wc = wc;
+ }
+
+ public boolean deliver(Element element) {
+ String type = element instanceof Feed ? "application/atom+xml" : "application/atom+xml;type=entry";
+ wc.type(type);
+ Response res = wc.post(element);
+ int status = res.getStatus();
+ return status >= 200 && status <= 299;
+ }
+
+ public String getEndpointAddress() {
+ return wc.getBaseURI().toString();
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/package-info.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/package-info.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/package-info.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,27 @@
+/**
+ * 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.
+ */
+
+/**
+ * Support for producing logs in
+ * <a href="http://tools.ietf.org/html/rfc4287">ATOM Syndication Format</a>.
+ * Allows to configure <tt>java.util.logging</tt> (JUL) loggers to use
+ * handlers producing ATOM feeds that are either pushed to or pulled by client.
+ */
+package org.apache.cxf.management.web.logging.atom;
+
Added: thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/package-info.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/package-info.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/package-info.java 2011-08-13 15:39:22 UTC (rev 14820)
@@ -0,0 +1,31 @@
+/**
+ * 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.
+ */
+
+/**
+ * CXF specific logging support. Based on <tt>java.util.logging</tt> (JUL)
+ * with use of different logging frameworks factored out; assumes that client
+ * with source code logging to other systems, like Log4J, can bridge
+ * to this implementation applying <a href="www.slf4j.org">SLF4J</a>
+ * that JAXRS already depends on.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(xmlns = {
+ @javax.xml.bind.annotation.XmlNs(namespaceURI = "http://cxf.apache.org/log", prefix = "log")
+ })
+package org.apache.cxf.management.web.logging;
+
13 years, 4 months
JBossWS SVN: r14818 - in thirdparty/cxf/branches/cxf-2.2.12: rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2011-08-12 12:01:03 -0400 (Fri, 12 Aug 2011)
New Revision: 14818
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
Log:
[JBPAPP-6529] Fixing NPE in StaxUtils. Adding more GET checks.
Modified: thirdparty/cxf/branches/cxf-2.2.12/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java 2011-08-12 15:19:03 UTC (rev 14817)
+++ thirdparty/cxf/branches/cxf-2.2.12/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java 2011-08-12 16:01:03 UTC (rev 14818)
@@ -97,11 +97,16 @@
}
public void handleMessage(SoapMessage message) throws Fault {
+ if (isGET(message)) {
+ return;
+ }
+
Boolean bodySet = (Boolean)message.get(BODY_FILLED_IN);
if (bodySet != null && bodySet == Boolean.TRUE) {
return;
}
message.put(BODY_FILLED_IN, Boolean.TRUE);
+
try {
MessageFactory factory = getFactory(message);
SOAPMessage soapMessage = factory.createMessage();
Modified: thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java 2011-08-12 15:19:03 UTC (rev 14817)
+++ thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java 2011-08-12 16:01:03 UTC (rev 14818)
@@ -143,9 +143,13 @@
}
return result;
}
+ public final boolean isGET(SoapMessage message) {
+ String method = (String)message.get(SoapMessage.HTTP_REQUEST_METHOD);
+ return "GET".equals(method) && message.getContent(XMLStreamReader.class) == null;
+ }
public void handleMessage(SoapMessage msg) throws Fault {
- if (msg.containsKey(SECURITY_PROCESSED)) {
+ if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg)) {
return;
}
msg.put(SECURITY_PROCESSED, Boolean.TRUE);
Modified: thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java 2011-08-12 15:19:03 UTC (rev 14817)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java 2011-08-12 16:01:03 UTC (rev 14818)
@@ -57,6 +57,7 @@
import org.apache.cxf.common.util.ASMHelper;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.helpers.XMLUtils;
import org.apache.cxf.helpers.XPathUtils;
import org.apache.cxf.jaxb_element_test.JaxbElementTest;
@@ -86,8 +87,15 @@
public static void startServers() throws Exception {
assertTrue("server did not launch correctly", launchServer(ServerMisc.class));
}
-
@Test
+ public void testCXF3170() throws Exception {
+ URL url = new URL(ServerMisc.DOCLITBARE_CODEFIRST_URL + "/foo");
+ HttpURLConnection con = (HttpURLConnection)url.openConnection();
+ con.getResponseCode();
+ String str = IOUtils.readStringFromStream(con.getErrorStream());
+ assertTrue(str.contains("/foo")); //No such operation
+ }
+
public void testDocLitBare() throws Exception {
QName portName = new QName("http://cxf.apache.org/systest/jaxws/DocLitBareCodeFirstService",
"DocLitBareCodeFirstServicePort");
Modified: thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java 2011-08-12 15:19:03 UTC (rev 14817)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java 2011-08-12 16:01:03 UTC (rev 14818)
@@ -22,7 +22,9 @@
import javax.xml.ws.Endpoint;
import org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeImpl;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
import org.apache.cxf.jaxb_element_test.JaxbElementTestImpl;
+import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.jaxws.JAXWSMethodInvoker;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.ordered_param_holder.OrderedParamHolderImpl;
@@ -82,7 +84,9 @@
//Endpoint.publish(DOCLIT_CODEFIRST_URL, implementor4);
Object implementor7 = new DocLitBareCodeFirstServiceImpl();
- Endpoint.publish(DOCLITBARE_CODEFIRST_URL, implementor7);
+ EndpointImpl ep = (EndpointImpl)Endpoint.publish(DOCLITBARE_CODEFIRST_URL, implementor7);
+ ep.getServer().getEndpoint().getInInterceptors().add(new SAAJInInterceptor());
+
Object implementor6 = new InterfaceInheritTestImpl();
Endpoint.publish(DOCLIT_CODEFIRST_BASE_URL, implementor6);
@@ -107,6 +111,7 @@
Endpoint.publish("http://localhost:" + PORT + "/InheritContext/InheritPort",
new InheritImpl());
+
}
public static void main(String[] args) {
13 years, 4 months
JBossWS SVN: r14817 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/core/client and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2011-08-12 11:19:03 -0400 (Fri, 12 Aug 2011)
New Revision: 14817
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/EnvelopBuilderTestCase.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java
Log:
JBPAPP-6860 - set ignoreParseError to false and updated CommonSOAPFaultException to handle exception instead of just the message. HttpRemotingConnection checks if underlying cause is present in the exception and passes this back to the client
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java 2011-08-12 12:40:36 UTC (rev 14816)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java 2011-08-12 15:19:03 UTC (rev 14817)
@@ -32,6 +32,7 @@
{
private QName faultCode;
private String faultString;
+ private Throwable throwable;
public CommonSOAPFaultException(QName faultCode, String faultString)
{
@@ -41,6 +42,15 @@
this.faultString = faultString;
}
+ public CommonSOAPFaultException(QName faultCode, Throwable throwable) {
+
+ super(throwable.getMessage(), throwable);
+
+ this.faultCode = faultCode;
+ this.throwable = throwable;
+
+ }
+
public QName getFaultCode()
{
return faultCode;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2011-08-12 12:40:36 UTC (rev 14816)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2011-08-12 15:19:03 UTC (rev 14817)
@@ -264,7 +264,14 @@
throw new WSTimeoutException("Timeout after: " + timeout + "ms", new Long(timeout.toString()));
}
- IOException io = new IOException("Could not transmit message");
+ IOException io = null;
+
+ if(th.getCause().getMessage() != null) {
+ io = new IOException(th.getCause().getMessage());
+ }else {
+ io = new IOException("Could not transmit message");
+ }
+
io.initCause(th);
throw io;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2011-08-12 12:40:36 UTC (rev 14816)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2011-08-12 15:19:03 UTC (rev 14817)
@@ -91,7 +91,7 @@
return null;
}
QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
- throw new CommonSOAPFaultException(faultCode, ex.getMessage());
+ throw new CommonSOAPFaultException(faultCode, ex);
}
return build(soapMessage, domEnv);
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java 2011-08-12 12:40:36 UTC (rev 14816)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java 2011-08-12 15:19:03 UTC (rev 14817)
@@ -287,6 +287,10 @@
SOAPBody soapBody = soapEnv.getBody();
+ if (soapBody == null) {
+ soapBody = soapEnv.addBody();
+ }
+
if (atPartMargin())
{
// the env:Body element
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2011-08-12 12:40:36 UTC (rev 14816)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2011-08-12 15:19:03 UTC (rev 14817)
@@ -288,6 +288,15 @@
{
envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), null);
}
+ //if inputstream is empty, no need to build
+ if (inputStream.markSupported()) {
+ inputStream.mark(1);
+ final int bytesRead = inputStream.read(new byte[1]);
+ inputStream.reset();
+ if (bytesRead == -1) {
+ return soapMessage;
+ }
+ }
// Build the payload
envBuilder.setStyle(getStyle());
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2011-08-12 12:40:36 UTC (rev 14816)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2011-08-12 15:19:03 UTC (rev 14817)
@@ -47,7 +47,7 @@
try
{
- SOAPMessage soapMsg = getMessageFactory().createMessage(null, inputStream, true);
+ SOAPMessage soapMsg = getMessageFactory().createMessage(null, inputStream, false);
return soapMsg;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java 2011-08-12 12:40:36 UTC (rev 14816)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java 2011-08-12 15:19:03 UTC (rev 14817)
@@ -79,7 +79,8 @@
if (resCode != HttpServletResponse.SC_NO_CONTENT)
{
MimeHeaders mimeHeaders = getMimeHeaders(metadata);
- soapMsg = getMessageFactory().createMessage(mimeHeaders, inputStream, true);
+ //[JBWS-2651] modify the ignoreParseError to false
+ soapMsg = getMessageFactory().createMessage(mimeHeaders, inputStream, false);
}
return soapMsg;
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/EnvelopBuilderTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/EnvelopBuilderTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/EnvelopBuilderTestCase.java 2011-08-12 15:19:03 UTC (rev 14817)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2651;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.soap.SOAPException;
+
+
+import org.jboss.ws.core.CommonSOAPFaultException;
+import org.jboss.ws.core.soap.EnvelopeBuilderDOM;
+import org.jboss.ws.core.soap.EnvelopeBuilderStax;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+
+import junit.framework.TestCase;
+
+public class EnvelopBuilderTestCase extends TestCase {
+
+ EnvelopeBuilderDOM domBuilder = new EnvelopeBuilderDOM();
+ EnvelopeBuilderStax staxBuilder = new EnvelopeBuilderStax();
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+
+ public void testEmptyInputStream() throws Exception {
+ InputStream ins = new ByteArrayInputStream("".getBytes());
+ factory.createMessage(null, ins, false);
+ }
+
+ public void testDomInputStream() throws Exception {
+ String soapMsg =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
+ InputStream ins = new ByteArrayInputStream(soapMsg.getBytes());
+ assertNotNull(domBuilder.build(soapMessage, ins, false));
+ }
+
+
+ public void testStaxInputStream() throws Exception {
+ String soapMsg =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
+ InputStream ins = new ByteArrayInputStream(soapMsg.getBytes());
+ assertNotNull(staxBuilder.build(soapMessage, ins, false));
+ }
+
+
+ public void testDomErroStream(){
+ String soapMsg =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
+ "</env:Envelope";
+
+ try {
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
+ InputStream ins = new ByteArrayInputStream(soapMsg.getBytes());
+ domBuilder.build(soapMessage, ins, false);
+ fail("expected SOAPException");
+ } catch (Exception e) {
+ assertTrue(e instanceof CommonSOAPFaultException);
+ }
+ }
+
+
+ public void testStaxErroStream(){
+ String soapMsg =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
+ "</env:Envelope";
+
+ try {
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
+ InputStream ins = new ByteArrayInputStream(soapMsg.getBytes());
+ staxBuilder.build(soapMessage, ins, false);
+ fail("expected IOException");
+ } catch (Exception e) {
+ assertTrue(e instanceof IOException);
+ }
+ }
+
+}
13 years, 4 months
JBossWS SVN: r14809 - in thirdparty/cxf/branches/cxf-2.3.1/systests: databinding and 45 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-08-12 07:42:19 -0400 (Fri, 12 Aug 2011)
New Revision: 14809
Added:
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/cxf/systest/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/cxf/systest/jaxb/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/cxf/systest/jaxb/service/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/cxf/systest/jaxb/service/TestServiceException.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWs.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsImpl.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisServer.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AttributeBean.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/BeanWithCharacter.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/ServerPasswordCallback.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/SportsService.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/SportsServiceImpl.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/Team.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/AnInterface.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/Item.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/DataHandlerBean.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/MtomTestImpl.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/MtomTestService.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/ExtendedWidget.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/ExtendedWidgetWithMime.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/Widget.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/jaxb.index
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/TestService.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/TestServiceImpl.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/util/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/util/ClassArrayFactoryBean.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/aegisJaxWsBeans.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/aegisSportsServiceBeans.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/extrajaxbclass.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/mtomTestBeans.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/web.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/hello_world.wsdl
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/src/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/src/main/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/src/main/resources/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/src/main/resources/defaultBinding.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/apache/cxf/systests/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/apache/cxf/systests/java2ws/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/apache/cxf/systests/java2ws/HelloWorld.java
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/resources/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/META-INF/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/META-INF/MANIFEST.MF
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/beans.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/lib/
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/web.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/pom.xml
Log:
importing CXF 2.3.1 tag - (per partes) because of unreliable SVN RH repo :(
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/pom.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,294 @@
+<?xml version="1.0"?>
+<!--
+ 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">
+ <parent>
+ <artifactId>cxf-parent</artifactId>
+ <groupId>org.apache.cxf</groupId>
+ <version>2.3.1</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-databinding</artifactId>
+ <name>Apache CXF Databinding System Tests</name>
+ <version>2.3.1</version>
+ <url>http://cxf.apache.org</url>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-test-source</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${basedir}/src/test/generated</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-test-resources</id>
+ <phase>process-test-sources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/target/test-classes/schemaorg_apache_xmlbeans</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/target/generated/src/test/java/schemaorg_apache_xmlbeans</directory>
+ <includes>
+ <include>**/*.xsb</include>
+ <include>**/*.class</include>
+ <include>**/*.wsdl</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <configuration>
+ <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
+ <testWsdlRoot>${basedir}/src/test/resources/wsdl_systest_databinding</testWsdlRoot>
+ <wsdlOptions>
+ <wsdlOption>
+ <wsdl>${basedir}/src/test/resources/wsdl_systest_databinding/xmlbeans/hello_world.wsdl</wsdl>
+ <extraargs>
+ <extraarg>-db</extraarg>
+ <extraarg>xmlbeans</extraarg>
+ </extraargs>
+ </wsdlOption>
+ <wsdlOption>
+ <wsdl>${basedir}/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl</wsdl>
+ <extraargs>
+ <extraarg>-db</extraarg>
+ <extraarg>xmlbeans</extraarg>
+ </extraargs>
+ </wsdlOption>
+ </wsdlOptions>
+ </configuration>
+ <goals>
+ <goal>wsdl2java</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>ibmjdk</id>
+ <activation>
+ <property>
+ <name>java.vendor</name>
+ <value>IBM Corporation</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_3.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+ <dependencies>
+ <dependency>
+ <groupId>${cxf.servlet-api.group}</groupId>
+ <artifactId>${cxf.servlet-api.artifact}</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-databinding-jaxb</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-js</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-bindings-soap</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-databinding-aegis</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http-jetty</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-local</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-ws-addr</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-ws-security</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-testutils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>${cxf.spring.mock}</artifactId>
+ <version>${cxf.spring.version}</version>
+ </dependency>
+
+ <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>com.sun.xml.fastinfoset</groupId>
+ <artifactId>FastInfoset</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-databinding-xmlbeans</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jettison</groupId>
+ <artifactId>jettison</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.0</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+ <properties>
+ <cxf.surefire.fork.mode>pertest</cxf.surefire.fork.mode>
+ </properties>
+
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/cxf/systest/jaxb/service/TestServiceException.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/cxf/systest/jaxb/service/TestServiceException.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/generated/org/apache/cxf/systest/jaxb/service/TestServiceException.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.systest.jaxb.service;
+
+/**
+ * Class used to test for unwanted serialization of exception fields.
+ */
+public class TestServiceException extends Exception {
+
+ static final long serialVersionUID = 4948446750312293907L;
+ // CHECKSTYLE:OFF
+ public String publicString;
+ // CHECKSTYLE:ON
+ @SuppressWarnings("unused")
+ private int privateInt;
+
+
+ public TestServiceException() {
+ privateInt = 2;
+ publicString = "strung";
+ }
+
+ public TestServiceException(String message) {
+ super(message);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,170 @@
+/**
+ * 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.systest.aegis;
+
+
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Collection;
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.w3c.dom.Document;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.authservice.AuthService;
+import org.apache.cxf.authservice.Authenticate;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.cxf.test.TestUtilities;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AegisClientServerTest extends AbstractBusClientServerTestBase {
+ static final String PORT = allocatePort(AegisServer.class);
+ static final Logger LOG = LogUtils.getLogger(AegisClientServerTest.class);
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(AegisServer.class));
+ }
+
+ @Test
+ public void testAegisClient() throws Exception {
+ AegisDatabinding aegisBinding = new AegisDatabinding();
+ ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
+ proxyFactory.setDataBinding(aegisBinding);
+ proxyFactory.setServiceClass(AuthService.class);
+ proxyFactory.setAddress("http://localhost:" + PORT + "/service");
+ AuthService service = (AuthService) proxyFactory.create();
+ assertTrue(service.authenticate("Joe", "Joe", "123"));
+ assertFalse(service.authenticate("Joe1", "Joe", "fang"));
+ assertTrue(service.authenticate("Joe", null, "123"));
+ List<String> list = service.getRoles("Joe");
+ assertEquals(3, list.size());
+ assertEquals("Joe", list.get(0));
+ assertEquals("Joe-1", list.get(1));
+ assertEquals("Joe-2", list.get(2));
+ String roles[] = service.getRolesAsArray("Joe");
+ assertEquals(2, roles.length);
+ assertEquals("Joe", roles[0]);
+ assertEquals("Joe-1", roles[1]);
+
+ assertEquals("get Joe", service.getAuthentication("Joe"));
+ Authenticate au = new Authenticate();
+ au.setSid("ffang");
+ au.setUid("ffang");
+ assertTrue(service.authenticate(au));
+ au.setUid("ffang1");
+ assertFalse(service.authenticate(au));
+ }
+
+ @Test
+ public void testJaxWsAegisClient() throws Exception {
+ AegisDatabinding aegisBinding = new AegisDatabinding();
+ JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
+ proxyFactory.setDataBinding(aegisBinding);
+ proxyFactory.setServiceClass(AuthService.class);
+ proxyFactory.setAddress("http://localhost:" + PORT + "/jaxwsAndAegis");
+ AuthService service = (AuthService) proxyFactory.create();
+ assertTrue(service.authenticate("Joe", "Joe", "123"));
+ assertFalse(service.authenticate("Joe1", "Joe", "fang"));
+ assertTrue(service.authenticate("Joe", null, "123"));
+ List<String> list = service.getRoles("Joe");
+ assertEquals(3, list.size());
+ assertEquals("Joe", list.get(0));
+ assertEquals("Joe-1", list.get(1));
+ assertEquals("Joe-2", list.get(2));
+ String roles[] = service.getRolesAsArray("Joe");
+ assertEquals(2, roles.length);
+ assertEquals("Joe", roles[0]);
+ assertEquals("Joe-1", roles[1]);
+
+ roles = service.getRolesAsArray("null");
+ assertNull(roles);
+
+ roles = service.getRolesAsArray("0");
+ assertEquals(0, roles.length);
+
+ assertEquals("get Joe", service.getAuthentication("Joe"));
+ Authenticate au = new Authenticate();
+ au.setSid("ffang");
+ au.setUid("ffang");
+ assertTrue(service.authenticate(au));
+ au.setUid("ffang1");
+ assertFalse(service.authenticate(au));
+ }
+
+ @Test
+ public void testWSDL() throws Exception {
+ URL url = new URL("http://localhost:" + PORT + "/jaxwsAndAegis?wsdl");
+ Document dom = XMLUtils.parse(url.openStream());
+ TestUtilities util = new TestUtilities(this.getClass());
+ util.addDefaultNamespaces();
+ util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
+ + "xsd:complexType[@name='getRolesAsArrayResponse']/"
+ + "xsd:sequence/xsd:element[@maxOccurs]",
+ dom);
+ util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
+ + "xsd:complexType[@name='getRolesAsArrayResponse']/"
+ + "xsd:sequence/xsd:element[@nillable='true']",
+ dom);
+
+ url = new URL("http://localhost:" + PORT + "/serviceWithCustomNS?wsdl");
+ dom = XMLUtils.parse(url.openStream());
+ util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
+ dom);
+ }
+
+ @Test
+ public void testCollection() throws Exception {
+ AegisDatabinding aegisBinding = new AegisDatabinding();
+ JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
+ proxyFactory.setDataBinding(aegisBinding);
+ proxyFactory.setServiceClass(SportsService.class);
+ proxyFactory.setWsdlLocation("http://localhost:" + PORT + "/jaxwsAndAegisSports?wsdl");
+ SportsService service = (SportsService) proxyFactory.create();
+
+ Collection<Team> teams = service.getTeams();
+ assertEquals(1, teams.size());
+ assertEquals("Patriots", teams.iterator().next().getName());
+
+ //CXF-1251
+ String s = service.testForMinOccurs0("A", null, "b");
+ assertEquals("Anullb", s);
+ }
+
+ @Test
+ public void testDynamicClient() throws Exception {
+ DynamicClientFactory dcf = DynamicClientFactory.newInstance();
+ Client client = dcf.createClient("http://localhost:" + PORT + "/jaxwsAndAegisSports?wsdl");
+
+ Object r = client.invoke("getAttributeBean")[0];
+ Method getAddrPlainString = r.getClass().getMethod("getAttrPlainString");
+ String s = (String)getAddrPlainString.invoke(r);
+
+ assertEquals("attrPlain", s);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWs.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWs.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWs.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.systest.aegis;
+
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.aegis.bean.Item;
+
+/**
+ *
+ */
+@WebService(name = "AegisJaxWs", targetNamespace = "http://test.cxf.apache.org")
+public interface AegisJaxWs {
+ @WebMethod
+ void addItem(@WebParam(name = "item")
+ Item item);
+
+ @WebMethod(operationName = "getItemsAsMap")
+ Map getItemsMap();
+
+ @WebMethod(operationName = "getItemsAsMapSpecified")
+ Map<Integer, Item> getItemsMapSpecified();
+
+ @WebMethod
+ @org.apache.cxf.aegis.type.java5.XmlElement(nillable = false, minOccurs = "1")
+ Item getItemByKey(@WebParam(name = "key1")
+ String key1, @WebParam(name = "key2")
+ String key2);
+
+ @WebMethod
+ Integer getSimpleValue(@WebParam(name = "a")Integer a, @WebParam(name = "b")String b);
+
+ //try comment this method
+ @WebMethod
+ java.util.List<String> getStringList();
+
+ @WebMethod
+ java.util.List<String> echoBigList(java.util.List<String> l);
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsImpl.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,69 @@
+/**
+ * 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.systest.aegis;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.Logging;
+import org.apache.cxf.systest.aegis.bean.Item;
+
+@Logging
+@WebService(endpointInterface = "org.apache.cxf.systest.aegis.AegisJaxWs")
+public class AegisJaxWsImpl implements AegisJaxWs {
+
+ Map<Integer, Item> items = new HashMap<Integer, Item>();
+
+ public void addItem(Item item) {
+ items.put(item.getKey(), item);
+ }
+
+ public Map getItemsMap() {
+ return items;
+ }
+
+ public Map<Integer, Item> getItemsMapSpecified() {
+ return items;
+ }
+
+ public Item getItemByKey(String key1, String key2) {
+ Item fake = new Item();
+ fake.setKey(new Integer(33));
+ fake.setData(key1 + ":" + key2);
+ return fake;
+ }
+
+
+ public Integer getSimpleValue(Integer a, String b) {
+ return a;
+ }
+
+ public List<String> getStringList() {
+ return Arrays.asList("a", "b", "c");
+ }
+
+ public java.util.List<String> echoBigList(java.util.List<String> l) {
+ return l;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,139 @@
+/**
+ * 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.systest.aegis;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.helpers.FileUtils;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.cxf.systest.aegis.bean.Item;
+import org.apache.cxf.testutil.common.TestUtil;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+/**
+ *
+ */
+@ContextConfiguration(locations = { "classpath:aegisJaxWsBeans.xml" })
+public class AegisJaxWsTest extends AbstractJUnit4SpringContextTests {
+ static final String PORT = TestUtil.getPortNumber(AegisJaxWsTest.class);
+
+ private AegisJaxWs client;
+
+ public AegisJaxWsTest() {
+ }
+
+ private void setupForTest(boolean sec) throws Exception {
+
+ JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
+ factory.setServiceClass(AegisJaxWs.class);
+ if (sec) {
+ factory.setAddress("http://localhost:" + PORT + "/aegisJaxWsUN");
+ WSS4JOutInterceptor wss4jOut = new WSS4JOutInterceptor();
+ wss4jOut.setProperty("action", "UsernameToken");
+ wss4jOut.setProperty("user", "alice");
+ wss4jOut.setProperty("password", "pass");
+
+ factory.setProperties(new HashMap<String, Object>());
+ factory.getProperties().put("password", "pass");
+ factory.getOutInterceptors().add(wss4jOut);
+ } else {
+ factory.setAddress("http://localhost:" + PORT + "/aegisJaxWs");
+ }
+ factory.getServiceFactory().setDataBinding(new AegisDatabinding());
+
+ client = (AegisJaxWs)factory.create();
+ }
+
+ @Test
+ public void testGetItemSecure() throws Exception {
+ setupForTest(true);
+ Item item = client.getItemByKey(" jack&jill ", "b");
+ Assert.assertEquals(33, item.getKey().intValue());
+ Assert.assertEquals(" jack&jill :b", item.getData());
+ }
+
+ @Test
+ public void testGetItem() throws Exception {
+ setupForTest(false);
+ Item item = client.getItemByKey(" a ", "b");
+ Assert.assertEquals(33, item.getKey().intValue());
+ Assert.assertEquals(" a :b", item.getData());
+ }
+ @Test
+ public void testMapSpecified() throws Exception {
+ setupForTest(false);
+ Item item = new Item();
+ item.setKey(new Integer(42));
+ item.setData("Godzilla");
+ client.addItem(item);
+
+ Map<Integer, Item> items = client.getItemsMapSpecified();
+ Assert.assertNotNull(items);
+ Assert.assertEquals(1, items.size());
+ Map.Entry<Integer, Item> entry = items.entrySet().iterator().next();
+ Assert.assertNotNull(entry);
+ Item item2 = entry.getValue();
+ Integer key2 = entry.getKey();
+ Assert.assertEquals(42, key2.intValue());
+ Assert.assertEquals("Godzilla", item2.getData());
+ }
+ @Test
+ public void testGetStringList() throws Exception {
+ setupForTest(false);
+
+ Integer soucet = client.getSimpleValue(5, "aa");
+ //this one fail, when comment org.apache.cxf.systest.aegis.AegisJaxWs.getStringList test pass
+ Assert.assertEquals(new Integer(5), soucet);
+
+ List<String> item = client.getStringList();
+ Assert.assertEquals(Arrays.asList("a", "b", "c"), item);
+ }
+ @Test
+ public void testBigList() throws Exception {
+ int size = 1000;
+ List<String> l = new ArrayList<String>(size);
+ for (int x = 0; x < size; x++) {
+ l.add("Need to create a pretty big soap message to make sure we go over "
+ + "some of the default buffer sizes and such so we can see what really"
+ + "happens when we do that - " + x);
+ }
+
+ setupForTest(false);
+ List<String> item = client.echoBigList(l);
+ Assert.assertEquals(size, item.size());
+
+ //CXF-2768
+ File f = FileUtils.getDefaultTempDir();
+ Assert.assertEquals(0, f.listFiles().length);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisServer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisServer.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisServer.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,92 @@
+/**
+ * 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.systest.aegis;
+
+import java.net.URISyntaxException;
+
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.handler.DefaultHandler;
+import org.eclipse.jetty.server.handler.HandlerCollection;
+import org.eclipse.jetty.server.nio.SelectChannelConnector;
+import org.eclipse.jetty.webapp.WebAppContext;
+
+
+public class AegisServer extends AbstractBusTestServerBase {
+ static final String PORT = allocatePort(AegisServer.class);
+
+ private org.eclipse.jetty.server.Server server;
+
+ protected void run() {
+ System.out.println("Starting Server");
+
+ server = new org.eclipse.jetty.server.Server();
+
+ SelectChannelConnector connector = new SelectChannelConnector();
+ connector.setPort(Integer.parseInt(PORT));
+ server.setConnectors(new Connector[] {connector});
+
+ WebAppContext webappcontext = new WebAppContext();
+ String contextPath = null;
+ try {
+ contextPath = getClass().getResource("/webapp").toURI().getPath();
+ } catch (URISyntaxException e1) {
+ e1.printStackTrace();
+ }
+ webappcontext.setContextPath("/");
+
+ webappcontext.setWar(contextPath);
+
+ HandlerCollection handlers = new HandlerCollection();
+ handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()});
+
+ server.setHandler(handlers);
+ try {
+ server.start();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+
+ }
+
+ public boolean stopInProcess() throws Exception {
+ boolean ret = super.stopInProcess();
+ if (server != null) {
+ server.stop();
+ }
+ return ret;
+ }
+
+ public static void main(String args[]) {
+ try {
+ AegisServer s = new AegisServer();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AttributeBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AttributeBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AttributeBean.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,50 @@
+/**
+ * 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.systest.aegis;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Test class for attribute forms.
+ */
+public class AttributeBean {
+ private String attrPlainString = "attrPlain";
+ private String attrExplicitString = "attrExplicit";
+
+ @XmlAttribute
+ public String getAttrPlainString() {
+ return attrPlainString;
+ }
+
+ public void setAttrPlainString(String plainString) {
+ this.attrPlainString = plainString;
+ }
+
+ @XmlAttribute (namespace = "urn:xyzzy")
+ public String getAttrExplicitString() {
+ return attrExplicitString;
+ }
+
+ public void setAttrExplicitString(String attrExplicitString) {
+ this.attrExplicitString = attrExplicitString;
+ }
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/BeanWithCharacter.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/BeanWithCharacter.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/BeanWithCharacter.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,40 @@
+/**
+ * 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.systest.aegis;
+
+public class BeanWithCharacter {
+ private Character character;
+ private char primitiveCharacter;
+
+ public Character getCharacter() {
+ return character;
+ }
+
+ public void setCharacter(Character character) {
+ this.character = character;
+ }
+
+ public char getPrimitiveChar() {
+ return primitiveCharacter;
+ }
+
+ public void setPrimitiveChar(char pchar) {
+ this.primitiveCharacter = pchar;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,82 @@
+/**
+ * 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.systest.aegis;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.aegis.type.basic.CharacterAsStringType;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.test.TestUtilities;
+import org.apache.cxf.testutil.common.TestUtil;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+
+/**
+ *
+ */
+@ContextConfiguration(locations = { "classpath:aegisSportsServiceBeans.xml" })
+public class CharacterSchemaTest extends AbstractJUnit4SpringContextTests {
+ static final String PORT = TestUtil.getPortNumber(CharacterSchemaTest.class);
+
+ private TestUtilities testUtilities;
+
+ public CharacterSchemaTest() {
+ testUtilities = new TestUtilities(getClass());
+ }
+
+ @Test
+ public void testSchema() throws Exception {
+ testUtilities.setBus((Bus)applicationContext.getBean("cxf"));
+ testUtilities.addDefaultNamespaces();
+ testUtilities.addNamespace("aegis", "http://cxf.apache.org/aegisTypes");
+ Server s = testUtilities.
+ getServerForService(new QName("http://aegis.systest.cxf.apache.org/",
+ "SportsService"));
+ Assert.assertNotNull(s);
+ Document wsdl = testUtilities.getWSDLDocument(s);
+ Assert.assertNotNull(wsdl);
+ NodeList typeAttrList =
+ testUtilities.assertValid("//xsd:complexType[@name='BeanWithCharacter']/xsd:sequence"
+ + "/xsd:element[@name='character']"
+ + "/@type",
+ wsdl);
+ Attr typeAttr = (Attr)typeAttrList.item(0);
+ String typeAttrValue = typeAttr.getValue();
+ // now, this thing is a qname with a :, and we have to work out if it's correct.
+ String[] pieces = typeAttrValue.split(":");
+ Assert.assertEquals(CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME.getLocalPart(),
+ pieces[1]);
+ Node elementNode = typeAttr.getOwnerElement();
+ String url = testUtilities.resolveNamespacePrefix(pieces[0], elementNode);
+ Assert.assertEquals(CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME.getNamespaceURI(),
+ url);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/ServerPasswordCallback.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/ServerPasswordCallback.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/ServerPasswordCallback.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.systest.aegis;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ *
+ */
+public class ServerPasswordCallback implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+ pc.setPassword("pass");
+ }
+
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/SportsService.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/SportsService.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/SportsService.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,34 @@
+/**
+ * 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.systest.aegis;
+
+import java.util.Collection;
+
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://cxf.apache.org/systest/aegis/sports")
+public interface SportsService {
+ Collection<Team> getTeams();
+
+ String testForMinOccurs0(String a, Integer b, String c);
+ AttributeBean getAttributeBean();
+ BeanWithCharacter getCharBean();
+}
+
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/SportsServiceImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/SportsServiceImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/SportsServiceImpl.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,50 @@
+/**
+ * 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.systest.aegis;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ *
+ */
+public class SportsServiceImpl implements SportsService {
+
+ /** {@inheritDoc}*/
+ public Collection<Team> getTeams() {
+ List<Team> teams = new ArrayList<Team>();
+ teams.add(new Team("Patriots", "New England"));
+ return teams;
+ }
+
+ public String testForMinOccurs0(String a, Integer b, String c) {
+ return a + b + c;
+ }
+
+ public AttributeBean getAttributeBean() {
+ return new AttributeBean();
+ }
+
+ public BeanWithCharacter getCharBean() {
+ return new BeanWithCharacter();
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/Team.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/Team.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/Team.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,49 @@
+/**
+ * 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.systest.aegis;
+
+/**
+ *
+ */
+public class Team {
+ private String name;
+ private String city;
+
+ public Team() {
+ }
+ public Team(String name, String city) {
+ this.name = name;
+ this.city = city;
+ }
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getCity() {
+ return city;
+ }
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/AnInterface.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/AnInterface.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/AnInterface.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.systest.aegis.bean;
+
+public interface AnInterface {
+ Integer getKey();
+ String getData();
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/Item.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/Item.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/bean/Item.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.systest.aegis.bean;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public class Item implements Serializable, AnInterface {
+ private Integer key;
+ private String data;
+
+ public Integer getKey() {
+ return key;
+ }
+ public void setKey(Integer key) {
+ this.key = key;
+ }
+ public String getData() {
+ return data;
+ }
+ public void setData(String data) {
+ this.data = data;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,195 @@
+/**
+ * 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.systest.aegis.mtom;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.aegis.type.mtom.AbstractXOPType;
+import org.apache.cxf.common.util.SOAPConstants;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.cxf.systest.aegis.mtom.fortest.DataHandlerBean;
+import org.apache.cxf.systest.aegis.mtom.fortest.MtomTestImpl;
+import org.apache.cxf.systest.aegis.mtom.fortest.MtomTestService;
+import org.apache.cxf.test.TestUtilities;
+import org.apache.cxf.testutil.common.TestUtil;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+/**
+ *
+ */
+@ContextConfiguration(locations = { "classpath:mtomTestBeans.xml" })
+public class MtomTest extends AbstractJUnit4SpringContextTests {
+ static final String PORT = TestUtil.getPortNumber(MtomTest.class);
+
+ private MtomTestImpl impl;
+ private MtomTestService client;
+ private MtomTestService jaxwsClient;
+ private TestUtilities testUtilities;
+
+ public MtomTest() {
+ testUtilities = new TestUtilities(getClass());
+ }
+
+ private void setupForTest(boolean enableClientMTOM) throws Exception {
+ AegisDatabinding aegisBinding = new AegisDatabinding();
+ aegisBinding.setMtomEnabled(enableClientMTOM);
+ ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
+ proxyFac.setDataBinding(aegisBinding);
+ proxyFac.setAddress("http://localhost:" + PORT + "/mtom");
+
+ JaxWsProxyFactoryBean jaxwsFac = new JaxWsProxyFactoryBean();
+ jaxwsFac.setDataBinding(new AegisDatabinding());
+ jaxwsFac.setAddress("http://localhost:" + PORT + "/jaxWsMtom");
+
+ Map<String, Object> props = new HashMap<String, Object>();
+ if (enableClientMTOM) {
+ props.put("mtom-enabled", Boolean.TRUE);
+ }
+ proxyFac.setProperties(props);
+
+ client = (org.apache.cxf.systest.aegis.mtom.fortest.MtomTestService)
+ proxyFac.create(MtomTestService.class);
+ jaxwsClient = jaxwsFac.create(MtomTestService.class);
+ impl = (MtomTestImpl)applicationContext.getBean("mtomImpl");
+ }
+
+ @Test
+ public void testMtomReply() throws Exception {
+ setupForTest(true);
+ DataHandlerBean dhBean = client.produceDataHandlerBean();
+ Assert.assertNotNull(dhBean);
+ String result = IOUtils.toString(dhBean.getDataHandler().getInputStream(), "utf-8");
+ Assert.assertEquals(MtomTestImpl.STRING_DATA, result);
+ }
+
+ //TODO: how do we see if MTOM actually happened?
+ @Test
+ public void testJaxWsMtomReply() throws Exception {
+ setupForTest(true);
+ DataHandlerBean dhBean = jaxwsClient.produceDataHandlerBean();
+ Assert.assertNotNull(dhBean);
+ String result = IOUtils.toString(dhBean.getDataHandler().getInputStream(), "utf-8");
+ Assert.assertEquals(MtomTestImpl.STRING_DATA, result);
+ }
+
+ @Test
+ public void testAcceptDataHandler() throws Exception {
+ setupForTest(true);
+ DataHandlerBean dhBean = new DataHandlerBean();
+ dhBean.setName("some name");
+ // some day, we might need this to be higher than some threshold.
+ String someData = "This is the cereal shot from guns.";
+ DataHandler dataHandler = new DataHandler(someData, "text/plain;charset=utf-8");
+ dhBean.setDataHandler(dataHandler);
+ client.acceptDataHandler(dhBean);
+ DataHandlerBean accepted = impl.getLastDhBean();
+ Assert.assertNotNull(accepted);
+ String data = (String) accepted.getDataHandler().getContent();
+ Assert.assertNotNull(data);
+ Assert.assertEquals("This is the cereal shot from guns.", data);
+ }
+
+ @Test
+ public void testAcceptDataHandlerNoMTOM() throws Exception {
+ setupForTest(false);
+ DataHandlerBean dhBean = new DataHandlerBean();
+ dhBean.setName("some name");
+ // some day, we might need this to be longer than some threshold.
+ String someData = "This is the cereal shot from guns.";
+ DataHandler dataHandler = new DataHandler(someData, "text/plain;charset=utf-8");
+ dhBean.setDataHandler(dataHandler);
+ client.acceptDataHandler(dhBean);
+ DataHandlerBean accepted = impl.getLastDhBean();
+ Assert.assertNotNull(accepted);
+ InputStream data = accepted.getDataHandler().getInputStream();
+ Assert.assertNotNull(data);
+ String dataString = org.apache.commons.io.IOUtils.toString(data, "utf-8");
+ Assert.assertEquals("This is the cereal shot from guns.", dataString);
+ }
+
+ @Test
+ public void testMtomSchema() throws Exception {
+ testUtilities.setBus((Bus)applicationContext.getBean("cxf"));
+ testUtilities.addDefaultNamespaces();
+ testUtilities.addNamespace("xmime", "http://www.w3.org/2005/05/xmlmime");
+ Server s = testUtilities.
+ getServerForService(new QName("http://fortest.mtom.aegis.systest.cxf.apache.org/",
+ "MtomTestService"));
+ Document wsdl = testUtilities.getWSDLDocument(s);
+ Assert.assertNotNull(wsdl);
+ NodeList typeAttrList =
+ testUtilities.assertValid("//xsd:complexType[@name='inputDhBean']/xsd:sequence/"
+ + "xsd:element[@name='dataHandler']/"
+ + "@type",
+ wsdl);
+ Attr typeAttr = (Attr)typeAttrList.item(0);
+ String typeAttrValue = typeAttr.getValue();
+ // now, this thing is a qname with a :, and we have to work out if it's correct.
+ String[] pieces = typeAttrValue.split(":");
+ Assert.assertEquals("base64Binary", pieces[1]);
+ Node elementNode = typeAttr.getOwnerElement();
+ String url = testUtilities.resolveNamespacePrefix(pieces[0], elementNode);
+ Assert.assertEquals(SOAPConstants.XSD, url);
+
+ s = testUtilities.getServerForAddress("http://localhost:" + PORT + "/mtomXmime");
+ wsdl = testUtilities.getWSDLDocument(s);
+ Assert.assertNotNull(wsdl);
+ typeAttrList =
+ testUtilities.assertValid("//xsd:complexType[@name='inputDhBean']/xsd:sequence/"
+ + "xsd:element[@name='dataHandler']/"
+ + "@type",
+ wsdl);
+ typeAttr = (Attr)typeAttrList.item(0);
+ typeAttrValue = typeAttr.getValue();
+ // now, this thing is a qname with a :, and we have to work out if it's correct.
+ pieces = typeAttrValue.split(":");
+ Assert.assertEquals("base64Binary", pieces[1]);
+ elementNode = typeAttr.getOwnerElement();
+ url = testUtilities.resolveNamespacePrefix(pieces[0], elementNode);
+ Assert.assertEquals(AbstractXOPType.XML_MIME_NS, url);
+
+ /* when I add a test for a custom mapping.
+ testUtilities.assertValid("//xsd:complexType[@name='inputDhBean']/xsd:sequence/"
+ + "xsd:element[@name='dataHandler']/"
+ + "@xmime:expectedContentType/text()",
+ wsdl);
+ */
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/DataHandlerBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/DataHandlerBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/DataHandlerBean.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.systest.aegis.mtom.fortest;
+
+import javax.activation.DataHandler;
+
+public class DataHandlerBean {
+
+ protected String name;
+ protected DataHandler dataHandler;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ public DataHandler getDataHandler() {
+ return dataHandler;
+ }
+
+ public void setDataHandler(DataHandler dataHandler) {
+ this.dataHandler = dataHandler;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/MtomTestImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/MtomTestImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/MtomTestImpl.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,56 @@
+/**
+ * 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.systest.aegis.mtom.fortest;
+
+import javax.activation.DataHandler;
+import javax.jws.WebService;
+import javax.xml.ws.soap.MTOM;
+
+/**
+ *
+ */
+@WebService
+@MTOM
+public class MtomTestImpl implements MtomTestService {
+
+ public static final String STRING_DATA = "What rough beast, its hour come at last,"
+ + " slouches toward Bethlehem to be born?";
+
+ private DataHandlerBean lastDhBean;
+
+ /** {@inheritDoc}*/
+ public void acceptDataHandler(DataHandlerBean dhBean) {
+ lastDhBean = dhBean;
+ }
+
+ public DataHandlerBean getLastDhBean() {
+ return lastDhBean;
+ }
+
+ public DataHandlerBean produceDataHandlerBean() {
+ DataHandlerBean dhBean = new DataHandlerBean();
+ dhBean.setName("legion");
+ // since we know that the code has no lower threshold for using attachments,
+ // we can just return a fairly short string.
+ dhBean.setDataHandler(new DataHandler(STRING_DATA, "text/plain;charset=utf-8"));
+ return dhBean;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/MtomTestService.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/MtomTestService.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/fortest/MtomTestService.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,34 @@
+/**
+ * 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.systest.aegis.mtom.fortest;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.soap.MTOM;
+
+/**
+ *
+ */
+@WebService(name = "MtomTestService", serviceName = "MtomTestService")
+@MTOM
+public interface MtomTestService {
+ void acceptDataHandler(@WebParam(name = "inputDhBean") DataHandlerBean dhBean);
+ DataHandlerBean produceDataHandlerBean();
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,107 @@
+/**
+ * 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.systest.jaxb;
+
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+
+import org.w3c.dom.Document;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.systest.jaxb.model.ExtendedWidget;
+import org.apache.cxf.systest.jaxb.model.Widget;
+import org.apache.cxf.systest.jaxb.service.TestService;
+import org.apache.cxf.test.TestUtilities;
+import org.apache.cxf.testutil.common.TestUtil;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+@ContextConfiguration(locations = { "classpath:extrajaxbclass.xml" })
+public class TestServiceTest extends AbstractJUnit4SpringContextTests {
+ static final String PORT = TestUtil.getPortNumber(TestServiceTest.class);
+
+ private TestUtilities testUtilities;
+
+ public TestServiceTest() {
+ testUtilities = new TestUtilities(getClass());
+ }
+
+ @Test
+ public void testExtraSubClassWithJaxb() throws Throwable {
+ Widget expected = new ExtendedWidget(42, "blah", "blah", true, true);
+ TestService testClient = getTestClient();
+ Widget widgetFromService = testClient.getWidgetById((long)42);
+
+ Assert.assertEquals(expected, widgetFromService);
+ }
+
+ @Test
+ public void testExtraSubClassWithJaxbFromEndpoint() throws Throwable {
+ Widget expected = new ExtendedWidget(42, "blah", "blah", true, true);
+
+ TestService testClient = getTestClient();
+ ((BindingProvider)testClient).getRequestContext()
+ .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://localhost:" + PORT + "/service/TestEndpoint");
+ Widget widgetFromService = testClient.getWidgetById((long)42);
+
+ Assert.assertEquals(expected, widgetFromService);
+ }
+
+
+ @Test
+ public void testSchema() throws Exception {
+ URL url = new URL("http://localhost:" + PORT + "/service/TestService?wsdl");
+ String s = IOUtils.toString(url.openStream());
+ Assert.assertTrue(s, s.contains("application/octet-stream"));
+ }
+
+ @Test
+ public void testAutoFaultBeanProperties() throws Exception {
+ testUtilities.setBus((Bus)applicationContext.getBean("cxf"));
+ testUtilities.addDefaultNamespaces();
+ testUtilities.addNamespace("ts", "http://cxf.org.apache/service");
+ Server s = testUtilities.getServerForService(new QName("http://cxf.org.apache/service",
+ "TestServiceService"));
+ Document wsdl = testUtilities.getWSDLDocument(s);
+ testUtilities.assertInvalid("//xsd:complexType[@name='TestServiceException']"
+ + "/xsd:sequence/xsd:element[@name='serialVersionUID']", wsdl);
+ testUtilities.assertInvalid("//xsd:complexType[@name='TestServiceException']"
+ + "/xsd:sequence/xsd:element[@name='privateInt']", wsdl);
+ testUtilities.assertValid("//xsd:complexType[@name='TestServiceException']"
+ + "/xsd:sequence/xsd:element[@name='publicString']", wsdl);
+ }
+
+
+ /**
+ * @return the testClient
+ */
+ public TestService getTestClient() {
+ return (TestService)applicationContext.getBean("testClient", TestService.class);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/ExtendedWidget.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/ExtendedWidget.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/ExtendedWidget.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,103 @@
+/**
+ * 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.systest.jaxb.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+@XmlType(name = "extendedwidget", namespace = "http://cxf.org.apache/model")
+@XmlRootElement(name = "extendedwidget", namespace = "http://cxf.org.apache/model")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class ExtendedWidget extends Widget {
+
+ @XmlElement(required = true, namespace = "http://cxf.org.apache/model")
+ private boolean extended = true;
+
+ /**
+ *
+ */
+ public ExtendedWidget() {
+ super();
+ }
+
+ /**
+ * @param id
+ * @param name
+ * @param serialNumber
+ * @param broken
+ * @param extended
+ */
+ public ExtendedWidget(long id, String name, String serialNumber, boolean broken, boolean extended) {
+ super(id, name, serialNumber, broken);
+ this.extended = extended;
+ }
+
+ /**
+ * @return the extended
+ */
+ public boolean isExtended() {
+ return extended;
+ }
+
+ /**
+ * @param extended the extended to set
+ */
+ public void setExtended(boolean extended) {
+ this.extended = extended;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ boolean ret = false;
+ if (obj instanceof ExtendedWidget) {
+ ExtendedWidget w = (ExtendedWidget)obj;
+ ret = new EqualsBuilder().appendSuper(true).append(extended, w.extended).isEquals();
+ }
+
+ return ret;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).appendSuper(super.toString()).append("extended", extended)
+ .toString();
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/ExtendedWidgetWithMime.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/ExtendedWidgetWithMime.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/ExtendedWidgetWithMime.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,53 @@
+/**
+ * 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.systest.jaxb.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+@XmlType(name = "extendedwidgetWithMime", namespace = "http://cxf.org.apache/model")
+@XmlRootElement(name = "extendedwidgetWithMime", namespace = "http://cxf.org.apache/model")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class ExtendedWidgetWithMime extends Widget {
+
+
+ @XmlMimeType("application/octet-stream")
+ private byte[] xmlData;
+
+
+ /**
+ * @return the extended
+ */
+ public byte[] getXmlData() {
+ return xmlData;
+ }
+
+ /**
+ * @param extended the extended to set
+ */
+ public void setXmlData(byte[] xmlData) {
+ this.xmlData = xmlData;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/Widget.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/Widget.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/Widget.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,162 @@
+/**
+ * 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.systest.jaxb.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * @author shade
+ */
+@XmlType(name = "widget", namespace = "http://cxf.org.apache/model")
+@XmlRootElement(name = "widget", namespace = "http://cxf.org.apache/model")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public abstract class Widget {
+
+ @XmlAttribute(required = true)
+ private long id;
+
+ @XmlElement(required = true, namespace = "http://cxf.org.apache/model")
+ private String name;
+
+ @XmlElement(required = false, namespace = "http://cxf.org.apache/model")
+ private String serialNumber;
+
+ @XmlElement(required = true, namespace = "http://cxf.org.apache/model")
+ private boolean broken;
+
+ /**
+ *
+ */
+ public Widget() {
+ super();
+ }
+
+ /**
+ * @param id
+ * @param name
+ * @param serialNumber
+ * @param broken
+ */
+ public Widget(long id, String name, String serialNumber, boolean broken) {
+ super();
+ this.id = id;
+ this.name = name;
+ this.serialNumber = serialNumber;
+ this.broken = broken;
+ }
+
+ /**
+ * @return the id
+ */
+ public long getId() {
+ return id;
+ }
+
+ /**
+ * @param id the id to set
+ */
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the serialNumber
+ */
+ public String getSerialNumber() {
+ return serialNumber;
+ }
+
+ /**
+ * @param serialNumber the serialNumber to set
+ */
+ public void setSerialNumber(String serialNumber) {
+ this.serialNumber = serialNumber;
+ }
+
+ /**
+ * @return the broken
+ */
+ public boolean isBroken() {
+ return broken;
+ }
+
+ /**
+ * @param broken the broken to set
+ */
+ public void setBroken(boolean broken) {
+ this.broken = broken;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ boolean ret = false;
+ if (obj instanceof Widget) {
+ Widget w = (Widget)obj;
+ ret = new EqualsBuilder().append(id, w.id).append(name, w.name).append(serialNumber,
+ w.serialNumber)
+ .append(broken, w.broken).isEquals();
+ }
+ return ret;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("id", id).append("name", name).append("serialNumber",
+ serialNumber)
+ .append("broken", broken).toString();
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/jaxb.index
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/jaxb.index (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/model/jaxb.index 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,19 @@
+# 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.
+Widget
+ExtendedWidget
+ExtendedWidgetWithMime
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/TestService.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/TestService.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/TestService.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.systest.jaxb.service;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jaxb.model.Widget;
+
+@WebService(targetNamespace = "http://cxf.org.apache/service")
+public interface TestService {
+
+ @WebMethod(operationName = "getWidgetById")
+ Widget getWidgetById(@WebParam(name = "id")
+ long id);
+
+ @WebMethod
+ void testExceptionMarshalling() throws TestServiceException;
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/TestServiceImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/TestServiceImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/service/TestServiceImpl.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,42 @@
+/**
+ * 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.systest.jaxb.service;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jaxb.model.ExtendedWidget;
+import org.apache.cxf.systest.jaxb.model.Widget;
+/**
+ * @author shade
+ */
+@WebService(endpointInterface = "org.apache.cxf.systest.jaxb.service.TestService")
+public class TestServiceImpl implements TestService {
+
+ public Widget getWidgetById(long id) {
+ return new ExtendedWidget(id, "blah", "blah", true, true);
+ }
+
+ public void testExceptionMarshalling() throws TestServiceException {
+ throw new TestServiceException("Your hovercraft is full of eels.");
+ }
+
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/util/ClassArrayFactoryBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/util/ClassArrayFactoryBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/util/ClassArrayFactoryBean.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.systest.jaxb.util;
+
+import java.util.List;
+
+import org.springframework.beans.factory.FactoryBean;
+
+public class ClassArrayFactoryBean implements FactoryBean {
+
+ private List<String> classNames;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.springframework.beans.factory.FactoryBean#getObject()
+ */
+ public Object getObject() throws Exception {
+
+ final Class<?>[] classes = new Class<?>[classNames.size()];
+ for (int i = 0; i < classNames.size(); i++) {
+ classes[i] = Class.forName(classNames.get(i));
+ }
+ return classes;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.springframework.beans.factory.FactoryBean#getObjectType()
+ */
+ public Class<?> getObjectType() {
+ return Class[].class;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.springframework.beans.factory.FactoryBean#isSingleton()
+ */
+ public boolean isSingleton() {
+ return true;
+ }
+
+ /**
+ * @return the classNames
+ */
+ public List<String> getClassNames() {
+ return classNames;
+ }
+
+ /**
+ * @param classNames the classNames to set
+ */
+ public void setClassNames(List<String> classNames) {
+ this.classNames = classNames;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ClientServerXmlBeansTest.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,262 @@
+/**
+ * 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.systest.xmlbeans;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.soap.SOAPBinding;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.headers.Header;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.TestUtil;
+import org.apache.cxf.xmlbeans.docLitBare.types.InDecimalDocument;
+import org.apache.cxf.xmlbeans.docLitBare.types.InDocument;
+import org.apache.cxf.xmlbeans.docLitBare.types.InoutDocument;
+import org.apache.cxf.xmlbeans.docLitBare.types.OutStringDocument;
+import org.apache.cxf.xmlbeans.docLitBare.types.StringRespTypeDocument;
+import org.apache.cxf.xmlbeans.docLitBare.types.TradePriceData;
+import org.apache.cxf.xmlbeans.doc_lit_bare.PutLastTradedPricePortType;
+import org.apache.helloWorldSoapHttp.xmlbeans.types.FaultDetailDocument;
+import org.apache.helloWorldSoapHttp.xmlbeans.types.FaultDetailDocument.FaultDetail;
+import org.apache.hello_world_soap_http.xmlbeans.GreetMeFault;
+import org.apache.hello_world_soap_http.xmlbeans.Greeter;
+import org.apache.hello_world_soap_http.xmlbeans.PingMeFault;
+import org.apache.hello_world_soap_http.xmlbeans.SOAPService;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ClientServerXmlBeansTest extends AbstractBusClientServerTestBase {
+ static final String WSDL_PORT = TestUtil.getPortNumber(Server.class);
+ static final String NOWSDL_PORT = TestUtil.getPortNumber(ServerNoWsdl.class);
+
+ private static final QName SERVICE_NAME
+ = new QName("http://apache.org/hello_world_soap_http/xmlbeans", "SOAPService");
+
+ private static final QName DOC_LIT_BARE_SERVICE =
+ new QName("http://cxf.apache.org/xmlbeans/doc_lit_bare", "SOAPService");
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class, true));
+ assertTrue("server did not launch correctly", launchServer(ServerNoWsdl.class, true));
+ }
+
+ @Test
+ public void testCallFromDocLitBareClient() throws Exception {
+ SpringBusFactory factory = new SpringBusFactory();
+ Bus bus = factory.createBus("org/apache/cxf/systest/xmlbeans/cxf.xml");
+ BusFactory.setDefaultBus(bus);
+ URL wsdl = this.getClass().getResource("/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl");
+ assertNotNull("We should have found the WSDL here. " , wsdl);
+
+ org.apache.cxf.xmlbeans.doc_lit_bare.SOAPService ss =
+ new org.apache.cxf.xmlbeans.doc_lit_bare.SOAPService(wsdl, DOC_LIT_BARE_SERVICE);
+ PutLastTradedPricePortType port = ss.getSoapPort();
+ updateAddressPort(port, WSDL_PORT);
+
+
+ ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
+ ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
+ StringRespTypeDocument resp = port.bareNoParam();
+ assertEquals("Get a wrong response", "Get the request!", resp.getStringRespType());
+
+ InDecimalDocument xd = InDecimalDocument.Factory.newInstance();
+ xd.setInDecimal(new BigDecimal(123));
+ OutStringDocument response = port.nillableParameter(xd);
+ assertEquals("Get a wrong response", "Get the request 123", response.getOutString());
+
+ InDocument document = InDocument.Factory.newInstance();
+ TradePriceData data = document.addNewIn();
+ data.setTickerPrice(12.33F);
+ data.setTickerSymbol("CXF");
+ port.putLastTradedPrice(document);
+
+ InoutDocument inOut = InoutDocument.Factory.newInstance();
+ data = inOut.addNewInout();
+ data.setTickerPrice(12.33F);
+ data.setTickerSymbol("CXF");
+ Holder<InoutDocument> holder = new Holder<InoutDocument>(inOut);
+ port.sayHi(holder);
+ assertEquals("Get a wrong response", "BAK", holder.value.getInout().getTickerSymbol());
+ }
+
+ @Test
+ public void testCallFromClient() throws Exception {
+ SpringBusFactory factory = new SpringBusFactory();
+ Bus bus = factory.createBus("org/apache/cxf/systest/xmlbeans/cxf.xml");
+ BusFactory.setDefaultBus(bus);
+ URL wsdl = this.getClass().getResource("/wsdl_systest_databinding/xmlbeans/hello_world.wsdl");
+ assertNotNull("We should have found the WSDL here. " , wsdl);
+
+ SOAPService ss = new SOAPService(wsdl, SERVICE_NAME);
+ Greeter port = ss.getSoapPort();
+ updateAddressPort(port, WSDL_PORT);
+
+ String resp;
+ ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
+ ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
+ resp = port.sayHi();
+ assertEquals("We should get the right response", "Bonjour", resp);
+
+ resp = port.greetMe("Willem");
+ assertEquals("We should get the right response", "Hello Willem", resp);
+
+ try {
+ port.greetMe("fault");
+ fail("Should have been a fault");
+ } catch (GreetMeFault ex) {
+ assertEquals("Some fault detail", ex.getFaultInfo().getGreetMeFaultDetail());
+ }
+
+ try {
+ resp = port.greetMe("Invoking greetMe with invalid length string, expecting exception...");
+ fail("We expect exception here");
+ } catch (WebServiceException ex) {
+ assertTrue("Get a wrong exception",
+ ex.getMessage().
+ indexOf("string length (67) is greater than maxLength facet (30)") >= 0);
+ }
+
+ try {
+ port.pingMe();
+ fail("We expect exception here");
+ } catch (PingMeFault ex) {
+ FaultDetailDocument detailDocument = ex.getFaultInfo();
+ FaultDetail detail = detailDocument.getFaultDetail();
+ assertEquals("Wrong faultDetail major", detail.getMajor(), 2);
+ assertEquals("Wrong faultDetail minor", detail.getMinor(), 1);
+ }
+
+ }
+
+ @Test
+ public void testCallFromClientNoWsdlServer() throws Exception {
+ SpringBusFactory factory = new SpringBusFactory();
+ Bus bus = factory.createBus("org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml");
+ BusFactory.setDefaultBus(bus);
+ URL wsdl = this.getClass().getResource("/wsdl_systest_databinding/xmlbeans/hello_world.wsdl");
+ assertNotNull("We should have found the WSDL here. " , wsdl);
+
+ SOAPService ss = new SOAPService(wsdl, SERVICE_NAME);
+ QName soapPort = new QName("http://apache.org/hello_world_soap_http/xmlbeans", "SoapPort");
+ ss.addPort(soapPort, SOAPBinding.SOAP11HTTP_BINDING, "http://localhost:"
+ + NOWSDL_PORT + "/SoapContext/SoapPort");
+ Greeter port = ss.getPort(soapPort, Greeter.class);
+ String resp;
+ ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
+ ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
+ resp = port.sayHi();
+ assertEquals("We should get the right response", resp, "Bonjour");
+
+ resp = port.greetMe("Willem");
+ assertEquals("We should get the right response", resp, "Hello Willem");
+
+ try {
+ resp = port.greetMe("Invoking greetMe with invalid length string, expecting exception...");
+ fail("We expect exception here");
+ } catch (WebServiceException ex) {
+ assertTrue("Get a wrong exception",
+ ex.getMessage().
+ indexOf("string length (67) is greater than maxLength facet (30)") >= 0);
+ }
+
+ try {
+ port.pingMe();
+ fail("We expect exception here");
+ } catch (PingMeFault ex) {
+ FaultDetailDocument detailDocument = ex.getFaultInfo();
+ FaultDetail detail = detailDocument.getFaultDetail();
+ assertEquals("Wrong faultDetail major", detail.getMajor(), 2);
+ assertEquals("Wrong faultDetail minor", detail.getMinor(), 1);
+ }
+ try {
+ port.greetMe("fault");
+ fail("Should have been a fault");
+ } catch (GreetMeFault ex) {
+ assertEquals("Some fault detail", ex.getFaultInfo().getGreetMeFaultDetail());
+ }
+
+ }
+ @Test
+ public void testXmlBeansHeader() throws Exception {
+ //CXF-2955
+ SpringBusFactory factory = new SpringBusFactory();
+ Bus bus = factory.createBus("org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml");
+ BusFactory.setDefaultBus(bus);
+ URL wsdl = this.getClass().getResource("/wsdl_systest_databinding/xmlbeans/hello_world.wsdl");
+ assertNotNull("We should have found the WSDL here. " , wsdl);
+
+ SOAPService ss = new SOAPService(wsdl, SERVICE_NAME);
+ QName soapPort = new QName("http://apache.org/hello_world_soap_http/xmlbeans", "SoapPort");
+ ss.addPort(soapPort, SOAPBinding.SOAP11HTTP_BINDING, "http://localhost:"
+ + NOWSDL_PORT + "/SoapContext/SoapPort");
+ Greeter port = ss.getPort(soapPort, Greeter.class);
+
+ Client client = ClientProxy.getClient(port);
+
+ List<Header> headers = new ArrayList<Header>();
+ org.apache.helloWorldSoapHttp.xmlbeans.types.GreetMeDocument doc
+ = org.apache.helloWorldSoapHttp.xmlbeans.types.GreetMeDocument.Factory.newInstance();
+ doc.addNewGreetMe().setRequestType("doc format header");
+ Header head = new Header(new QName("", "doc"), doc,
+ client.getEndpoint().getService().getDataBinding());
+ headers.add(head);
+ org.apache.helloWorldSoapHttp.xmlbeans.types.GreetMeDocument.GreetMe gm
+ = org.apache.helloWorldSoapHttp.xmlbeans.types.GreetMeDocument.GreetMe.Factory.newInstance();
+ gm.setRequestType("non-doc format header");
+ head = new Header(new QName("http://somenamespace.com", "nondocheader"), gm,
+ client.getEndpoint().getService().getDataBinding());
+ headers.add(head);
+ ((BindingProvider)port).getRequestContext().put(Header.HEADER_LIST, headers);
+
+ String resp;
+ ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
+
+ StringWriter sw = new StringWriter();
+ PrintWriter pw = new PrintWriter(sw);
+ ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor(pw));
+ resp = port.sayHi();
+ assertEquals("We should get the right response", resp, "Bonjour");
+ assertTrue(sw.toString().contains("doc format header"));
+ assertTrue(sw.toString().contains("non-doc format header"));
+ assertTrue(sw.toString().contains("nondocheader"));
+
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/GreeterImpl.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,80 @@
+/**
+ * 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.systest.xmlbeans;
+
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.helloWorldSoapHttp.xmlbeans.types.FaultDetailDocument;
+import org.apache.helloWorldSoapHttp.xmlbeans.types.FaultDetailDocument.FaultDetail;
+import org.apache.hello_world_soap_http.xmlbeans.GreetMeFault;
+import org.apache.hello_world_soap_http.xmlbeans.Greeter;
+import org.apache.hello_world_soap_http.xmlbeans.PingMeFault;
+
+(a)javax.jws.WebService(portName = "SoapPort", serviceName = "SOAPService",
+ targetNamespace = "http://apache.org/hello_world_soap_http/xmlbeans",
+ endpointInterface = "org.apache.hello_world_soap_http.xmlbeans.Greeter")
+public class GreeterImpl implements Greeter {
+
+ private static final Logger LOG = LogUtils.getL7dLogger(GreeterImpl.class);
+
+ /* (non-Javadoc)
+ * @see org.apache.hello_world_soap_http.Greeter#greetMe(java.lang.String)
+ */
+ public String greetMe(String me) throws GreetMeFault {
+ if ("fault".equals(me)) {
+ org.apache.helloWorldSoapHttp.xmlbeans.types.GreetMeFaultDetailDocument detail
+ = org.apache.helloWorldSoapHttp.xmlbeans.types.GreetMeFaultDetailDocument.Factory
+ .newInstance();
+ detail.setGreetMeFaultDetail("Some fault detail");
+ throw new GreetMeFault("Fault String", detail);
+ }
+ LOG.info("Executing operation greetMe");
+ return "Hello " + me;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.hello_world_soap_http.Greeter#greetMeOneWay(java.lang.String)
+ */
+ public void greetMeOneWay(String me) {
+ LOG.info("Executing operation greetMeOneWay");
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.hello_world_soap_http.Greeter#sayHi()
+ */
+ public String sayHi() {
+ LOG.info("Executing operation sayHi");
+ return "Bonjour";
+ }
+
+ public void pingMe() throws PingMeFault {
+ // here we need to put the FaultDetail into the FaultDetailDocument
+ FaultDetailDocument faultDocument =
+ org.apache.helloWorldSoapHttp.xmlbeans.types.FaultDetailDocument.Factory.newInstance();
+ FaultDetail faultDetail = faultDocument.addNewFaultDetail();
+ faultDetail.setMajor((short)2);
+ faultDetail.setMinor((short)1);
+ LOG.info("Executing operation pingMe, throwing PingMeFault exception");
+ throw new PingMeFault("PingMeFault raised by server", faultDocument);
+ }
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/PutLastTradePriceImpl.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,62 @@
+/**
+ * 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.systest.xmlbeans;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.xmlbeans.docLitBare.types.StringRespTypeDocument;
+import org.apache.cxf.xmlbeans.doc_lit_bare.PutLastTradedPricePortType;
+
+/**
+ *
+ */
+@WebService(targetNamespace = "http://cxf.apache.org/xmlbeans/doc_lit_bare",
+ portName = "SoapPort", serviceName = "SOAPService",
+ endpointInterface = "org.apache.cxf.xmlbeans.doc_lit_bare.PutLastTradedPricePortType"
+)
+public class PutLastTradePriceImpl implements PutLastTradedPricePortType {
+
+ public StringRespTypeDocument bareNoParam() {
+ StringRespTypeDocument st = StringRespTypeDocument.Factory.newInstance();
+ st.setStringRespType("Get the request!");
+ return st;
+ }
+
+ public org.apache.cxf.xmlbeans.docLitBare.types.OutStringDocument nillableParameter(
+ org.apache.cxf.xmlbeans.docLitBare.types.InDecimalDocument theRequest) {
+ org.apache.cxf.xmlbeans.docLitBare.types.OutStringDocument st
+ = org.apache.cxf.xmlbeans.docLitBare.types.OutStringDocument.Factory.newInstance();
+ st.setOutString("Get the request " + theRequest.getInDecimal().toString());
+ return st;
+ }
+
+ public void sayHi(javax.xml.ws.Holder<org.apache.cxf.xmlbeans.docLitBare.types.InoutDocument> body) {
+ body.value.getInout().setTickerSymbol("BAK");
+ }
+
+
+ public void putLastTradedPrice(org.apache.cxf.xmlbeans.docLitBare.types.InDocument body) {
+ /*System.out.println("Get the last trade price "
+ + body.getIn().getTickerPrice() + ", " + body.getIn().getTickerSymbol());*/
+
+ }
+
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/Server.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,58 @@
+/**
+ * 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.systest.xmlbeans;
+
+import javax.xml.ws.Endpoint;
+
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.TestUtil;
+
+public class Server extends AbstractBusTestServerBase {
+ static final String PORT = TestUtil.getPortNumber(Server.class);
+
+ protected void run() {
+ // set the configuration file
+ SpringBusFactory factory = new SpringBusFactory();
+ Bus bus = factory.createBus("org/apache/cxf/systest/xmlbeans/cxf.xml");
+ BusFactory.setDefaultBus(bus);
+ setBus(bus);
+ Endpoint.publish("http://localhost:" + PORT + "/SoapContext/SoapPort",
+ new GreeterImpl());
+
+ Endpoint.publish("http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPort",
+ new PutLastTradePriceImpl());
+ }
+
+ public static void main(String args[]) {
+ try {
+ Server s = new Server();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/ServerNoWsdl.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,59 @@
+/**
+ * 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.systest.xmlbeans;
+
+import javax.xml.ws.Endpoint;
+
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.TestUtil;
+
+public class ServerNoWsdl extends AbstractBusTestServerBase {
+ static final String PORT = TestUtil.getPortNumber(ServerNoWsdl.class);
+
+ protected void run() {
+ // set the configuration file
+ SpringBusFactory factory = new SpringBusFactory();
+ Bus bus = factory.createBus("org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml");
+ BusFactory.setDefaultBus(bus);
+ setBus(bus);
+ Object implementor = new GreeterImpl();
+ String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+ Endpoint.publish(address, implementor);
+
+ implementor = new PutLastTradePriceImpl();
+ Endpoint.publish("http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPort", implementor);
+ }
+
+ public static void main(String args[]) {
+ try {
+ ServerNoWsdl s = new ServerNoWsdl();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+
+ <jaxws:client name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
+ createdFromAPI="true">
+ <!-- jaxws:properties>
+ <entry key="schema-validation-enabled" value="true" />
+ </jaxws:properties-->
+ </jaxws:client>
+
+ <jaxws:endpoint name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
+ wsdlLocation="classpath:wsdl_systest_databinding/xmlbeans/hello_world.wsdl"
+ createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="schema-validation-enabled" value="true" />
+ </jaxws:properties>
+ </jaxws:endpoint>
+
+
+ <jaxws:endpoint name="{http://cxf.apache.org/xmlbeans/doc_lit_bare}SoapPort"
+ wsdlLocation="classpath:wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl"
+ createdFromAPI="true"/>
+</beans>
+
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <!-- comment this bean to disable schema validation in the client -->
+
+ <jaxws:client name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
+ createdFromAPI="true">
+ <!-- jaxws:properties>
+ <entry key="schema-validation-enabled" value="true" />
+ </jaxws:properties-->
+ </jaxws:client>
+
+ <jaxws:endpoint name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
+ createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="schema-validation-enabled" value="true" />
+ </jaxws:properties>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint name="{http://cxf.apache.org/xmlbeans/doc_lit_bare}SoapPort"
+ wsdlLocation="wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl"
+ createdFromAPI="true"/>
+</beans>
+
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/aegisJaxWsBeans.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/aegisJaxWsBeans.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/aegisJaxWsBeans.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:simple="http://cxf.apache.org/simple"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
+http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/simple
+http://cxf.apache.org/schemas/simple.xsd
+http://cxf.apache.org/jaxws
+http://cxf.apache.org/schemas/jaxws.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+ <import
+ resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <bean id="aegisBean"
+ class="org.apache.cxf.aegis.databinding.AegisDatabinding"
+ scope="prototype" />
+
+ <bean id="jaxws-and-aegis-service-factory"
+ class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
+ scope="prototype">
+ <property name="dataBinding" ref="aegisBean" />
+ </bean>
+
+ <bean id="impl" class="org.apache.cxf.systest.aegis.AegisJaxWsImpl" />
+
+ <jaxws:endpoint id="aegisRPCImpl" implementor="#impl"
+ address="http://localhost:${testutil.ports.AegisJaxWsTest}/aegisJaxWs">
+ <jaxws:serviceFactory>
+ <ref bean='jaxws-and-aegis-service-factory' />
+ </jaxws:serviceFactory>
+ <jaxws:inInterceptors>
+ <bean
+ class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
+
+ <bean id="myPasswordCallback"
+ class="org.apache.cxf.systest.aegis.ServerPasswordCallback"/>
+
+ <jaxws:endpoint id="aegisRPCImplUN" implementor="#impl"
+ address="http://localhost:${testutil.ports.AegisJaxWsTest}/aegisJaxWsUN">
+ <jaxws:serviceFactory>
+ <ref bean='jaxws-and-aegis-service-factory' />
+ </jaxws:serviceFactory>
+
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken"/>
+ <entry key="passwordType" value="PasswordText"/>
+ <entry key="passwordCallbackRef">
+ <ref bean="myPasswordCallback"/>
+ </entry>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+
+ <jaxws:properties>
+ <entry key="mtom-enabled" value="true" />
+ </jaxws:properties>
+ </jaxws:endpoint>
+</beans>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/aegisSportsServiceBeans.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/aegisSportsServiceBeans.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/aegisSportsServiceBeans.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:simple="http://cxf.apache.org/simple"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
+http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/simple
+http://cxf.apache.org/schemas/simple.xsd
+http://cxf.apache.org/jaxws
+http://cxf.apache.org/schemas/jaxws.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <bean id="sportsImpl"
+ class="org.apache.cxf.systest.aegis.SportsServiceImpl" />
+
+ <simple:server id="sports-server" address="http://localhost:${testutil.ports.CharacterSchemaTest}/sports"
+ serviceClass="org.apache.cxf.systest.aegis.SportsService">
+ <simple:dataBinding>
+ <bean
+ class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
+ </simple:dataBinding>
+ <simple:serviceBean>
+ <ref bean="sportsImpl" />
+ </simple:serviceBean>
+ </simple:server>
+</beans>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/extrajaxbclass.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/extrajaxbclass.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/extrajaxbclass.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd">
+
+
+
+ <!-- CXF -->
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <!-- Services -->
+ <jaxws:server id="testServer" serviceClass="org.apache.cxf.systest.jaxb.service.TestService"
+ address="http://localhost:${testutil.ports.TestServiceTest}/service/TestService">
+
+ <jaxws:properties>
+ <entry key="jaxb.additionalContextClasses">
+ <bean class="org.apache.cxf.systest.jaxb.util.ClassArrayFactoryBean">
+ <property name="classNames">
+ <list>
+ <value>org.apache.cxf.systest.jaxb.model.ExtendedWidget</value>
+ </list>
+ </property>
+ </bean>
+ </entry>
+ </jaxws:properties>
+
+ <jaxws:serviceBean>
+ <bean class="org.apache.cxf.systest.jaxb.service.TestServiceImpl" autowire="byName" />
+ </jaxws:serviceBean>
+
+ </jaxws:server>
+
+ <!-- Endpoint -->
+ <jaxws:endpoint id="testEndpoint"
+ implementor="org.apache.cxf.systest.jaxb.service.TestServiceImpl"
+ address="http://localhost:${testutil.ports.TestServiceTest}/service/TestEndpoint">
+
+ <jaxws:properties>
+ <entry key="jaxb.additionalContextClasses">
+ <bean class="org.apache.cxf.systest.jaxb.util.ClassArrayFactoryBean">
+ <property name="classNames">
+ <list>
+ <value>org.apache.cxf.systest.jaxb.model.ExtendedWidget</value>
+ </list>
+ </property>
+ </bean>
+ </entry>
+ </jaxws:properties>
+ </jaxws:endpoint>
+
+
+ <!-- Client Proxy -->
+ <jaxws:client id="testClient" address="http://localhost:${testutil.ports.TestServiceTest}/service/TestService" serviceClass="org.apache.cxf.systest.jaxb.service.TestService">
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
+ </jaxws:inInterceptors>
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
+ </jaxws:outInterceptors>
+ <jaxws:properties>
+ <entry key="jaxb.additionalContextClasses">
+ <bean class="org.apache.cxf.systest.jaxb.util.ClassArrayFactoryBean">
+ <property name="classNames">
+ <list>
+ <value>org.apache.cxf.systest.jaxb.model.ExtendedWidget</value>
+ </list>
+ </property>
+ </bean>
+ </entry>
+ </jaxws:properties>
+ </jaxws:client>
+
+
+</beans>
+
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/mtomTestBeans.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/mtomTestBeans.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/mtomTestBeans.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:simple="http://cxf.apache.org/simple"
+ xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://cxf.apache.org/core"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
+http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/simple
+http://cxf.apache.org/schemas/simple.xsd
+http://cxf.apache.org/jaxws
+http://cxf.apache.org/schemas/jaxws.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
+
+ <bean
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
+
+ <bean id="mtomImpl" class="org.apache.cxf.systest.aegis.mtom.fortest.MtomTestImpl" />
+
+ <bean id="aegisBean"
+ class="org.apache.cxf.aegis.databinding.AegisDatabinding"
+ scope="prototype" />
+
+ <bean id="jaxws-and-aegis-service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
+ scope="prototype">
+ <property name="dataBinding" ref="aegisBean" />
+ </bean>
+
+
+ <jaxws:endpoint id="mtom-jaxws-service" implementor="#mtomImpl"
+ address="http://localhost:${testutil.ports.MtomTest}/jaxWsMtom">
+ <jaxws:serviceFactory>
+ <ref bean='jaxws-and-aegis-service-factory' />
+ </jaxws:serviceFactory>
+ </jaxws:endpoint>
+
+
+ <simple:server id="mtom-server"
+ address="http://localhost:${testutil.ports.MtomTest}/mtom"
+ serviceClass="org.apache.cxf.systest.aegis.mtom.fortest.MtomTestService">
+ <simple:dataBinding>
+ <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
+ </simple:dataBinding>
+ <simple:serviceBean>
+ <ref bean="mtomImpl" />
+ </simple:serviceBean>
+ <simple:serviceFactory>
+ <bean class='org.apache.cxf.service.factory.ReflectionServiceFactoryBean'>
+ <property name="properties">
+ <map>
+ <entry key="mtom-enabled">
+ <value>true</value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+ </simple:serviceFactory>
+ </simple:server>
+
+ <simple:server id="mtom-xmime-server"
+ address="http://localhost:${testutil.ports.MtomTest}/mtomXmime"
+ serviceClass="org.apache.cxf.systest.aegis.mtom.fortest.MtomTestService">
+ <simple:dataBinding>
+ <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding">
+ <property name="mtomEnabled" value="true" />
+ <property name="mtomUseXmime" value="true" />
+ </bean>
+ </simple:dataBinding>
+ <simple:serviceBean>
+ <ref bean="mtomImpl" />
+ </simple:serviceBean>
+ <simple:serviceFactory>
+ <bean class='org.apache.cxf.service.factory.ReflectionServiceFactoryBean'>
+ <property name="properties">
+ <map>
+ <entry key="mtom-enabled">
+ <value>true</value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+ </simple:serviceFactory>
+ </simple:server>
+
+</beans>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!--beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:simple="http://cxf.apache.org/simple"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd"-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:simple="http://cxf.apache.org/simple"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
+http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/simple
+http://cxf.apache.org/schemas/simple.xsd
+http://cxf.apache.org/jaxws
+http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+ <simple:server address="/service"
+ serviceClass="org.apache.cxf.authservice.AuthService">
+ <simple:dataBinding>
+ <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
+ </simple:dataBinding>
+ <simple:serviceBean>
+ <bean class="org.apache.cxf.authservice.AuthServiceImpl" />
+ </simple:serviceBean>
+ </simple:server>
+
+ <simple:server address="/serviceWithCustomNS"
+ serviceClass="org.apache.cxf.authservice.AuthService">
+ <simple:dataBinding>
+ <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
+ </simple:dataBinding>
+ <simple:serviceBean>
+ <bean class="org.apache.cxf.authservice.AuthServiceImpl" />
+ </simple:serviceBean>
+ <simple:serviceFactory>
+ <bean class="org.apache.cxf.service.factory.ReflectionServiceFactoryBean">
+ <property name="serviceConfigurations">
+ <list>
+ <bean class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration">
+ <property name="serviceNamespace" value="http://foo.bar.com"/>
+ </bean>
+ <bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </simple:serviceFactory>
+ </simple:server>
+
+
+ <jaxws:server address="/jaxwsAndAegis"
+ serviceClass="org.apache.cxf.authservice.AuthService">
+ <jaxws:dataBinding>
+ <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
+ </jaxws:dataBinding>
+ <jaxws:serviceBean>
+ <bean class="org.apache.cxf.authservice.AuthServiceImpl" />
+ </jaxws:serviceBean>
+ </jaxws:server>
+
+ <jaxws:server address="/jaxwsAndJaxb"
+ serviceClass="org.apache.cxf.authservice.AuthService">
+ <jaxws:serviceBean>
+ <bean class="org.apache.cxf.authservice.AuthServiceImpl" />
+ </jaxws:serviceBean>
+ </jaxws:server>
+
+ <jaxws:server address="/jaxwsAndAegisSports"
+ serviceClass="org.apache.cxf.systest.aegis.SportsService">
+ <jaxws:dataBinding>
+ <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" />
+ </jaxws:dataBinding>
+ <jaxws:serviceBean>
+ <bean class="org.apache.cxf.systest.aegis.SportsServiceImpl" />
+ </jaxws:serviceBean>
+ </jaxws:server>
+</beans>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/web.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/web.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/webapp/WEB-INF/web.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!--
+ 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.
+-->
+<!-- START SNIPPET: webxml -->
+<web-app>
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>WEB-INF/beans.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>CXFServlet</servlet-name>
+ <display-name>CXF Servlet</display-name>
+ <servlet-class>
+ org.apache.cxf.transport.servlet.CXFServlet
+ </servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>CXFServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+<!-- END SNIPPET: webxml -->
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/doc_lit_bare.wsdl 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://cxf.apache.org/xmlbeans/doc_lit_bare"
+ xmlns:x1="http://cxf.apache.org/xmlbeans/doc_lit_bare/types"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://cxf.apache.org/xmlbeans/doc_lit_bare" name="DocLitBare">
+ <wsdl:types>
+ <schema targetNamespace="http://cxf.apache.org/xmlbeans/doc_lit_bare/types"
+ xmlns:tns="http://cxf.apache.org/xmlbeans/doc_lit_bare/types"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+ <complexType name="TradePriceData">
+ <sequence>
+ <element name="tickerSymbol" type="xsd:string"/>
+ <element name="tickerPrice" type="xsd:float"/>
+ </sequence>
+ </complexType>
+ <element name="in" type="tns:TradePriceData"/>
+ <element name="inout" type="tns:TradePriceData"/>
+ <element name="stringRespType" type="xsd:string"/>
+ <element name="inDecimal" nillable="true" type="xsd:decimal" />
+ <element name="outString" nillable="true" type="xsd:string" />
+ </schema>
+ </wsdl:types>
+ <message name="PutLastTradedPriceInput">
+ <part name="body" element="x1:in"/>
+ </message>
+ <message name="PutLastTradedPriceOutput"/>
+ <message name="SayHiInput">
+ <part name="body" element="x1:inout"/>
+ </message>
+ <message name="SayHiOutput">
+ <part name="body" element="x1:inout"/>
+ </message>
+ <message name="bareNoParamRequest"/>
+ <message name="bareNoParamResponse">
+ <part element="x1:stringRespType" name="theResponse"/>
+ </message>
+ <message name="nillableRequest">
+ <part name="theRequest" element="x1:inDecimal" />
+ </message>
+ <message name="nillableResponse">
+ <part name="theResponse" element="x1:outString" />
+ </message>
+ <portType name="PutLastTradedPricePortType">
+ <operation name="SayHi">
+ <input message="tns:SayHiInput"/>
+ <output message="tns:SayHiOutput"/>
+ </operation>
+ <operation name="PutLastTradedPrice">
+ <input message="tns:PutLastTradedPriceInput"/>
+ <output message="tns:PutLastTradedPriceOutput"/>
+ </operation>
+ <operation name="bareNoParam">
+ <input message="tns:bareNoParamRequest"/>
+ <output message="tns:bareNoParamResponse"/>
+ </operation>
+ <operation name="nillableParameter">
+ <input message="tns:nillableRequest" />
+ <output message="tns:nillableResponse" />
+ </operation>
+ </portType>
+ <binding name="PutLastTradedPriceSoapBinding" type="tns:PutLastTradedPricePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="SayHi">
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="PutLastTradedPrice">
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="bareNoParam">
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="nillableParameter">
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <wsdl:service name="SOAPService">
+ <wsdl:port name="SoapPort" binding="tns:PutLastTradedPriceSoapBinding">
+ <soap:address location="http://localhost:9107/SOAPDocLitBareService/SoapPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/hello_world.wsdl
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/hello_world.wsdl (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/databinding/src/test/resources/wsdl_systest_databinding/xmlbeans/hello_world.wsdl 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http/xmlbeans"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://apache.org/hello_world_soap_http/xmlbeans"
+ xmlns:x1="http://apache.org/hello_world_soap_http/xmlbeans/types"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <schema targetNamespace="http://apache.org/hello_world_soap_http/xmlbeans/types"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://apache.org/hello_world_soap_http/xmlbeans/types"
+ elementFormDefault="qualified">
+ <simpleType name="MyStringType">
+ <restriction base="string">
+ <maxLength value="30" />
+ </restriction>
+ </simpleType>
+
+ <element name="sayHi">
+ <complexType/>
+ </element>
+ <element name="sayHiResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMe">
+ <complexType>
+ <sequence>
+ <element name="requestType" type="tns:MyStringType"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeOneWay">
+ <complexType>
+ <sequence>
+ <element name="requestType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="pingMe">
+ <complexType/>
+ </element>
+ <element name="pingMeResponse">
+ <complexType/>
+ </element>
+ <element name="faultDetail">
+ <complexType>
+ <sequence>
+ <element name="minor" type="short"/>
+ <element name="major" type="short"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeFaultDetail" type="string"/>
+ </schema>
+ </wsdl:types>
+ <wsdl:message name="sayHiRequest">
+ <wsdl:part element="x1:sayHi" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="sayHiResponse">
+ <wsdl:part element="x1:sayHiResponse" name="out"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeRequest">
+ <wsdl:part element="x1:greetMe" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeResponse">
+ <wsdl:part element="x1:greetMeResponse" name="out"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeOneWayRequest">
+ <wsdl:part element="x1:greetMeOneWay" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeRequest">
+ <wsdl:part name="in" element="x1:pingMe"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeResponse">
+ <wsdl:part name="out" element="x1:pingMeResponse"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeFault">
+ <wsdl:part name="faultDetail" element="x1:faultDetail"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeFault">
+ <wsdl:part name="greetMeFault" element="x1:greetMeFaultDetail"/>
+ </wsdl:message>
+
+
+ <wsdl:portType name="Greeter">
+ <wsdl:operation name="sayHi">
+ <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+ <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+ </wsdl:operation>
+
+
+ <wsdl:operation name="greetMe">
+ <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+ <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+ <wsdl:fault name="greetMeFault" message="tns:greetMeFault"/>
+ </wsdl:operation>
+
+
+ <wsdl:operation name="greetMeOneWay">
+ <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="pingMe">
+ <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+ <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+ <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+
+ <wsdl:operation name="sayHi">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="sayHiRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sayHiResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+
+ <wsdl:operation name="greetMe">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="greetMeResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="greetMeFault">
+ <soap:fault name="greetMeFault" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+
+ <wsdl:operation name="greetMeOneWay">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeOneWayRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+
+ <wsdl:operation name="pingMe">
+ <soap:operation style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="pingMeFault">
+ <soap:fault name="pingMeFault" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+
+ </wsdl:binding>
+ <wsdl:service name="SOAPService">
+ <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+ <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
+
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/pom.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -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.
+-->
+<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.systests.wsdl_maven</groupId>
+ <artifactId>cxf-systests-codegen</artifactId>
+ <version>2.3.1</version>
+ <name>Test for reading wsdl from repo and generating code from it</name>
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <!-- Codegen with default settings.
+ This test shows some of the defaults that work without configuration.
+ In this case the wsdl dependency to the service "cxf-systests-java2ws"
+ will be processed.
+ As we have a file named defaultBinding.xml in the classpath
+ this binding will be applied.
+ The binding file contains an empty wsdlLocation. This means that
+ the binding will be applied to the wsdl currently processed. -->
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>wsdl2java</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf.systests.wsdl_maven</groupId>
+ <artifactId>cxf-systests-java2ws</artifactId>
+ <version>${project.version}</version>
+ <type>wsdl</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf.systests.wsdl_maven</groupId>
+ <artifactId>cxf-systests-java2ws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/src/main/resources/defaultBinding.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/src/main/resources/defaultBinding.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/codegen/src/main/resources/defaultBinding.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,16 @@
+<jaxws:bindings wsdlLocation=""
+ xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema">
+ <jxb:globalBindings>
+ <jxb:javaType name="java.util.Date" xmlType="xs:dateTime"
+ parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
+ printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
+ <jxb:javaType name="java.util.Date" xmlType="xs:date"
+ parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
+ printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"/>
+ </jxb:globalBindings>
+ </jaxws:bindings>
+</jaxws:bindings>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/pom.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,77 @@
+<!--
+ 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.systests.wsdl_maven</groupId>
+ <artifactId>cxf-systests-java2ws</artifactId>
+ <version>2.3.1</version>
+ <name>Test for writing wsdl to repo</name>
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-java2ws-plugin</artifactId>
+ <version>${project.version}</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-simple</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>process-classes</id>
+ <phase>process-classes</phase>
+ <configuration>
+ <className>org.apache.cxf.systests.java2ws.HelloWorld</className>
+ <genWsdl>true</genWsdl>
+ <verbose>true</verbose>
+ <attachWsdl>true</attachWsdl>
+ <fork>true</fork>
+ </configuration>
+ <goals>
+ <goal>java2ws</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/apache/cxf/systests/java2ws/HelloWorld.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/apache/cxf/systests/java2ws/HelloWorld.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/java/org/apache/cxf/systests/java2ws/HelloWorld.java 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,34 @@
+/**
+ * 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.systests.java2ws;
+
+import java.util.Date;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.WSDLDocumentation;
+
+@WebService
+@WSDLDocumentation(value = "A simple service with only one method")
+public interface HelloWorld {
+ @WSDLDocumentation(value = "Simply return the given text")
+ String sayHi(@WebParam(name = "text") String text, @WebParam(name = "date") Date date);
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/META-INF/MANIFEST.MF (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/META-INF/MANIFEST.MF 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/beans.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/beans.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+ <jaxws:endpoint
+ id="helloWorld"
+ implementor="net.lr.java2wstest.HelloWorldImpl"
+ address="/HelloWorld" />
+
+</beans>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/web.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/java2ws/src/main/webapp/WEB-INF/web.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+
+<web-app>
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>WEB-INF/beans.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>CXFServlet</servlet-name>
+ <display-name>CXF Servlet</display-name>
+ <servlet-class>
+ org.apache.cxf.transport.servlet.CXFServlet
+ </servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>CXFServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/wsdl_maven/pom.xml 2011-08-12 11:42:19 UTC (rev 14809)
@@ -0,0 +1,40 @@
+<!--
+ 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.systests</groupId>
+ <artifactId>cxf-wsdl-maven</artifactId>
+ <packaging>pom</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF System Tests for WSDL generation and retrieval</name>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests</artifactId>
+ <version>2.3.1</version>
+ </parent>
+
+ <modules>
+ <module>codegen</module>
+ <module>java2ws</module>
+ </modules>
+
+
+</project>
13 years, 4 months
JBossWS SVN: r14808 - in thirdparty/cxf/branches/cxf-2.3.1: systests and 20 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-08-12 07:39:56 -0400 (Fri, 12 Aug 2011)
New Revision: 14808
Added:
thirdparty/cxf/branches/cxf-2.3.1/systests/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/main/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/main/resources/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/DHRequest.java
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/DHResponse.java
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointAPITest.java
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointBean.java
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointInterface.java
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/resources/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/jetty6/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/jetty6/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/HelloWorld.java
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/HelloWorldImpl.java
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/beans.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/web.xml
thirdparty/cxf/branches/cxf-2.3.1/systests/pom.xml
Log:
importing CXF 2.3.1 tag - (per partes) because of unreliable SVN RH repo :(
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/pom.xml 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-container-integration</artifactId>
+ <version>2.3.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-ci-grizzly</artifactId>
+ <name>Apache CXF Container Integration Test Grizzly</name>
+ <version>2.3.1-SNAPSHOT</version>
+
+ <repositories>
+ <repository>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven 2</name>
+ <url>http://download.java.net/maven/2/</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-testutils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jaxws_2.2_spec</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.grizzly</groupId>
+ <artifactId>grizzly-http</artifactId>
+ <version>1.9.18</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jvnet.jax-ws-commons</groupId>
+ <artifactId>jaxws-grizzly-httpspi</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>${cxf.servlet-api.group}</groupId>
+ <artifactId>${cxf.servlet-api.artifact}</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-endorsed-dir</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jaxws_2.2_spec</artifactId>
+ <outputDirectory>${basedir}/target/endorsed</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Djava.endorsed.dirs=${basedir}/target/endorsed</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArguments>
+ <endorseddirs>${basedir}/target/endorsed</endorseddirs>
+ </compilerArguments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/DHRequest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/DHRequest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/DHRequest.java 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,46 @@
+/**
+ * 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.systest.grizzly;
+
+import javax.activation.DataHandler;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name = "dataRequest", namespace = "http://org.apache.cxf/jaxws/endpoint/")
+public class DHRequest {
+
+ private DataHandler dataHandler;
+
+ public DHRequest() {
+ }
+
+ public DHRequest(DataHandler dataHandler) {
+ this.dataHandler = dataHandler;
+ }
+
+ @XmlMimeType("text/plain")
+ public DataHandler getDataHandler() {
+ return dataHandler;
+ }
+
+ public void setDataHandler(DataHandler dataHandler) {
+ this.dataHandler = dataHandler;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/DHResponse.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/DHResponse.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/DHResponse.java 2011-08-12 11:39:56 UTC (rev 14808)
@@ -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.systest.grizzly;
+
+import javax.activation.DataHandler;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name = "dataResponse", namespace = "http://org.apache.cxf/jaxws/endpoint/")
+public class DHResponse {
+
+ private DataHandler dataHandler;
+
+ public DHResponse() {
+ }
+
+ public DHResponse(DataHandler dataHandler) {
+ this.dataHandler = dataHandler;
+ }
+
+ @XmlMimeType("text/plain")
+ public DataHandler getDataHandler() {
+ return dataHandler;
+ }
+
+ public void setDataHandler(DataHandler dataHandler) {
+ this.dataHandler = dataHandler;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointAPITest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointAPITest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointAPITest.java 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,202 @@
+/**
+ * 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.systest.grizzly;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+
+import javax.activation.DataHandler;
+import javax.activation.DataSource;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.MTOMFeature;
+import javax.xml.ws.spi.http.HttpContext;
+
+import org.apache.cxf.testutil.common.TestUtil;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.jvnet.jax_ws_commons.transport.grizzly_httpspi.GrizzlyHttpContextFactory;
+
+public class EndpointAPITest extends Assert {
+
+ private static int counter;
+ private static int currentPort;
+ private com.sun.grizzly.http.embed.GrizzlyWebServer server;
+
+ @Before
+ public void setUp() {
+ currentPort = Integer.valueOf(TestUtil.getPortNumber(EndpointAPITest.class, counter++));
+ server = new com.sun.grizzly.http.embed.GrizzlyWebServer(currentPort);
+ }
+
+ @After
+ public void tearDown() {
+ server.stop();
+ server = null;
+ }
+
+ @Test
+ public void testSingleEndpoint() throws Exception {
+
+ String contextPath = "/ctxt";
+ String path = "/echo";
+ String address = "http://localhost:" + currentPort + contextPath + path;
+
+ HttpContext context = GrizzlyHttpContextFactory.createHttpContext(server, contextPath, path);
+
+ Endpoint endpoint = Endpoint.create(new EndpointBean());
+ endpoint.publish(context); // Use grizzly HTTP context for publishing
+
+ server.start();
+
+ invokeEndpoint(address);
+
+ endpoint.stop();
+ }
+
+ @Test
+ public void testMultiplePublishSameAddress() throws Exception {
+ server.start();
+ String contextPath = "/ctxt";
+ String path = "/echo";
+ //need to use the same HttpContext, otherwise Grizzly get confused
+ HttpContext ctx = GrizzlyHttpContextFactory.createHttpContext(server, contextPath, path);
+ for (int i = 0; i < 3; i++) {
+ String address = "http://localhost:" + currentPort + contextPath + path;
+
+ Endpoint endpoint = Endpoint.create(new EndpointBean());
+ endpoint.publish(ctx); // Use grizzly HTTP context for publishing
+
+ invokeEndpoint(address);
+
+ endpoint.stop();
+ }
+ }
+
+ @Test
+ public void testMultipleEndpointsSameContext() throws Exception {
+ server.start();
+ String contextPath = "/ctxt";
+ String path = "/echo";
+ int k = 3;
+ Endpoint[] endpoints = new Endpoint[k];
+ HttpContext[] contexts = new HttpContext[k];
+ String[] addresses = new String[k];
+ for (int i = 0; i < k; i++) {
+ addresses[i] = "http://localhost:" + currentPort + contextPath + path + i;
+ contexts[i] = GrizzlyHttpContextFactory.createHttpContext(server,
+ contextPath,
+ path + i);
+ endpoints[i] = Endpoint.create(new EndpointBean());
+ endpoints[i].publish(contexts[i]);
+ }
+ for (int i = 0; i < k; i++) {
+ invokeEndpoint(addresses[i]);
+ }
+ for (int i = 0; i < k; i++) {
+ endpoints[i].stop();
+ }
+ }
+
+ @Test
+ public void testMultipleEndpointsDifferentContexts() throws Exception {
+ server.start();
+ String contextPath = "/ctxt";
+ String path = "/echo";
+ int k = 3;
+ Endpoint[] endpoints = new Endpoint[k];
+ HttpContext[] contexts = new HttpContext[k];
+ String[] addresses = new String[k];
+ for (int i = 0; i < k; i++) {
+ addresses[i] = "http://localhost:" + currentPort + contextPath + i + path;
+ contexts[i] = GrizzlyHttpContextFactory.createHttpContext(server,
+ contextPath + i,
+ path);
+ endpoints[i] = Endpoint.create(new EndpointBean());
+ endpoints[i].publish(contexts[i]);
+ }
+ for (int i = 0; i < k; i++) {
+ invokeEndpoint(addresses[i]);
+ }
+ for (int i = 0; i < k; i++) {
+ endpoints[i].stop();
+ }
+ }
+
+ private void invokeEndpoint(String publishURL) throws Exception {
+ URL wsdlURL = new URL(publishURL + "?wsdl");
+ QName qname = new QName("http://org.apache.cxf/jaxws/endpoint/", "EndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ checkBasicInvocations(service);
+ checkMTOMInvocation(service);
+ }
+
+ private static void checkBasicInvocations(Service service) {
+ EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class);
+ String helloWorld = "Hello world!";
+ assertEquals(0, port.getCount());
+ Object retObj = port.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ assertEquals(1, port.getCount());
+ port.echo(helloWorld);
+ assertEquals(2, port.getCount());
+ try {
+ port.getException();
+ fail("Exception expected!");
+ } catch (Exception e) {
+ assertEquals("Ooops", e.getMessage());
+ }
+ }
+
+ private static void checkMTOMInvocation(Service service) throws IOException {
+ DataSource ds = new DataSource() {
+ public String getContentType() {
+ return "text/plain";
+ }
+
+ public InputStream getInputStream() throws IOException {
+ return new ByteArrayInputStream("some string".getBytes());
+ }
+
+ public String getName() {
+ return "none";
+ }
+
+ public OutputStream getOutputStream() throws IOException {
+ return null;
+ }
+ };
+ EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class,
+ new MTOMFeature(true));
+ DataHandler dh = new DataHandler(ds);
+ DHResponse response = port.echoDataHandler(new DHRequest(dh));
+ assertNotNull(response);
+ Object content = response.getDataHandler().getContent();
+ assertEquals("Server data", content);
+ String contentType = response.getDataHandler().getContentType();
+ assertEquals("text/plain", contentType);
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointBean.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointBean.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointBean.java 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,89 @@
+/**
+ * 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.systest.grizzly;
+
+import java.io.IOException;
+
+import javax.activation.DataHandler;
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.soap.MTOM;
+
+@WebService(serviceName = "EndpointService",
+ endpointInterface = "org.apache.cxf.systest.grizzly.EndpointInterface",
+ targetNamespace = "http://org.apache.cxf/jaxws/endpoint/")
+@MTOM
+public class EndpointBean implements EndpointInterface {
+
+ private int count;
+ private boolean initialized;
+
+ public String echo(String input) {
+ count++;
+ return input;
+ }
+
+ @PostConstruct
+ public void init() {
+ this.initialized = true;
+ }
+
+ @PreDestroy
+ public void destroy() {
+ // nothing to do
+ }
+
+ public int getCount() {
+ this.ensureInit();
+ return count;
+ }
+
+ public void getException() {
+ this.ensureInit();
+ throw new WebServiceException("Ooops");
+ }
+
+ public DHResponse echoDataHandler(DHRequest request) {
+ this.ensureInit();
+ DataHandler dataHandler = request.getDataHandler();
+
+ try {
+ if (!dataHandler.getContentType().equals("text/plain")) {
+ throw new WebServiceException("Wrong content type");
+ }
+ if (!dataHandler.getContent().equals("some string")) {
+ throw new WebServiceException("Wrong data");
+ }
+ } catch (IOException e) {
+ throw new WebServiceException(e);
+ }
+
+ DataHandler responseData = new DataHandler("Server data", "text/plain");
+ return new DHResponse(responseData);
+ }
+
+ private void ensureInit() {
+ if (!this.initialized) {
+ throw new IllegalStateException();
+ }
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointInterface.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointInterface.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointInterface.java 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,36 @@
+/**
+ * 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.systest.grizzly;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(targetNamespace = "http://org.apache.cxf/jaxws/endpoint/")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface EndpointInterface {
+
+ String echo(String input);
+
+ int getCount();
+
+ void getException();
+
+ DHResponse echoDataHandler(DHRequest request);
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/jetty6/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/jetty6/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/jetty6/pom.xml 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-container-integration</artifactId>
+ <version>2.3.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-ci-jetty6</artifactId>
+ <name>Apache CXF Container Integration Test Jetty6</name>
+ <version>2.3.1-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- disable surefire, all tests are failsafe -->
+ <excludes>
+ <exclude>**/**</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-war</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-ci-webapp</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <destFileName>hello.war</destFileName>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/wars</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.24</version>
+ <configuration>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <stopPort>8005</stopPort>
+ <stopKey>STOP</stopKey>
+ <contextPath>/</contextPath>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start-jetty</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run-war</goal>
+ </goals>
+ <configuration>
+ <webApp>${project.build.directory}/hello.war</webApp>
+ <scanIntervalSeconds>0</scanIntervalSeconds>
+ <daemon>true</daemon>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop-jetty</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/pom.xml 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+ 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">
+ <parent>
+ <artifactId>cxf-parent</artifactId>
+ <groupId>org.apache.cxf</groupId>
+ <version>2.3.1</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-container-integration</artifactId>
+ <name>Apache CXF Container Integration System Tests</name>
+ <version>2.3.1</version>
+ <packaging>pom</packaging>
+ <url>http://cxf.apache.org</url>
+ <modules>
+ <module>webapp</module>
+ </modules>
+
+ <profiles>
+ <profile>
+ <id>jaxws22</id>
+ <modules>
+ <module>grizzly</module>
+ </modules>
+ </profile>
+ </profiles>
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/pom.xml 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-container-integration</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-ci-webapp</artifactId>
+ <name>Apache CXF Container Integration Test Webapp</name>
+ <version>2.3.1</version>
+ <packaging>war</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/HelloWorld.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/HelloWorld.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/HelloWorld.java 2011-08-12 11:39:56 UTC (rev 14808)
@@ -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.
+ */
+// START SNIPPET: service
+package demo.spring;
+
+import javax.jws.WebService;
+
+@WebService
+public interface HelloWorld {
+ String sayHi(String text);
+}
+// END SNIPPET: service
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/HelloWorldImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/HelloWorldImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/java/demo/spring/HelloWorldImpl.java 2011-08-12 11:39:56 UTC (rev 14808)
@@ -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.
+ */
+// START SNIPPET: service
+package demo.spring;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface = "demo.spring.HelloWorld")
+public class HelloWorldImpl implements HelloWorld {
+
+ public String sayHi(String text) {
+ System.out.println("sayHi called");
+ return "Hello " + text;
+ }
+}
+// END SNIPPET: service
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/beans.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/beans.xml 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!-- START SNIPPET: beans -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+ <jaxws:endpoint
+ id="helloWorld"
+ implementor="demo.spring.HelloWorldImpl"
+ address="/HelloWorld" />
+
+</beans>
+<!-- END SNIPPET: beans -->
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/container-integration/webapp/src/main/webapp/WEB-INF/web.xml 2011-08-12 11:39:56 UTC (rev 14808)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!--
+ 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.
+-->
+<!-- START SNIPPET: webxml -->
+<web-app>
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>WEB-INF/beans.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>CXFServlet</servlet-name>
+ <display-name>CXF Servlet</display-name>
+ <servlet-class>
+ org.apache.cxf.transport.servlet.CXFServlet
+ </servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>CXFServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+<!-- END SNIPPET: webxml -->
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/systests/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/systests/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/systests/pom.xml 2011-08-12 11:39:56 UTC (rev 14808)
@@ -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.
+-->
+<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.systests</groupId>
+ <artifactId>cxf-systests</artifactId>
+ <packaging>pom</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF System Tests</name>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf</artifactId>
+ <version>2.3.1</version>
+ </parent>
+
+ <modules>
+ <module>container-integration</module>
+ <module>uncategorized</module>
+ <module>transports</module>
+ <module>jaxws</module>
+ <module>databinding</module>
+ <module>jaxrs</module>
+ <module>ws-specs</module>
+ <module>wsdl_maven</module>
+ </modules>
+
+</project>
13 years, 4 months
JBossWS SVN: r14803 - in thirdparty/cxf/branches/cxf-2.3.1: etc and 57 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-08-12 06:15:42 -0400 (Fri, 12 Aug 2011)
New Revision: 14803
Added:
thirdparty/cxf/branches/cxf-2.3.1/etc/
thirdparty/cxf/branches/cxf-2.3.1/etc/apache-header.txt
thirdparty/cxf/branches/cxf-2.3.1/etc/cxf.rdf
thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/
thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXF.importorder
thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXFCleanUp.xml
thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXFCodeFormatter.xml
thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/addcheckstyle.xsl
thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/codetemplates.xml
thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/template.checkstyle-config.xml
thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/xmltemplates.xml
thirdparty/cxf/branches/cxf-2.3.1/etc/idea/
thirdparty/cxf/branches/cxf-2.3.1/etc/idea/README.txt
thirdparty/cxf/branches/cxf-2.3.1/etc/idea/settings.jar
thirdparty/cxf/branches/cxf-2.3.1/etc/rat.unknowns.txt
thirdparty/cxf/branches/cxf-2.3.1/etc/survey/
thirdparty/cxf/branches/cxf-2.3.1/etc/survey/README
thirdparty/cxf/branches/cxf-2.3.1/etc/survey/SurveySummary.pdf
thirdparty/cxf/branches/cxf-2.3.1/etc/svn-auto-props
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/META-INF/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/META-INF/maven/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/META-INF/maven/archetype.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlArtifact.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/test/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/test/java/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/test/java/org/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/test/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/test/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/test/resources/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/IDLToWSDLPlugin.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/IdltowsdlOption.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WsdltoidlOption.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/pom.xml
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/org/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/
thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java
thirdparty/cxf/branches/cxf-2.3.1/parent/
thirdparty/cxf/branches/cxf-2.3.1/parent/pom.xml
Log:
importing CXF 2.3.1 tag - (per partes) because of unreliable SVN RH repo :(
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/apache-header.txt
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/apache-header.txt (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/apache-header.txt 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,19 @@
+/**
+ * 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.
+ */
+
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/cxf.rdf
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/cxf.rdf (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/cxf.rdf 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rdf:RDF xml:lang="en"
+ xmlns="http://usefulinc.com/ns/doap#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:asfext="http://projects.apache.org/ns/asfext#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/">
+ <Project rdf:about="http://cxf.apache.org/">
+ <created>2009-04-04</created>
+ <license rdf:resource="http://usefulinc.com/doap/licenses/asl20" />
+ <name>Apache CXF</name>
+ <homepage rdf:resource="http://cxf.apache.org/" />
+ <asfext:pmc rdf:resource="http://cxf.apache.org/" />
+ <shortdesc>Apache CXF: An Open Source Service Framework</shortdesc>
+ <description>Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI.</description>
+ <bug-database rdf:resource="http://issues.apache.org/jira/browse/CXF" />
+ <mailing-list rdf:resource="http://cxf.apache.org/mailing-lists.html" />
+ <download-page rdf:resource="http://cxf.apache.org/download.html" />
+ <programming-language>Java</programming-language>
+ <category rdf:resource="http://projects.apache.org/category/library" />
+ <category rdf:resource="http://projects.apache.org/category/xml" />
+ <category rdf:resource="http://projects.apache.org/category/network-client" />
+ <category rdf:resource="http://projects.apache.org/category/network-server" />
+ <repository>
+ <SVNRepository>
+ <location rdf:resource="http://svn.apache.org/repos/asf/cxf"/>
+ <browse rdf:resource="http://svn.apache.org/viewvc/cxf/"/>
+ </SVNRepository>
+ </repository>
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Daniel Kulp</foaf:name>
+ <foaf:mbox rdf:resource="mailto:dkulp@apache.org"/>
+ </foaf:Person>
+ </maintainer>
+ <asfext:implements>
+ <asfext:Standard>
+ <asfext:title>Web Services Metadata</asfext:title>
+ <asfext:body>JCP</asfext:body>
+ <asfext:id>JSR 181</asfext:id>
+ <asfext:url rdf:resource="http://www.jcp.org/en/jsr/detail?id=181"/>
+ </asfext:Standard>
+ </asfext:implements>
+ <asfext:implements>
+ <asfext:Standard>
+ <asfext:title>JAX-WS</asfext:title>
+ <asfext:body>JCP</asfext:body>
+ <asfext:id>JSR 224</asfext:id>
+ <asfext:url rdf:resource="http://www.jcp.org/en/jsr/detail?id=224"/>
+ </asfext:Standard>
+ </asfext:implements>
+ <asfext:implements>
+ <asfext:Standard>
+ <asfext:title>JAX-RS</asfext:title>
+ <asfext:body>JCP</asfext:body>
+ <asfext:id>JSR 311</asfext:id>
+ <asfext:url rdf:resource="http://www.jcp.org/en/jsr/detail?id=311"/>
+ </asfext:Standard>
+ </asfext:implements>
+ </Project>
+
+</rdf:RDF>
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXF.importorder
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXF.importorder (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXF.importorder 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,27 @@
+#
+#
+# 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.
+#
+#
+#Organize Import Order
+#Thu Aug 11 12:37:29 EDT 2005
+4=junit
+3=org.xml
+2=org.w3c
+1=javax
+0=java
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXFCleanUp.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXFCleanUp.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXFCleanUp.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="2">
+<profile kind="CleanUpProfile" name="CXF" version="2">
+<setting id="cleanup.always_use_blocks" value="true"/>
+<setting id="cleanup.use_this_for_non_static_field_access_only_if_necessary" value="true"/>
+<setting id="cleanup.use_this_for_non_static_field_access" value="false"/>
+<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/>
+<setting id="cleanup.remove_unused_private_fields" value="true"/>
+<setting id="cleanup.remove_unnecessary_casts" value="true"/>
+<setting id="cleanup.sort_members_all" value="true"/>
+<setting id="cleanup.make_local_variable_final" value="true"/>
+<setting id="cleanup.never_use_parentheses_in_expressions" value="true"/>
+<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/>
+<setting id="cleanup.convert_to_enhanced_for_loop" value="true"/>
+<setting id="cleanup.remove_trailing_whitespaces" value="true"/>
+<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/>
+<setting id="cleanup.use_this_for_non_static_method_access_only_if_necessary" value="true"/>
+<setting id="cleanup.always_use_parentheses_in_expressions" value="false"/>
+<setting id="cleanup.remove_unused_private_types" value="true"/>
+<setting id="cleanup.format_source_code" value="true"/>
+<setting id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class" value="true"/>
+<setting id="cleanup.remove_unused_local_variables" value="true"/>
+<setting id="cleanup.add_missing_nls_tags" value="false"/>
+<setting id="cleanup.add_missing_override_annotations" value="false"/>
+<setting id="cleanup.add_missing_annotations" value="true"/>
+<setting id="cleanup.use_this_for_non_static_method_access" value="false"/>
+<setting id="cleanup.make_variable_declarations_final" value="false"/>
+<setting id="cleanup.remove_private_constructors" value="true"/>
+<setting id="cleanup.make_parameters_final" value="false"/>
+<setting id="cleanup.remove_trailing_whitespaces_all" value="true"/>
+<setting id="cleanup.add_generated_serial_version_id" value="false"/>
+<setting id="cleanup.add_missing_deprecated_annotations" value="true"/>
+<setting id="cleanup.organize_imports" value="true"/>
+<setting id="cleanup.qualify_static_member_accesses_with_declaring_class" value="true"/>
+<setting id="cleanup.remove_unnecessary_nls_tags" value="true"/>
+<setting id="cleanup.always_use_this_for_non_static_field_access" value="false"/>
+<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/>
+<setting id="cleanup.use_parentheses_in_expressions" value="true"/>
+<setting id="cleanup.never_use_blocks" value="false"/>
+<setting id="cleanup.sort_members" value="false"/>
+<setting id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class" value="true"/>
+<setting id="cleanup.use_blocks_only_for_return_and_throw" value="false"/>
+<setting id="cleanup.add_default_serial_version_id" value="true"/>
+<setting id="cleanup.add_serial_version_id" value="false"/>
+<setting id="cleanup.use_blocks" value="true"/>
+<setting id="cleanup.make_private_fields_final" value="true"/>
+<setting id="cleanup.remove_unused_imports" value="true"/>
+<setting id="cleanup.remove_unused_private_methods" value="true"/>
+<setting id="cleanup.remove_unused_private_members" value="false"/>
+</profile>
+</profiles>
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXFCodeFormatter.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXFCodeFormatter.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/CXFCodeFormatter.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="11">
+<profile kind="CodeFormatterProfile" name="CXF Java Conventions" version="11">
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="32"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="8"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="110"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="110"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+</profile>
+</profiles>
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/addcheckstyle.xsl
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/addcheckstyle.xsl (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/addcheckstyle.xsl 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:strip-space elements="*"/>
+
+ <xsl:param name="checkstyleconfig"/>
+ <xsl:param name="checkstyleconfigcorba"/>
+
+ <xsl:template match="*">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="checkstyle-configurations">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+
+ <xsl:choose>
+ <xsl:when test="not(check-configuration/@name='CXF CORBA Checks')">
+ <check-configuration name="CXF Checks" type="external" description="">
+ <xsl:attribute name="location"><xsl:value-of select="$checkstyleconfig"/></xsl:attribute>
+ </check-configuration>
+ <check-configuration name="CXF CORBA Checks" type="external" description="">
+ <xsl:attribute name="location"><xsl:value-of select="$checkstyleconfigcorba"/></xsl:attribute>
+ </check-configuration>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
+
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/codetemplates.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/codetemplates.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/codetemplates.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<templates><template autoinsert="true" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment">/** * @return Returns the ${bare_field_name}.
+ */</template><template autoinsert="true" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment">/**
+ * @param ${param} The ${bare_field_name} to set.
+ */</template><template autoinsert="true" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment">/**
+ * ${tags}
+ */</template><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/**
+ * 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.
+ */
+</template><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">/**
+ * ${tags}
+ */</template><template autoinsert="false" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment"></template><template autoinsert="true" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment">/**
+ * ${tags}
+ */</template><template autoinsert="true" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment">/** {@inheritDoc}*/</template><template autoinsert="true" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment">/**
+ * ${tags}
+ * ${see_to_target}
+ */</template><template autoinsert="true" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">${filecomment}
+${package_declaration}
+
+${typecomment}
+${type_declaration}</template><template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">
+</template><template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">
+</template><template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">
+</template><template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">
+</template><template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block
+${exception_var}.printStackTrace();</template><template autoinsert="true" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">// ${todo} Auto-generated method stub
+${body_statement}</template><template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement}
+// ${todo} Auto-generated constructor stub</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates>
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/template.checkstyle-config.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/template.checkstyle-config.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/template.checkstyle-config.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<checkstyle-configurations file-format-version="5.0.0">
+ <check-configuration name="CXF Checks" location="@CHECKSTYLE_CONFIG_FILE@" type="external" description=""/>
+ <check-configuration name="CXF CORBA Checks" location="@CHECKSTYLE_CORBA_CONFIG_FILE@" type="external" description=""/>
+</checkstyle-configurations>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/xmltemplates.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/xmltemplates.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/eclipse/xmltemplates.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<templates><template autoinsert="true" context="xml_new" deleted="false" description="xml declaration" enabled="true" id="org.eclipse.wst.xml.ui.internal.templates.xmldeclaration" name="xml declaration"><?xml version="1.0" encoding="${encoding}"?>
+<!--
+ 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.
+--></template></templates>
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/idea/README.txt
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/idea/README.txt (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/idea/README.txt 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,22 @@
+
+To setup an IntelliJ project: (tested with version 5.1.2)
+
+1) From the trunk, run "mvn process-test-sources -Pnochecks idea:idea"
+
+2) From IntelliJ, open the project created above
+
+3) From IntelliJ, select "File -> Import Settings". Navigate to this folder
+ and sellect the settings.jar file. Let it import everything. Restart.
+
+4) From IntelliJ, select "File -> Settings", select "Project Code Style",
+ "Use per-project code style","Import", and select the "CXFStyle" option.
+
+Optional:
+5) If you have the "JetStyle" plugin installed, select "File -> Settings",
+ "Checkstyle", "Select Checkstyle Configuration", navigate to trunk/checkstyle.xml.
+
+
+
+
+
+
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/idea/settings.jar
===================================================================
(Binary files differ)
Property changes on: thirdparty/cxf/branches/cxf-2.3.1/etc/idea/settings.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/rat.unknowns.txt
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/rat.unknowns.txt (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/rat.unknowns.txt 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,320 @@
+
+W3C Schemas:
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/addressing.xsd
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/http.xsd
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/mime-binding.xsd
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/soap-binding.xsd
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/soap-encoding.xsd
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/wsrm.xsd
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/xml.xsd
+ !????? ./common/schemas/src/main/resources/schemas/wsdl/XMLSchema.xsd
+ !????? ./rt/ws/rm/src/main/resources/schemas/configuration/wsrm-policy.xsd
+ !????? ./rt/ws/rm/src/main/resources/schemas/wsdl/wsrm.xsd
+ !????? ./rt/ws/security/src/main/resources/schemas/ws-security-policy.xsd
+ !????? ./rt/ws/policy/src/main/resources/schemas/datatypes.dtd
+ !????? ./rt/ws/policy/src/main/resources/schemas/ws-policy-200409.xsd
+ !????? ./rt/ws/policy/src/main/resources/schemas/xml.xsd
+ !????? ./rt/ws/policy/src/main/resources/schemas/xmldsig-core-schema.xsd
+ !????? ./rt/ws/policy/src/main/resources/schemas/XMLSchema.dtd
+
+Files without support for comments (and one liners with no creativity)
+ !????? ./common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
+ !????? ./common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
+ !????? ./tools/wsdlto/test/src/test/resources/META-INF/services/com.sun.tools.xjc.Plugin
+ !????? ./rt/bindings/http/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/bindings/jbi/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/bindings/object/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/bindings/soap/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/bindings/xml/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/management/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/transports/http-jetty/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/transports/http/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/transports/jbi/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/transports/jms/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/transports/local/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/ws/addr/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/ws/policy/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/ws/rm/src/main/resources/META-INF/cxf/cxf.extension
+ !????? ./rt/frontend/jaxws/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider
+ !????? ./rt/frontend/js/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider
+ !????? ./rt/core/src/main/resources/META-INF/services/org.apache.cxf.bus.factory
+
+Readme type files
+ !????? ./distribution/src/main/release/lib/WHICH_JARS
+
+License text files
+ !????? ./distribution/src/main/release/licenses/asm.txt
+ !????? ./distribution/src/main/release/licenses/bouncy-castle.txt
+ !????? ./distribution/src/main/release/licenses/bsd.txt
+ !????? ./distribution/src/main/release/licenses/cdd1-1.0.txt
+ !????? ./distribution/src/main/release/licenses/jaxen.txt
+ !????? ./distribution/src/main/release/licenses/jdom.txt
+ !????? ./distribution/src/main/release/licenses/MPL-1.1.txt
+ !????? ./distribution/src/main/release/licenses/ruby-mit.txt
+ !????? ./distribution/src/main/release/licenses/sl4j.txt
+ !????? ./distribution/src/main/release/licenses/w3c.html
+ !????? ./distribution/src/main/release/licenses/ws-policy.txt
+ !????? ./distribution/src/main/release/licenses/wsa.txt
+ !????? ./distribution/src/main/release/licenses/wsdl.txt
+ !????? ./distribution/src/main/release/licenses/wsdl4j.txt
+ !????? ./rt/databinding/aegis/src/main/resources/META-INF/NOTICE.jdom
+
+JDOM Licensed: (NOTICE included in jar as well as in distro)
+ !????? ./rt/databinding/aegis/src/main/generated/org/apache/cxf/aegis/util/jdom/StaxBuilder.java
+
+
+Generated:
+ !????? ./integration/jbi/src/test/resources/service-assemblies/cxf-demo-service-assembly/version_1/sus/CXFServiceEngine/JBIDemoSE_AProvider/META-INF/MANIFEST.MF
+
+
+"Binary" files (may be text files, but they are uses as sample "wire dumps" to
+test various things and/or as direct string compares of generated data. Some may be changed as
+part of the work around CXF-1000:
+ !????? ./common/common/src/test/java/org/apache/cxf/helpers/resources/test.xml
+ !????? ./tools/jdee/src/main/java/org/apache/cxf/maven_plugin/jdee/prj.vm
+ !????? ./tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/namespace2package.cfg
+ !????? ./tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/wsdltojavaexclude.cfg
+ !????? ./systests/src/test/java/org/apache/cxf/systest/http/resources/Truststore.pem
+ !????? ./systests/src/test/java/org/apache/cxf/systest/mtom/nonmtom.xml
+ !????? ./systests/src/test/java/org/apache/cxf/systest/mtom/request
+ !????? ./systests/src/test/java/org/apache/cxf/systest/mtom/request-url-attachment
+ !????? ./systests/src/test/java/org/apache/cxf/systest/provider/attachmentData
+ !????? ./systests/src/test/java/org/apache/cxf/systest/provider/resources/GreetMeRpcLiteralReqLogical.xml
+ !????? ./systests/src/test/java/org/apache/cxf/systest/provider/resources/XML_GreetMeDocLiteralResp.xml
+ !????? ./systests/src/test/java/org/apache/cxf/systest/rest/resources/add_book_json.txt
+ !????? ./systests/src/test/java/org/apache/cxf/systest/rest/resources/CustomerAllResp.xml
+ !????? ./systests/src/test/java/org/apache/cxf/systest/rest/resources/CustomerJohnReq.xml
+ !????? ./systests/src/test/java/org/apache/cxf/systest/rest/resources/CustomerJohnResp.xml
+ !????? ./systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_add_book_json.txt
+ !????? ./systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
+ !????? ./systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_json_book123.txt
+ !????? ./systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_json_books.txt
+ !????? ./systests/src/test/java/org/apache/cxf/systest/swa/resources/attach.jpeg1
+ !????? ./systests/src/test/java/org/apache/cxf/systest/swa/resources/attach.jpeg2
+ !????? ./systests/src/test/resources/attachmentBinaryData
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/DBServiceFaultBean.java.source
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/FaultDetail.java.source
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_wrapperclass.wsdl
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_rpclist_no_sei.wsdl
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/rpc_greeter.wsdl
+ !????? ./tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_rpc.wsdl
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/DBServiceFaultBean.java.source
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/expected/FaultDetail.java.source
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_wrapperclass.wsdl
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_rpclist_no_sei.wsdl
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/rpc_greeter.wsdl
+ !????? ./tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_rpc.wsdl
+ !????? ./rt/core/src/test/java/org/apache/cxf/attachment/axis2_mimedata
+ !????? ./rt/core/src/test/java/org/apache/cxf/attachment/mimedata
+ !????? ./rt/core/src/test/java/org/apache/cxf/attachment/swadata
+ !????? ./rt/core/src/test/java/org/apache/cxf/attachment/swareq
+ !????? ./rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/reference/referring.wsdl
+ !????? ./rt/ws/policy/src/test/resources/normalized/test10.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test11.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test12.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test13.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test14.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test15.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test16.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test17.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test18.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test19.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test2.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test20.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test21.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test22.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test23.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test24.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test25.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test3.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test4.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test5.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test6.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test7.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test8.xml
+ !????? ./rt/ws/policy/src/test/resources/normalized/test9.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test10.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test11.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test12.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test13.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test14.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test15.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test16.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test17.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test18.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test19.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test2.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test20.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test21.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test22.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test23.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test24.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test25.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test26.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test27.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test28.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test3.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test4.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test5.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test6.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test7.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test8.xml
+ !????? ./rt/ws/policy/src/test/resources/samples/test9.xml
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/ca.crl
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/cacert.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/caprivkey.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/cherry-ra-cert.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/cherry.chain
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/csrcherry.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/csrra.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/csrwibble.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/demoCA/index.txt
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/demoCA/index.txt.old
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/demoCA/newcerts/1345.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/demoCA/newcerts/1346.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/demoCA/newcerts/1347.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/demoCA/serial
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/demoCA/serial.old
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/exts
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/ra-ca-cert.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/raprivkey.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/wibble-ra-cert.pem
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/certs/wibble.chain
+ !????? ./distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/resources/abigcompany_ca.pem
+ !????? ./rt/transports/http/src/test/java/org/apache/cxf/transport/https/resources/abigcompany_ca.pem
+ !????? ./rt/ws/security/src/test/java/META-INF/cxf/key.rsa
+ !????? ./rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/signed.xml
+ !????? ./rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/signed_invalid.xml
+ !????? ./rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/wsse-request-clean.xml
+ !????? ./rt/bindings/http/src/test/java/org/apache/cxf/binding/http/mtom/addPerson
+ !????? ./rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/resources/emptyReq.xml
+ !????? ./rt/frontend/simple/src/test/java/org/apache/cxf/frontend/soap/soap11.xml
+ !????? ./rt/frontend/simple/src/test/java/org/apache/cxf/frontend/soap/soap12.xml
+ !????? ./rt/frontend/simple/src/test/java/org/apache/cxf/service/stax/req.xml
+ !????? ./rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/echoFoo.xsd
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Echo.aegis.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/GetEmployee.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ReceiveEmployee.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/bean11.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/DuplicateArrayReturnItem.aegis.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/BadBeanDescriptor.aegis.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/EchoData.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/GetData.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/MyInterface.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/basic/MyInterface2.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedBean3.aegis.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest$CollectionService.aegis.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/GetDTO.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/DualOutService.aegis.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/echo11.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/Inner.aegis.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/Outer.aegis.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/missing/package.html
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/xml/stax/bean11.xml
+ !????? ./rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/xml/stax/read1.xml
+ !????? ./distribution/src/main/release/samples/restful_http_binding/add.json
+ !????? ./distribution/src/main/release/samples/restful_http_binding/add.xml
+ !????? ./distribution/src/main/release/samples/restful_http_binding/index.html
+ !????? ./distribution/src/main/release/samples/restful_http_binding/update.xml
+
+MTOSI stuff: (see NOTICE file)
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/DiscoveryServiceSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/EquipmentInventoryMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/FaultServiceSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/InventoryRetrievalSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/ManagedElementMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/MultiLayerSubnetworkMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/NotificationServiceSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/OperationsSystemMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/ProtectionMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_http/TransmissionDescriptorMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/DiscoveryServiceSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/EquipmentInventoryMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/FaultServiceSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/InventoryRetrievalSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/ManagedElementMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/MultiLayerSubnetworkMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/NotificationServiceSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/OperationsSystemMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/ProtectionMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/binding/soap_jms/TransmissionDescriptorMgrSOAP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/ConfigurationService.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/DiscoveryService.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/EquipmentInventoryMgr.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/Exceptions.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/FaultService.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/InventoryRetrieval.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/ManagedElementMgr.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/MultiLayerSubnetworkMgr.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/NotificationService.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/OperationsSystemMgr.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/ProtectionMgr.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/common/TransmissionDescriptorMgr.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/async_binding.xml
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/DiscoveryServiceSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/EquipmentInventoryMgrSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/FaultServiceSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/InventoryRetrievalSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/ManagedElementMgrSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/MultiLayerSubnetworkMgrSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/NotificationServiceSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/OperationsSystemMgrSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/ProtectionMgrSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/http/TransmissionDescriptorMgrSOAP_HTTP.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/DiscoveryServiceSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/EquipmentInventoryMgrSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/FaultServiceSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/InventoryRetrievalSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/ManagedElementMgrSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/MultiLayerSubnetworkMgrSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/NotificationServiceSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/OperationsSystemMgrSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/ProtectionMgrSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/wsdl/transport/jms/TransmissionDescriptorMgrSOAP_JMS.wsdl
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/common/Definitions.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/common/Header.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/common/HeaderVendorExtensions.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/AlarmRetrieval.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/Common.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/Discovery.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/EquipmentInventoryMgr.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/Exceptions.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/InventoryRetrieval.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/ManagedElementMgr.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/MultiLayerSubnetworkMgr.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/NotificationService.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/OperationsSystemMgr.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/ProtectionMgr.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/TransmissionDescriptorMgr.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/interfaces/VendorExtensions.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/Equipment.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/GlobalDefinitions.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/Inventory.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/LayerRates.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/ManagedElement.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/ManagementDomain.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/MultiLayerSubnetwork.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/Notifications.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/OperationsSystem.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/PGPParameters.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/ProbableCauses.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/Protection.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/SubnetworkConnection.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/TerminationPoint.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/TopologicalLink.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/TransmissionDescriptor.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/TransmissionParameters.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/VendorExtensions.xsd
+ !????? ./distribution/src/main/release/samples/mtosi_1.1/xsd/networkResources/VendorObject.xsd
+
+
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/survey/README
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/survey/README (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/survey/README 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,7 @@
+This is the summary results of the USER Survey that the CXF community
+conducted in September 2010.
+
+If you are interested in seeing the raw data, please contact Daniel
+Kulp (dkulp at apache.org)
+
+
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/survey/SurveySummary.pdf
===================================================================
(Binary files differ)
Property changes on: thirdparty/cxf/branches/cxf-2.3.1/etc/survey/SurveySummary.pdf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: thirdparty/cxf/branches/cxf-2.3.1/etc/svn-auto-props
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/etc/svn-auto-props (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/etc/svn-auto-props 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,83 @@
+#
+#
+# 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.
+#
+#
+### Section for configuring miscelleneous Subversion options.
+[miscellany]
+### Set enable-auto-props to 'yes' to enable automatic properties
+### for 'svn add' and 'svn import', it defaults to 'no'.
+### Automatic properties are defined in the section 'auto-props'.
+enable-auto-props = yes
+
+### Section for configuring automatic properties.
+### The format of the entries is:
+### file-name-pattern = propname[=value][;propname[=value]...]
+### The file-name-pattern can contain wildcards (such as '*' and
+### '?'). All entries which match will be applied to the file.
+### Note that auto-props functionality must be enabled, which
+### is typically done by setting the 'enable-auto-props' option.
+[auto-props]
+*.java = svn:eol-style=native;svn:keywords=Rev Date
+*.xml = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.xsl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.xsd = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.xjb = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.wsdl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.properties = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=Rev Date
+.checkstyle = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+.pmd = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+.ruleset = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.c = svn:eol-style=native;svn:keywords=Rev Date
+*.cpp = svn:eol-style=native;svn:keywords=Rev Date
+*.h = svn:eol-style=native;svn:keywords=Rev Date
+*.dsp = svn:eol-style=CRLF
+*.dsw = svn:eol-style=CRLF
+*.sh = svn:eol-style=native;svn:executable
+*.bat = svn:eol-style=native
+*.pl = svn:eol-style=native
+*.py = svn:eol-style=native
+*.cmd = svn:eol-style=native
+*.txt = svn:eol-style=native;svn:mime-type=text/plain
+*.cat = svn:eol-style=native;svn:mime-type=text/plain
+*.htm* = svn:eol-style=native;svn:mime-type=text/html;svn:keywords=Rev Date
+ChangeLog = svn:eol-style=native;svn:mime-type=text/plain
+README* = svn:eol-style=native;svn:mime-type=text/plain
+LICENSE* = svn:eol-style=native;svn:mime-type=text/plain
+NOTICE* = svn:eol-style=native;svn:mime-type=text/plain
+TODO* = svn:eol-style=native;svn:mime-type=text/plain
+KEYS* = svn:eol-style=native;svn:mime-type=text/plain
+INSTALL* = svn:eol-style=native;svn:mime-type=text/plain
+WHATSNEW* = svn:eol-style=native;svn:mime-type=text/plain
+NEWS* = svn:eol-style=native;svn:mime-type=text/plain
+COPYING = svn:eol-style=native;svn:mime-type=text/plain
+*.png = svn:mime-type=image/png
+*.jpg = svn:mime-type=image/jpeg
+*.gif = svn:mime-type=image/gif
+Makefile = svn:eol-style=native
+*.css = svn:eol-style=native
+*.js = svn:eol-style=native
+*.jsx = svn:eol-style=native
+#Tuscany/SCA work should also have:
+*.wsdd = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.scdl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.componentType = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
+*.fragment = svn:eol-style=native
+sca.subsystem = svn:eol-style=native;svn:mime-type=text/xml
+
+
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ 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">
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf.archetype</groupId>
+ <artifactId>cxf-jaxws-javafirst</artifactId>
+ <name>Apache CXF Archetype - Simple JAX-WS Java First</name>
+ <version>2.3.1</version>
+ <url>http://cxf.apache.org</url>
+ <properties>
+ <maven.test.skip>true</maven.test.skip>
+ <eclipse.skip>true</eclipse.skip>
+ </properties>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
+</project>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/META-INF/maven/archetype.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/META-INF/maven/archetype.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/META-INF/maven/archetype.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,29 @@
+<!--
+ 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.
+-->
+<archetype>
+ <id>cxf-spring-basic</id>
+ <sources>
+ <source>src/main/java/HelloWorldImpl.java</source>
+ <source>src/main/java/HelloWorld.java</source>
+ </sources>
+ <resources>
+ <resource>src/main/webapp/WEB-INF/beans.xml</resource>
+ <resource>src/main/webapp/WEB-INF/web.xml</resource>
+ </resources>
+</archetype>
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,64 @@
+## 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>$groupId</groupId>
+ <artifactId>$artifactId</artifactId>
+ <version>$version</version>
+ <packaging>war</packaging>
+ <name>Simple CXF project using spring configuration</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
+ <wtpmanifest>true</wtpmanifest>
+ <wtpapplicationxml>true</wtpapplicationxml>
+ <wtpversion>2.0</wtpversion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorld.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,25 @@
+## 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 ${packageName};
+
+import javax.jws.WebService;
+
+@WebService
+public interface HelloWorld {
+ String sayHi(String text);
+}
+
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,29 @@
+## 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 ${packageName};
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface = "${packageName}.HelloWorld")
+public class HelloWorldImpl implements HelloWorld {
+
+ public String sayHi(String text) {
+ return "Hello " + text;
+ }
+}
+
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,35 @@
+## 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.
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+ <jaxws:endpoint
+ id="helloWorld"
+ implementor="${packageName}.HelloWorldImpl"
+ address="/HelloWorld" />
+
+</beans>
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/cxf-jaxws-javafirst/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,49 @@
+## 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.
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+
+<web-app>
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>WEB-INF/beans.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>CXFServlet</servlet-name>
+ <display-name>CXF Servlet</display-name>
+ <servlet-class>
+ org.apache.cxf.transport.servlet.CXFServlet
+ </servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>CXFServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/archetypes/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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-archetypes</artifactId>
+ <packaging>pom</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF Maven Archetypes</name>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+
+ <modules>
+ <module>cxf-jaxws-javafirst</module>
+ </modules>
+</project>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+<!--
+ 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-codegen-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF Code Generation Maven2 Plugins</name>
+ <url>http://cxf.apache.org</url>
+
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-artifact-resolver</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-wsdlto-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-wsdlto-databinding-jaxb</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ </dependency>
+ </dependencies>
+
+
+ <profiles>
+ <profile>
+ <id>ibmjdk</id>
+ <activation>
+ <property>
+ <name>java.vendor</name>
+ <value>IBM Corporation</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.8.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,122 @@
+/**
+ * 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.maven_plugin;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Manages switching to the classloader needed for creating the java sources and restoring the old classloader
+ * when finished
+ */
+public class ClassLoaderSwitcher {
+
+ private Log log;
+ private String origClassPath;
+ private Map<Object, Object> origProps;
+ private ClassLoader origContextClassloader;
+
+ public ClassLoaderSwitcher(Log log) {
+ this.log = log;
+ }
+
+ /**
+ * Create and set the classloader that is needed for creating the java sources from wsdl
+ *
+ * @param project
+ * @param useCompileClasspath
+ * @param classesDir
+ */
+ public void switchClassLoader(MavenProject project, boolean useCompileClasspath, File classesDir) {
+ List<URL> urlList = new ArrayList<URL>();
+ StringBuilder buf = new StringBuilder();
+
+ try {
+ urlList.add(classesDir.toURI().toURL());
+ if (!useCompileClasspath) {
+ urlList.add(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
+ }
+ } catch (MalformedURLException e) {
+ // ignore
+ }
+
+ buf.append(classesDir.getAbsolutePath());
+ buf.append(File.pathSeparatorChar);
+ if (!useCompileClasspath) {
+ buf.append(project.getBuild().getOutputDirectory());
+ buf.append(File.pathSeparatorChar);
+ }
+ List<?> artifacts = useCompileClasspath ? project.getCompileArtifacts() : project.getTestArtifacts();
+ for (Artifact a : CastUtils.cast(artifacts, Artifact.class)) {
+ try {
+ if (a.getFile() != null && a.getFile().exists()) {
+ urlList.add(a.getFile().toURI().toURL());
+ buf.append(a.getFile().getAbsolutePath());
+ buf.append(File.pathSeparatorChar);
+ // System.out.println(" " +
+ // a.getFile().getAbsolutePath());
+ }
+ } catch (MalformedURLException e) {
+ // ignore
+ }
+ }
+
+ origContextClassloader = Thread.currentThread().getContextClassLoader();
+ URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[urlList.size()]),
+ origContextClassloader);
+ String newCp = buf.toString();
+
+ log.debug("Classpath: " + urlList.toString());
+
+ origProps = new HashMap<Object, Object>(System.getProperties());
+
+ origClassPath = System.getProperty("java.class.path");
+
+ Thread.currentThread().setContextClassLoader(loader);
+ System.setProperty("java.class.path", newCp);
+ }
+
+ /**
+ * Restore the old classloader
+ */
+ public void restoreClassLoader() {
+ Thread.currentThread().setContextClassLoader(origContextClassloader);
+ System.setProperty("java.class.path", origClassPath);
+
+ Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
+ for (Object o : newProps.keySet()) {
+ if (!origProps.containsKey(o)) {
+ System.clearProperty(o.toString());
+ }
+ }
+ System.getProperties().putAll(origProps);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,444 @@
+/**
+ * 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.maven_plugin;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class Option {
+ static final String DEFAULT_BINDING_FILE_PATH = "src" + File.separator + "main"
+ + File.separator + "resources" + File.separator + "defaultBinding.xml";
+
+ /**
+ * As maven will set null for an empty parameter we need
+ * this horrid inital value to tell if it has been
+ * configured or not yet.
+ */
+ private static final String DEFAULT_WSDL_LOCATION = "DEFAULTWSDLLOCATION - WORKAROUND";
+
+ /**
+ *
+ */
+ protected List<String> packagenames = new ArrayList<String>();
+
+ /**
+ * Extra arguments to pass to the command-line code generator. For compatibility as well as to
+ * specify any extra flags not addressed by other parameters
+ */
+ protected List<String> extraargs = new ArrayList<String>();
+
+ /**
+ * Extra arguments to pass to the XJC compiler command-line code generator.
+ * For compatibility as well as to specify any extra flags not addressed by other parameters
+ */
+ protected List<String> xjcargs = new ArrayList<String>();
+
+ /**
+ * Directory where generated java classes will be created. Defaults to plugin 'sourceRoot' parameter
+ */
+ protected File outputDir;
+
+ /**
+ * Ignore the specified WSDL schema namespace when generating code.
+ * Also, optionally specifies the Java package name used by types described in the excluded
+ * namespace(s) using schema-namespace[=java-packagename]
+ */
+ List<String> namespaceExcludes = new ArrayList<String>();
+
+ /**
+ * Enables or disables the loading of the default excludes namespace mapping. Default is true.
+ */
+ Boolean defaultExcludesNamespace;
+
+ /**
+ * Enables or disables the loading of the default namespace package name mapping. Default is true and
+ * <a href=""http://www.w3.org/2005/08/addressing">
+ * http://www.w3.org/2005/08/addressing=org.apache.cxf.ws.addressingnamespace</a>
+ * package mapping will be enabled.
+ */
+ Boolean defaultNamespacePackageMapping;
+
+ /**
+ * A set of dependent files used to detect the generator must process WSDL, even
+ * if generator marker files are up to date.
+ */
+ File dependencies[];
+
+ /**
+ * Redundant directories to be deleted after code generation
+ */
+ File redundantDirs[];
+
+ /**
+ * Specifies JAXWS or JAXB binding files. Use spaces to separate multiple entries.
+ */
+ String bindingFiles[] = new String[0];
+
+ /**
+ * Specifies the value of the @WebServiceClient annotation's wsdlLocation property.
+ */
+ String wsdlLocation = DEFAULT_WSDL_LOCATION;
+
+ /**
+ * Specifies that the wsdlurl contains a plain text, new line delimited,
+ * list of wsdlurls instead of the wsdl itself.
+ */
+ Boolean wsdlList;
+
+ /**
+ * Specifies the frontend. Default is JAXWS. Currently supports only JAXWS frontend.
+ */
+ String frontEnd;
+
+ /**
+ * Specifies the databinding. Default is JAXB. Currently supports only JAXB databinding.
+ */
+ String dataBinding;
+
+ /**
+ * Specifies the wsdl version .Default is WSDL1.1. Currently suppports only WSDL1.1 version.
+ */
+ String wsdlVersion;
+
+ /**
+ * Specify catalog file to map the imported wsdl/schema
+ */
+ String catalog;
+
+ /**
+ * Enables or disables processing of implicit SOAP headers (i.e. SOAP headers defined in the
+ * wsdl:binding but not wsdl:portType section.) Default is false.
+ */
+ Boolean extendedSoapHeaders;
+
+ /**
+ * Enables validating the WSDL before generating the code.
+ */
+ Boolean validateWsdl;
+
+ /**
+ * Enables generation of fault Exception's SUID based on hash of classname.
+ */
+ Boolean useFQCNForFaultSerialVersionUID;
+
+ /**
+ * The WSDL service name to use for the generated code
+ */
+ String serviceName;
+
+ /**
+ * Automatically resolve naming conflicts without requiring the use of binding customizations
+ */
+ Boolean autoNameResolution;
+
+ /**
+ * Disable generation of service address binding in the generated Java classes
+ */
+ Boolean noAddressBinding;
+
+ /**
+ * Allow element references when determining if an operation can be unwrapped or not
+ */
+ Boolean allowElementRefs;
+
+
+ public Option() {
+ super();
+ }
+
+ public List<String> getExtraargs() {
+ return extraargs;
+ }
+
+ public void setExtraargs(List<String> ea) {
+ this.extraargs.clear();
+ this.extraargs.addAll(ea);
+ }
+
+ public List<String> getXJCargs() {
+ return xjcargs;
+ }
+
+ public void setXJCargs(List<String> ea) {
+ this.xjcargs.clear();
+ this.xjcargs.addAll(ea);
+ }
+
+ public List<String> getPackagenames() {
+ return packagenames;
+ }
+
+ public void setPackagenames(List<String> pn) {
+ this.packagenames = pn;
+ }
+
+ public List<String> getNamespaceExcludes() {
+ return namespaceExcludes;
+ }
+
+ public void setNamespaceExcludes(List<String> namespaceExcludes) {
+ this.namespaceExcludes = namespaceExcludes;
+ }
+ public void setDependencies(File files[]) {
+ dependencies = files;
+ }
+
+ public File[] getDependencies() {
+ return dependencies;
+ }
+
+ public void setDeleteDirs(File files[]) {
+ redundantDirs = files;
+ }
+
+ public File[] getDeleteDirs() {
+ return redundantDirs;
+ }
+
+ public File getOutputDir() {
+ return outputDir;
+ }
+
+ public void setOutputDir(File f) {
+ outputDir = f;
+ }
+
+ public void setBindingFiles(String files[]) {
+ bindingFiles = files;
+ }
+ public String[] getBindingFiles() {
+ return bindingFiles;
+ }
+ public void addBindingFile(File file) {
+ String tmp[] = new String[bindingFiles.length + 1];
+ System.arraycopy(bindingFiles, 0, tmp, 0, bindingFiles.length);
+ bindingFiles = tmp;
+ bindingFiles[bindingFiles.length - 1] = file.getAbsolutePath();
+ }
+
+ public void addDefaultBindingFileIfExists(File baseDir) {
+ File defaultBindingFile = new File(baseDir, DEFAULT_BINDING_FILE_PATH);
+ if (defaultBindingFile.exists()) {
+ addBindingFile(defaultBindingFile);
+ }
+ }
+
+ public void setWsdlLocation(String s) {
+ wsdlLocation = s;
+ }
+
+ public String getWsdlLocation() {
+ return isSetWsdlLocation() ? wsdlLocation : null;
+ }
+
+ public boolean isSetWsdlLocation() {
+ return !DEFAULT_WSDL_LOCATION.equals(wsdlLocation);
+ }
+
+ public boolean isWsdlList() {
+ return wsdlList == null ? false : wsdlList;
+ }
+
+ public void setWsdlList(boolean wsdlList) {
+ this.wsdlList = wsdlList;
+ }
+
+ public String getFrontEnd() {
+ return frontEnd;
+ }
+
+ public void setFrontEnd(String frontEnd) {
+ this.frontEnd = frontEnd;
+ }
+
+ public String getDataBinding() {
+ return dataBinding;
+ }
+
+ public void setDataBinding(String dataBinding) {
+ this.dataBinding = dataBinding;
+ }
+
+ public String getWsdlVersion() {
+ return wsdlVersion;
+ }
+
+ public void setWsdlVersion(String wsdlVersion) {
+ this.wsdlVersion = wsdlVersion;
+ }
+
+ public String getCatalog() {
+ return catalog;
+ }
+
+ public void setCatalog(String catalog) {
+ this.catalog = catalog;
+ }
+
+ public boolean isExtendedSoapHeaders() {
+ return extendedSoapHeaders == null ? false : extendedSoapHeaders;
+ }
+
+ public void setExtendedSoapHeaders(boolean extendedSoapHeaders) {
+ this.extendedSoapHeaders = extendedSoapHeaders;
+ }
+
+ public boolean isValidateWsdl() {
+ return validateWsdl == null ? false : validateWsdl;
+ }
+
+ public void setValidateWsdl(boolean validateWsdl) {
+ this.validateWsdl = validateWsdl;
+ }
+
+ public boolean isUseFQCNForFaultSerialVersionUID() {
+ return useFQCNForFaultSerialVersionUID == null ? false : useFQCNForFaultSerialVersionUID;
+ }
+
+ public void setUseFQCNForFaultSerialVersionUID(boolean useFQCNForFaultSerialVersionUID) {
+ this.useFQCNForFaultSerialVersionUID = useFQCNForFaultSerialVersionUID;
+ }
+
+ public Boolean getDefaultExcludesNamespace() {
+ return defaultExcludesNamespace;
+ }
+
+ public void setDefaultExcludesNamespace(Boolean defaultExcludesNamespace) {
+ this.defaultExcludesNamespace = defaultExcludesNamespace;
+ }
+
+ public Boolean getDefaultNamespacePackageMapping() {
+ return defaultNamespacePackageMapping;
+ }
+
+ public void setDefaultNamespacePackageMapping(Boolean defaultNamespacePackageMapping) {
+ this.defaultNamespacePackageMapping = defaultNamespacePackageMapping;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public boolean isAutoNameResolution() {
+ return autoNameResolution == null ? false : autoNameResolution;
+ }
+
+ public void setAutoNameResolution(boolean autoNameResolution) {
+ this.autoNameResolution = autoNameResolution;
+ }
+
+ public boolean isNoAddressBinding() {
+ return noAddressBinding == null ? false : noAddressBinding;
+ }
+
+ public void setNoAddressBinding(boolean noAddressBinding) {
+ this.noAddressBinding = noAddressBinding;
+ }
+
+ public boolean isAllowElementRefs() {
+ return allowElementRefs == null ? false : allowElementRefs;
+ }
+
+ public void setAllowElementRefs(boolean allowElementRefs) {
+ this.allowElementRefs = allowElementRefs;
+ }
+
+ public void copyOptions(Option destination) {
+ destination.setAutoNameResolution(isAutoNameResolution());
+ destination.setBindingFiles(getBindingFiles());
+ destination.setCatalog(getCatalog());
+ destination.setDataBinding(getDataBinding());
+ destination.setDefaultExcludesNamespace(getDefaultExcludesNamespace());
+ destination.setDefaultNamespacePackageMapping(getDefaultNamespacePackageMapping());
+ destination.setDeleteDirs(getDeleteDirs());
+ destination.setDependencies(getDependencies());
+ destination.setExtendedSoapHeaders(isExtendedSoapHeaders());
+ destination.setExtraargs(getExtraargs());
+ destination.setXJCargs(getXJCargs());
+ destination.setFrontEnd(getFrontEnd());
+ destination.setNamespaceExcludes(namespaceExcludes);
+ destination.setNoAddressBinding(isNoAddressBinding());
+ destination.setOutputDir(getOutputDir());
+ destination.setPackagenames(getPackagenames());
+ destination.setServiceName(getServiceName());
+ destination.setValidateWsdl(isValidateWsdl());
+ destination.setUseFQCNForFaultSerialVersionUID(isUseFQCNForFaultSerialVersionUID());
+ destination.setAllowElementRefs(isAllowElementRefs());
+ if (isSetWsdlLocation()) {
+ destination.setWsdlLocation(getWsdlLocation());
+ }
+ destination.setWsdlVersion(getWsdlVersion());
+ }
+
+ private <T> T setIfNull(T dest, T source) {
+ if (dest == null) {
+ dest = source;
+ }
+ return dest;
+ }
+
+ public void merge(Option defaultOptions) {
+ wsdlList = setIfNull(wsdlList, defaultOptions.wsdlList);
+ extendedSoapHeaders = setIfNull(extendedSoapHeaders, defaultOptions.extendedSoapHeaders);
+ validateWsdl = setIfNull(validateWsdl, defaultOptions.validateWsdl);
+ useFQCNForFaultSerialVersionUID = setIfNull(useFQCNForFaultSerialVersionUID,
+ defaultOptions.useFQCNForFaultSerialVersionUID);
+ autoNameResolution = setIfNull(autoNameResolution, defaultOptions.autoNameResolution);
+ noAddressBinding = setIfNull(noAddressBinding, defaultOptions.noAddressBinding);
+ allowElementRefs = setIfNull(allowElementRefs, defaultOptions.allowElementRefs);
+ defaultExcludesNamespace = setIfNull(defaultExcludesNamespace,
+ defaultOptions.defaultExcludesNamespace);
+ defaultNamespacePackageMapping = setIfNull(defaultNamespacePackageMapping,
+ defaultOptions.defaultNamespacePackageMapping);
+ frontEnd = setIfNull(frontEnd, defaultOptions.frontEnd);
+ dataBinding = setIfNull(dataBinding, defaultOptions.dataBinding);
+ wsdlVersion = setIfNull(wsdlVersion, defaultOptions.wsdlVersion);
+ catalog = setIfNull(catalog, defaultOptions.catalog);
+ serviceName = setIfNull(serviceName, defaultOptions.serviceName);
+ outputDir = setIfNull(outputDir, defaultOptions.outputDir);
+ extraargs.addAll(defaultOptions.extraargs);
+ xjcargs.addAll(defaultOptions.xjcargs);
+ bindingFiles = mergeList(bindingFiles, defaultOptions.bindingFiles, String.class);
+ dependencies = mergeList(dependencies, defaultOptions.dependencies, File.class);
+ redundantDirs = mergeList(redundantDirs, defaultOptions.redundantDirs, File.class);
+ packagenames.addAll(defaultOptions.packagenames);
+ namespaceExcludes.addAll(defaultOptions.namespaceExcludes);
+ }
+
+ @SuppressWarnings("unchecked")
+ private <T> T[] mergeList(T[] l1, T[] l2, Class<T> cls) {
+ if (l1 == null) {
+ return l2;
+ } else if (l2 == null) {
+ return l1;
+ }
+ int len = l1.length + l2.length;
+ T ret[] = (T[])java.lang.reflect.Array.newInstance(cls, len);
+ System.arraycopy(l1, 0, ret, 0, l1.length);
+ System.arraycopy(l2, 0, ret, l1.length, l2.length);
+ return ret;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,500 @@
+/**
+ * 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.maven_plugin;
+
+import java.io.File;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.tools.common.ToolContext;
+import org.apache.cxf.tools.wsdlto.WSDLToJava;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.InvalidRepositoryException;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.ProjectUtils;
+
+/**
+ * @goal wsdl2java
+ * @phase generate-sources
+ * @description CXF WSDL To Java Tool
+ * @requiresDependencyResolution test
+ */
+public class WSDL2JavaMojo extends AbstractMojo {
+
+ /**
+ * @parameter expression="${cxf.testSourceRoot}"
+ */
+ File testSourceRoot;
+
+ /**
+ * Path where the generated sources should be placed
+ *
+ * @parameter expression="${cxf.sourceRoot}"
+ * default-value="${project.build.directory}/generated-sources/cxf"
+ * @required
+ */
+ File sourceRoot;
+
+ /**
+ * @parameter expression="${project.build.outputDirectory}"
+ * @required
+ */
+ String classesDirectory;
+
+ /**
+ * @parameter expression="${project}"
+ * @required
+ */
+ MavenProject project;
+
+ /**
+ * Default options to be used when a wsdl has not had it's options explicitly specified.
+ *
+ * @parameter
+ */
+ Option defaultOptions = new Option();
+
+ /**
+ * @parameter
+ */
+ WsdlOption wsdlOptions[];
+
+ /**
+ * @parameter expression="${cxf.wsdlRoot}" default-value="${basedir}/src/main/resources/wsdl"
+ */
+ File wsdlRoot;
+
+ /**
+ * @parameter expression="${cxf.testWsdlRoot}" default-value="${basedir}/src/test/resources/wsdl"
+ */
+ File testWsdlRoot;
+
+ /**
+ * Directory in which the "DONE" markers are saved that
+ *
+ * @parameter expression="${cxf.markerDirectory}"
+ * default-value="${project.build.directory}/cxf-codegen-plugin-markers"
+ */
+ File markerDirectory;
+
+ /**
+ * Use the compile classpath rather than the test classpath for execution useful if the test dependencies
+ * clash with those of wsdl2java
+ *
+ * @parameter expression="${cxf.useCompileClasspath}" default-value="false"
+ */
+ boolean useCompileClasspath;
+
+
+ /**
+ * Disables the scanning of the wsdlRoot/testWsdlRoot directories configured above.
+ * By default, we scan for *.wsdl (see include/exclude params as well) in the wsdlRoot
+ * directories and run wsdl2java on all the wsdl's we find. This disables that scan
+ * and requires an explicit wsdlOption to be set for each wsdl that needs to be processed.
+ * @parameter expression="${cxf.disableDirectoryScan}" default-value="false"
+ */
+ boolean disableDirectoryScan;
+
+ /**
+ * By default all maven dependencies of type "wsdl" are added to the effective wsdlOptions. Setting this
+ * parameter to true disables this functionality
+ *
+ * @parameter expression="${cxf.disableDependencyScan}" default-value="false"
+ */
+ boolean disableDependencyScan;
+
+ /**
+ * A list of wsdl files to include. Can contain ant-style wildcards and double wildcards. Defaults to
+ * *.wsdl
+ *
+ * @parameter
+ */
+ String includes[];
+
+ /**
+ * A list of wsdl files to exclude. Can contain ant-style wildcards and double wildcards.
+ *
+ * @parameter
+ */
+ String excludes[];
+
+ /**
+ * The local repository taken from Maven's runtime. Typically $HOME/.m2/repository.
+ *
+ * @parameter expression="${localRepository}"
+ * @readonly
+ * @required
+ */
+ private ArtifactRepository localRepository;
+
+ /**
+ * Artifact factory, needed to create artifacts.
+ *
+ * @component
+ * @readonly
+ * @required
+ */
+ private ArtifactFactory artifactFactory;
+
+ /**
+ * The remote repositories used as specified in your POM.
+ *
+ * @parameter expression="${project.repositories}"
+ * @readonly
+ * @required
+ */
+ private List repositories;
+
+ /**
+ * Artifact repository factory component.
+ *
+ * @component
+ * @readonly
+ * @required
+ */
+ private ArtifactRepositoryFactory artifactRepositoryFactory;
+
+ /**
+ * The Maven session.
+ *
+ * @parameter expression="${session}"
+ * @readonly
+ * @required
+ */
+ private MavenSession mavenSession;
+
+ /**
+ * @component
+ * @readonly
+ * @required
+ */
+ private ArtifactResolver artifactResolver;
+
+
+
+ /**
+ * Merge WsdlOptions that point to the same file by adding the extraargs to the first option and deleting
+ * the second from the options list
+ *
+ * @param options
+ */
+ private void mergeOptions(List<WsdlOption> effectiveWsdlOptions) {
+ if (wsdlOptions == null) {
+ return;
+ }
+ File outputDirFile = testSourceRoot == null ? sourceRoot : testSourceRoot;
+ for (WsdlOption o : wsdlOptions) {
+ if (defaultOptions != null) {
+ o.merge(defaultOptions);
+ }
+ if (o.getOutputDir() == null) {
+ o.setOutputDir(outputDirFile);
+ }
+
+ File file = o.getWsdlFile(project.getBasedir());
+ if (file != null && file.exists()) {
+ file = file.getAbsoluteFile();
+ for (WsdlOption o2 : effectiveWsdlOptions) {
+ File file2 = o2.getWsdlFile(project.getBasedir());
+ if (file2 != null && file2.exists() && file2.getAbsoluteFile().equals(file)) {
+ o.getExtraargs().addAll(0, o2.getExtraargs());
+ effectiveWsdlOptions.remove(o2);
+ break;
+ }
+ }
+ }
+ effectiveWsdlOptions.add(o);
+ }
+ }
+
+ /**
+ * @return effective WsdlOptions
+ * @throws MojoExecutionException
+ */
+ private List<WsdlOption> createWsdlOptionsFromScansAndExplicitWsdlOptions()
+ throws MojoExecutionException {
+ List<WsdlOption> effectiveWsdlOptions = new ArrayList<WsdlOption>();
+ List<WsdlOption> temp;
+ if (wsdlRoot != null && wsdlRoot.exists() && !disableDirectoryScan) {
+ temp = WsdlOptionLoader.loadWsdlOptionsFromFiles(wsdlRoot, includes, excludes, defaultOptions,
+ sourceRoot);
+ effectiveWsdlOptions.addAll(temp);
+ }
+ if (testWsdlRoot != null && testWsdlRoot.exists() && !disableDirectoryScan) {
+ temp = WsdlOptionLoader.loadWsdlOptionsFromFiles(testWsdlRoot, includes, excludes,
+ defaultOptions, testSourceRoot);
+ effectiveWsdlOptions.addAll(temp);
+ }
+ if (!disableDependencyScan) {
+ temp = WsdlOptionLoader.loadWsdlOptionsFromDependencies(project, defaultOptions, sourceRoot);
+ effectiveWsdlOptions.addAll(temp);
+ }
+ mergeOptions(effectiveWsdlOptions);
+ downloadRemoteWsdls(effectiveWsdlOptions);
+// String buildDir = project.getBuild().getDirectory();
+// File tempBindingDir = new File(buildDir, TEMPBINDINGS_DIR);
+// for (WsdlOption o : effectiveWsdlOptions) {
+// BindingFileHelper.setWsdlLocationInBindingsIfNotSet(project.getBasedir(), tempBindingDir, o,
+// getLog());
+// }
+ return effectiveWsdlOptions;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Artifact resolveRemoteWsdlArtifact(List remoteRepos, Artifact artifact)
+ throws MojoExecutionException {
+
+ /**
+ * First try to find the artifact in the reactor projects of the maven session.
+ * So an artifact that is not yet built can be resolved
+ */
+ List<MavenProject> rProjects = mavenSession.getSortedProjects();
+ for (MavenProject rProject : rProjects) {
+ if (artifact.getGroupId().equals(rProject.getGroupId())
+ && artifact.getArtifactId().equals(rProject.getArtifactId())
+ && artifact.getVersion().equals(rProject.getVersion())) {
+ Set<Artifact> artifacts = rProject.getArtifacts();
+ for (Artifact pArtifact : artifacts) {
+ if ("wsdl".equals(pArtifact.getType())) {
+ return pArtifact;
+ }
+ }
+ }
+ }
+
+ /**
+ * If this did not work resolve the artifact using the artifactResolver
+ */
+ try {
+ artifactResolver.resolve(artifact, remoteRepos, localRepository);
+ } catch (ArtifactResolutionException e) {
+ throw new MojoExecutionException("Error downloading wsdl artifact.", e);
+ } catch (ArtifactNotFoundException e) {
+ throw new MojoExecutionException("Resource can not be found.", e);
+ }
+
+ return artifact;
+ }
+
+ private void downloadRemoteWsdls(List<WsdlOption> effectiveWsdlOptions) throws MojoExecutionException {
+ List remoteRepos;
+ try {
+ remoteRepos = ProjectUtils.buildArtifactRepositories(repositories, artifactRepositoryFactory,
+ mavenSession.getContainer());
+ } catch (InvalidRepositoryException e) {
+ throw new MojoExecutionException("Error build repositories for remote wsdls", e);
+ }
+
+ for (WsdlOption wsdlOption : effectiveWsdlOptions) {
+ WsdlArtifact wsdlA = wsdlOption.getWsdlArtifact();
+ if (wsdlA == null) {
+ return;
+ }
+ Artifact wsdlArtifact = artifactFactory.createArtifact(wsdlA.getGroupId(), wsdlA.getArtifactId(),
+ wsdlA.getVersion(),
+ Artifact.SCOPE_COMPILE, wsdlA.getType());
+ wsdlArtifact = resolveRemoteWsdlArtifact(remoteRepos, wsdlArtifact);
+ if (wsdlArtifact != null) {
+ String path = wsdlArtifact.getFile().getAbsolutePath();
+ getLog().info("Resolved WSDL artifact to file " + path);
+ wsdlOption.setWsdl(path);
+ }
+ }
+ }
+
+ public void execute() throws MojoExecutionException {
+ if (includes == null) {
+ includes = new String[] {
+ "*.wsdl"
+ };
+ }
+ defaultOptions.addDefaultBindingFileIfExists(project.getBasedir());
+ File classesDir = new File(classesDirectory);
+ classesDir.mkdirs();
+ markerDirectory.mkdirs();
+
+ List<WsdlOption> effectiveWsdlOptions = createWsdlOptionsFromScansAndExplicitWsdlOptions();
+
+ if (effectiveWsdlOptions.size() == 0) {
+ getLog().info("Nothing to generate");
+ return;
+ }
+
+ ClassLoaderSwitcher classLoaderSwitcher = new ClassLoaderSwitcher(getLog());
+ boolean result = true;
+
+ Bus bus = null;
+ try {
+ classLoaderSwitcher.switchClassLoader(project, useCompileClasspath, classesDir);
+
+ for (WsdlOption o : effectiveWsdlOptions) {
+ bus = callWsdl2Java(o, bus);
+
+ File dirs[] = o.getDeleteDirs();
+ if (dirs != null) {
+ for (int idx = 0; idx < dirs.length; ++idx) {
+ result = result && deleteDir(dirs[idx]);
+ }
+ }
+ }
+ } finally {
+ // cleanup as much as we can.
+ if (bus != null) {
+ bus.shutdown(true);
+ }
+ classLoaderSwitcher.restoreClassLoader();
+ }
+ if (project != null && sourceRoot != null && sourceRoot.exists()) {
+ project.addCompileSourceRoot(sourceRoot.getAbsolutePath());
+ }
+ if (project != null && testSourceRoot != null && testSourceRoot.exists()) {
+ project.addTestCompileSourceRoot(testSourceRoot.getAbsolutePath());
+ }
+
+ System.gc();
+ }
+
+ private Bus callWsdl2Java(WsdlOption wsdlOption, Bus bus) throws MojoExecutionException {
+ File outputDirFile = wsdlOption.getOutputDir();
+ outputDirFile.mkdirs();
+ URI basedir = project.getBasedir().toURI();
+ URI wsdlURI = wsdlOption.getWsdlURI(basedir);
+ File doneFile = getDoneFile(basedir, wsdlURI);
+
+ if (!shouldRun(wsdlOption, doneFile, wsdlURI)) {
+ return bus;
+ }
+
+ if (bus == null) {
+ bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ }
+
+ doneFile.delete();
+ List<String> list = wsdlOption.generateCommandLine(outputDirFile, basedir, wsdlURI, getLog()
+ .isDebugEnabled());
+ String[] args = (String[])list.toArray(new String[list.size()]);
+ getLog().debug("Calling wsdl2java with args: " + Arrays.toString(args));
+ try {
+ new WSDLToJava(args).run(new ToolContext());
+ } catch (Throwable e) {
+ getLog().debug(e);
+ throw new MojoExecutionException(e.getMessage(), e);
+ }
+ try {
+ doneFile.createNewFile();
+ } catch (Throwable e) {
+ getLog().warn("Could not create marker file " + doneFile.getAbsolutePath());
+ getLog().debug(e);
+ }
+ return bus;
+ }
+
+ private File getDoneFile(URI basedir, URI wsdlURI) {
+ String doneFileName = wsdlURI.toString();
+
+ // Strip the basedir from the doneFileName
+ if (doneFileName.startsWith(basedir.toString())) {
+ doneFileName = doneFileName.substring(basedir.toString().length());
+ }
+
+ // If URL to WSDL, replace ? and & since they're invalid chars for file names
+ // Not to mention slashes.
+ doneFileName = doneFileName.replace('?', '_').replace('&', '_').replace('/', '_').replace('\\', '_')
+ .replace(':', '_');
+
+ return new File(markerDirectory, "." + doneFileName + ".DONE");
+ }
+
+ /**
+ * Determine if code should be generated from the given wsdl
+ *
+ * @param wsdlOption
+ * @param doneFile
+ * @param wsdlURI
+ * @return
+ */
+ private boolean shouldRun(WsdlOption wsdlOption, File doneFile, URI wsdlURI) {
+ long timestamp = 0;
+ if ("file".equals(wsdlURI.getScheme())) {
+ timestamp = new File(wsdlURI).lastModified();
+ } else {
+ try {
+ timestamp = wsdlURI.toURL().openConnection().getDate();
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+ boolean doWork = false;
+ if (!doneFile.exists()) {
+ doWork = true;
+ } else if (timestamp > doneFile.lastModified()) {
+ doWork = true;
+ } else if (wsdlOption.isDefServiceName()) {
+ doWork = true;
+ } else {
+ File files[] = wsdlOption.getDependencies();
+ if (files != null) {
+ for (int z = 0; z < files.length; ++z) {
+ if (files[z].lastModified() > doneFile.lastModified()) {
+ doWork = true;
+ }
+ }
+ }
+ }
+ return doWork;
+ }
+
+ /**
+ * Recursively delete the given directory
+ *
+ * @param f
+ * @return
+ */
+ private boolean deleteDir(File f) {
+ if (f.isDirectory()) {
+ File files[] = f.listFiles();
+ for (int idx = 0; idx < files.length; ++idx) {
+ deleteDir(files[idx]);
+ }
+ }
+
+ if (f.exists()) {
+ return f.delete();
+ }
+
+ return true;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlArtifact.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlArtifact.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlArtifact.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,65 @@
+/**
+ * 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.maven_plugin;
+
+/**
+ * Represents a wsdl file that is stored in a maven repository
+ */
+public class WsdlArtifact {
+ private String groupId;
+ private String artifactId;
+ private String version;
+ private String type;
+
+ public WsdlArtifact() {
+ type = "wsdl";
+ }
+
+ public String getGroupId() {
+ return groupId;
+ }
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+ public String getArtifactId() {
+ return artifactId;
+ }
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+ public String getVersion() {
+ return version;
+ }
+ public void setVersion(String version) {
+ this.version = version;
+ }
+ public String getType() {
+ return type;
+ }
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public boolean doesMatch(WsdlArtifact artifact) {
+ return type.equals(artifact.getType()) && groupId.equals(artifact.getGroupId())
+ && artifactId.equals(artifact.getArtifactId())
+ && (version == null || version.equals(artifact.getVersion()));
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,201 @@
+/**
+ * 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.maven_plugin;
+
+import java.io.File;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.cxf.tools.util.URIParserUtil;
+
+public class WsdlOption extends Option {
+
+ /**
+ * The WSDL file to process.
+ */
+ String wsdl;
+
+ /**
+ * Alternatively to the wsdl string an artifact can be specified
+ */
+ WsdlArtifact wsdlArtifact;
+
+ public String getWsdl() {
+ return wsdl;
+ }
+
+ public void setWsdl(String w) {
+ wsdl = w;
+ }
+
+ public WsdlArtifact getWsdlArtifact() {
+ return wsdlArtifact;
+ }
+
+ public void setWsdlArtifact(WsdlArtifact wsdlArtifact) {
+ this.wsdlArtifact = wsdlArtifact;
+ }
+
+ /**
+ * Try to find a file matching the wsdl path (either absolutely, relatively to the current dir or to
+ * the project base dir)
+ *
+ * @return wsdl file
+ */
+ public File getWsdlFile(File baseDir) {
+ if (wsdl == null) {
+ return null;
+ }
+ File file = null;
+ try {
+ URI uri = new URI(wsdl);
+ if (uri.isAbsolute()) {
+ file = new File(uri);
+ }
+ } catch (Exception e) {
+ // ignore
+ }
+ if (file == null || !file.exists()) {
+ file = new File(wsdl);
+ }
+ if (!file.exists()) {
+ file = new File(baseDir, wsdl);
+ }
+ return file;
+ }
+
+ public URI getWsdlURI(URI baseURI) {
+ String wsdlLocation = getWsdl();
+ File wsdlFile = new File(wsdlLocation);
+ return wsdlFile.exists() ? wsdlFile.toURI()
+ : baseURI.resolve(URIParserUtil.escapeChars(wsdlLocation));
+ }
+
+ public boolean isDefServiceName() {
+ if (extraargs == null) {
+ return false;
+ }
+ for (int i = 0; i < extraargs.size(); i++) {
+ if ("-sn".equalsIgnoreCase(extraargs.get(i))) {
+ return true;
+ }
+ }
+ return false;
+
+ }
+
+ public int hashCode() {
+ if (wsdl != null) {
+ return wsdl.hashCode();
+ }
+ return -1;
+ }
+
+ public boolean equals(Object obj) {
+ if (!(obj instanceof WsdlOption)) {
+ return false;
+ }
+
+ WsdlOption t = (WsdlOption)obj;
+ return t.getWsdl().equals(getWsdl());
+ }
+
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("WSDL: ").append(wsdl).append('\n');
+ builder.append("OutputDir: ").append(outputDir).append('\n');
+ builder.append("Extraargs: ").append(extraargs).append('\n');
+ builder.append("XJCargs: ").append(xjcargs).append('\n');
+ builder.append("Packagenames: ").append(packagenames).append('\n');
+ builder.append('\n');
+ return builder.toString();
+ }
+
+ public List<String> generateCommandLine(File outputDirFile, URI basedir, URI wsdlURI, boolean debug) {
+ List<String> list = new ArrayList<String>();
+ addList(list, "-p", true, getPackagenames());
+ addList(list, "-nexclude", true, getNamespaceExcludes());
+ addIfNotNull(list, outputDirFile, "-d");
+ for (String binding : getBindingFiles()) {
+ File bindingFile = new File(binding);
+ URI bindingURI = bindingFile.exists() ? bindingFile.toURI() : basedir.resolve(binding);
+ list.add("-b");
+ list.add(bindingURI.toString());
+ }
+ addIfNotNull(list, getFrontEnd(), "-fe");
+ addIfNotNull(list, getDataBinding(), "-db");
+ addIfNotNull(list, getWsdlVersion(), "-wv");
+ addIfNotNull(list, getCatalog(), "-catalog");
+ if (isExtendedSoapHeaders()) {
+ list.add("-exsh");
+ list.add("true");
+ }
+ addIfTrue(list, isAllowElementRefs(), "-allowElementRefs");
+ addIfTrue(list, isValidateWsdl(), "-validate");
+ addIfTrue(list, isUseFQCNForFaultSerialVersionUID(), "-useFQCNForFaultSerialVersionUID");
+ addIfNotNull(list, getDefaultExcludesNamespace(), "-dex");
+ addIfNotNull(list, getDefaultNamespacePackageMapping(), "-dns");
+ addIfNotNull(list, getServiceName(), "-sn");
+ addIfTrue(list, isAutoNameResolution(), "-autoNameResolution");
+ addIfTrue(list, isNoAddressBinding(), "-noAddressBinding");
+ addList(list, "-xjc", false, getXJCargs());
+ addList(list, "", false, getExtraargs());
+ if (isSetWsdlLocation()) {
+ list.add("-wsdlLocation");
+ list.add(getWsdlLocation() == null ? "" : getWsdlLocation());
+ }
+ addIfTrue(list, isWsdlList(), "-wsdlList");
+ addIfTrue(list, debug && !list.contains("-verbose"), "-verbose");
+ list.add(wsdlURI.toString());
+ return list;
+ }
+
+ private static void addIfTrue(List<String> list, boolean expression, String key) {
+ if (expression) {
+ list.add(key);
+ }
+ }
+
+ private static void addIfNotNull(List<String> list, Object value, String key) {
+ if (value != null) {
+ list.add(key);
+ list.add(value.toString());
+ }
+ }
+
+ private static void addList(List<String> destList, String key, boolean keyAsOwnElement,
+ List<String> sourceList) {
+ if (sourceList == null) {
+ return;
+ }
+ for (String value : sourceList) {
+ if (keyAsOwnElement) {
+ destList.add(key);
+ destList.add(value);
+ } else {
+ // Maven makes empty tags into null
+ // instead of empty strings. so replace null by ""
+ destList.add(key + ((value == null) ? "" : value));
+ }
+ }
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOptionLoader.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,212 @@
+/**
+ * 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.maven_plugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.helpers.FileUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+
+public final class WsdlOptionLoader {
+ private static final String WSDL_TYPE = "wsdl";
+ private static final String WSDL_OPTIONS = "-options$";
+ private static final String WSDL_BINDINGS = "-binding-?\\d*.xml$";
+
+ private WsdlOptionLoader() {
+ }
+
+ @SuppressWarnings("unchecked")
+ public static List<WsdlOption> loadWsdlOptionsFromDependencies(MavenProject project,
+ Option defaultOptions, File outputDir) {
+ List<WsdlOption> options = new ArrayList<WsdlOption>();
+ Set<Artifact> dependencies = project.getDependencyArtifacts();
+ for (Artifact artifact : dependencies) {
+ WsdlOption option = generateWsdlOptionFromArtifact(artifact, outputDir);
+ if (option != null) {
+ if (defaultOptions != null) {
+ option.merge(defaultOptions);
+ }
+ options.add(option);
+ }
+ }
+ return options;
+ }
+
+ private static WsdlOption generateWsdlOptionFromArtifact(Artifact artifact, File outputDir) {
+ if (!WSDL_TYPE.equals(artifact.getType())) {
+ return null;
+ }
+ WsdlOption option = new WsdlOption();
+ WsdlArtifact wsdlArtifact = new WsdlArtifact();
+ wsdlArtifact.setArtifactId(artifact.getArtifactId());
+ wsdlArtifact.setGroupId(artifact.getGroupId());
+ wsdlArtifact.setType(artifact.getType());
+ wsdlArtifact.setVersion(artifact.getVersion());
+ option.setWsdlArtifact(wsdlArtifact);
+ option.setOutputDir(outputDir);
+ return option;
+ }
+
+ /**
+ * Scan files in a directory and generate one wsdlOption per file found. Extra args for code generation
+ * can be defined in a file that is named like the wsdl file and ends in -options. Binding files can be
+ * defined in files named like the wsdl file and end in -binding-*.xml
+ *
+ * @param wsdlBasedir
+ * @param includes file name patterns to include
+ * @param excludes file name patterns to exclude
+ * @param defaultOptions options that should be used if no special file is given
+ * @return list of one WsdlOption object for each wsdl found
+ * @throws MojoExecutionException
+ */
+ public static List<WsdlOption> loadWsdlOptionsFromFiles(File wsdlBasedir, String includes[],
+ String excludes[], Option defaultOptions,
+ File defaultOutputDir)
+ throws MojoExecutionException {
+
+ if (wsdlBasedir == null) {
+ return new ArrayList<WsdlOption>();
+ }
+
+ if (!wsdlBasedir.exists()) {
+ throw new MojoExecutionException(wsdlBasedir + " does not exist");
+ }
+
+ List<File> wsdlFiles = getWsdlFiles(wsdlBasedir, includes, excludes);
+ List<WsdlOption> wsdlOptions = new ArrayList<WsdlOption>();
+ for (File wsdl : wsdlFiles) {
+ WsdlOption wsdlOption = generateWsdlOptionFromFile(wsdl, defaultOptions, defaultOutputDir);
+ if (wsdlOption != null) {
+ wsdlOptions.add(wsdlOption);
+ }
+ }
+ return wsdlOptions;
+ }
+
+ private static String joinWithComma(String[] arr) {
+ if (arr == null) {
+ return "";
+ }
+ StringBuilder str = new StringBuilder();
+
+ if (arr != null) {
+ for (String s : arr) {
+ if (str.length() > 0) {
+ str.append(',');
+ }
+ str.append(s);
+ }
+ }
+ return str.toString();
+ }
+
+ private static List<File> getWsdlFiles(File dir, String includes[], String excludes[])
+ throws MojoExecutionException {
+
+ List<String> exList = new ArrayList<String>();
+ if (excludes != null) {
+ exList.addAll(Arrays.asList(excludes));
+ }
+ exList.addAll(Arrays.asList(org.codehaus.plexus.util.FileUtils.getDefaultExcludes()));
+
+ String inc = joinWithComma(includes);
+ String ex = joinWithComma(exList.toArray(new String[exList.size()]));
+
+ try {
+ List newfiles = org.codehaus.plexus.util.FileUtils.getFiles(dir, inc, ex);
+ return CastUtils.cast(newfiles);
+ } catch (IOException exc) {
+ throw new MojoExecutionException(exc.getMessage(), exc);
+ }
+ }
+
+ private static String[] readOptionsFromFile(File dir, String wsdlName) throws MojoExecutionException {
+ String[] noOptions = new String[] {};
+ List<File> files = FileUtils.getFiles(dir, wsdlName + WSDL_OPTIONS);
+ if (files.size() <= 0) {
+ return noOptions;
+ }
+ File optionsFile = files.iterator().next();
+ if (optionsFile == null || !optionsFile.exists()) {
+ return noOptions;
+ }
+ try {
+ List<String> lines = FileUtils.readLines(optionsFile);
+ if (lines.size() <= 0) {
+ return noOptions;
+ }
+ return lines.iterator().next().split(" ");
+ } catch (Exception e) {
+ throw new MojoExecutionException("Error reading options from file "
+ + optionsFile.getAbsolutePath(), e);
+ }
+ }
+
+ protected static WsdlOption generateWsdlOptionFromFile(final File wsdl, final Option defaultOptions,
+ File defaultOutputDir)
+ throws MojoExecutionException {
+
+ if (wsdl == null || !wsdl.exists()) {
+ return null;
+ }
+
+ final String wsdlFileName = wsdl.getName();
+ int idx = wsdlFileName.toLowerCase().lastIndexOf(".wsdl");
+ if (idx == -1) {
+ idx = wsdlFileName.lastIndexOf('.');
+ }
+ if (idx == -1) {
+ return null;
+ }
+
+ final WsdlOption wsdlOption = new WsdlOption();
+ final String wsdlName = wsdlFileName.substring(0, idx);
+
+ final String[] options = readOptionsFromFile(wsdl.getParentFile(), wsdlName);
+ if (options.length > 0) {
+ wsdlOption.getExtraargs().addAll(Arrays.asList(options));
+ } else if (defaultOptions != null) {
+ // no options specified use the defaults
+ defaultOptions.copyOptions(wsdlOption);
+ }
+
+ List<File> bindingFiles = FileUtils.getFiles(wsdl.getParentFile(), wsdlName + WSDL_BINDINGS);
+ if (bindingFiles != null) {
+ for (File binding : bindingFiles) {
+ wsdlOption.addBindingFile(binding);
+ }
+ }
+ wsdlOption.setWsdl(wsdl.toURI().toString());
+
+ if (wsdlOption.getOutputDir() == null) {
+ wsdlOption.setOutputDir(defaultOutputDir);
+ }
+
+ return wsdlOption;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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-corbatools-maven-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF CORBA Tools Maven2 Plugins</name>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-corba</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
+
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/IDLToWSDLPlugin.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/IDLToWSDLPlugin.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/IDLToWSDLPlugin.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,87 @@
+/**
+ * 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.maven_plugin.corba.maven.plugins;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.cxf.tools.corba.IDLToWSDL;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+
+/**
+ * @goal idl2wsdl
+ * @description CXF IDL To WSDL Tool
+ */
+public class IDLToWSDLPlugin extends AbstractMojo {
+
+ /**
+ * @parameter expression="${project.build.directory}/generated/src/main/java"
+ * @required
+ */
+ String outputDir;
+
+ /**
+ * @parameter
+ */
+ IdltowsdlOption idltowsdlOptions[];
+
+
+ public void execute() throws MojoExecutionException {
+ File outputDirFile = new File(outputDir);
+ outputDirFile.mkdirs();
+
+ if (idltowsdlOptions == null) {
+ throw new MojoExecutionException("Please specify the idl2wsdl options");
+ }
+
+ for (int x = 0; x < idltowsdlOptions.length; x++) {
+ File file = new File(idltowsdlOptions[x].getIDL());
+ File doneFile = new File(outputDirFile, "." + file.getName() + ".DONE");
+
+ boolean doWork = file.lastModified() > doneFile.lastModified();
+ if (!doneFile.exists()) {
+ doWork = true;
+ } else if (file.lastModified() > doneFile.lastModified()) {
+ doWork = true;
+ }
+
+ if (doWork) {
+ List<Object> list = new ArrayList<Object>();
+ list.add("-o");
+ list.add(outputDir);
+ list.addAll(idltowsdlOptions[x].getExtraargs());
+ list.add(idltowsdlOptions[x].getIDL());
+ try {
+ IDLToWSDL.run((String[])list.toArray(new String[list.size()]));
+ doneFile.delete();
+ doneFile.createNewFile();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ throw new MojoExecutionException(e.getMessage(), e);
+ }
+ }
+ }
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/IdltowsdlOption.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/IdltowsdlOption.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/IdltowsdlOption.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,44 @@
+/**
+ * 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.maven_plugin.corba.maven.plugins;
+
+import java.util.List;
+
+public class IdltowsdlOption {
+
+ String idl;
+ List<String> extraargs;
+
+ public String getIDL() {
+ return idl;
+ }
+
+ public void setIDL(String idlFile) {
+ idl = idlFile;
+ }
+
+ public List<String> getExtraargs() {
+ return extraargs;
+ }
+
+ public void setExtraargs(List<String> args) {
+ extraargs = args;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,180 @@
+/**
+ * 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.maven_plugin.corba.maven.plugins;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.tools.corba.WSDLToIDL;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+
+
+/**
+ * @goal wsdl2idl
+ * @requiresDependencyResolution test
+ * @description CXF WSDL To IDL Tool
+ */
+public class WSDLToIDLPlugin extends AbstractMojo {
+
+ /**
+ * @parameter expression="${project.build.directory}/generated/src/main/java"
+ * @required
+ */
+ File outputDir;
+
+ /**
+ * @parameter
+ */
+ WsdltoidlOption wsdltoidlOptions[];
+
+ /**
+ * @parameter expression="${project}"
+ * @required
+ */
+ MavenProject project;
+
+ /**
+ * Use the compile classpath rather than the test classpath for execution
+ * useful if the test dependencies clash with those of wsdl2java
+ * @parameter expression="${cxf.useCompileClasspath}" default-value="false"
+ */
+ boolean useCompileClasspath;
+
+ public void execute() throws MojoExecutionException {
+ outputDir.mkdirs();
+
+ if (wsdltoidlOptions == null) {
+ throw new MojoExecutionException("Please specify the wsdltoidl options");
+ }
+
+
+ List<URL> urlList = new ArrayList<URL>();
+ StringBuilder buf = new StringBuilder();
+
+ try {
+ urlList.add(outputDir.toURI().toURL());
+ } catch (MalformedURLException e) {
+ //ignore
+ }
+
+ buf.append(outputDir.getAbsolutePath());
+ buf.append(File.pathSeparatorChar);
+
+
+ List artifacts = useCompileClasspath ? project.getCompileArtifacts() : project.getTestArtifacts();
+ for (Artifact a : CastUtils.cast(artifacts, Artifact.class)) {
+ try {
+ if (a.getFile() != null
+ && a.getFile().exists()) {
+ urlList.add(a.getFile().toURI().toURL());
+ buf.append(a.getFile().getAbsolutePath());
+ buf.append(File.pathSeparatorChar);
+ //System.out.println(" " + a.getFile().getAbsolutePath());
+ }
+ } catch (MalformedURLException e) {
+ //ignore
+ }
+ }
+
+ ClassLoader origContext = Thread.currentThread().getContextClassLoader();
+ URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[urlList.size()]),
+ origContext);
+ String newCp = buf.toString();
+
+ //with some VM's, creating an XML parser (which we will do to parse wsdls)
+ //will set some system properties that then interferes with mavens
+ //dependency resolution. (OSX is the major culprit here)
+ //We'll save the props and then set them back later.
+ Map<Object, Object> origProps = new HashMap<Object, Object>(System.getProperties());
+
+ String cp = System.getProperty("java.class.path");
+
+ try {
+ Thread.currentThread().setContextClassLoader(loader);
+ System.setProperty("java.class.path", newCp);
+
+ for (int x = 0; x < wsdltoidlOptions.length; x++) {
+ File file = new File(wsdltoidlOptions[x].getWSDL());
+ File doneFile = new File(outputDir, "." + file.getName() + ".DONE");
+
+ boolean doWork = file.lastModified() > doneFile.lastModified();
+ if (!doneFile.exists()) {
+ doWork = true;
+ } else if (file.lastModified() > doneFile.lastModified()) {
+ doWork = true;
+ }
+
+ if (doWork) {
+ List<String> list = new ArrayList<String>();
+ list.add("-d");
+ list.add(outputDir.getAbsolutePath());
+ if (wsdltoidlOptions[x].isCorbaEnabled()) {
+ list.add("-corba");
+ }
+ if (wsdltoidlOptions[x].isIdlEnabled()) {
+ list.add("-idl");
+ }
+ if (wsdltoidlOptions[x].getExtraargs() != null) {
+ list.addAll(wsdltoidlOptions[x].getExtraargs());
+ }
+ list.add(wsdltoidlOptions[x].getWSDL());
+ try {
+ WSDLToIDL.run((String[])list.toArray(new String[list.size()]));
+ doneFile.delete();
+ doneFile.createNewFile();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ throw new MojoExecutionException(e.getMessage(), e);
+ }
+ }
+ }
+ } finally {
+ //cleanup as much as we can.
+ Bus bus = BusFactory.getDefaultBus(false);
+ if (bus != null) {
+ bus.shutdown(true);
+ }
+ Thread.currentThread().setContextClassLoader(origContext);
+ System.setProperty("java.class.path", cp);
+
+ Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
+ for (Object o : newProps.keySet()) {
+ if (!origProps.containsKey(o)) {
+ System.clearProperty(o.toString());
+ }
+ }
+ System.getProperties().putAll(origProps);
+ }
+
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WsdltoidlOption.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WsdltoidlOption.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WsdltoidlOption.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,63 @@
+/**
+ * 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.maven_plugin.corba.maven.plugins;
+
+import java.util.List;
+
+public class WsdltoidlOption {
+
+ String wsdl;
+ boolean corbabinding;
+ boolean idl;
+
+ List<String> extraargs;
+
+ public String getWSDL() {
+ return wsdl;
+ }
+
+ public void setWSDL(String wsdlFile) {
+ wsdl = wsdlFile;
+ }
+
+ public boolean isCorbaEnabled() {
+ return corbabinding;
+ }
+
+ public void setCorbabinding(boolean flag) {
+ corbabinding = flag;
+ }
+
+ public boolean isIdlEnabled() {
+ return idl;
+ }
+
+ public void setIdl(boolean flag) {
+ idl = flag;
+ }
+
+ public List<String> getExtraargs() {
+ return extraargs;
+ }
+
+ public void setExtraargs(List<String> args) {
+ extraargs = args;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+ 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-java2ws-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF Java2WS Maven2 Plugin</name>
+ <url>http://cxf.apache.org</url>
+
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>2.0.5</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!--dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-wsdlto-databinding-jaxb</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency-->
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-java2ws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -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.maven_plugin;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Manages switching to the classloader needed for creating the java sources and restoring the old classloader
+ * when finished
+ */
+public class ClassLoaderSwitcher {
+
+ private Log log;
+ private String origClassPath;
+ private Map<Object, Object> origProps;
+ private ClassLoader origContextClassloader;
+
+ public ClassLoaderSwitcher(Log log) {
+ this.log = log;
+ }
+
+ /**
+ * Create and set the classloader that is needed for creating the java sources from wsdl
+ *
+ * @param project
+ * @param useCompileClasspath
+ * @param classesDir
+ */
+ public String switchClassLoader(MavenProject project,
+ boolean useCompileClasspath,
+ String classpath,
+ List classpathElements) {
+ List<URL> urlList = new ArrayList<URL>();
+ StringBuilder buf = new StringBuilder();
+
+
+ try {
+ buf.append(classpath);
+ buf.append(File.pathSeparatorChar);
+ urlList.add(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
+ } catch (MalformedURLException e) {
+ // ignore
+ }
+ for (Object classpathElement : classpathElements) {
+ buf.append(classpathElement.toString());
+ buf.append(File.pathSeparatorChar);
+ }
+
+ buf.append(File.pathSeparatorChar);
+ List<?> artifacts = useCompileClasspath ? project.getCompileArtifacts() : project.getTestArtifacts();
+ for (Artifact a : CastUtils.cast(artifacts, Artifact.class)) {
+ try {
+ if (a.getFile() != null && a.getFile().exists()) {
+ urlList.add(a.getFile().toURI().toURL());
+ buf.append(a.getFile().getAbsolutePath());
+ buf.append(File.pathSeparatorChar);
+ // System.out.println(" " +
+ // a.getFile().getAbsolutePath());
+ }
+ } catch (MalformedURLException e) {
+ // ignore
+ }
+ }
+
+ origContextClassloader = Thread.currentThread().getContextClassLoader();
+ URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[urlList.size()]),
+ origContextClassloader);
+ String newCp = buf.toString();
+
+ log.debug("Classpath: " + urlList.toString());
+
+ origProps = new HashMap<Object, Object>(System.getProperties());
+
+ origClassPath = System.getProperty("java.class.path");
+
+ Thread.currentThread().setContextClassLoader(loader);
+ System.setProperty("java.class.path", newCp);
+ return newCp;
+ }
+
+ /**
+ * Restore the old classloader
+ */
+ public void restoreClassLoader() {
+ Thread.currentThread().setContextClassLoader(origContextClassloader);
+ System.setProperty("java.class.path", origClassPath);
+
+ Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
+ for (Object o : newProps.keySet()) {
+ if (!origProps.containsKey(o)) {
+ System.clearProperty(o.toString());
+ }
+ }
+ System.getProperties().putAll(origProps);
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,434 @@
+/**
+ * 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.maven_plugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.apache.commons.lang.SystemUtils;
+import org.apache.cxf.helpers.FileUtils;
+import org.apache.cxf.tools.common.CommandInterfaceUtils;
+import org.apache.cxf.tools.java2ws.JavaToWS;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectHelper;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * @goal java2ws
+ * @description CXF Java To Webservice Tool
+ * @requiresDependencyResolution test
+*/
+public class Java2WSMojo extends AbstractMojo {
+ /**
+ * @parameter
+ * @required
+ */
+ private String className;
+
+ /**
+ * @parameter expression="${project.build.outputDirectory}"
+ * @required
+ */
+ private String classpath;
+
+ /**
+ * @parameter
+ */
+ private String outputFile;
+
+ /**
+ * @parameter
+ */
+ private Boolean soap12;
+
+ /**
+ * @parameter
+ */
+ private String targetNamespace;
+
+ /**
+ * @parameter
+ */
+ private String serviceName;
+
+ /**
+ * @parameter
+ */
+ private Boolean verbose;
+
+ /**
+ * @parameter
+ */
+ private Boolean quiet;
+
+ /**
+ * @parameter expression="${project.compileClasspathElements}"
+ * @required
+ */
+ private List classpathElements;
+
+ /**
+ * @parameter expression="${project}"
+ * @required
+ */
+ private MavenProject project;
+
+ /**
+ * Maven ProjectHelper.
+ *
+ * @component
+ * @readonly
+ */
+ private MavenProjectHelper projectHelper;
+
+ /**
+ * @parameter
+ */
+ private String argline;
+
+ /**
+ * @parameter
+ */
+ private String frontend;
+
+ /**
+ * @parameter
+ */
+ private String databinding;
+ /**
+ * @parameter default-value="false"
+ */
+ private Boolean genWsdl;
+ /**
+ * @parameter default-value="false"
+ */
+ private Boolean genServer;
+ /**
+ * @parameter default-value="false"
+ */
+ private Boolean genClient;
+ /**
+ * @parameter default-value="false"
+ */
+ private Boolean genWrapperbean;
+
+ /**
+ * Attach the generated wsdl file to the list of files to be deployed
+ * on install. This means the wsdl file will be copied to the repository
+ * with groupId, artifactId and version of the project and type "wsdl".
+ *
+ * With this option you can use the maven repository as a Service Repository.
+ *
+ * @parameter default-value="true"
+ */
+ private Boolean attachWsdl;
+
+ /**
+ * The plugin dependencies, needed for the fork mode.
+ *
+ * @parameter expression="${plugin.artifacts}"
+ * @required
+ * @readonly
+ */
+ private List<Artifact> pluginArtifacts;
+
+ /**
+ * Specifies whether the JavaToWs execution should be skipped.
+ *
+ * @parameter default-value="false"
+ * @since 2.4
+ */
+ private Boolean skip;
+
+ /**
+ * Allows running the JavaToWs in a separate process.
+ *
+ * @parameter default-value="false"
+ * @since 2.4
+ */
+ private Boolean fork;
+
+ /**
+ * Sets the Java executable to use when fork parameter is <code>true</code>.
+ *
+ * @parameter default-value="${java.home}/bin/java"
+ * @since 2.4
+ */
+ private String javaExecutable;
+
+ /**
+ * Sets the JVM arguments (i.e. <code>-Xms128m -Xmx128m</code>) if fork is set to <code>true</code>.
+ *
+ * @parameter
+ * @since 2.4
+ */
+ private String additionalJvmArgs;
+
+ public void execute() throws MojoExecutionException {
+ if (skip) {
+ getLog().info("Skipping Java2WS execution");
+ return;
+ }
+
+ ClassLoaderSwitcher classLoaderSwitcher = new ClassLoaderSwitcher(getLog());
+
+ try {
+ String cp = classLoaderSwitcher.switchClassLoader(project, false,
+ classpath, classpathElements);
+ if (fork) {
+ List<String> artifactsPath = new ArrayList<String>(pluginArtifacts.size());
+ for (Artifact a : pluginArtifacts) {
+ File file = a.getFile();
+ if (file == null) {
+ throw new MojoExecutionException("Unable to find " + file + " for artifact "
+ + a.getGroupId() + ":" + a.getArtifactId()
+ + ":" + a.getVersion());
+ }
+ artifactsPath.add(file.getPath());
+ }
+ cp = StringUtils.join(artifactsPath.iterator(), File.pathSeparator) + File.pathSeparator + cp;
+ }
+
+ List<String> args = initArgs(cp);
+ processJavaClass(args);
+ } finally {
+ classLoaderSwitcher.restoreClassLoader();
+ }
+
+ System.gc();
+ }
+
+ private List<String> initArgs(String cp) {
+ List<String> args = new ArrayList<String>();
+
+ if (fork) {
+ args.add(additionalJvmArgs);
+ // @see JavaToWS#isExitOnFinish()
+ args.add("-DexitOnFinish=true");
+ }
+
+ // classpath arg
+ args.add("-cp");
+ args.add(cp);
+
+ if (fork) {
+ args.add(JavaToWS.class.getCanonicalName());
+ }
+
+ // outputfile arg
+ if (outputFile == null && project != null) {
+ // Put the wsdl in target/generated/wsdl
+ int i = className.lastIndexOf('.');
+ // Prone to OoBE, but then it's wrong anyway
+ String name = className.substring(i + 1);
+ outputFile = (project.getBuild().getDirectory() + "/generated/wsdl/" + name + ".wsdl")
+ .replace("/", File.separator);
+ }
+ if (outputFile != null) {
+ // JavaToWSDL freaks out if the directory of the outputfile doesn't exist, so lets
+ // create it since there's no easy way for the user to create it beforehand in maven
+ FileUtils.mkDir(new File(outputFile).getParentFile());
+ args.add("-o");
+ args.add(outputFile);
+
+ /*
+ Contributor's comment:
+ Sometimes JavaToWSDL creates Java code for the wrappers. I don't *think* this is
+ needed by the end user.
+ */
+
+ // Commiter's comment:
+ // Yes, it's required, it's defined in the JAXWS spec.
+
+ if (project != null) {
+ project.addCompileSourceRoot(new File(outputFile).getParentFile().getAbsolutePath());
+ }
+ }
+
+ if (frontend != null) {
+ args.add("-frontend");
+ args.add(frontend);
+ }
+
+ if (databinding != null) {
+ args.add("-databinding");
+ args.add(databinding);
+ }
+
+ if (genWrapperbean) {
+ args.add("-wrapperbean");
+ }
+
+ if (genWsdl) {
+ args.add("-wsdl");
+ }
+
+ if (genServer) {
+ args.add("-server");
+ }
+
+ if (genClient) {
+ args.add("-client");
+ }
+
+ // soap12 arg
+ if (soap12 != null && soap12.booleanValue()) {
+ args.add("-soap12");
+ }
+
+ // target namespace arg
+ if (targetNamespace != null) {
+ args.add("-t");
+ args.add(targetNamespace);
+ }
+
+ // servicename arg
+ if (serviceName != null) {
+ args.add("-servicename");
+ args.add(serviceName);
+ }
+
+ // verbose arg
+ if (verbose != null && verbose.booleanValue()) {
+ args.add("-verbose");
+ }
+
+ // quiet arg
+ if (quiet != null && quiet.booleanValue()) {
+ args.add("-quiet");
+ }
+
+ if (argline != null) {
+ StringTokenizer stoken = new StringTokenizer(argline, " ");
+ while (stoken.hasMoreTokens()) {
+ args.add(stoken.nextToken());
+ }
+ }
+
+ // classname arg
+ args.add(className);
+
+ return args;
+ }
+
+ private void processJavaClass(List<String> args) throws MojoExecutionException {
+ if (!fork) {
+ try {
+ CommandInterfaceUtils.commandCommonMain();
+ JavaToWS j2w = new JavaToWS(args.toArray(new String[args.size()]));
+ j2w.run();
+ } catch (OutOfMemoryError e) {
+ getLog().debug(e);
+
+ StringBuffer msg = new StringBuffer();
+ msg.append(e.getMessage()).append('\n');
+ msg.append("Try to run this goal using the <fork>true</fork> and "
+ + "<additionalJvmArgs>-Xms128m -Xmx128m</additionalJvmArgs> parameters.");
+ throw new MojoExecutionException(msg.toString(), e);
+ } catch (Throwable e) {
+ getLog().debug(e);
+ throw new MojoExecutionException(e.getMessage(), e);
+ }
+ } else {
+ getLog().info("Running java2ws in fork mode...");
+
+ Commandline cmd = new Commandline();
+ cmd.getShell().setQuotedArgumentsEnabled(false); // for JVM args
+ cmd.setWorkingDirectory(project.getBuild().getDirectory());
+ try {
+ cmd.setExecutable(getJavaExecutable().getAbsolutePath());
+ } catch (IOException e) {
+ getLog().debug(e);
+ throw new MojoExecutionException(e.getMessage(), e);
+ }
+
+ cmd.addArguments(args.toArray(new String[args.size()]));
+
+ CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
+ CommandLineUtils.StringStreamConsumer out = new CommandLineUtils.StringStreamConsumer();
+
+ int exitCode;
+ try {
+ exitCode = CommandLineUtils.executeCommandLine(cmd, out, err);
+ } catch (CommandLineException e) {
+ getLog().debug(e);
+ throw new MojoExecutionException(e.getMessage(), e);
+ }
+
+ String output = StringUtils.isEmpty(out.getOutput()) ? null : '\n' + out.getOutput().trim();
+
+ String cmdLine = CommandLineUtils.toString(cmd.getCommandline());
+
+ if (exitCode != 0) {
+ if (StringUtils.isNotEmpty(output)) {
+ getLog().info(output);
+ }
+
+ StringBuffer msg = new StringBuffer("\nExit code: ");
+ msg.append(exitCode);
+ if (StringUtils.isNotEmpty(err.getOutput())) {
+ msg.append(" - ").append(err.getOutput());
+ }
+ msg.append('\n');
+ msg.append("Command line was: ").append(cmdLine).append('\n').append('\n');
+
+ throw new MojoExecutionException(msg.toString());
+ }
+
+ if (StringUtils.isNotEmpty(err.getOutput()) && err.getOutput().contains("JavaToWS Error")) {
+ StringBuffer msg = new StringBuffer();
+ msg.append(err.getOutput());
+ msg.append('\n');
+ msg.append("Command line was: ").append(cmdLine).append('\n').append('\n');
+ throw new MojoExecutionException(msg.toString());
+ }
+ }
+
+ // Attach the generated wsdl file to the artifacts that get deployed
+ // with the enclosing project
+ if (attachWsdl && outputFile != null) {
+ File wsdlFile = new File(outputFile);
+ if (wsdlFile.exists()) {
+ projectHelper.attachArtifact(project, "wsdl", wsdlFile);
+ }
+ }
+ }
+
+ private File getJavaExecutable() throws IOException {
+ String exe = (SystemUtils.IS_OS_WINDOWS && !javaExecutable.endsWith(".exe")) ? ".exe" : "";
+ File javaExe = new File(javaExecutable + exe);
+
+ if (!javaExe.isFile()) {
+ throw new IOException("The java executable '" + javaExe
+ + "' doesn't exist or is not a file. Verify the <javaExecutable/> parameter.");
+ }
+
+ return javaExe;
+ }
+}
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,42 @@
+<!--
+ 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-maven-plugins</artifactId>
+ <packaging>pom</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF Maven Plugins</name>
+ <url>http://cxf.apache.org</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf</artifactId>
+ <version>2.3.1</version>
+ </parent>
+
+ <modules>
+ <module>codegen-plugin</module>
+ <module>java2ws-plugin</module>
+ <module>wsdl-validator-plugin</module>
+ <module>corba</module>
+ <module>archetypes</module>
+ </modules>
+
+</project>
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,61 @@
+<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-wsdl-validator-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>2.3.1</version>
+ <name>Apache CXF WSDL Validator Maven2 Plugin</name>
+ <url>http://cxf.apache.org</url>
+
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-common-utilities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-validator</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,192 @@
+/**
+ * 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.maven_plugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.tools.common.toolspec.ToolSpec;
+import org.apache.cxf.tools.validator.WSDLValidator;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+/**
+ * @goal wsdlvalidator
+ * @description CXF WSDL Validation
+ */
+public class WSDLValidatorMojo extends AbstractMojo {
+ /**
+ * @parameter
+ */
+ private Boolean verbose;
+
+ /**
+ * @parameter
+ */
+ private Boolean quiet;
+
+
+ /**
+ * @parameter expression="${cxf.wsdlRoot}" default-value="${basedir}/src/main/resources/wsdl"
+ */
+ private File wsdlRoot;
+
+ /**
+ * @parameter expression="${cxf.testWsdlRoot}" default-value="${basedir}/src/test/resources/wsdl"
+ */
+ private File testWsdlRoot;
+
+ /**
+ * Directory in which the "DONE" markers are saved that
+ * @parameter expression="${cxf.markerDirectory}"
+ * default-value="${project.build.directory}/cxf-wsdl-validator-markers"
+ */
+ private File markerDirectory;
+ /**
+ * A list of wsdl files to include. Can contain ant-style wildcards and double wildcards. Defaults to
+ * *.wsdl
+ *
+ * @parameter
+ */
+ private String includes[];
+ /**
+ * A list of wsdl files to exclude. Can contain ant-style wildcards and double wildcards.
+ *
+ * @parameter
+ */
+ private String excludes[];
+
+ private String getIncludeExcludeString(String[] arr) {
+ if (arr == null) {
+ return "";
+ }
+ StringBuilder str = new StringBuilder();
+
+ if (arr != null) {
+ for (String s : arr) {
+ if (str.length() > 0) {
+ str.append(',');
+ }
+ str.append(s);
+ }
+ }
+ return str.toString();
+ }
+
+ private List<File> getWsdlFiles(File dir)
+ throws MojoExecutionException {
+
+ List<String> exList = new ArrayList<String>();
+ if (excludes != null) {
+ exList.addAll(Arrays.asList(excludes));
+ }
+ exList.addAll(Arrays.asList(org.codehaus.plexus.util.FileUtils.getDefaultExcludes()));
+
+ String inc = getIncludeExcludeString(includes);
+ String ex = getIncludeExcludeString(exList.toArray(new String[exList.size()]));
+
+ try {
+ List newfiles = org.codehaus.plexus.util.FileUtils.getFiles(dir, inc, ex);
+ return CastUtils.cast(newfiles);
+ } catch (IOException exc) {
+ throw new MojoExecutionException(exc.getMessage(), exc);
+ }
+ }
+
+ private void processWsdl(File file) throws MojoExecutionException {
+
+ // If URL to WSDL, replace ? and & since they're invalid chars for file names
+ File doneFile =
+ new File(markerDirectory, "." + file.getName().replace('?', '_').replace('&', '_') + ".DONE");
+ boolean doWork = false;
+ if (!doneFile.exists()) {
+ doWork = true;
+ } else if (file.lastModified() > doneFile.lastModified()) {
+ doWork = true;
+ }
+
+ if (doWork) {
+ doneFile.delete();
+
+ List<String> list = new ArrayList<String>();
+
+ // verbose arg
+ if (verbose != null && verbose.booleanValue()) {
+ list.add("-verbose");
+ }
+
+ // quiet arg
+ if (quiet != null && quiet.booleanValue()) {
+ list.add("-quiet");
+ }
+
+ getLog().debug("Calling wsdlvalidator with args: " + list);
+ try {
+ list.add(file.getCanonicalPath());
+ String[] pargs = list.toArray(new String[list.size()]);
+
+ InputStream toolspecStream = WSDLValidator.class
+ .getResourceAsStream("wsdlvalidator.xml");
+ ToolSpec spec = new ToolSpec(toolspecStream, false);
+ toolspecStream.close();
+ WSDLValidator validator = new WSDLValidator(spec);
+ validator.setArguments(pargs);
+ boolean ok = validator.executeForMaven();
+ if (!ok) {
+ throw new MojoExecutionException("WSDL failed validation: " + file.getName());
+ }
+
+ doneFile.createNewFile();
+ } catch (Throwable e) {
+ throw new MojoExecutionException(file.getName() + ": "
+ + e.getMessage(), e);
+ }
+ }
+ }
+
+ public void execute() throws MojoExecutionException {
+ if (includes == null) {
+ includes = new String[] {
+ "*.wsdl"
+ };
+ }
+
+ markerDirectory.mkdirs();
+
+ List<File> wsdls = new ArrayList<File>();
+ if (wsdlRoot != null && wsdlRoot.exists()) {
+ wsdls.addAll(getWsdlFiles(wsdlRoot));
+ }
+ if (testWsdlRoot != null && testWsdlRoot.exists()) {
+ wsdls.addAll(getWsdlFiles(testWsdlRoot));
+ }
+
+ for (File wsdl : wsdls) {
+ processWsdl(wsdl);
+ }
+
+
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.3.1/parent/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/parent/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/parent/pom.xml 2011-08-12 10:15:42 UTC (rev 14803)
@@ -0,0 +1,1561 @@
+<!--
+ 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">
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf</artifactId>
+ <version>2.3.1</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.3.1</version>
+ <name>Apache CXF Parent</name>
+ <url>http://cxf.apache.org</url>
+
+ <packaging>pom</packaging>
+
+ <properties>
+ <cxf.surefire.fork.mode>once</cxf.surefire.fork.mode>
+ <cxf.surefire.format>brief</cxf.surefire.format>
+ <cxf.surefire.usefile>false</cxf.surefire.usefile>
+ <cxf.surefire.parallel.mode />
+ <cxf.surefire.fork.vmargs>-ea</cxf.surefire.fork.vmargs>
+ <cxf.server.launcher.vmargs>-ea</cxf.server.launcher.vmargs>
+ <cxf.compile.flags>-Xlint:unchecked,deprecation,fallthrough,finally</cxf.compile.flags>
+ <cxf.compile.show.deprecation>true</cxf.compile.show.deprecation>
+
+ <cxf.eclipse.outputDirectory>${basedir}/target/classes</cxf.eclipse.outputDirectory>
+ <cxf.saaj.impl.groupId>com.sun.xml.messaging.saaj</cxf.saaj.impl.groupId>
+ <cxf.saaj.impl.artifactId>saaj-impl</cxf.saaj.impl.artifactId>
+ <cxf.saaj.impl.version>1.3.2</cxf.saaj.impl.version>
+
+ <!-- please maintain alphabetical order here -->
+ <cxf.abdera.version>1.1</cxf.abdera.version>
+ <cxf.activemq.version>5.4.1</cxf.activemq.version>
+ <cxf.derby.version>10.2.2.0</cxf.derby.version>
+
+ <cxf.jaxb21.version>2.1</cxf.jaxb21.version>
+ <cxf.jaxb21.impl.version>2.1.13</cxf.jaxb21.impl.version>
+ <cxf.jaxb21.xjc.version>2.1.13</cxf.jaxb21.xjc.version>
+ <cxf.jaxb22.version>2.2.1</cxf.jaxb22.version>
+ <cxf.jaxb22.impl.version>2.2.1.1</cxf.jaxb22.impl.version>
+ <cxf.jaxb22.xjc.version>2.2.1.1</cxf.jaxb22.xjc.version>
+
+ <!-- by default, we use jaxb 2.1, but java5 profile will override to 2.2 -->
+ <cxf.jaxb.version>${cxf.jaxb21.version}</cxf.jaxb.version>
+ <cxf.jaxb.impl.version>${cxf.jaxb21.impl.version}</cxf.jaxb.impl.version>
+ <cxf.jaxb.xjc.version>${cxf.jaxb21.xjc.version}</cxf.jaxb.xjc.version>
+
+ <cxf.specs.jaxws.api.version>1.0</cxf.specs.jaxws.api.version>
+
+ <cxf.jdom.version>1.0</cxf.jdom.version>
+ <cxf.jetty.version>7.2.0.v20101020</cxf.jetty.version>
+ <cxf.msv.version>2010.1</cxf.msv.version>
+ <cxf.rhino.version>1.7R2</cxf.rhino.version>
+ <cxf.saaj.version>1.3</cxf.saaj.version>
+ <cxf.servlet-api.group>org.apache.geronimo.specs</cxf.servlet-api.group>
+ <cxf.servlet-api.artifact>geronimo-servlet_3.0_spec</cxf.servlet-api.artifact>
+ <cxf.servlet-api.version>1.0</cxf.servlet-api.version>
+ <cxf.spring.version>3.0.5.RELEASE</cxf.spring.version>
+ <cxf.spring.mock>spring-test</cxf.spring.mock>
+ <cxf.stax.impl.groupId>org.codehaus.woodstox</cxf.stax.impl.groupId>
+ <cxf.stax.impl.artifactId>woodstox-core-asl</cxf.stax.impl.artifactId>
+ <cxf.stax.impl.version>4.0.8</cxf.stax.impl.version>
+ <cxf.wsdl4j.version>1.6.2</cxf.wsdl4j.version>
+ <cxf.xmlbeans.version>2.4.0</cxf.xmlbeans.version>
+ <cxf.xmlschema.version>1.4.7</cxf.xmlschema.version>
+ <cxf.checkstyle.extension />
+
+ <cxf.spring.validation.mode>VALIDATION_AUTO</cxf.spring.validation.mode>
+
+ <cxf.downloadSources>true</cxf.downloadSources>
+
+ <cxf.pmd.eclipse.ruleset>cxf-pmd-ruleset.xml</cxf.pmd.eclipse.ruleset>
+
+ <cxf.resources.base.path />
+
+ </properties>
+
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/resources-filtered</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>target/generated/src/main/resources</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/test/java</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </testResource>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>target/generated/src/test/resources</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </testResource>
+ </testResources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${cxf.eclipse.outputDirectory}</outputDirectory>
+ <buildcommands>
+ <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
+ <java.lang.String>net.sf.eclipsecs.core.CheckstyleBuilder</java.lang.String>
+ <java.lang.String>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</java.lang.String>
+ </buildcommands>
+ <projectnatures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+ <nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
+ </projectnatures>
+ <ajdtVersion>none</ajdtVersion>
+ <additionalConfig>
+ <file>
+ <name>.checkstyle</name>
+ <location>/cxf-eclipse-checkstyle${cxf.checkstyle.extension}</location>
+ </file>
+ <file>
+ <name>.pmd</name>
+ <location>/cxf-eclipse-pmd</location>
+ </file>
+ <file>
+ <name>.ruleset</name>
+ <location>/${cxf.pmd.eclipse.ruleset}</location>
+ </file>
+ </additionalConfig>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.6</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.puppycrawl.tools</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf.build-utils</groupId>
+ <artifactId>cxf-buildtools</artifactId>
+ <version>${cxf.build-utils.version}</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ <executions>
+ <execution>
+ <id>validate</id>
+ <phase>validate</phase>
+ <configuration>
+ <configLocation>${cxf.resources.base.path}cxf-checkstyle${cxf.checkstyle.extension}.xml</configLocation>
+ <consoleOutput>true</consoleOutput>
+ <failsOnError>true</failsOnError>
+ <linkXRef>false</linkXRef>
+ <suppressionsLocation>${cxf.resources.base.path}cxf-checkstyle-suppressions.xml</suppressionsLocation>
+ <sourceDirectory>${basedir}/src</sourceDirectory>
+ <excludes>**/archetype-resources/**/*.java</excludes>
+ </configuration>
+ <goals>
+ <goal>checkstyle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.5</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf.build-utils</groupId>
+ <artifactId>cxf-buildtools</artifactId>
+ <version>${cxf.build-utils.version}</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <rulesets>
+ <ruleset>${cxf.resources.base.path}cxf-pmd-ruleset.xml</ruleset>
+ <ruleset>${cxf.resources.base.path}cxf-pmd-custom.xml</ruleset>
+ </rulesets>
+ <sourceEncoding>UTF-8</sourceEncoding>
+ <targetJdk>1.5</targetJdk>
+ <linkXRef>false</linkXRef>
+ <includeTests>true</includeTests>
+ <verbose>true</verbose>
+ <excludeRoots>
+ <excludeRoot>${basedir}/src/main/generated</excludeRoot>
+ </excludeRoots>
+ </configuration>
+ <executions>
+ <execution>
+ <id>validate</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ <include>**/*TestCase.java</include>
+ <include>**/*TestCases.java</include>
+ </includes>
+ <!-- do not exclude **/Abstract*Test.java **/Abstract*TestCase.java -->
+ <excludes>
+ <exclude>**/*$*</exclude>
+ </excludes>
+ <!--disableXmlReport>true</disableXmlReport-->
+ <reportFormat>${cxf.surefire.format}</reportFormat>
+ <useFile>${cxf.surefire.usefile}</useFile>
+ <forkMode>${cxf.surefire.fork.mode}</forkMode>
+ <childDelegation>false</childDelegation>
+ <argLine>${cxf.surefire.fork.vmargs}</argLine>
+ <parallel>${cxf.surefire.parallel.mode}</parallel>
+ <systemPropertyVariables>
+ <useRandomPorts>true</useRandomPorts>
+ <cxf.validateServiceSchemas>${cxf.validateServices}</cxf.validateServiceSchemas>
+ <java.awt.headless>${java.awt.headless}</java.awt.headless>
+ <java.util.logging.config.file>${basedir}/target/test-classes/logging.properties</java.util.logging.config.file>
+ <org.apache.activemq.default.directory.prefix>${basedir}/target/ActiveMQ/</org.apache.activemq.default.directory.prefix>
+ <derby.system.home>${basedir}/target/derby</derby.system.home>
+ <spring.validation.mode>${cxf.spring.validation.mode}</spring.validation.mode>
+ <server.launcher.vmargs>${cxf.server.launcher.vmargs}</server.launcher.vmargs>
+ <!-- If we close the port after a client in the same JVM has opened a keep-alive
+ connection, on some Linux's, the socket remains consumed until
+ some timeout occurs. That may cause some tests to timeout/hang. -->
+ <org.apache.cxf.transports.http_jetty.DontClosePort>false</org.apache.cxf.transports.http_jetty.DontClosePort>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.cxf.build-utils</groupId>
+ <artifactId>cxf-xml2fastinfoset-plugin</artifactId>
+ <version>${cxf.build-utils.version}</version>
+ <configuration>
+ <includes>
+ <include>META-INF/cxf/cxf*.xml</include>
+ </includes>
+ <outputDirectory>target/generated/src/main/resources</outputDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>xml2fastinfoset</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>xml2fastinfoset</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <version>1.1</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf.build-utils</groupId>
+ <artifactId>cxf-buildtools</artifactId>
+ <version>${cxf.build-utils.version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <resourceBundles>
+ <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
+ </resourceBundles>
+ <supplementalModels>
+ <supplementalModel>notice-supplements.xml</supplementalModel>
+ </supplementalModels>
+ <properties>
+ <projectName>Apache CXF</projectName>
+ </properties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <version>2.1_3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.fastinfoset</groupId>
+ <artifactId>FastInfoset</artifactId>
+ <version>1.2.8</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0.4</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0.4</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <scope>provided</scope>
+ <version>2.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <scope>provided</scope>
+ <version>2.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>httpunit</groupId>
+ <artifactId>httpunit</artifactId>
+ <version>1.6.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xmlParserAPIs</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jtidy</groupId>
+ <artifactId>jtidy</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jra</groupId>
+ <artifactId>jra</artifactId>
+ <version>1.0-alpha-4</version>
+ </dependency>
+ <dependency>
+ <groupId>jtidy</groupId>
+ <artifactId>jtidy</artifactId>
+ <version>4aug2000r7-dev</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.parsers</groupId>
+ <artifactId>jaxp-ri</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicemix.specs</groupId>
+ <artifactId>org.apache.servicemix.specs.jbi-api-1.0</artifactId>
+ <version>1.5.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.neethi</groupId>
+ <artifactId>neethi</artifactId>
+ <version>2.0.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-parent</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+
+
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jettison</groupId>
+ <artifactId>jettison</artifactId>
+ <version>1.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>${cxf.stax.impl.groupId}</groupId>
+ <artifactId>${cxf.stax.impl.artifactId}</artifactId>
+ <version>${cxf.stax.impl.version}</version>
+ <!-- these are motivated by Woodstox, but they can't hurt with others. -->
+ <exclusions>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ <!-- this one comes from sjsxp -->
+ <exclusion>
+ <groupId>javax.xml.stream</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>${cxf.jetty.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
+ <version>${cxf.jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <version>${cxf.jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.schema</groupId>
+ <artifactId>XmlSchema</artifactId>
+ <version>${cxf.xmlschema.version}</version>
+ <exclusions>
+ <!-- on IBM jdk, XmlSchema pulls these in -->
+ <exclusion>
+ <groupId>org.apache.bcel</groupId>
+ <artifactId>bcel</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.soap</groupId>
+ <artifactId>saaj-api</artifactId>
+ <version>${cxf.saaj.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>activation</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>${cxf.jaxb.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jsr173_api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.xml</groupId>
+ <artifactId>jsr173</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.xml.stream</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>${cxf.saaj.impl.groupId}</groupId>
+ <artifactId>${cxf.saaj.impl.artifactId}</artifactId>
+ <version>${cxf.saaj.impl.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>activation</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>${cxf.jaxb.impl.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jsr173_api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.xml</groupId>
+ <artifactId>jsr173</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jms</artifactId>
+ <version>${cxf.spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>${cxf.spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${cxf.spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${cxf.spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${cxf.spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${cxf.spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${cxf.spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${cxf.spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-core</artifactId>
+ <version>2.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-core-tiger</artifactId>
+ <version>2.0.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-dao</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-remoting</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-support</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-acl</artifactId>
+ <version>2.0.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-dao</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-remoting</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-support</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-dao</artifactId>
+ <version>2.0.8</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-remoting</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-support</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>${cxf.spring.mock}</artifactId>
+ <version>${cxf.spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>1.5.5</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>3.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.6.4</version>
+ </dependency>
+ <dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <version>${cxf.wsdl4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-xjc</artifactId>
+ <version>${cxf.jaxb.xjc.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jsr173_api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>jaxme</groupId>
+ <artifactId>jaxme2</artifactId>
+ <version>0.5.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-annotation_1.0_spec</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>${cxf.servlet-api.group}</groupId>
+ <artifactId>${cxf.servlet-api.artifact}</artifactId>
+ <version>${cxf.servlet-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.1_spec</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+ <version>2.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_3.0_spec</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+ <version>1.1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jaxws_2.2_spec</artifactId>
+ <version>${cxf.specs.jaxws.api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>${cxf.activemq.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>${cxf.rhino.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlbeans</groupId>
+ <artifactId>xmlbeans</artifactId>
+ <version>${cxf.xmlbeans.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xml-resolver</groupId>
+ <artifactId>xml-resolver</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15</artifactId>
+ <version>1.45</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-core</artifactId>
+ <version>${cxf.abdera.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.0.2_spec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-extensions-json</artifactId>
+ <version>${cxf.abdera.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-client</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-server</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-extensions-html</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.0.2_spec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.abdera</groupId>
+ <artifactId>abdera-parser</artifactId>
+ <version>${cxf.abdera.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.1_spec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xmlParserAPIs</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xercesImpl</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xom</artifactId>
+ <groupId>xom</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xalan</artifactId>
+ <groupId>xalan</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-api</artifactId>
+ <version>1.2.9</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xmlParserAPIs</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xercesImpl</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xom</artifactId>
+ <groupId>xom</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xalan</artifactId>
+ <groupId>xalan</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-impl</artifactId>
+ <version>1.2.9</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1.1</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>jdom</artifactId>
+ <groupId>jdom</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>dom4j</artifactId>
+ <groupId>dom4j</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xmlParserAPIs</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xercesImpl</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xom</artifactId>
+ <groupId>xom</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xalan</artifactId>
+ <groupId>xalan</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- if we use the new woodstox artifact, we're using the new version -->
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>woodstox-core-asl</artifactId>
+ <version>4.0.8</version>
+ </dependency>
+ <dependency>
+ <groupId>net.java.dev.msv</groupId>
+ <artifactId>msv-core</artifactId>
+ <version>${cxf.msv.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ <configLocation>cxf-checkstyle${cxf.checkstyle.extension}.xml</configLocation>
+ <consoleOutput>true</consoleOutput>
+ <failsOnError>true</failsOnError>
+ <linkXRef>false</linkXRef>
+ <suppressionsLocation>cxf-checkstyle-suppressions.xml</suppressionsLocation>
+ <sourceDirectory>${basedir}/src</sourceDirectory>
+ <excludes>**/archetype-resources/**/*.java</excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <profiles>
+ <profile>
+ <id>jdk15</id>
+ <activation>
+ <jdk>1.5</jdk>
+ </activation>
+ <properties>
+ <cxf.jaxb.version>${cxf.jaxb22.version}</cxf.jaxb.version>
+ <cxf.jaxb.impl.version>${cxf.jaxb22.impl.version}</cxf.jaxb.impl.version>
+ <cxf.jaxb.xjc.version>${cxf.jaxb22.impl.version}</cxf.jaxb.xjc.version>
+ <jdk.version>1.5</jdk.version>
+ </properties>
+ </profile>
+ <profile>
+ <id>validateServices</id>
+ <properties>
+ <cxf.validateServices>true</cxf.validateServices>
+ </properties>
+ </profile>
+ <profile>
+ <!-- sjsxp is really the precursor to the jaxp-ri jars. However, getting the jaxp-ri jar to work on
+ Java 5 requires endorsing it which is non-trivial in maven :-(.
+ -->
+ <id>sjsxp</id>
+ <properties>
+ <cxf.stax.impl.groupId>com.sun.xml.stream</cxf.stax.impl.groupId>
+ <cxf.stax.impl.artifactId>sjsxp</cxf.stax.impl.artifactId>
+ <cxf.stax.impl.version>1.0.1</cxf.stax.impl.version>
+ </properties>
+ </profile>
+ <profile>
+ <!-- This really only works with Java 6 as the classes are identically named with the same classes in the Java 5 JDK
+ and the Java 5 versions get picked up instead -->
+ <id>jaxpri</id>
+ <properties>
+ <cxf.stax.impl.groupId>com.sun.xml.parsers</cxf.stax.impl.groupId>
+ <cxf.stax.impl.artifactId>jaxp-ri</cxf.stax.impl.artifactId>
+ <cxf.stax.impl.version>1.4.2</cxf.stax.impl.version>
+ </properties>
+ </profile>
+ <profile>
+ <id>axis2-saaj</id>
+ <properties>
+ <cxf.saaj.impl.groupId>org.apache.axis2</cxf.saaj.impl.groupId>
+ <cxf.saaj.impl.artifactId>axis2-saaj</cxf.saaj.impl.artifactId>
+ <cxf.saaj.impl.version>1.4.1</cxf.saaj.impl.version>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>fastinstall</id>
+ <properties>
+ <maven.test.skip>true</maven.test.skip>
+ <pmd.skip>true</pmd.skip>
+ <checkstyle.skip>true</checkstyle.skip>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>nospringvalidation</id>
+ <properties>
+ <cxf.spring.validation.mode>VALIDATION_NONE</cxf.spring.validation.mode>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>nochecks</id>
+ <properties>
+ <pmd.skip>true</pmd.skip>
+ <checkstyle.skip>true</checkstyle.skip>
+ </properties>
+ </profile>
+
+ <profile>
+ <!-- default profile enables checkstyle and Xlint stuff -->
+ <id>sourcecheck</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>${cxf.compile.show.deprecation}</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <compilerArgument>${cxf.compile.flags}</compilerArgument>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>set.eclipse.output</id>
+ <properties>
+ <cxf.eclipse.outputDirectory>${basedir}/eclipse-classes</cxf.eclipse.outputDirectory>
+ </properties>
+ </profile>
+
+ <profile>
+ <!-- pmd and checkstyle, no tests. -->
+ <id>justsourcecheck</id>
+ <properties>
+ <maven.test.skip.exec>true</maven.test.skip.exec>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <compilerArgument>${cxf.compile.flags}</compilerArgument>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>setup.eclipse</id>
+ <build>
+ <defaultGoal>process-test-sources</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>setup.eclipse.project</id>
+ <phase>process-test-sources</phase>
+ <goals>
+ <goal>eclipse</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>ibmjdk</id>
+ <activation>
+ <property>
+ <name>java.vendor</name>
+ <value>IBM Corporation</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <compilerArgument>${cxf.compile.flags}</compilerArgument>
+ <fork>true</fork>
+ <maxmem>512M</maxmem>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>spring2</id>
+ <properties>
+ <cxf.spring.version>2.5.6.SEC02</cxf.spring.version>
+ </properties>
+ </profile>
+ <profile>
+ <!-- Profile to clean even if you do not have the cxf plugins in
+ your local mavven repo -->
+ <id>clean</id>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>apache.snapshots</id>
+ <url>http://repository.apache.org/snapshots/</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <build>
+ <defaultGoal>clean</defaultGoal>
+ </build>
+ </profile>
+ </profiles>
+</project>
+
+
+
13 years, 4 months
JBossWS SVN: r14800 - in thirdparty/cxf/branches: cxf-2.3.1 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-08-12 05:40:55 -0400 (Fri, 12 Aug 2011)
New Revision: 14800
Added:
thirdparty/cxf/branches/cxf-2.3.1/
thirdparty/cxf/branches/cxf-2.3.1/.gitignore
thirdparty/cxf/branches/cxf-2.3.1/KEYS
thirdparty/cxf/branches/cxf-2.3.1/pom.xml
Log:
importing CXF 2.3.1 tag - (per partes) because of unreliable SVN RH repo :(
Added: thirdparty/cxf/branches/cxf-2.3.1/.gitignore
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/.gitignore (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/.gitignore 2011-08-12 09:40:55 UTC (rev 14800)
@@ -0,0 +1,8 @@
+.checkstyle
+.classpath
+.pmd
+.project
+.ruleset
+.settings/
+target/
+velocity.log
Added: thirdparty/cxf/branches/cxf-2.3.1/KEYS
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/KEYS (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/KEYS 2011-08-12 09:40:55 UTC (rev 14800)
@@ -0,0 +1,368 @@
+pub 1024D/D872E270 2006/10/12
+uid Bozhong Lin <blin(a)iona.com>
+sub 1024g/E8DB0FEE 2006-10-12
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: PGP Key Server 0.9.6
+
+mQGiBEUtlPURBACpqxng6iMNdYkGCBGS2vFT3zeGU4pgpUiZvQapzNHJm2FovXfz
+GS2OCAOQd+K0g5/ujjBfaCXgyCdiPgG3cf95FlzZDlYREW0fpvprqMpiPbnqvAjL
+vm7MTrJ+FZTVwj+tGJEPdDuJQjf5N1Jhm7DE7pzYNQifaBM0VK3kLKX78wCgxJNo
+CndIg5o2yaTuo9ZK2/ESkNED/0s+fOG/9EHrQeBEH64lWECmeB6R75xno77K7BdD
+Y8TqPBbLR3iLBXRQ1TrYgy/8eTlzGM13onnh6wPb+gJtC0mCZK2C5iG4ibjKaOty
+O+Wa+Yw/KKH6Nr6BE0a+Wyn+ukqMOeu6fEsbkAnit7EOKtguRTqFCk4iOE4+XokS
+7RUqA/9QBtxQTvUwyGj9NycRyGa+LHSk43GHKUWzWeViEAeoldGwadfpdO+tsNnK
+FWFKs44Po1mUBMkdCV4EDxerc2owPbQATmDyYnJyg/l285aX6NpCrMx5lapeHvFc
+lO9WEN2i8DIP1UXhsmSTACO2A+AjxHUOHxe1EuH7B/NX7ERkkLQbQm96aG9uZyBM
+aW4gPGJsaW5AaW9uYS5jb20+iEYEEBECAAYFAkU07M4ACgkQq8juObtVB0b59wCc
+C1l8TEtmvn51SN2cl6UhaXKvwSoAn1RBGS6mpbEEdx8UnfxGswCCExkWiEYEEBEC
+AAYFAkU+ttIACgkQa+KOrr/QMHznCgCghEGYSNR/8Aw9qwZq1uHbhkwXyqQAoJIN
+MnzSM9C/kfnI9H/wyEHmRkt3iGYEExECACYFAkUtlPUCGwMFCQlmAYAGCwkIBwMC
+BBUCCAMEFgIDAQIeAQIXgAAKCRCXe/3Q2HLicBiDAKDCmq53/nBDT6l8xlp/gOc3
+MP9Y6ACfUTjAArY37bpF3LarC0wgieKzpkO5AQ0ERS2U+BAEAI3FDhxJIlADwLiU
+rIa+aBumALi9VD/c6QBJ3oOT+bXH2Zjz1b5YLv2ahPgRudrSkLOPvF4D7L1EuQem
+GQKKjk779JUjReTE+4GksycMxLwhU3gfFLYn3LVgfPLA7bitbwCBVWSXAD1oO3NS
+bANwsiuqNlkYKUUhrmRJTakn3nePAAQNA/4rlXwdK8LP/t+PXnoeLNL1TP6lzClz
+XsOVbIed0YVAhVWcVMXtr959N8fTdAaeIUv4MH7DtQWo14/YHWcAO9cNnN4KkwJ0
+Be9Vx52A68wR82WFl4WVFVD0gwnGRcMLJUcdk4EDW2HlIhLFMcvTPhLCaV4U0qYd
+ubWZv9cJooSc4ohPBBgRAgAPBQJFLZT4AhsMBQkJZgGAAAoJEJd7/dDYcuJwrMcA
+oMODlzUh/weSum1R/+8vb1WMOnE3AJ9wiQI7k774Rriyy630Xuuj2Fv3Uw==
+=4dkT
+-----END PGP PUBLIC KEY BLOCK-----
+
+pub 1024D/BB550746 2006-10-04
+ Key fingerprint = 8FE7 A0B2 4B77 E888 EF5A 5CE8 ABC8 EE39 BB55 0746
+uid J. Daniel Kulp <dan(a)kulp.com>
+uid J. Daniel Kulp <daniel.kulp(a)iona.com>
+uid J. Daniel Kulp <dkulp(a)apache.org>
+uid J. Daniel Kulp <dkulp(a)progress.com>
+sub 2048g/DCA3FD2C 2006-10-04
+
+pub 4096R/F43856A3 2009-08-22
+ Key fingerprint = 51B5 2DC5 DD45 2F92 BE34 2CC2 858F C4C4 F438 56A3
+uid J. Daniel Kulp <dan(a)kulp.com>
+uid J. Daniel Kulp <dkulp(a)apache.org>
+uid J. Daniel Kulp <dkulp(a)progress.com>
+sub 4096R/6A36A392 2009-08-22
+
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v2.0.12 (GNU/Linux)
+
+mQGiBEUj3noRBADAdi2ImIZcsa8eANp/jH+LOZ3Pi60685V6xd/ElHsnCa6QDvFX
+7CwhtEKqAlOweB22NLgPSzcuJtary0VG0HCc927Itzo6++ScVMfewasfctYKtFgi
+XIoFphtg0tCfUoRE4xiuICzwCmjBkyHflWPQ2fB88QpiWvbZm/oW6lNkIwCgneiI
+LrHbudOdNMGuNQLWB7FDO/8EALs+L2veKHIUxCxWrRq+UUavfhGeMqUiOZUQysVT
+aDirsQWrs/b0bhgfaeoRUrq5v+sg0U2iehQktR01HBZ5QoNQi6A6kUd7suMGvRbs
+4+FPRa8FRzZrGGItNin8J4BRxJBBt9qPLX5VWC4DLwBYcEBOveaNu0sfUYviXYDb
+C/s6BAC1ktmPc0ELn9qLR2A7ldBlxrIN9i3+uUdHfhXNvw3peDA7IJYeJ2tMEY0n
+yxzpHp7bcTTLwWtM3y58slBGfkeQbwopipsDw5b/OCC8jT9s4vuGeeT3L8CmxJbt
+k5Vsx0umVGbg4tNhmdCkDyyAKQRNxSfGt9x4qUFrkltAsKxZUrQdSi4gRGFuaWVs
+IEt1bHAgPGRhbkBrdWxwLmNvbT6IZAQTEQIAJAIbAwIeAQIXgAIZAQUCSgHw7QUL
+CQgHAwUVCgkICwUWAgMBAAAKCRCryO45u1UHRvURAJ0cNZRtrOLD1mkDIhG/x4AI
+0JHYOQCgmO9DuTZLQct29/uCLOfqdTD8OteIRgQQEQIABgUCRS2xsQAKCRCXe/3Q
+2HLicKdUAJ9QBgrqANug51kDHHYAHM5LDRjdQgCgwQaZ3ABb24S5TAhhiHerF9GG
+tW2IRgQQEQIABgUCRS8vwAAKCRBbloAQ4E+aifWkAJwN0kAqJ8RXYLGHoUdp3Ulv
+msn4GQCZAbDVyVJNNuWNz2TEBl5J9NKDqoyIRgQQEQIABgUCRTCZdwAKCRAN8HRd
+q4IfvE2bAKCQGOGW3/1zgNf9KYiykw8YP2kINACdFE3BwWkdD5FiKoxDWjdZx/c7
+b3yIRgQTEQIABgUCRTQRxAAKCRB4voXZZpxKte//AJ9N1O09qzERjGOMbphsgIYC
+eexmgACeLwTD4V3SP0OVky8/9TcimY5Y+X6IRgQQEQIABgUCRTQdOAAKCRBeRSbO
+mZKt/KcaAKDJzpoT1IZIvGfpO19ixzL+qnTjIgCguBwuCPGAbadGOOA5xhBs55uR
+1r6IRgQQEQIABgUCRTQwXwAKCRCZLEP9X3iYqWuiAJ9QQAthhSj40t8wDBj2vdnR
+n93l6wCdGsqtFGrTIlmQJ8Tczmn7+9q8wBSIRgQQEQIABgUCRTZPfwAKCRCLOmAf
+CMl15cREAJ4yU5b4e2ThDF41ryIBala6+6wErgCgiZwK7OhrlVd8YMd5YiZDyKz2
+RXmIRgQQEQIABgUCRTkHhQAKCRBgKNb8nTr9T2hhAJ9WAvFLce+jr1O4jvw7ajrN
+E7bbpQCcCIHQvo8tueLGnzJFn7kAdSLtZiuIRgQQEQIABgUCRT4Q2gAKCRDJHbja
+m8/OLzzWAKDoY5MrpeWFcA3/BPzlZskLwPMYBQCeNv6w6tY9vLx/PX4ChyBqbhjr
+HaSIRgQQEQIABgUCRT61mwAKCRBr4o6uv9AwfOGWAKCFJpNqAhSAlH9Re5TRux4Y
+95vRyQCfb0fbaNsOOip2KOYOiYYFAoIyTj6IRgQQEQIABgUCRUKpgQAKCRASQbyH
+LF5OwEzlAJ9zNLgYQoIOd/u7TupIyyqpWipragCeMt1V7rQ4YZjWtNQLGjPdBNOc
+Dm2IRgQQEQIABgUCRWH7HwAKCRD8d3QRMp2A0veCAJ0WmYKudCRI8H2+uqDFbMRh
+1uuPIQCgiFc9/mjLqJRVbX/T3dVH2llKQDKIRgQQEQIABgUCRYKMEQAKCRBK4siH
+Zl4HYLPdAJ4gGFBXDg1j81wJubgqKv9WZshWfACeIVx9iDIRFcHkyPk0ikChdkT/
+B4iIRgQQEQIABgUCRYWMHwAKCRATLknU5B7cfuHFAJ91BYYzqemkaspOBII1GQ4r
+AdCnsACeK72g9T3krwNx9xaJZH1jr7l05C2IRgQQEQIABgUCRS2vhAAKCRAQEguc
+UICtdkkWAKCY7Q+iMY17ftdlvzBz7BvhUmNbwwCgteK6N4q1dpqeazlBq7Ii8uRc
+XAmIRgQQEQIABgUCR2bIKAAKCRAINWtR4xr1M++nAJ48WcXkUR1DolsXU4jQ3soK
+ye1LQQCfRWw/tFebU1QjDWUJL7I5SCKozpSIcQQQEQIAMQUCRkjN6CocSGVubmlu
+ZyBTY2htaWVkZWhhdXNlbiA8aHBzQGludGVybWV0YS5kZT4ACgkQMoZOQZyFIivE
+sACfYRvqwtd65fecVB8eTfkob57AuNQAnj4IvS2t6Y5CwnW1LDixYgCV5BcBiGME
+ExECACMCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUCRSPhRgIZAQAKCRCryO45
+u1UHRh/7AKCD5S6Yz40OvnsdQdJ5ZQV2m5D+xQCfdBJ+/ue29qVQg+6pkZJDu5+a
+2LuJAhwEEAEIAAYFAkqQPCoACgkQhY/ExPQ4VqNkrw/9GU++s4FJDvNuhcT8EGqE
+JmAucwnBiYRG3eW2JVpAmLXqSskgY3HdRl3rW+ATfkNcxPBZL3yqIVReMbe2YnAp
+W2wUfeWi6QYKjshLCOl5Sh1IZmBf/4qsbx9qPnlj2DDuzL3kfhBpnGd2HWC3QErQ
+Gz+fGfN1Ayyh118GIvfblH3ccquacbQE2xneeHN5IYUjXw0fnVMf/Uotp/pRqkWf
+xjObuvF1UM7Olr13dqISMjOCJvO/Ieei1X6IsIZrkwDL1ZGb/JYTZWwnbVP8i6VT
+ReGlRXzR4FMJ3y22xhhOMmNVIDEAqoaWvKT39OIEhiz/HEpQo9iXGk6EhqI3DyFH
+eUXWtjQTDlsekZQNEoLLYNqFSnUNhr0NF8rqkOttpaVu/p8ZLXXs8EpMEP+Xar2D
+R6QLFtNZxbdP+daHMeQOLY+4vl5Ec8x7E0MFoj3qkhuSAbh+EJ17BWQ4qkn82a9A
+rAIcqjuQbnqvDkv1K/O6dk0Zb32vb3IFbA7gT+MFa5/QklnTI0WYnf/vJUVL2W5D
+H38IDiolM0IjnudhdoA5ANd+uavqO5KQRJREAh0tGe4hvakfp9Sxr5RolcBuGVyD
+CDrPUwm8ExW/EJ8sabfGM9pToceqnmcFLJFqlvcFiJrM3xsK6KTrAwxUik5zdYHh
+jwCFG/farycwzq/wjsjZmDO0JUouIERhbmllbCBLdWxwIDxkYW5pZWwua3VscEBp
+b25hLmNvbT6IYQQTEQIAIQIbAwIeAQIXgAUCSgHw8gULCQgHAwUVCgkICwUWAgMB
+AAAKCRCryO45u1UHRq+MAJ9pIY5WHb9FmRtGEoRHRAhTVBW9FQCdFLzADlGKmdUm
+sZd24INFkMB0oleIRgQQEQIABgUCRS2xtgAKCRCXe/3Q2HLicDN7AJ9Is2z4kMD/
+6oVVU7Jh5jmzTI1UdACgqLIoqDFhSoVTBvMoD0Gvv6CVMDOIRgQQEQIABgUCRS8v
+xAAKCRBbloAQ4E+aiUU3AKCRCU8xBPklfNNNX+jXeacAO+KO9ACgk6n8UZtWRYCZ
+2IT1G0E7m6GMmLKIRgQQEQIABgUCRTCZeAAKCRAN8HRdq4IfvIwXAJ9epm4vASS4
+3rYj1k9W/xlXoD9yIgCeMTiwXrnIdNW3Uowx0aDP8R0WHOqIRgQTEQIABgUCRTQR
+xAAKCRB4voXZZpxKtXlLAJ93lb52jMHLRkOh6LA4hNNpndHbrgCeN5lDLNrNSmPR
+T7Gf9Xm5kRViDc+IRgQQEQIABgUCRTQdOQAKCRBeRSbOmZKt/MXzAJ9VE3ZYgBWz
+bEHN6ZJAm6wWJ67nrgCg3UsbiGIdOgf4aLTbYAnHwy3uDq+IRgQQEQIABgUCRTQw
+XwAKCRCZLEP9X3iYqVAxAJ95AzEkYQgpX33iLcxdOS4Dm1fkmQCfcZ5zCiO5ViOZ
+AFjxuVDhLVrqUF6IRgQQEQIABgUCRTZPgQAKCRCLOmAfCMl15a5OAKD/GjYOW6Z5
+HPS+SpZp9xh8b0TTqgCeIXQU6BJqmZzXGAjlEV/MKLyYQhCIRgQQEQIABgUCRTkH
+iAAKCRBgKNb8nTr9Tzd+AKCQ6I/bD4IoIVBSiutBl5svLyIEnwCfQ3vrvMBj6hO2
+KHf8V3l7getWNz2IRgQQEQIABgUCRT4Q3AAKCRDJHbjam8/OL6MtAKDGGM79lBKo
+zdozuBt16d5Wa9SvkACfQuf6cT82k2WkdLmOyFac9iJIFJaIRgQQEQIABgUCRT61
+ogAKCRBr4o6uv9AwfCuMAJ91eh27ZWQVt3A2Bcqdbg+5OVK7zgCfRz/sV/t9uVeK
+L89v/TP8U9QETBmIRgQQEQIABgUCRUKpgQAKCRASQbyHLF5OwNNNAKCYROmsCXFi
+sn5Jl23teBG1t+O+qwCfdFQU9ShUbosSpusSwwZzswPmmNuIRgQQEQIABgUCRWH7
+JgAKCRD8d3QRMp2A0gshAJ4rwGHEcaKWSV2MJECovAYSwfDm2QCfYiRpcOgUh2mh
+hozMYzyAsrjVrnWIRgQQEQIABgUCRYKMFQAKCRBK4siHZl4HYDnnAJ0SQyVFBCTR
+1L+QFcKwhrNPuR7wBwCfUup4P9vDO2pg2TDs5ZbTGoGsB/iIRgQQEQIABgUCRYWM
+IQAKCRATLknU5B7cfp0KAJ4vGNHAhBnFtyHTWxP99eRSg0CZjACgnUnh7q+DvLBd
+q15sWZRGPSKKihKIRgQQEQIABgUCRS2viwAKCRAQEgucUICtdn3mAKC+B+vaituj
+orzRRCmMB3YbK9BQygCgyV6C7BHpInp7bvU84BD/QT95uc6IRgQQEQIABgUCR2bI
+MAAKCRAINWtR4xr1M4BJAKCByLsVRvheA0FqYVRxuFatxhFijwCeKX5njjeOTSoI
+unf7kPqS6v8aOg2IcQQQEQIAMQUCRkjN6CocSGVubmluZyBTY2htaWVkZWhhdXNl
+biA8aHBzQGludGVybWV0YS5kZT4ACgkQMoZOQZyFIivEsACfYRvqwtd65fecVB8e
+Tfkob57AuNQAnj4IvS2t6Y5CwnW1LDixYgCV5BcBiGAEExECACAFAkUj370CGwMG
+CwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRCryO45u1UHRhrbAKCNIpm3tCvUaDi6
+5aSW+aDU0KA3WQCeOuihsG7wyR5OSUjsdEcysMd87yGJAhwEEAEIAAYFAkqQPC8A
+CgkQhY/ExPQ4VqPCcw//e0uV77a8isevwOEbmlACn6/+2+nTBEmMSp8BXb7LS9uS
+9uJCwZRfAV9MCFB+ne0ZSt7FEXJy6KqAugbcIAWwEN9E4wqQwMo4yTAVG5x9qErS
+lRBpGyktzs57QuL3ynDvgg78uChICt1fcozjg2X6WtSqD6EHfO7+xLdE21752TtG
+/4ARc2TBBHcYWr+oXOBtcsEWI6ieMQ6wVEdo7MawVF39EGdudYYSPJvkiaH5/lbK
+BhFOYn/NDYswxQsVJx0YRKaReAKQEnIynfZG9yxSiCVT6Ww4uWZdcYMGKvL3gHdi
+hgThRzJMWUBzB9diXu0RN6Fu5dzOPLwF0cRGYuxTkCxbXLS3qJBpq4YAj058nF9X
+PyxFD+PbDk/HxRCHRRBX+TIJ5R9G0uKzMSl7Ugbj6OIH/9rebqnwCCDxK4xHtPbf
+E9MRd6uNqcEn+/CH36kiJNft87NbvxP5FUdLLZTjwMZJ1KR8/taUXjw9QaEA12dV
+FnauWdIDazuH7VvhYzLYD5UP3ypTFXzW5porzBoX+iT1P91JXxAVIAgXq+OJeKTR
+hRou2bqC5jugutEtxttFJTszIHP5/34HL1oZ1RaQzxHeswwytVTsNUE5JWblJRE3
+5gCjuS9tdJYN+nWJ8EAKXDmJxePiM1OF/Xd10bhjhMj1YRIXEJatigbRsHMXhwS0
+IUouIERhbmllbCBLdWxwIDxka3VscEBhcGFjaGUub3JnPohhBBMRAgAhAhsDAh4B
+AheABQJKAfDyBQsJCAcDBRUKCQgLBRYCAwEAAAoJEKvI7jm7VQdGDdAAnAyxVuwh
+5S3VOZRYdJ4ZONN/XJ1DAJ96vyv5bno2hPb1cmNqtA5nQLMFiIhGBBARAgAGBQJF
+LbG2AAoJEJd7/dDYcuJwpqAAoI3jm2w4L2IJWw/RxyZB4SyCbTOnAJ42yp5iPdDw
+YlmNjM6NlaS6WINcDIhGBBARAgAGBQJFLy/EAAoJEFuWgBDgT5qJS14AnRfkiXfK
+AZIdfl0ta1IJRsWvPd27AJ9oH2xtwVcjMwK/BaJbym9beQFN0YhGBBARAgAGBQJF
+MJl4AAoJEA3wdF2rgh+8nG4AoIY37pNT8tttyAlXAkM4+eQolMd5AJ4txitoL8Yz
+mL2WVuLD6G+ggnFYKIhGBBMRAgAGBQJFNBHEAAoJEHi+hdlmnEq1IQIAn0sep6qL
+7WeNUaarNPaIWdN1P04VAJwNQdSk3yekAQEmYfrhxfDxNsKZg4hGBBARAgAGBQJF
+NB04AAoJEF5FJs6Zkq38fjEAnixSVaOUNG2U+SDeHx3B7Tc5KJ1yAJ9V3wIqQZ4S
+eAvtlekqjnz+rsL2yohGBBARAgAGBQJFNDBfAAoJEJksQ/1feJipFZcAn3/+JWpL
+N3SEJcsr1efgi0fEyS2DAJ9RhjHd0z/Ya7Bu7VBY0WBXHLkqn4hGBBARAgAGBQJF
+Nk+BAAoJEIs6YB8IyXXl//UAn18iJeKOHFR1aLMYOqm7duSQZ/1CAJ4uYfUhmSuA
+N9Jl3dKlhSqJcpGQ0ohGBBARAgAGBQJFOQeIAAoJEGAo1vydOv1PolEAnRj4tOtG
+nkiYegvtdMVcciK6n2pRAJ9Z9ayDWruqKALu1pB106LwpSCgSohGBBARAgAGBQJF
+PhDcAAoJEMkduNqbz84vm+gAoOnkxxN8tgXYd6aL7qZRQe9QS4W8AJ9KSGNOEcFs
+PJ7u4wRLbzS2WRrUaYhGBBARAgAGBQJFPrWiAAoJEGvijq6/0DB8LmkAn25UxzEy
+6O/O4lHLRaqzbXLDMXPXAJ4gkx//WuFaTUkFhs26o5a7RtE6/YhGBBARAgAGBQJF
+QqmBAAoJEBJBvIcsXk7A08YAn0JC2td+y9qxVyMuVc2lJNms9822AKCevWTzxklH
+SlXZGSQayXbx88xvk4hGBBARAgAGBQJFYfsmAAoJEPx3dBEynYDSMbQAniYuP/Zv
+zY41XnE3TCBbG2nUL5hEAKCMtQuluvkLFamtBOkymh2Vc+1WkYhGBBARAgAGBQJF
+gowVAAoJEEriyIdmXgdgtQMAnj7V3jfrP1bH1xcphwCs5Ghf8ufeAJ90IsSwUU96
+skU+nT6ICQROUxGS8IhGBBARAgAGBQJFhYwhAAoJEBMuSdTkHtx+H2kAn2qEWRAf
+PMbfajM0wLl5QT1C/s7tAJ0fvmAtPETYGNviCH9E/jMPODR94ohGBBARAgAGBQJF
+La+LAAoJEBASC5xQgK12wsoAn2eZqeEOdEQ98+iwXZLT3Ovt+MAPAJ4opnsNWlRC
+sBg1DDs6mGnbrYT/TIhGBBARAgAGBQJHZsgwAAoJEAg1a1HjGvUzya8AoIP8pvWW
+g2jheGUJMFllF4+7JPUcAJ9tNjpG7Jsb/MvpWcMnLyN7FAvkV4hxBBARAgAxBQJG
+SM3oKhxIZW5uaW5nIFNjaG1pZWRlaGF1c2VuIDxocHNAaW50ZXJtZXRhLmRlPgAK
+CRAyhk5BnIUiK8SwAJ9hG+rC13rl95xUHx5N+ShvnsC41ACePgi9La3pjkLCdbUs
+OLFiAJXkFwGIYAQTEQIAIAUCRSPfngIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA
+AAoJEKvI7jm7VQdG/Q8An0tXFexzDQrsza/4z5WvCnuPKjKmAJ9KISGbNt+Otc1h
+Zj1/aT+cXMAXvokCHAQQAQgABgUCSpA8MAAKCRCFj8TE9DhWo7XTD/0XBlLFtKNP
+DKZmIjO681oKXpXmmccw4UETbK5FUIwi5bnlfqhepjTz1XQENsAk6MrI6QE4tYQ1
+akW4pMXauXTo/f8oCy19J4JMH0k+Rd5jOKz4azmxfn0Mm58hdLXOR0FAoAPIKUQ8
+3JGIfSkCEwKzJKhzoaSlTPxlw4u4oj6rIuDtdjDInhzldbX/nQZGV+N4pi4oUZEY
+NY1x1g3C4qmUDHrNLk4n4YzsW1Cvj4HN4t7HCeA0glWs2QNjMn6GxGaxtUyGR2cG
+u1I/AF2rfQ6H4vOzNvLQBKZZ/cVbWRZaNWZFPlwCidq3Yxs/hnM48qxuVeAMM9nF
+s3Vl3a1vb7aHVY1c4YVOBT7dUuAcaMQfZ1led1km9QzjK6YgarAmwdMj8aVrTk2H
+8HEAtml69zzWjaRm0V7MwkY3Jk7y3qBW24MFrOv+z6mg00GiojNP0LNNstYjOIED
+RqaD5/q+joSRdsjb/HrwSrIFERLXy6TJeNp0UtdYmOuZSQUWrsjl1N8p10hAeQ3s
+CfYHsb5HSBKEX26jEeZ3svBNwVskaEYRyShp6mEnupAf906NPpGExLUQTQSRv7al
+loAMKjYnH+NgAopcFNgja43DYexFSBcEd8l4RIn0y4B44qSVoZcIwgDVDF724M2P
+rJQxcVlRxXcoU9QxXkRNUXmpJyER0Xyv+7QjSi4gRGFuaWVsIEt1bHAgPGRrdWxw
+QHByb2dyZXNzLmNvbT6IYQQTEQIAIQIbAwIeAQIXgAUCSgHw8gULCQgHAwUVCgkI
+CwUWAgMBAAAKCRCryO45u1UHRiuxAJ9673l2d9dzaV0fQTfga5HQiRk4IACeJbkZ
+yqbnLAEb8YUNVsZ+btK/QAOIYQQTEQIAIQUCSQot0wIbAwcLCQgHAwIBBBUCCAME
+FgIDAQIeAQIXgAAKCRCryO45u1UHRj5+AJ4zT6meAqeoXcTCWK0HpTuneGGP4gCe
+KFvhkRv48kMT2fBNVVd3McRQ6nWJAhwEEAEIAAYFAkqQPDAACgkQhY/ExPQ4VqOq
+wA//denQQrFVDVy7HBffbjWfsIs9JMFGsiatEZSKnR+IyIJBJj3oHzk1WCSNA3qZ
+lpMwkBtrDBB/Zg6XMnYNwD7TrMA12CufLfa6DdWH/Bxi8E2uSZmH+229N2eZLbqp
+HbXIicMku9tSmoWD7bEp2yaM33Ums91qnWOgm+pnv9XXj/LOk8cQgoN6rVhmtv53
+Q4ll4f2bWAQqry97fz+Ql70errXCSNmWa6bPRC0y0xuM6ULUP1qa2LcZySyNBgqA
+5IjG6Ce9Tvc+D2NR3UNDxui2cr0TZFZgbBdAXi2VeIa2ShNa1Vok2mJpxUmPQd/l
+8OqMJhK2i0AIl4Q0ktjtGjKiZ2wIefqZmvlOJw+E1vWmArytUfn0VcInK2QiAAUS
+fkHBVB0YYq9SEfwXmM8clcT2M0MDrgAsfnaPWjKRRRLufn24vLHgkWMkOv157UyY
+PeIHM2VibYrv8USgacBVR3adFUY9cc1qrS1XcsxpjA3W+8zLQKB/OtSzoF2yYIr7
+ucYKZqXphE8HRiAImJVGm5o2creiIo/llN3BCqX1FZhmXNE0UEaCgKUPzWfHweKZ
+wU5xlkPMKncvQUmev38h2KuQFfncYW1ow2MVw4ht863X1qK7KfNCw7zI90bg5Bin
+saRcx5iohxowomvR4kt9Z3vU9QulIqrfaqVUgzcPIWt/OaS5Ag0ERSPefRAIAJbg
+2FI9t7XxUDxBBWK1UobHxKbGSXjc9w4m60InKqlRvWnpW9vhMOeJ/uVUaCtzN4Gl
+K0bBeMMJCyCpTqYBJeqXgzzCw7RvEWKuidKeJ3pfjXnOi2f2rEkqCwpHYNhL8B/4
+PSz5CAsh2Ra8yHTHfuDakPmss4vcRHqgOQivYvdmkN0q8WC8/dF3luywQz1U/zfQ
+i18mKQBmN0mFrZOgBpQYgaX3wLrWbWTJFr3DSVeyGwFqTMQVk4ODbJDJHusI5H+l
+3MWdV2QZs6zume3ueuDn9nS/lWdJVWtBLFBkphPvCoGUs64nAZGQsZaw2El+8hlj
+YxQUP7Rlw26pIh3ql+sAAwUH/2DdCKxmWaqwIG12tkkoNEU8eLv3J8GEbrctfyDh
+txTeLCTZaZYnZlWkmyjGSJGtTxJfP4FUZpIduRufA1c8Dzmy+VRPjit4/a3BZ76w
+FU5GBK4HLiokrm9DzqoxQuv7umlLPD2umEx1re3wDTsDfS1X+DFHMJM9W0rUhuW8
+OJ/bhzFkb7OpPxHUDe8V6/zM5gbEtTZQLpCGsIr+NKpaMrEcJoki/Jdr1KM1B5nU
+zm1kQdlzMiX5k5OfGBZcIFh/hpqHxmwZtzxC7pIDCzYsXvVwnAlX8w54kOmGNqxw
+HekuZz/G2hY1GTFioxrpUmaLZZKJsnkOQ7qCh0rIMgY9kYqISQQYEQIACQUCRSPe
+fQIbDAAKCRCryO45u1UHRsXcAKCS5cI/je94h/VcrjnWQ2jRV43yLQCgi1f+R/B5
+yWjuX9+ZWoIPHPBZHKaZAg0ESpA5zAEQAJ09J8ECQebVvYZ06MHeAZ6vH8kOffNg
+2c2lxCszwOjRvEPCV9OrAsDQ/2O7ibNN8dTmQS+baWtfPxAJk8t715jobHPNJt5e
+237h8/zj9gaawroNBPJ5jQvLk/SaXkhAY+QoAnxyVDLerdVixs+Z7bfypuJYuwY1
+Hp2l3mmUaiAWxrG8xOtvCcNA4F8c/Ex1ODvyYGkDUhizKh5qeZqyZqDvIc8aY9eI
+7wH+Y330EhcOyG+bRVFMbisQz3xMDmEZJA33jCNGuZ3k5mdDih+SsWRqXJSZuZdC
+99l3UH7Q39GCWuHtV0Mud5X68BliLWgP89dKpgTJ09ysJFy7axoMwQIhDQRAN2dS
+7Kt+Ty3mOYkvB6pYPPeA968YCsphzAFjWNdrKYEsoDpDPHo0fTYu++Gk4b8/LN5k
+S9ENQ25XnEyOXxYnRmxgJpL9G0c55r66/Ow7UN5fUBskdKzqhYuoyiEBzDWr0w9g
+x07lDtDWl+v7qM03Je5ODLCoaJ/gPCC50IuFutwIpHTc9+HWhB94fZ4zWmSAEmxd
+kNDkVZYIzWLgCeIcbg8vRa2hNyIRrxmqw1edVtwR83E6OR8nfEWT+RXaC2KrVYHd
+GqwnFXRbMElT95d2FH2umhHxMT8NqhJFcefc1ZwoCeiulGLXe2gcMzEldKdo6Qa4
+kLCHs9a38447ABEBAAG0HUouIERhbmllbCBLdWxwIDxkYW5Aa3VscC5jb20+iQI6
+BBMBCAAkAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheABQJKkD2pAhkBAAoJEIWP
+xMT0OFajpOgP/0jfNTSNGJ+u/QZC6VMwDoZl5Vjg3r6q+TWNe62nLpeCft6JIOTS
+PsjPqJSE3tznXZopqlS1ar77VpltNZk1hiongpjPNCpfk+xMzYoNRsj9IuP0B54I
+jeIHuhzCl79zYekgEKGqat9JNzzZQ4+KeIEX3f/AwWL6XkB38F569tt4XbZV9Xnu
+a991Df3olMcZ0UFI9C3TnSNGMsBbxroL/G9SI9wNK/d9G53Yaww+8hMl5hVrMSXS
+KJpKbtFLtPevSWXz9JFoVOBbnNlKmCLXyp0Igc2jvG/j4ao7M9pnNe2aD1Z4V/kI
+XO2g55ptdb2tZycfCuFGM00a0g0RpcpbE/6529OjI08GAfpVD4RsND9YO2szx6OQ
+b60Gt86R1WuK2cZeZLLvN1llyh1s2u/SkKw97o19nQPVQ810LBIuflBhopxWBCR/
+2ibU0gmxtrWhuVWAUGEgA8S6dPHHu8uUu32YUOXCLc9dKYNTXF9ObhTSfR1tCqAY
+D3CZdqFia9282c/LKTw+hVgr0dQh/0NDCSLax7+ZBAZd6fvRiSyUQKHMfhiXL/D6
+C90NklZZsd8U5FWVxpglvmCo3JptzV0DGRND9EvzBDaUFDWuV4L9+tQkF4cuaVOp
+Vg8G9SMXrZ5/acvSh17bhkQBmv2bJ8k0059bmYvZ0oJrmctzTkXsjr2AiEYEEBEI
+AAYFAkqQO0QACgkQq8juObtVB0ZndQCgirTxAUMRlJvxoLwdQktIsLlD6S4An1Dw
+8dzeB3J/XVP2TKSP0BdAEl2ytCFKLiBEYW5pZWwgS3VscCA8ZGt1bHBAYXBhY2hl
+Lm9yZz6JAjcEEwEIACEFAkqQPYECGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AA
+CgkQhY/ExPQ4VqNTVw//buPBq2rMbouSeXhTLs2SqrjJGfzv1Jsq9/TgYLEt+E0+
+avfnQ6DLu4CYNXXDTpoK7fV0rBJYzjEmjwbSCOCTju6EtsuJ6DToqCjalaze0iTO
+DF2S52Weq7mF5RefS8EPFqAYYaifmAvdrD9jGZu/WPbZF8vHFo0GMS10kfUuIkmY
+cn/3IfsXI0SukF0jUjI9uFqUMPfecyjJg8cy+ftIW8A/jLzeGU3qU/DK3YC2IWNV
+GMgxC+/hCzezsvwYhnPu0hrRVo14sJR45K8YspUaZPbwY65fy4LEC64tmaUglS3k
+jGiMVPGjnr3m1Uxetjp66lQ/F5ODOEPjVHxudUy7MpDOi5GyvY/z/v1t4hO8Ny7N
+OmbtFf8GsI3yNAZj+/jsGuHOkBNtJ+6pYdq+7K4RrFmIZzEQEpFzUWz2+1wzr12K
+l6CrUbzNHJR7SIPbOSffdHRH1UdWfNX0WG1VfGHmNtCt1X0efD/dwEKJbHxxYf8R
+bfEqn5ylxwDC1Hf+BQd7+8IPPHnSO64j2JVl1WNZI7hpJuT2H5DRN3OGFIins6FU
+SYL0qpyEDMU+CSwbCB6snnalmJJMBAUecdkZBlKFC+nvTkBhrCU5IijhjQ9iNhZW
+NC3gZtGvImavWslv1yKX3RS4i5T3+GeHUE5P42L+YvTrCpVQ3s2ORAkM+XzpUzm0
+I0ouIERhbmllbCBLdWxwIDxka3VscEBwcm9ncmVzcy5jb20+iQI3BBMBCAAhBQJK
+kD4HAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEIWPxMT0OFajhYYP/2tN
+HBwFj32C00DCsqkYJK+aJLtVIYKon2lqfVKdo4tQP9cd/py0GvRzuM93+UX6TG9R
+D//ykKSWQzYLlMM+Fn5wWA3TXgocL1D8E0pMzew1sTbeN92MzzEICjX+2xrp8/iU
+opwcmvIV5BttcpWl3mePTClmNehabnU6FAjfu4H7K+LYWK0/lp+CdT79Vij7yPuu
+PHkMP+D9o8o1VWyEVsyM4W2RtyVXgRd141I3SqxzBjtZH1cwfddALzKM9AxjHIUG
+ihsRfcUmiReISwoVq/PGhWHfiE/rKWotaYpDyWmUa1jT8yU5rZ1xv5a0oQiVkD+7
+HKZsBmmILEssXaeozsYCo2LTqal/Htr5UcSAPPWx5QieVnCjUrKiOmneCOoYvRuS
+eqx8eAufcCW9rQz2Up0AiXJ+5nVhZA5YmYbr936sFF7FoL2qNS058dLWV3sgzfa2
+hNE22/sxKBf1qqkdEsmiXdwMppMZIdxxy/RMPdIjSvblYveBByeTx9k9HYXPviNi
+FykC/NMmFmQXwkofdDCNOccaaXu5f+6Xxj6f/3TRCmm679TIqVTiHtuEUq4Y7Ys5
+wCihYksaix44tERcnQARMu4QFv0mlVxhaf8+5vmkobWDzp9WucPJGgbguIS0YP6F
+3SNXYADvPih6zRhKtD/6jEYCan9JOOQ6eqQ9BsQ3uQINBEqQOcwBEADne7AtqsFv
+XrnZMYcmEbWOKJT3hS6xfNCRGlLKxmSUfhkvHSSE7Eu7S28DH6PUN18Umgow9931
+dy/mfZVyZUQvsLswyo1k/3/tFKHIEUeJM2pJtDRc8aUI270beBPmDGBFo7eCImGx
+CozK5KLkde5eREBl5hlCE+UxYUHK1m6hXwefnNEsL2CYObe2gvf17VCTNc/vdFCL
+yttYbLY/jwnnRO4yqKZY7miCUPRa/HxlhCuktHvosPihv+zK1+OhRzatSGkI7Ift
+22fl44IiG/OLcfNFbFFFSbNQmhyolocy/6KrsiuqasZ82RJRMkV53XTHdRsHndDY
+K9Q2+Outuyg36KeLbg2ue2UVR6CJYiwYrGiSmdw/MQck11OBzn8VKQgieeRtbDaa
+gpkYk1N8yDWE7JzHQ+PN8tGzl5qTubQl3GzDSmud4jhUG4oujSyZ+qWiIPff6y0G
+gAPu7Wi2SpnNY8WVLpQWTwTdJVp0xfW9N16q5MF+uCKUIWLTelupKkeiBQ+h/l5K
+GX1UMn7bnSkGUvg6T6MXFVazRKsSLRnYaChaUP3PEXffAuw9hAU5d57fR87MujLv
+mhP7//mJbzb86j/nsoLt/WQZXFGfMYFQyXL6hTwGdSpZMvMqj9k0jqoz2EjNCCEs
+JR/snYjNg/oKkP5kmjfuXzvYK3xfIWMYdQARAQABiQIfBBgBCAAJBQJKkDnMAhsM
+AAoJEIWPxMT0OFaj7TcP/2pgUNXKOs6z7WPRC8p54Rq/ltccE7EsaEkmOaE19LZG
+T3Oz2Dzza+XuzaxzK1yZtzGCeUU1NL5TUATdA+i0RM8TC+Cvp9f7gScXyQLBYtc8
+/4B1FVFGJSmCcB2z3SIz6ealw62RcBtC0TUfhHWhAj4KfGHCkdwjp6rvDup2y4xI
+K/iHxihJnR5dZY4AY/Gp/Wbq3ZPTkpSSQHVtJ6y3XCsEFsOEeq9lmC/Ky/45cD3r
+xGVfYrdCPaljHCC26q3bw6CneLH7m5HZPIEIRgTuCyKDBni0RK8hQ1fqcdQKWpJh
+6fu1LOV/TpEXmJd1XlnkGjaD5u63LmASgTnka6+PMNBKrQOXUlzw+GAJMXotnwo6
+flDrgNuHywqbdyQ7BjFX4VkheURuhlav/yg8WupPvLlvtarFOw2Vj9690CoFflia
+OsoVDZ8NBPh02E5V6+xyCaKFitSBi5WwdAf4odFf+93pNKE81JxzerBLlVGO3MA5
+TVP78tl6zFXlPtEYPhnguLFqxpVAx+R9QTbSdpjITFUijlu0MDv2QyDIx7uUVBlD
+tmmSGQT/B/JjMRQ0uF/K8GQgrSWB8Fy3ztMqK7dUaBHjCndXOlWm5/tSM1TXcerx
+cG5vF3KW2pnd1hDHar+J3u9xAmaHqFjFI8dIB8ab72h8ySjaeEd9kV96ByEtpm09
+=DKip
+-----END PGP PUBLIC KEY BLOCK-----
+
+
+pub 1024D/AE8DE9E4 2008-02-26
+uid Willem Jiang <ningjiang(a)apache.org>
+sig 3 AE8DE9E4 2008-02-26 Willem Jiang <ningjiang(a)apache.org>
+sig 2 7FBBDC54 2008-02-29 Freeman Fang <freeman.fang(a)gmail.com>
+sub 2048g/7103E49E 2008-02-26
+sig AE8DE9E4 2008-02-26 Willem Jiang <ningjiang(a)apache.org>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+mQGiBEfDuDQRBADFJCCycB/7DfHD0SVBBa73sOiS4J8FI0EWH1U1nXULGAmacx45
+aBK8Vrp1hyAP4k15EU/x4a9Hn04RFS93FXsuFS1wamOREpOR4Wqeo0wZe764rYrn
+MDzn+w/2R6rzS+CVIgVKTjyumiRewPJ6GL0EiwqNzxOpd/lgzBSvTz8+bwCgkzTY
+dk4zMaQPcxWgcyZsZBdn4wEEALlxfbBdRcSBzmEaKAbvn3wdH2mVnQnF1D1kaLjg
+wrKvT/+DeF3DFfkk7NQQGm8S9iC2zp3CGFfeuGvCiXBz+h8cIRflvlQBFDNyB8nH
+/RDTYQAL2oHqMNnHaCFA/Ym6awai/mCpsHy3+hjWL8zEXI7fqzezqzYDOXqYTxlL
++7vMA/40OzbjojnbPnOgp0wDxqFBFVRXDO2rDZ9+98nYdFvHTNcrm29Qo/fefNDR
+WpWJlO3Ye+A9B5QiFF02p0GY74d/+i5dlO7wujQeUHUfjmXViFRcA7m3daWXsh/x
+hIKKzq6I4t81VxQ46l/jZZtCJmEdv21ZXAbxdKgy1Kte+EbFELQjV2lsbGVtIEpp
+YW5nIDxuaW5namlhbmdAYXBhY2hlLm9yZz6IYAQTEQIAIAUCR8O4NAIbAwYLCQgH
+AwIEFQIIAwQWAgMBAh4BAheAAAoJECNQkpiujenkCJYAn3P50rFH2F9W36EnXPOD
+xnyOcQbYAKCACOv1QV/Wyf5/sZJ418qLBTm3xohGBBIRAgAGBQJHx5Y9AAoJEOMr
+/yJ/u9xUwp0AoLcC/pnvejkkVU1R44jmpXSJlQKUAJ9O+1v1OtgVfzIFT2kpJGdj
+ewKBzbkCDQRHw7g0EAgAhjDZ8228RDJWyRJ8dY8VGVZyhFaqFysr6SGrc9AZXjaM
+Hd/xNtPFyWdfoaB/rG6rb9nJea3BVBwNRSZHssgEC4SVAlHlWSznt818DPTitKVl
+GFo2h0twrtiNz7ehpEHFrELhUdMy5TPXNKT0EGs77Qka1zgqp0k+PQZsqeK9++Nq
+J/q0GKNFi4KApWoSSso5oJwaOCtoroxdCSmO7XVBwMcwGVqYwUbesCPqUySCXjxv
+btyJETc6tCKhCdQHbcSd6+JWwo08IPGKQ4m9iF5VsS2Nnd2gjK3kZwLWfNSn1Ekq
+pEOcKhd7dw4ZuXdsxBvzhyvgmVmg7YjDsUdn4l3XuwADBQf9FaREF2DvTD9YvVgL
+//3XX8pp30blQ+o7p5/5eEewAvlmyZ5/0pimVv2ItxoqqeL6FUZUyxU1yWvsECMI
+UPHIWFW6knDpHNRNMpW4AGgr/6iGLpGClCtw/zwvBPsGMTA6+sICRX2zk5Bt9DFr
+dJZUrWCf57tIEDJ+g9/tOLT4Pv60JMl/A+QA3niTR/eZ1Afu93T172A/SX9LSby+
+YvIXIsp27n6wNKW5tJ6V5YuHeemK8wVM7p7CJ1F/KnrCnhf+BpxUkP5rkuOfG5x6
+DW4st8w5tZg6LEbQFqI+jCXzw5OkhRbARwHwmF7jALQHVNAjsLTfDYbqgstNv7l9
+wOSjiYhJBBgRAgAJBQJHw7g0AhsMAAoJECNQkpiujenk7WYAmwdWGumur5Y3CHan
+JLggH+IDC4gLAJ9MjIA6xep/7uk6fzhzyP/bRSA6lg==
+=Y6Fw
+-----END PGP PUBLIC KEY BLOCK-----
+
+pub 1024D/1D09BB39 2009-04-27
+uid Eoghan Glynn <eglynn(a)apache.org>
+sig 3 1D09BB39 2009-04-27 Eoghan Glynn <eglynn(a)apache.org>
+sub 2048g/AD876DBC 2009-04-27
+sig 1D09BB39 2009-04-27 Eoghan Glynn <eglynn(a)apache.org>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.9 (MingW32)
+
+mQGhBEn1u6wRBACWSo4nExyH/GtgDiFK2CRj1DNhPzMMhQa2Lt6PJzZob8CQUOD8
+uEk/pwYtBCC7MfUWdbP+xXXqREGfN5e3cca4wszEjim7O45k9GVhD+0xyvUZ81QW
+a9m2W9BjIGaoVcg+KISUF2THg0XkyjbEJfrO4GCja7LlUVgMfZn5b5LmhwCgzK8F
+SQLHUoAUV4UR/SGFu8pLJD8D+wek3G6t5MwgFnVO+0PHyrePmgBcd7w4ZIq04uI+
++ccw0qNPMz5PJjqXoJ9Y28VBdtwriJxwZFkQ5NuZNhc+0nP8VssNT9aAUy7H24Bu
+9uuRRhR+3+Nj6tj2QMQr3I73aFfF7tkUmnSVZFctYBG7sJDkXF/fJcohAbdYQJxn
+yPtSA/QPgPToWL925oYzBFQbf7GVJisF5kqd5Pv9d6B5XdVbZBQACRN8pQXvX9DL
+lfTouSHwZU67HmRy6pMXX1lFJseEu9lXq6zxmMdJl6stPKxUWyo30cO010XUW+/0
+hdMn8i7dWVrIB59h2JRgl1skKkrQtwt0bhTDgeuoO8Iz1nlytCBFb2doYW4gR2x5
+bm4gPGVnbHlubkBhcGFjaGUub3JnPohgBBMRAgAgBQJJ9busAhsDBgsJCAcDAgQV
+AggDBBYCAwECHgECF4AACgkQsooF4B0Juzk9pgCeM4vNPwRz6EvNeiCIEYMmQ3CS
+lacAoJ81AgirKyIQmY7bKmq/oe7D/+CBuQINBEn1u6wQCADS710aPsmsXl6Kdwuh
+1NVQtE3R2rTP8KI1S7WL9ou7Kn13NyKGuVTVV6DOeYPnUnU54hWiCOhQurnQIK/B
+vgAHw6l9gigzrmrgm0I6BwHQnby5FUC2V3ZjQLwHIswqGVXHye9Hl0bnf152sdFl
+KvIbZtj3nijIzK2cEh5IAWlR1U0XmXWcbZIdqd2Fbz9Q/jy/Jt+voZe+Eq3UCGNu
+EgozJTJ4DiIHAhFOVI6Zy2nNDc+4DQPKP92/UCGvjlvpiLYWPdgg76l/4zTpSdU+
+ej/IwxceRP0m8RrnurWPe2rrZBraei7YbpxYh+H8WFnEn9ZW9qzitbF6hlxHAf/L
+NdADAAMGB/0Vp7zF5tGKjVUT0ygEYRVG/fXuQdwbr8TYxrfRpBobjmlpurvltx9s
+4DtwyGPHbkDiH81sot685bIKyjYCptCNnIWvbE+LjjcU4YyLbTyDmPudliAipyNl
+Z18ZMEuUDzq56hJ75UnlUPNla+VfwkF5tfDo4nXVQ/i+iNjmknkUNVrECEfZNYWM
+AvhAnqdaL34WG33qPuik5QfgGt7IcHkHaGJMSdTUbh/2g1hFmIsk5fI+r0J2t7N2
+pQ5z3VTER3AodKSG7Y4yBg6jXVAA/L9XEAkcDG5PSjwM4UI1UXEpuKoFj+Z56ql6
+3hr80bP3Q5wGiJ/wDbQZAPHqLEKeENTfiEkEGBECAAkFAkn1u6wCGwwACgkQsooF
+4B0JuzkZGQCfe3w5DUfM/AcGyfislVPLai/JNVYAoJg/4wHYk6OfYyc2fumzmeoT
+AeqA
+=aTjD
+-----END PGP PUBLIC KEY BLOCK-----
Added: thirdparty/cxf/branches/cxf-2.3.1/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.3.1/pom.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.3.1/pom.xml 2011-08-12 09:40:55 UTC (rev 14800)
@@ -0,0 +1,663 @@
+<!--
+ 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</artifactId>
+ <version>2.3.1</version>
+ <name>Apache CXF</name>
+ <url>http://cxf.apache.org</url>
+
+ <packaging>pom</packaging>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/cxf/tags/cxf-2.3.1</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cxf/tags/cxf-2.3.1</developerConnection>
+ </scm>
+ <issueManagement>
+ <system>jira</system>
+ <url>https://issues.apache.org/jira/browse/CXF</url>
+ </issueManagement>
+
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <properties>
+ <cxf.compiler.fork>false</cxf.compiler.fork>
+ <cxf.build-utils.version>2.3.1</cxf.build-utils.version>
+ <cxf.xjc-utils.version>2.3.0</cxf.xjc-utils.version>
+ <cxf.jdk.version>1.6</cxf.jdk.version>
+ </properties>
+
+ <distributionManagement>
+ <repository>
+ <id>apache.releases.https</id>
+ <name>Apache Release Distribution Repository</name>
+ <url>https://repository.apache.org/service/local/staging/deploy/maven2</url>
+ </repository>
+ <snapshotRepository>
+ <id>apache.snapshots.https</id>
+ <name>Apache Development Snapshot Repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
+ <uniqueVersion>false</uniqueVersion>
+ </snapshotRepository>
+ <site>
+ <id>apache.cxf.site</id>
+ <url>scpexe://people.apache.org/www/cxf.apache.org/cxf/mvn_site</url>
+ </site>
+ </distributionManagement>
+ <repositories>
+ <repository>
+ <id>apache.snapshots</id>
+ <url>http://repository.apache.org/snapshots/</url>
+ <name>Apache Snapshot Repo</name>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>apache.snapshots</id>
+ <url>http://repository.apache.org/snapshots/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <inceptionYear>2006</inceptionYear>
+ <mailingLists>
+ <mailingList>
+ <name>Apache CXF User List</name>
+ <subscribe>users-subscribe(a)cxf.apache.org</subscribe>
+ <unsubscribe>users-unsubscribe(a)cxf.apache.org</unsubscribe>
+ <post>users(a)cxf.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/cxf-users</archive>
+ </mailingList>
+ <mailingList>
+ <name>Apache CXF Developer List</name>
+ <subscribe>dev-subscribe(a)cxf.apache.org</subscribe>
+ <unsubscribe>dev-unsubscribe(a)cxf.apache.org</unsubscribe>
+ <post>dev(a)cxf.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/cxf-dev</archive>
+ </mailingList>
+ <mailingList>
+ <name>Apache CXF Commits List</name>
+ <subscribe>commits-subscribe(a)cxf.apache.org</subscribe>
+ <unsubscribe>commits-unsubscribe(a)cxf.apache.org</unsubscribe>
+ <post>commits(a)cxf.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/cxf-commits</archive>
+ </mailingList>
+ <mailingList>
+ <name>Apache CXF Issues List</name>
+ <subscribe>issues-subscribe(a)cxf.apache.org</subscribe>
+ <unsubscribe>issues-unsubscribe(a)cxf.apache.org</unsubscribe>
+ <post>issues(a)cxf.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/cxf-issues</archive>
+ </mailingList>
+ <mailingList>
+ <name>Apache CXF Build Notifications List</name>
+ <subscribe>notifications-subscribe(a)cxf.apache.org</subscribe>
+ <unsubscribe>notifications-unsubscribe(a)cxf.apache.org</unsubscribe>
+ <post>notifications(a)cxf.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/cxf-notifications</archive>
+ </mailingList>
+ </mailingLists>
+ <ciManagement>
+ <system>Hudson</system>
+ <url>http://hudson.zones.apache.org/hudson/view/CXF/</url>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <configuration>
+ <address>notifications(a)cxf.apache.org</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>The Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+
+ <modules>
+ <module>parent</module>
+ <module>common</module>
+ <module>api</module>
+ <module>tools</module>
+ <module>testutils</module>
+ <module>rt</module>
+ <module>integration</module>
+ <module>maven-plugins</module>
+ <!--module>test-samples</module-->
+ <module>systests</module>
+ </modules>
+
+
+ <profiles>
+ <profile>
+ <!-- default profile enables checkstyle and Xlint stuff -->
+ <id>everything</id>
+ <modules>
+ <module>distribution</module>
+ </modules>
+ </profile>
+ <profile>
+ <!-- default profile enables checkstyle and Xlint stuff -->
+ <id>rat</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>setup.eclipse</id>
+ <properties>
+ <eclipse.workspace.dir>${basedir}/../workspace</eclipse.workspace.dir>
+ </properties>
+ <build>
+ <defaultGoal>process-test-sources</defaultGoal>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>${cxf.jdk.version}</source>
+ <target>${cxf.jdk.version}</target>
+ <maxmem>256M</maxmem>
+ <fork>${cxf.compiler.fork}</fork>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>setup.eclipse.workspace</id>
+ <phase>process-test-sources</phase>
+ <goals>
+ <goal>configure-workspace</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <workspace>${eclipse.workspace.dir}</workspace>
+ <workspaceCodeStylesURL>file:etc/eclipse/CXFCodeFormatter.xml</workspaceCodeStylesURL>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <inherited>false</inherited>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf.build-utils</groupId>
+ <artifactId>cxf-buildtools</artifactId>
+ <version>${cxf.build-utils.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>pmd</groupId>
+ <artifactId>pmd</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>setup.workspace</id>
+ <phase>validate</phase>
+ <configuration>
+ <tasks>
+ <path id="ecp.ws.path" location="${eclipse.workspace.dir}" />
+ <property name="full.eclipse.workspace" refid="ecp.ws.path" />
+
+ <whichresource resource="/cxf-eclipse-pmd" property="pmd.url" />
+ <whichresource resource="/cxf-pmd-ruleset.xml" property="pmdruleset.url" />
+ <whichresource resource="/cxf-eclipse-checkstyle" property="eclipse.checkstyle.url" />
+ <whichresource resource="/cxf-checkstyle.xml" property="checkstyle.url" />
+ <whichresource resource="/cxf-checkstyle-corba.xml" property="corba.checkstyle.url" />
+
+ <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings" />
+ <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle" />
+ <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/net.sourceforge.pmd.eclipse" />
+
+ <get src="${checkstyle.url}" dest="${full.eclipse.workspace}/cxf-checkstyle.xml" />
+ <get src="${corba.checkstyle.url}" dest="${full.eclipse.workspace}/cxf-checkstyle-corba.xml" />
+
+ <!-- Add checkstyle config -->
+ <copy file="${basedir}/etc/eclipse/template.checkstyle-config.xml" tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" overwrite="no">
+ <filterset>
+ <filter token="CHECKSTYLE_CONFIG_FILE" value="${full.eclipse.workspace}/cxf-checkstyle.xml" />
+ <filter token="CHECKSTYLE_CORBA_CONFIG_FILE" value="${full.eclipse.workspace}/cxf-checkstyle-corba.xml" />
+ <filter token="APACHE_HEADER_FILE" value="${full.eclipse.workspace}/apache-header.txt" />
+ </filterset>
+ </copy>
+
+ <xslt style="${basedir}/etc/eclipse/addcheckstyle.xsl" in="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" out="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new">
+ <param name="checkstyleconfig" expression="${full.eclipse.workspace}/cxf-checkstyle.xml" />
+ <param name="checkstyleconfigcorba" expression="${full.eclipse.workspace}/cxf-checkstyle-corba.xml" />
+ </xslt>
+ <copy file="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new" tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml" overwrite="yes" />
+
+ <!-- Add checkstyle config for 5.0 plugin -->
+ <copy file="${basedir}/etc/eclipse/template.checkstyle-config.xml" tofile="${full.eclipse.workspace}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml" overwrite="no">
+ <filterset>
+ <filter token="CHECKSTYLE_CONFIG_FILE" value="${full.eclipse.workspace}/cxf-checkstyle.xml" />
+ <filter token="CHECKSTYLE_CORBA_CONFIG_FILE" value="${full.eclipse.workspace}/cxf-checkstyle-corba.xml" />
+ <filter token="APACHE_HEADER_FILE" value="${full.eclipse.workspace}/apache-header.txt" />
+ </filterset>
+ </copy>
+
+ <xslt style="${basedir}/etc/eclipse/addcheckstyle.xsl" in="${full.eclipse.workspace}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml" out="${full.eclipse.workspace}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml.new">
+ <param name="checkstyleconfig" expression="${full.eclipse.workspace}/cxf-checkstyle.xml" />
+ <param name="checkstyleconfigcorba" expression="${full.eclipse.workspace}/cxf-checkstyle-corba.xml" />
+ </xslt>
+ <copy file="${full.eclipse.workspace}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml.new" tofile="${full.eclipse.workspace}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml" overwrite="yes" />
+
+
+
+
+ <!-- Add warning flags that we want -->
+ <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
+ <entry key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion" value="ignore" />
+ <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore" />
+ <entry key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface" value="ignore" />
+ <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore" />
+ </propertyfile>
+
+
+ <!-- Add code format rules -->
+ <loadfile property="eclipse.code.cleanup" srcFile="${basedir}/etc/eclipse/CXFCleanUp.xml" />
+ <loadfile property="eclipse.code.templates" srcFile="${basedir}/etc/eclipse/codetemplates.xml" />
+ <loadfile property="eclipse.xml.templates" srcFile="${basedir}/etc/eclipse/xmltemplates.xml" />
+ <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs">
+ <entry key="cleanup_profile" value="_CXF" />
+ <entry key="org.eclipse.jdt.ui.cleanupprofiles" value="${eclipse.code.cleanup}" />
+ <entry key="org.eclipse.jdt.ui.text.custom_code_templates" value="${eclipse.code.templates}" />
+
+ <!-- Add import order -->
+ <entry key="org.eclipse.jdt.ui.importorder" value="java;javax;org.w3c;org.xml;junit;antlr;com;net;org;org.junit;#org.junit" />
+ <!-- Sort order -->
+ <entry key="org.eclipse.jdt.ui.visibility.order" value="B,R,D,V," />
+ <entry key="outlinesortoption" value="T,SF,F,SI,I,C,SM,M," />
+ <entry key="org.eclipse.jdt.ui.enable.visibility.order" value="true" />
+ </propertyfile>
+ <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.ui.prefs">
+ <entry key="eclipse.preferences.version" value="1" />
+ <entry key="org.eclipse.wst.sse.ui.custom_templates" value="${eclipse.xml.templates}" />
+ </propertyfile>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <!-- We want to deploy the artifact to a staging location for perusal -->
+ <plugin>
+ <inherited>true</inherited>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
+ <updateReleaseInfo>true</updateReleaseInfo>
+ </configuration>
+ </plugin>
+ <!-- We want to sign the artifact, the POM, and all attached artifacts -->
+ <plugin>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>deploy</id>
+ <modules>
+ <module>distribution</module>
+ </modules>
+ <build>
+ <defaultGoal>deploy</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>jdk15</id>
+ <activation>
+ <jdk>1.5</jdk>
+ </activation>
+ <properties>
+ <jdk.version>1.5</jdk.version>
+ </properties>
+ </profile>
+ </profiles>
+
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin </artifactId>
+ <version>1.0-alpha-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xmlbeans-maven-plugin</artifactId>
+ <version>2.3.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <tagBase>https://svn.apache.org/repos/asf/cxf/tags</tagBase>
+ <useReleaseProfile>false</useReleaseProfile>
+ <preparationGoals>clean install</preparationGoals>
+ <goals>deploy</goals>
+ <arguments>-Prelease,deploy</arguments>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <attach>true</attach>
+ <source>1.5</source>
+ <quiet>true</quiet>
+ <bottom>Apache CXF</bottom>
+ <javadocVersion>1.5</javadocVersion>
+ <encoding>UTF-8</encoding>
+ <detectOfflineLinks>false</detectOfflineLinks>
+ <!--subpackages>org.apache.cxf</subpackages-->
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <maxmem>256M</maxmem>
+ <fork>${cxf.compiler.fork}</fork>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.4</version>
+ <dependencies>
+ <dependency>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <version>1.0b3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.8.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Specification-Title>${project.name}</Specification-Title>
+ <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
+ <Specification-Version>${project.version}</Specification-Version>
+ <Implementation-Title>${project.name}</Implementation-Title>
+ <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+ <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-5</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.3.3</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf.build-utils</groupId>
+ <artifactId>cxf-buildtools</artifactId>
+ <version>${cxf.build-utils.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf.build-utils</groupId>
+ <artifactId>cxf-buildtools</artifactId>
+ <version>${cxf.build-utils.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.6</version>
+ <configuration>
+ <numUnapprovedLicenses>350</numUnapprovedLicenses>
+ <excludeSubProjects>false</excludeSubProjects>
+ <excludes>
+ <exclude>.git/**</exclude>
+ <exclude>.gitignore</exclude>
+ <exclude>velocity.log</exclude>
+ <exclude>**/target/**</exclude>
+ <exclude>distribution/**</exclude>
+ <exclude>**/jaxb.index</exclude>
+ <exclude>**/META-INF/MANIFEST</exclude>
+ <exclude>**/src/test/**/*.txt</exclude>
+ <exclude>**/.classpath</exclude>
+ <exclude>**/.settings/**/*</exclude>
+ <exclude>**/.project</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.1.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
13 years, 4 months
JBossWS SVN: r14799 - spi/trunk/src/main/java/org/jboss/wsf/spi/management.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-08-10 01:19:42 -0400 (Wed, 10 Aug 2011)
New Revision: 14799
Added:
spi/trunk/src/main/java/org/jboss/wsf/spi/management/WebServerInfo.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/WebServerInfoFactory.java
Log:
[JBWS-3332]:Add interfaces to provide server information
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/management/WebServerInfo.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/WebServerInfo.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/WebServerInfo.java 2011-08-10 05:19:42 UTC (rev 14799)
@@ -0,0 +1,6 @@
+package org.jboss.wsf.spi.management;
+
+public interface WebServerInfo
+{
+ int getPort(String protocol, boolean secure);
+}
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/management/WebServerInfoFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/WebServerInfoFactory.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/WebServerInfoFactory.java 2011-08-10 05:19:42 UTC (rev 14799)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.management;
+
+public abstract class WebServerInfoFactory
+{
+ public abstract WebServerInfo newWebServerInfo();
+}
13 years, 4 months
JBossWS SVN: r14798 - common/trunk/src/main/java/org/jboss/ws/common/management.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-08-10 01:17:41 -0400 (Wed, 10 Aug 2011)
New Revision: 14798
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
common/trunk/src/main/java/org/jboss/ws/common/management/Message.properties
Log:
[JBWS-3332]:Get port value from WebServerInfo if it is failed from JMX
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-08-09 22:56:55 UTC (rev 14797)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-08-10 05:17:41 UTC (rev 14798)
@@ -39,10 +39,13 @@
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.StackConfig;
import org.jboss.wsf.spi.management.StackConfigFactory;
+import org.jboss.wsf.spi.management.WebServerInfo;
+import org.jboss.wsf.spi.management.WebServerInfoFactory;
import org.jboss.wsf.spi.metadata.config.EndpointConfig;
/**
@@ -153,11 +156,25 @@
webServicePort = getConnectorPort("HTTP/1.1", false);
int localPort = webServicePort;
- if (localPort <= 0)
+ if (localPort <= 0)
{
- // Do not initialize webServicePort with the default, the connector port may become available later
- log.debug("Unable to calculate 'WebServicePort', using default '8080'");
- localPort = 8080;
+ ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ try
+ {
+ WebServerInfo webServerInfo = spiProvider.getSPI(WebServerInfoFactory.class, cl).newWebServerInfo();
+ localPort = webServerInfo.getPort("HTTP/1.1", false);
+ }
+ catch (WSFException e)
+ {
+ log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"), e);
+ }
+ if (localPort <= 0)
+ {
+ // Do not initialize webServicePort with the default, the connector port may become available later
+ log.debug("Unable to calculate 'WebServicePort', using default '8080'");
+ localPort = 8080;
+ }
}
return localPort;
@@ -171,9 +188,25 @@
int localPort = webServiceSecurePort;
if (localPort <= 0)
{
- // Do not initialize webServiceSecurePort with the default, the connector port may become available later
- log.debug("Unable to calculate 'WebServiceSecurePort', using default '8443'");
- localPort = 8443;
+ ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ try
+ {
+ WebServerInfo webServerInfo = spiProvider.getSPI(WebServerInfoFactory.class, cl).newWebServerInfo();
+
+ localPort = webServerInfo.getPort("HTTP/1.1", true);
+ }
+ catch (WSFException e)
+ {
+ log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"), e);
+ }
+
+ if (localPort <= 0)
+ {
+ // Do not initialize webServiceSecurePort with the default, the connector port may become available later
+ log.debug("Unable to calculate 'WebServiceSecurePort', using default '8443'");
+ localPort = 8443;
+ }
}
return localPort;
@@ -259,4 +292,4 @@
{
return this.endpointConfigs;
}
-}
+}
\ No newline at end of file
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/Message.properties 2011-08-09 22:56:55 UTC (rev 14797)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/Message.properties 2011-08-10 05:17:41 UTC (rev 14798)
@@ -12,3 +12,4 @@
ENDPOINT_NAME_CANNOT_BE_NULL_FOR=Endpoint name cannot be null for: {0}
ENDPOINT_ALREADY_REGISTERED=Endpoint already registered: {0}
ENDPOINT_NOT_REGISTERED=Endpoint not registered: {0}
+COULD_NOT_GET_WEBSERVERINFO=Can not get WebServerInfo from SPIProvider
13 years, 4 months
JBossWS SVN: r14797 - common/trunk/src/main/java/org/jboss/ws/common/injection.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-08-09 18:56:55 -0400 (Tue, 09 Aug 2011)
New Revision: 14797
Modified:
common/trunk/src/main/java/org/jboss/ws/common/injection/ThreadLocalAwareWebServiceContext.java
Log:
[JBWS-3337] fixing singleton serialization
Modified: common/trunk/src/main/java/org/jboss/ws/common/injection/ThreadLocalAwareWebServiceContext.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/injection/ThreadLocalAwareWebServiceContext.java 2011-08-09 22:54:28 UTC (rev 14796)
+++ common/trunk/src/main/java/org/jboss/ws/common/injection/ThreadLocalAwareWebServiceContext.java 2011-08-09 22:56:55 UTC (rev 14797)
@@ -40,7 +40,7 @@
private static final long serialVersionUID = 126557512266764152L;
- private static final transient ThreadLocalAwareWebServiceContext SINGLETON = new ThreadLocalAwareWebServiceContext();
+ private static final ThreadLocalAwareWebServiceContext SINGLETON = new ThreadLocalAwareWebServiceContext();
private final transient ThreadLocal<WebServiceContext> contexts = new InheritableThreadLocal<WebServiceContext>();
@@ -91,4 +91,9 @@
return delegate;
}
+ protected Object readResolve()
+ {
+ return SINGLETON;
+ }
+
}
13 years, 4 months