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&q...
+
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/ty...
+
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>