You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/12/15 08:40:35 UTC
svn commit: r726634 [2/4] - in /cxf/trunk:
common/common/src/test/java/org/apache/cxf/helpers/
distribution/src/main/release/samples/configuration_interceptor/
distribution/src/main/release/samples/configuration_interceptor/src/demo/stream/client/
dist...
Modified: cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/pom.xml?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/pom.xml Sun Dec 14 23:40:33 2008
@@ -1,191 +1,191 @@
-<?xml version="1.0"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.samples</groupId>
- <artifactId>jax_rs_basic_https</artifactId>
- <version>1.0</version>
- <properties>
- <cxf.version>[2,)</cxf.version>
- <httpclient.version>3.1</httpclient.version>
- <jsr311.version>1.0</jsr311.version>
- </properties>
-
- <build>
- <sourceDirectory>src</sourceDirectory>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copyResources</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <copy file="${basedir}/src/demo/jaxrs/client/add_customer.xml" todir="${basedir}/target/classes/demo/jaxrs/client"/>
- <copy file="${basedir}/src/demo/jaxrs/client/update_customer.xml" todir="${basedir}/target/classes/demo/jaxrs/client"/>
- <copy file="${basedir}/CherryServer.xml" todir="${basedir}/target/classes"/>
- <copy todir="${basedir}/src">
- <fileset dir="${basedir}/contrib">
- <include name="*.java"/>
- </fileset>
- </copy>
- </tasks>
- </configuration>
- </execution>
- <execution>
- <id>removeContribFromSrc</id>
- <phase>process-classes</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <delete>
- <fileset dir="${basedir}/src">
- <include name="*.java"/>
- </fileset>
- </delete>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>server</id>
- <build>
- <defaultGoal>test</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>test</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>demo.jaxrs.server.Server</mainClass>
- <systemProperties>
- <property>
- <key>cxf.config.file</key>
- <value>CherryServer.xml</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>client</id>
- <build>
- <defaultGoal>test</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>test</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>demo.jaxrs.client.Client</mainClass>
- <arguments>
- <argument>${basedir}/certs/wibble.jks</argument>
- <argument>${basedir}/certs/truststore.jks</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>snapshots</id>
- <repositories>
- <repository>
- <id>apache-snapshots</id>
- <name>Apache SNAPSHOT Repository</name>
- <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- <!-- for jaxb-impl -->
- <repository>
- <id>java.net</id>
- <url>http://download.java.net/maven/1/</url>
- <layout>legacy</layout>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>apache-plugin-snapshots</id>
- <name>Apache Maven Plugin Snapshots</name>
- <url>http://people.apache.org/repo/m2-snapshot-repository</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
- <repositories>
- <!-- for jaxb-impl -->
- <repository>
- <id>java.net</id>
- <url>http://download.java.net/maven/1/</url>
- <layout>legacy</layout>
- </repository>
- </repositories>
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <!-- Jetty is needed if you're using Jetty container -->
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http-jetty</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>${httpclient.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- <version>${jsr311.version}</version>
- </dependency>
- </dependencies>
-</project>
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf.samples</groupId>
+ <artifactId>jax_rs_basic_https</artifactId>
+ <version>1.0</version>
+ <properties>
+ <cxf.version>[2,)</cxf.version>
+ <httpclient.version>3.1</httpclient.version>
+ <jsr311.version>1.0</jsr311.version>
+ </properties>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copyResources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/src/demo/jaxrs/client/add_customer.xml" todir="${basedir}/target/classes/demo/jaxrs/client"/>
+ <copy file="${basedir}/src/demo/jaxrs/client/update_customer.xml" todir="${basedir}/target/classes/demo/jaxrs/client"/>
+ <copy file="${basedir}/CherryServer.xml" todir="${basedir}/target/classes"/>
+ <copy todir="${basedir}/src">
+ <fileset dir="${basedir}/contrib">
+ <include name="*.java"/>
+ </fileset>
+ </copy>
+ </tasks>
+ </configuration>
+ </execution>
+ <execution>
+ <id>removeContribFromSrc</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <delete>
+ <fileset dir="${basedir}/src">
+ <include name="*.java"/>
+ </fileset>
+ </delete>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>server</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.jaxrs.server.Server</mainClass>
+ <systemProperties>
+ <property>
+ <key>cxf.config.file</key>
+ <value>CherryServer.xml</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>client</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.jaxrs.client.Client</mainClass>
+ <arguments>
+ <argument>${basedir}/certs/wibble.jks</argument>
+ <argument>${basedir}/certs/truststore.jks</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>snapshots</id>
+ <repositories>
+ <repository>
+ <id>apache-snapshots</id>
+ <name>Apache SNAPSHOT Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <!-- for jaxb-impl -->
+ <repository>
+ <id>java.net</id>
+ <url>http://download.java.net/maven/1/</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>apache-plugin-snapshots</id>
+ <name>Apache Maven Plugin Snapshots</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+ <repositories>
+ <!-- for jaxb-impl -->
+ <repository>
+ <id>java.net</id>
+ <url>http://download.java.net/maven/1/</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <!-- Jetty is needed if you're using Jetty container -->
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http-jetty</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ <version>${jsr311.version}</version>
+ </dependency>
+ </dependencies>
+</project>
Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/src/demo/jaxrs/client/add_customer.xml
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Sun Dec 14 23:40:33 2008
@@ -1 +1 @@
-text/plain
+text/xml
Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/src/demo/jaxrs/client/update_customer.xml
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Sun Dec 14 23:40:33 2008
@@ -1 +1 @@
-text/plain
+text/xml
Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java (original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java Sun Dec 14 23:40:33 2008
@@ -1,48 +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.xmlbeans;
-
-import javax.jws.WebService;
-import javax.xml.ws.BindingType;
-
-import org.apache.cxf.xmlbeans.wsdltest.GreeterMine;
-import org.apache.cxf.xmlbeans.wsdltest.StringListType;
-
-@WebService(endpointInterface = "org.apache.cxf.xmlbeans.wsdltest.GreeterMine",
- targetNamespace = "http://org.apache.cxf/xmlbeans",
- portName = "SoapPort",
- serviceName = "SOAPMineService",
- name = "GreeterMine")
-@BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING)
-public class GreeterMineImpl implements GreeterMine {
-
-/*
- public String sayHi() {
- System.out.println("****** Executing the operation sayHi *****");
- return "Bonjour";
- }
-*/
- public void sayHi2(StringListType stringList) {
- System.out.println("****** Executing the operation sayHi2 *****");
- }
-
-
-
-}
+/**
+ * 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.xmlbeans;
+
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+
+import org.apache.cxf.xmlbeans.wsdltest.GreeterMine;
+import org.apache.cxf.xmlbeans.wsdltest.StringListType;
+
+@WebService(endpointInterface = "org.apache.cxf.xmlbeans.wsdltest.GreeterMine",
+ targetNamespace = "http://org.apache.cxf/xmlbeans",
+ portName = "SoapPort",
+ serviceName = "SOAPMineService",
+ name = "GreeterMine")
+@BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING)
+public class GreeterMineImpl implements GreeterMine {
+
+/*
+ public String sayHi() {
+ System.out.println("****** Executing the operation sayHi *****");
+ return "Bonjour";
+ }
+*/
+ public void sayHi2(StringListType stringList) {
+ System.out.println("****** Executing the operation sayHi2 *****");
+ }
+
+
+
+}
Propchange: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/GreeterMineImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java (original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java Sun Dec 14 23:40:33 2008
@@ -1,89 +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.xmlbeans;
-
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.test.AbstractCXFTest;
-import org.apache.cxf.xmlbeans.wsdltest.GreeterMine;
-import org.apache.cxf.xmlbeans.wsdltest.SOAPMineService;
-import org.apache.cxf.xmlbeans.wsdltest.StringListType;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class XmlBeansTest extends AbstractCXFTest {
-
- private static final String CONFIG1 = "org/apache/cxf/xmlbeans/cxf.xml";
- private static final String CONFIG2 = "org/apache/cxf/xmlbeans/cxf2.xml";
-
- private SpringBusFactory bf;
-
- @Before
- public void setUp() throws Exception {
- bf = new SpringBusFactory();
-
- }
-
- @After
- public void tearDown() throws Exception {
- if (bus != null) {
- bus.shutdown(false);
- bus = null;
- }
- BusFactory.setDefaultBus(null);
- }
-
-
- @Test
- @Ignore
- public void testBusCreationFails() throws Exception {
- bf = new SpringBusFactory();
- bus = bf.createBus(CONFIG1);
- BusFactory.setDefaultBus(bus);
- }
-
- @Test
- @Ignore
- public void testBasicFails() throws Exception {
-
- bf = new SpringBusFactory();
- bus = bf.createBus(CONFIG2);
- BusFactory.setDefaultBus(bus);
- URL wsdlURL = XmlBeansTest.class.getResource("xmlbeanstest.wsdl");
- SOAPMineService ss =
- new SOAPMineService(wsdlURL,
- new QName("http://cxf.apache.org/xmlbeans", "SOAPMineService"));
- GreeterMine port = ss.getSoapPort();
-
- StringListType stringListType = StringListType.Factory.newInstance();
- stringListType.setMyname("sean");
- stringListType.setMyaddress("home");
- port.sayHi2(stringListType);
- }
-
-
-
-}
+/**
+ * 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.xmlbeans;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.test.AbstractCXFTest;
+import org.apache.cxf.xmlbeans.wsdltest.GreeterMine;
+import org.apache.cxf.xmlbeans.wsdltest.SOAPMineService;
+import org.apache.cxf.xmlbeans.wsdltest.StringListType;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class XmlBeansTest extends AbstractCXFTest {
+
+ private static final String CONFIG1 = "org/apache/cxf/xmlbeans/cxf.xml";
+ private static final String CONFIG2 = "org/apache/cxf/xmlbeans/cxf2.xml";
+
+ private SpringBusFactory bf;
+
+ @Before
+ public void setUp() throws Exception {
+ bf = new SpringBusFactory();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (bus != null) {
+ bus.shutdown(false);
+ bus = null;
+ }
+ BusFactory.setDefaultBus(null);
+ }
+
+
+ @Test
+ @Ignore
+ public void testBusCreationFails() throws Exception {
+ bf = new SpringBusFactory();
+ bus = bf.createBus(CONFIG1);
+ BusFactory.setDefaultBus(bus);
+ }
+
+ @Test
+ @Ignore
+ public void testBasicFails() throws Exception {
+
+ bf = new SpringBusFactory();
+ bus = bf.createBus(CONFIG2);
+ BusFactory.setDefaultBus(bus);
+ URL wsdlURL = XmlBeansTest.class.getResource("xmlbeanstest.wsdl");
+ SOAPMineService ss =
+ new SOAPMineService(wsdlURL,
+ new QName("http://cxf.apache.org/xmlbeans", "SOAPMineService"));
+ GreeterMine port = ss.getSoapPort();
+
+ StringListType stringListType = StringListType.Factory.newInstance();
+ stringListType.setMyname("sean");
+ stringListType.setMyaddress("home");
+ port.sayHi2(stringListType);
+ }
+
+
+
+}
Propchange: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml (original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml Sun Dec 14 23:40:33 2008
@@ -1,36 +1,36 @@
-<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-2.5.xsd
- http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
-
-
- <bean id="GreeterImpl"
- class="org.apache.cxf.xmlbeans.GreeterMineImpl"
- scope="prototype" />
-
- <!--bean id="xmlBeansBean"
- class="org.apache.cxf.jaxb.JAXBDataBinding"
- scope="prototype" /-->
-
- <bean id="xmlBeansBean"
- class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"
- scope="prototype"/>
-
- <bean id="testServiceFactory"
- class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
- scope="singleton">
- <property name="dataBinding" ref="xmlBeansBean" />
- </bean>
-
- <jaxws:endpoint id="greeterMineEndpoint"
- address="http://localhost:9000/SoapContext/SoapPort"
- implementor="org.apache.cxf.xmlbeans.GreeterMineImpl"
- serviceName="ns:SOAPMineService"
- xmlns:ns="http://cxf.apache.org/xmlbeans">
- <jaxws:serviceFactory>
- <ref bean="testServiceFactory"/>
- </jaxws:serviceFactory>
- </jaxws:endpoint>
-</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-2.5.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+
+ <bean id="GreeterImpl"
+ class="org.apache.cxf.xmlbeans.GreeterMineImpl"
+ scope="prototype" />
+
+ <!--bean id="xmlBeansBean"
+ class="org.apache.cxf.jaxb.JAXBDataBinding"
+ scope="prototype" /-->
+
+ <bean id="xmlBeansBean"
+ class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"
+ scope="prototype"/>
+
+ <bean id="testServiceFactory"
+ class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
+ scope="singleton">
+ <property name="dataBinding" ref="xmlBeansBean" />
+ </bean>
+
+ <jaxws:endpoint id="greeterMineEndpoint"
+ address="http://localhost:9000/SoapContext/SoapPort"
+ implementor="org.apache.cxf.xmlbeans.GreeterMineImpl"
+ serviceName="ns:SOAPMineService"
+ xmlns:ns="http://cxf.apache.org/xmlbeans">
+ <jaxws:serviceFactory>
+ <ref bean="testServiceFactory"/>
+ </jaxws:serviceFactory>
+ </jaxws:endpoint>
+</beans>
Propchange: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml (original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml Sun Dec 14 23:40:33 2008
@@ -1,37 +1,37 @@
-<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-2.5.xsd
- http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
-
-
- <bean id="GreeterImpl"
- class="org.apache.cxf.xmlbeans.GreeterMineImpl"
- scope="prototype" />
-
- <!--bean id="xmlBeansBean"
- class="org.apache.cxf.jaxb.JAXBDataBinding"
- scope="prototype" /-->
-
- <bean id="xmlBeansBean"
- class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"
- scope="prototype"/>
-
- <bean id="testServiceFactory"
- class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
- scope="singleton">
- <property name="dataBinding" ref="xmlBeansBean" />
- </bean>
-
- <jaxws:endpoint id="greeterMineEndpoint"
- address="http://localhost:9000/SoapContext/SoapPort"
- wsdlLocation="src/test/java/org/apache/cxf/xmlbeans/xmlbeanstest.wsdl"
- implementor="org.apache.cxf.xmlbeans.GreeterMineImpl"
- serviceName="ns:SOAPMineService"
- xmlns:ns="http://cxf.apache.org/xmlbeans">
- <jaxws:serviceFactory>
- <ref bean="testServiceFactory"/>
- </jaxws:serviceFactory>
- </jaxws:endpoint>
-</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-2.5.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+
+ <bean id="GreeterImpl"
+ class="org.apache.cxf.xmlbeans.GreeterMineImpl"
+ scope="prototype" />
+
+ <!--bean id="xmlBeansBean"
+ class="org.apache.cxf.jaxb.JAXBDataBinding"
+ scope="prototype" /-->
+
+ <bean id="xmlBeansBean"
+ class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"
+ scope="prototype"/>
+
+ <bean id="testServiceFactory"
+ class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
+ scope="singleton">
+ <property name="dataBinding" ref="xmlBeansBean" />
+ </bean>
+
+ <jaxws:endpoint id="greeterMineEndpoint"
+ address="http://localhost:9000/SoapContext/SoapPort"
+ wsdlLocation="src/test/java/org/apache/cxf/xmlbeans/xmlbeanstest.wsdl"
+ implementor="org.apache.cxf.xmlbeans.GreeterMineImpl"
+ serviceName="ns:SOAPMineService"
+ xmlns:ns="http://cxf.apache.org/xmlbeans">
+ <jaxws:serviceFactory>
+ <ref bean="testServiceFactory"/>
+ </jaxws:serviceFactory>
+ </jaxws:endpoint>
+</beans>
Propchange: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/xmlbeanstest.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/xmlbeanstest.wsdl?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/xmlbeanstest.wsdl (original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/xmlbeanstest.wsdl Sun Dec 14 23:40:33 2008
@@ -1,72 +1,72 @@
-<?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://cxf.apache.org/xmlbeans"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:tns="http://cxf.apache.org/xmlbeans"
- xmlns:x1="http://cxf.apache.org/xmlbeans"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
-
- <wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://cxf.apache.org/xmlbeans"
- xmlns:x1="http://cxf.apache.org/xmlbeans"
- elementFormDefault="qualified">
-
- <complexType name="StringListType">
- <all>
- <element minOccurs="1" maxOccurs="1" name="myname" type="string" />
- <element minOccurs="1" maxOccurs="1" name="myaddress" type="string" />
- </all>
- </complexType>
-
- <element name="sayHi2Message" type="x1:StringListType" />
-
- </schema>
- </wsdl:types>
-
- <wsdl:message name="sayHiRequest2">
- <wsdl:part element="x1:sayHi2Message" name="in"/>
- </wsdl:message>
-
- <wsdl:portType name="GreeterMine">
- <wsdl:operation name="sayHi2">
- <wsdl:input message="tns:sayHiRequest2" name="sayHiRequest2"/>
- </wsdl:operation>
-
- </wsdl:portType>
- <wsdl:binding name="Greeter_SOAPBinding" type="tns:GreeterMine">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="sayHi2">
- <soap:operation soapAction="sayHi2" style="document"/>
- <wsdl:input name="sayHiRequest2">
- <soap:body use="literal"/>
- </wsdl:input>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="SOAPMineService">
- <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
- <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
-
+<?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://cxf.apache.org/xmlbeans"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://cxf.apache.org/xmlbeans"
+ xmlns:x1="http://cxf.apache.org/xmlbeans"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+
+ <wsdl:types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://cxf.apache.org/xmlbeans"
+ xmlns:x1="http://cxf.apache.org/xmlbeans"
+ elementFormDefault="qualified">
+
+ <complexType name="StringListType">
+ <all>
+ <element minOccurs="1" maxOccurs="1" name="myname" type="string" />
+ <element minOccurs="1" maxOccurs="1" name="myaddress" type="string" />
+ </all>
+ </complexType>
+
+ <element name="sayHi2Message" type="x1:StringListType" />
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="sayHiRequest2">
+ <wsdl:part element="x1:sayHi2Message" name="in"/>
+ </wsdl:message>
+
+ <wsdl:portType name="GreeterMine">
+ <wsdl:operation name="sayHi2">
+ <wsdl:input message="tns:sayHiRequest2" name="sayHiRequest2"/>
+ </wsdl:operation>
+
+ </wsdl:portType>
+ <wsdl:binding name="Greeter_SOAPBinding" type="tns:GreeterMine">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sayHi2">
+ <soap:operation soapAction="sayHi2" style="document"/>
+ <wsdl:input name="sayHiRequest2">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SOAPMineService">
+ <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+ <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
+
Propchange: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/xmlbeanstest.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/xmlbeanstest.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java Sun Dec 14 23:40:33 2008
@@ -1,34 +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.jaxrs.model;
-
-import java.util.Comparator;
-
-public class ClassResourceInfoComparator implements Comparator<ClassResourceInfo> {
-
- public int compare(ClassResourceInfo cr1, ClassResourceInfo cr2) {
-
- return URITemplate.compareTemplates(
- cr1.getURITemplate(),
- cr2.getURITemplate());
- }
-}
-
-
+/**
+ * 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.jaxrs.model;
+
+import java.util.Comparator;
+
+public class ClassResourceInfoComparator implements Comparator<ClassResourceInfo> {
+
+ public int compare(ClassResourceInfo cr1, ClassResourceInfo cr2) {
+
+ return URITemplate.compareTemplates(
+ cr1.getURITemplate(),
+ cr2.getURITemplate());
+ }
+}
+
+
Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfoComparator.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/PathSegmentImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/PathSegmentImplTest.java?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/PathSegmentImplTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/PathSegmentImplTest.java Sun Dec 14 23:40:33 2008
@@ -1,58 +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.jaxrs.impl;
-
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.PathSegment;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class PathSegmentImplTest extends Assert {
-
- @Test
- public void testPlainPathSegment() {
- PathSegment ps = new PathSegmentImpl("bar");
- assertEquals("bar", ps.getPath());
- assertEquals(0, ps.getMatrixParameters().size());
- }
-
- @Test
- public void testPathSegmentWithMatrixParams() {
- PathSegment ps = new PathSegmentImpl("bar;a=1;a=2;b=3%202", false);
- assertEquals("bar", ps.getPath());
- MultivaluedMap<String, String> params = ps.getMatrixParameters();
- assertEquals(2, params.size());
- assertEquals(2, params.get("a").size());
- assertEquals("1", params.get("a").get(0));
- assertEquals("2", params.get("a").get(1));
- assertEquals("3%202", params.getFirst("b"));
- }
-
- @Test
- public void testPathSegmentWithDecodedMatrixParams() {
- PathSegment ps = new PathSegmentImpl("bar%20foo;a=1%202");
- assertEquals("bar foo", ps.getPath());
- MultivaluedMap<String, String> params = ps.getMatrixParameters();
- assertEquals(1, params.size());
- assertEquals(1, params.get("a").size());
- assertEquals("1 2", params.get("a").get(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.
+ */
+
+package org.apache.cxf.jaxrs.impl;
+
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.PathSegment;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PathSegmentImplTest extends Assert {
+
+ @Test
+ public void testPlainPathSegment() {
+ PathSegment ps = new PathSegmentImpl("bar");
+ assertEquals("bar", ps.getPath());
+ assertEquals(0, ps.getMatrixParameters().size());
+ }
+
+ @Test
+ public void testPathSegmentWithMatrixParams() {
+ PathSegment ps = new PathSegmentImpl("bar;a=1;a=2;b=3%202", false);
+ assertEquals("bar", ps.getPath());
+ MultivaluedMap<String, String> params = ps.getMatrixParameters();
+ assertEquals(2, params.size());
+ assertEquals(2, params.get("a").size());
+ assertEquals("1", params.get("a").get(0));
+ assertEquals("2", params.get("a").get(1));
+ assertEquals("3%202", params.getFirst("b"));
+ }
+
+ @Test
+ public void testPathSegmentWithDecodedMatrixParams() {
+ PathSegment ps = new PathSegmentImpl("bar%20foo;a=1%202");
+ assertEquals("bar foo", ps.getPath());
+ MultivaluedMap<String, String> params = ps.getMatrixParameters();
+ assertEquals(1, params.size());
+ assertEquals(1, params.get("a").size());
+ assertEquals("1 2", params.get("a").get(0));
+ }
+}
Propchange: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/PathSegmentImplTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/javascript/src/test/resources/attributeTestBeans.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java (original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java Sun Dec 14 23:40:33 2008
@@ -1,82 +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.transport.jms;
-
-import java.util.logging.Logger;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.configuration.ConfigurationException;
-import org.apache.cxf.endpoint.Client;
-import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.feature.AbstractFeature;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.transport.Destination;
-import org.springframework.beans.factory.annotation.Required;
-
-/**
- * Allows to configure the JMSConfiguration directly at the Client or Server. Simply add this class to the
- * Features and reference a JMSConfiguration. The configuration inside this class takes precedence over a
- * configuration that is generated from the old configuration style.
- */
-public class JMSConfigFeature extends AbstractFeature {
- static final Logger LOG = LogUtils.getL7dLogger(JMSConfigFeature.class);
-
- JMSConfiguration jmsConfig;
-
- @Override
- public void initialize(Client client, Bus bus) {
- checkJmsConfig();
- Conduit conduit = client.getConduit();
- if (!(conduit instanceof JMSConduit)) {
- throw new ConfigurationException(new Message("JMSCONFIGFEATURE_ONLY_JMS", LOG));
- }
- JMSConduit jmsConduit = (JMSConduit)conduit;
- jmsConduit.setJmsConfig(jmsConfig);
- super.initialize(client, bus);
- }
-
- @Override
- public void initialize(Server server, Bus bus) {
- checkJmsConfig();
- Destination destination = server.getDestination();
- if (!(destination instanceof JMSDestination)) {
- throw new ConfigurationException(new Message("JMSCONFIGFEATURE_ONLY_JMS", LOG));
- }
- JMSDestination jmsDestination = (JMSDestination)destination;
- jmsDestination.setJmsConfig(jmsConfig);
- super.initialize(server, bus);
- }
-
- public JMSConfiguration getJmsConfig() {
- return jmsConfig;
- }
-
- @Required
- public void setJmsConfig(JMSConfiguration jmsConfig) {
- this.jmsConfig = jmsConfig;
- }
-
- private void checkJmsConfig() {
- if (jmsConfig == null) {
- throw new ConfigurationException(new Message("JMSCONFIG_REQUIRED", LOG));
- }
- }
-}
+/**
+ * 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.transport.jms;
+
+import java.util.logging.Logger;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.configuration.ConfigurationException;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.transport.Conduit;
+import org.apache.cxf.transport.Destination;
+import org.springframework.beans.factory.annotation.Required;
+
+/**
+ * Allows to configure the JMSConfiguration directly at the Client or Server. Simply add this class to the
+ * Features and reference a JMSConfiguration. The configuration inside this class takes precedence over a
+ * configuration that is generated from the old configuration style.
+ */
+public class JMSConfigFeature extends AbstractFeature {
+ static final Logger LOG = LogUtils.getL7dLogger(JMSConfigFeature.class);
+
+ JMSConfiguration jmsConfig;
+
+ @Override
+ public void initialize(Client client, Bus bus) {
+ checkJmsConfig();
+ Conduit conduit = client.getConduit();
+ if (!(conduit instanceof JMSConduit)) {
+ throw new ConfigurationException(new Message("JMSCONFIGFEATURE_ONLY_JMS", LOG));
+ }
+ JMSConduit jmsConduit = (JMSConduit)conduit;
+ jmsConduit.setJmsConfig(jmsConfig);
+ super.initialize(client, bus);
+ }
+
+ @Override
+ public void initialize(Server server, Bus bus) {
+ checkJmsConfig();
+ Destination destination = server.getDestination();
+ if (!(destination instanceof JMSDestination)) {
+ throw new ConfigurationException(new Message("JMSCONFIGFEATURE_ONLY_JMS", LOG));
+ }
+ JMSDestination jmsDestination = (JMSDestination)destination;
+ jmsDestination.setJmsConfig(jmsConfig);
+ super.initialize(server, bus);
+ }
+
+ public JMSConfiguration getJmsConfig() {
+ return jmsConfig;
+ }
+
+ @Required
+ public void setJmsConfig(JMSConfiguration jmsConfig) {
+ this.jmsConfig = jmsConfig;
+ }
+
+ private void checkJmsConfig() {
+ if (jmsConfig == null) {
+ throw new ConfigurationException(new Message("JMSCONFIG_REQUIRED", LOG));
+ }
+ }
+}
Propchange: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java (original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java Sun Dec 14 23:40:33 2008
@@ -1,137 +1,137 @@
-/**
- * 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.transport.jms;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageListener;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.JmsTemplate102;
-import org.springframework.jms.core.SessionCallback;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
-import org.springframework.jms.listener.DefaultMessageListenerContainer102;
-import org.springframework.jms.support.destination.DestinationResolver;
-
-/**
- * Factory to create JmsTemplates and JmsListeners from configuration and context information
- */
-public final class JMSFactory {
-
- private JMSFactory() {
- }
-
- /**
- * Create JmsTemplate from configuration information. Most settings are taken from jmsConfig. The QoS
- * settings in headers override the settings from jmsConfig
- *
- * @param jmsConfig configuration information
- * @param headers context headers
- * @return
- */
- public static JmsTemplate createJmsTemplate(JMSConfiguration jmsConfig, JMSMessageHeadersType headers) {
- JmsTemplate jmsTemplate = jmsConfig.isUseJms11() ? new JmsTemplate() : new JmsTemplate102();
- jmsTemplate.setConnectionFactory(jmsConfig.getConnectionFactory());
- jmsTemplate.setPubSubDomain(jmsConfig.isPubSubDomain());
- jmsTemplate.setReceiveTimeout(jmsConfig.getReceiveTimeout());
- jmsTemplate.setTimeToLive(jmsConfig.getTimeToLive());
- int priority = (headers != null && headers.isSetJMSPriority())
- ? headers.getJMSPriority() : jmsConfig.getPriority();
- jmsTemplate.setPriority(priority);
- int deliveryMode = (headers != null && headers.isSetJMSDeliveryMode()) ? headers
- .getJMSDeliveryMode() : jmsConfig.getDeliveryMode();
- jmsTemplate.setDeliveryMode(deliveryMode);
- jmsTemplate.setExplicitQosEnabled(jmsConfig.isExplicitQosEnabled());
- jmsTemplate.setSessionTransacted(jmsConfig.isSessionTransacted());
- if (jmsConfig.getDestinationResolver() != null) {
- jmsTemplate.setDestinationResolver(jmsConfig.getDestinationResolver());
- }
- return jmsTemplate;
- }
-
- /**
- * Create and start listener using configuration information from jmsConfig. Uses
- * resolveOrCreateDestination to determine the destination for the listener.
- *
- * @param jmsConfig configuration information
- * @param listenerHandler object to be called when a message arrives
- * @param destinationName null for temp dest or a destination name
- * @return
- */
- public static DefaultMessageListenerContainer createJmsListener(JMSConfiguration jmsConfig,
- MessageListener listenerHandler,
- String destinationName) {
- DefaultMessageListenerContainer jmsListener = jmsConfig.isUseJms11()
- ? new DefaultMessageListenerContainer() : new DefaultMessageListenerContainer102();
- jmsListener.setConcurrentConsumers(jmsConfig.getConcurrentConsumers());
- jmsListener.setMaxConcurrentConsumers(jmsConfig.getMaxConcurrentConsumers());
- jmsListener.setPubSubDomain(jmsConfig.isPubSubDomain());
- jmsListener.setAutoStartup(true);
- jmsListener.setConnectionFactory(jmsConfig.getConnectionFactory());
- jmsListener.setMessageSelector(jmsConfig.getMessageSelector());
- jmsListener.setDurableSubscriptionName(jmsConfig.getDurableSubscriptionName());
- jmsListener.setSessionTransacted(jmsConfig.isSessionTransacted());
- jmsListener.setTransactionManager(jmsConfig.getTransactionManager());
- jmsListener.setMessageListener(listenerHandler);
- if (jmsConfig.getDestinationResolver() != null) {
- jmsListener.setDestinationResolver(jmsConfig.getDestinationResolver());
- }
- if (jmsConfig.getTaskExecutor() != null) {
- jmsListener.setTaskExecutor(jmsConfig.getTaskExecutor());
- }
- JmsTemplate jmsTemplate = createJmsTemplate(jmsConfig, null);
- Destination dest = JMSFactory.resolveOrCreateDestination(jmsTemplate, destinationName, jmsConfig
- .isPubSubDomain());
- jmsListener.setDestination(dest);
- jmsListener.initialize();
- return jmsListener;
- }
-
- /**
- * If the destinationName given is null then a temporary destination is created else the destination name
- * is resolved using the resolver from the jmsConfig
- *
- * @param jmsTemplate template to use for session and resolver
- * @param replyToDestinationName null for temporary destination or a destination name
- * @param pubSubDomain true=pubSub, false=Queues
- * @return resolved destination
- */
- private static Destination resolveOrCreateDestination(final JmsTemplate jmsTemplate,
- final String replyToDestinationName,
- final boolean pubSubDomain) {
- return (Destination)jmsTemplate.execute(new SessionCallback() {
- public Object doInJms(Session session) throws JMSException {
- if (replyToDestinationName == null) {
- if (session instanceof QueueSession) {
- // For JMS 1.0.2
- return ((QueueSession)session).createTemporaryQueue();
- } else {
- // For JMS 1.1
- return session.createTemporaryQueue();
- }
- }
- DestinationResolver resolv = jmsTemplate.getDestinationResolver();
- return resolv.resolveDestinationName(session, replyToDestinationName, pubSubDomain);
- }
- });
- }
-
-}
+/**
+ * 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.transport.jms;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MessageListener;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jms.core.JmsTemplate102;
+import org.springframework.jms.core.SessionCallback;
+import org.springframework.jms.listener.DefaultMessageListenerContainer;
+import org.springframework.jms.listener.DefaultMessageListenerContainer102;
+import org.springframework.jms.support.destination.DestinationResolver;
+
+/**
+ * Factory to create JmsTemplates and JmsListeners from configuration and context information
+ */
+public final class JMSFactory {
+
+ private JMSFactory() {
+ }
+
+ /**
+ * Create JmsTemplate from configuration information. Most settings are taken from jmsConfig. The QoS
+ * settings in headers override the settings from jmsConfig
+ *
+ * @param jmsConfig configuration information
+ * @param headers context headers
+ * @return
+ */
+ public static JmsTemplate createJmsTemplate(JMSConfiguration jmsConfig, JMSMessageHeadersType headers) {
+ JmsTemplate jmsTemplate = jmsConfig.isUseJms11() ? new JmsTemplate() : new JmsTemplate102();
+ jmsTemplate.setConnectionFactory(jmsConfig.getConnectionFactory());
+ jmsTemplate.setPubSubDomain(jmsConfig.isPubSubDomain());
+ jmsTemplate.setReceiveTimeout(jmsConfig.getReceiveTimeout());
+ jmsTemplate.setTimeToLive(jmsConfig.getTimeToLive());
+ int priority = (headers != null && headers.isSetJMSPriority())
+ ? headers.getJMSPriority() : jmsConfig.getPriority();
+ jmsTemplate.setPriority(priority);
+ int deliveryMode = (headers != null && headers.isSetJMSDeliveryMode()) ? headers
+ .getJMSDeliveryMode() : jmsConfig.getDeliveryMode();
+ jmsTemplate.setDeliveryMode(deliveryMode);
+ jmsTemplate.setExplicitQosEnabled(jmsConfig.isExplicitQosEnabled());
+ jmsTemplate.setSessionTransacted(jmsConfig.isSessionTransacted());
+ if (jmsConfig.getDestinationResolver() != null) {
+ jmsTemplate.setDestinationResolver(jmsConfig.getDestinationResolver());
+ }
+ return jmsTemplate;
+ }
+
+ /**
+ * Create and start listener using configuration information from jmsConfig. Uses
+ * resolveOrCreateDestination to determine the destination for the listener.
+ *
+ * @param jmsConfig configuration information
+ * @param listenerHandler object to be called when a message arrives
+ * @param destinationName null for temp dest or a destination name
+ * @return
+ */
+ public static DefaultMessageListenerContainer createJmsListener(JMSConfiguration jmsConfig,
+ MessageListener listenerHandler,
+ String destinationName) {
+ DefaultMessageListenerContainer jmsListener = jmsConfig.isUseJms11()
+ ? new DefaultMessageListenerContainer() : new DefaultMessageListenerContainer102();
+ jmsListener.setConcurrentConsumers(jmsConfig.getConcurrentConsumers());
+ jmsListener.setMaxConcurrentConsumers(jmsConfig.getMaxConcurrentConsumers());
+ jmsListener.setPubSubDomain(jmsConfig.isPubSubDomain());
+ jmsListener.setAutoStartup(true);
+ jmsListener.setConnectionFactory(jmsConfig.getConnectionFactory());
+ jmsListener.setMessageSelector(jmsConfig.getMessageSelector());
+ jmsListener.setDurableSubscriptionName(jmsConfig.getDurableSubscriptionName());
+ jmsListener.setSessionTransacted(jmsConfig.isSessionTransacted());
+ jmsListener.setTransactionManager(jmsConfig.getTransactionManager());
+ jmsListener.setMessageListener(listenerHandler);
+ if (jmsConfig.getDestinationResolver() != null) {
+ jmsListener.setDestinationResolver(jmsConfig.getDestinationResolver());
+ }
+ if (jmsConfig.getTaskExecutor() != null) {
+ jmsListener.setTaskExecutor(jmsConfig.getTaskExecutor());
+ }
+ JmsTemplate jmsTemplate = createJmsTemplate(jmsConfig, null);
+ Destination dest = JMSFactory.resolveOrCreateDestination(jmsTemplate, destinationName, jmsConfig
+ .isPubSubDomain());
+ jmsListener.setDestination(dest);
+ jmsListener.initialize();
+ return jmsListener;
+ }
+
+ /**
+ * If the destinationName given is null then a temporary destination is created else the destination name
+ * is resolved using the resolver from the jmsConfig
+ *
+ * @param jmsTemplate template to use for session and resolver
+ * @param replyToDestinationName null for temporary destination or a destination name
+ * @param pubSubDomain true=pubSub, false=Queues
+ * @return resolved destination
+ */
+ private static Destination resolveOrCreateDestination(final JmsTemplate jmsTemplate,
+ final String replyToDestinationName,
+ final boolean pubSubDomain) {
+ return (Destination)jmsTemplate.execute(new SessionCallback() {
+ public Object doInJms(Session session) throws JMSException {
+ if (replyToDestinationName == null) {
+ if (session instanceof QueueSession) {
+ // For JMS 1.0.2
+ return ((QueueSession)session).createTemporaryQueue();
+ } else {
+ // For JMS 1.1
+ return session.createTemporaryQueue();
+ }
+ }
+ DestinationResolver resolv = jmsTemplate.getDestinationResolver();
+ return resolv.resolveDestinationName(session, replyToDestinationName, pubSubDomain);
+ }
+ });
+ }
+
+}
Propchange: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/ws/security/src/test/resources/DoubleIt.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/ws/security/src/test/resources/DoubleIt.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AbstractSpringServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AbstractSpringServer.java?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AbstractSpringServer.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AbstractSpringServer.java Sun Dec 14 23:40:33 2008
@@ -1,95 +1,95 @@
-/**
- * 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.jaxrs;
-
-import java.net.URISyntaxException;
-
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-import org.mortbay.jetty.Connector;
-import org.mortbay.jetty.Handler;
-import org.mortbay.jetty.handler.DefaultHandler;
-import org.mortbay.jetty.handler.HandlerCollection;
-import org.mortbay.jetty.nio.SelectChannelConnector;
-import org.mortbay.jetty.webapp.WebAppContext;
-
-public abstract class AbstractSpringServer extends AbstractBusTestServerBase {
-
- private org.mortbay.jetty.Server server;
- private String resourcePath;
- private String contextPath;
- private int port;
-
- protected AbstractSpringServer(String path) {
- this(path, "/", 9080);
- }
-
- protected AbstractSpringServer(String path, int portNumber) {
- this(path, "/", portNumber);
- }
-
- protected AbstractSpringServer(String path, String cPath, int portNumber) {
- resourcePath = path;
- contextPath = "/";
- port = portNumber;
- }
-
- protected void run() {
- System.out.println("Starting Server");
-
- server = new org.mortbay.jetty.Server();
-
- SelectChannelConnector connector = new SelectChannelConnector();
- connector.setPort(port);
- server.setConnectors(new Connector[] {connector});
-
- WebAppContext webappcontext = new WebAppContext();
- webappcontext.setContextPath(contextPath);
-
- String warPath = null;
- try {
- warPath = getClass().getResource(resourcePath).toURI().getPath();
- } catch (URISyntaxException e1) {
- e1.printStackTrace();
- }
-
- webappcontext.setWar(warPath);
-
- HandlerCollection handlers = new HandlerCollection();
- handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()});
-
- server.setHandler(handlers);
- try {
- server.start();
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void tearDown() throws Exception {
- super.tearDown();
- if (server != null) {
- server.stop();
- server.destroy();
- server = null;
- }
- }
-}
+/**
+ * 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.jaxrs;
+
+import java.net.URISyntaxException;
+
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.handler.DefaultHandler;
+import org.mortbay.jetty.handler.HandlerCollection;
+import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
+
+public abstract class AbstractSpringServer extends AbstractBusTestServerBase {
+
+ private org.mortbay.jetty.Server server;
+ private String resourcePath;
+ private String contextPath;
+ private int port;
+
+ protected AbstractSpringServer(String path) {
+ this(path, "/", 9080);
+ }
+
+ protected AbstractSpringServer(String path, int portNumber) {
+ this(path, "/", portNumber);
+ }
+
+ protected AbstractSpringServer(String path, String cPath, int portNumber) {
+ resourcePath = path;
+ contextPath = "/";
+ port = portNumber;
+ }
+
+ protected void run() {
+ System.out.println("Starting Server");
+
+ server = new org.mortbay.jetty.Server();
+
+ SelectChannelConnector connector = new SelectChannelConnector();
+ connector.setPort(port);
+ server.setConnectors(new Connector[] {connector});
+
+ WebAppContext webappcontext = new WebAppContext();
+ webappcontext.setContextPath(contextPath);
+
+ String warPath = null;
+ try {
+ warPath = getClass().getResource(resourcePath).toURI().getPath();
+ } catch (URISyntaxException e1) {
+ e1.printStackTrace();
+ }
+
+ webappcontext.setWar(warPath);
+
+ HandlerCollection handlers = new HandlerCollection();
+ handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()});
+
+ server.setHandler(handlers);
+ try {
+ server.start();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ if (server != null) {
+ server.stop();
+ server.destroy();
+ server = null;
+ }
+ }
+}
Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AbstractSpringServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/AbstractSpringSecurityTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/AbstractSpringSecurityTest.java?rev=726634&r1=726633&r2=726634&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/AbstractSpringSecurityTest.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/AbstractSpringSecurityTest.java Sun Dec 14 23:40:33 2008
@@ -1,71 +1,71 @@
-/**
- * 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.jaxrs.security;
-
-import java.io.InputStream;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.cxf.common.util.Base64Utility;
-import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.io.CachedOutputStream;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-
-public abstract class AbstractSpringSecurityTest extends AbstractBusClientServerTestBase {
-
- private String getStringFromInputStream(InputStream in) throws Exception {
- CachedOutputStream bos = new CachedOutputStream();
- IOUtils.copy(in, bos);
- in.close();
- bos.close();
- //System.out.println(bos.getOut().toString());
- return bos.getOut().toString();
- }
-
- private String base64Encode(String value) {
- return Base64Utility.encode(value.getBytes());
- }
-
- protected void getBook(String endpointAddress, String user, String password,
- int expectedStatus)
- throws Exception {
-
- GetMethod get = new GetMethod(endpointAddress);
- get.setRequestHeader("Accept", "application/xml");
- get.setRequestHeader("Authorization",
- "Basic " + base64Encode(user + ":" + password));
- HttpClient httpClient = new HttpClient();
- try {
- int result = httpClient.executeMethod(get);
- assertEquals(expectedStatus, result);
- if (expectedStatus == 200) {
- String content = getStringFromInputStream(get.getResponseBodyAsStream());
- String resource = "/org/apache/cxf/systest/jaxrs/resources/expected_get_book123.txt";
- InputStream expected = getClass().getResourceAsStream(resource);
- assertEquals("Expected value is wrong",
- getStringFromInputStream(expected), content);
- }
- } finally {
- get.releaseConnection();
- }
-
- }
-
-}
+/**
+ * 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.jaxrs.security;
+
+import java.io.InputStream;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.cxf.common.util.Base64Utility;
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.io.CachedOutputStream;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+
+public abstract class AbstractSpringSecurityTest extends AbstractBusClientServerTestBase {
+
+ private String getStringFromInputStream(InputStream in) throws Exception {
+ CachedOutputStream bos = new CachedOutputStream();
+ IOUtils.copy(in, bos);
+ in.close();
+ bos.close();
+ //System.out.println(bos.getOut().toString());
+ return bos.getOut().toString();
+ }
+
+ private String base64Encode(String value) {
+ return Base64Utility.encode(value.getBytes());
+ }
+
+ protected void getBook(String endpointAddress, String user, String password,
+ int expectedStatus)
+ throws Exception {
+
+ GetMethod get = new GetMethod(endpointAddress);
+ get.setRequestHeader("Accept", "application/xml");
+ get.setRequestHeader("Authorization",
+ "Basic " + base64Encode(user + ":" + password));
+ HttpClient httpClient = new HttpClient();
+ try {
+ int result = httpClient.executeMethod(get);
+ assertEquals(expectedStatus, result);
+ if (expectedStatus == 200) {
+ String content = getStringFromInputStream(get.getResponseBodyAsStream());
+ String resource = "/org/apache/cxf/systest/jaxrs/resources/expected_get_book123.txt";
+ InputStream expected = getClass().getResourceAsStream(resource);
+ assertEquals("Expected value is wrong",
+ getStringFromInputStream(expected), content);
+ }
+ } finally {
+ get.releaseConnection();
+ }
+
+ }
+
+}
Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/AbstractSpringSecurityTest.java
------------------------------------------------------------------------------
svn:eol-style = native