Author: klape
Date: 2012-10-23 00:20:48 -0400 (Tue, 23 Oct 2012)
New Revision: 16941
Added:
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/CXF4130Provider.java
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/CXF4130Test.java
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/cxf4130data.txt
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/resources/wsdl_systest_jaxws/
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/resources/wsdl_systest_jaxws/cxf4130.wsdl
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/pom.xml
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/pom.xml
Log:
[JBPAPP-9994] Server using @WebServiceProvider implementation writes contents of SOAP
body in SOAP header
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java 2012-10-22
17:27:05 UTC (rev 16940)
+++
thirdparty/cxf/branches/cxf-2.2.12/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java 2012-10-23
04:20:48 UTC (rev 16941)
@@ -52,6 +52,7 @@
import org.apache.cxf.message.MessageImpl;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
+import org.apache.cxf.service.model.BindingMessageInfo;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.apache.cxf.staxutils.OverlayW3CDOMStreamWriter;
import org.apache.cxf.staxutils.StaxUtils;
@@ -168,7 +169,7 @@
public void handleMessage(SoapMessage message) throws Fault {
MessageContentsList list =
(MessageContentsList)message.getContent(List.class);
- Object o = list.get(0);
+ Object o = list.remove(0);
SOAPMessage soapMessage = null;
if (o instanceof SOAPMessage) {
@@ -202,7 +203,9 @@
// Replace stax writer with DomStreamWriter
message.setContent(XMLStreamWriter.class, writer);
message.setContent(SOAPMessage.class, soapMessage);
-
+
+ BindingOperationInfo bop =
message.getExchange().get(BindingOperationInfo.class);
+
DocumentFragment frag = soapMessage.getSOAPPart().createDocumentFragment();
try {
Node body = soapMessage.getSOAPBody();
@@ -212,7 +215,25 @@
frag.appendChild(nd);
nd = soapMessage.getSOAPBody().getFirstChild();
}
- list.set(0, frag);
+
+ int index = 0;
+
+ boolean client = isRequestor(message);
+ BindingMessageInfo bmsg = null;
+
+ if (client) {
+ bmsg = bop.getInput();
+ } else if (bop.getOutput() != null) {
+ bmsg = bop.getOutput();
+ }
+ if (bmsg != null && bmsg.getMessageParts() != null
+ && bmsg.getMessageParts().size() > 0) {
+ index = bmsg.getMessageParts().get(0).getIndex();
+ }
+
+ list.set(index, frag);
+
+
//No need to buffer this as we're already a DOM,
//but only do so if someone hasn't actually configured this
Object buffer = message
@@ -223,7 +244,6 @@
} catch (Exception ex) {
throw new Fault(ex);
}
- BindingOperationInfo bop =
message.getExchange().get(BindingOperationInfo.class);
if (bop != null && bop.isUnwrapped()) {
bop = bop.getWrappedOperation();
message.getExchange().put(BindingOperationInfo.class, bop);
Modified: thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/pom.xml 2012-10-22 17:27:05 UTC (rev
16940)
+++ thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/pom.xml 2012-10-23 04:20:48 UTC (rev
16941)
@@ -18,181 +18,171 @@
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>
- <artifactId>cxf-rt-ws-security</artifactId>
- <packaging>jar</packaging>
- <name>Apache CXF Runtime WS Security</name>
- <url>http://cxf.apache.org</url>
-
- <parent>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-parent</artifactId>
- <version>2.2.12-patch-05-SNAPSHOT</version>
- <relativePath>../../../parent/pom.xml</relativePath>
- </parent>
-
-
- <repositories>
- <!-- temporary add the apache snapshot repo to get the wss4j snapshot -->
- <repository>
- <id>apache.snapshots</id>
- <name>Apache Snapshot Repository</name>
- <
url>http://repository.apache.org/snapshots</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
-
- <dependencies>
-
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>cxf-rt-ws-security</artifactId>
+ <packaging>jar</packaging>
+ <name>Apache CXF Runtime WS Security</name>
+ <url>http://cxf.apache.org</url>
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.2.12-patch-05-SNAPSHOT</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+ <repositories>
+ <!-- temporary add the apache snapshot repo to get the wss4j snapshot -->
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <
url>http://repository.apache.org/snapshots</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ <dependencies>
+ <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-common-utilities</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-ws-policy</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-ws-addr</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.soap</groupId>
+ <artifactId>saaj-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.security</groupId>
+ <artifactId>wss4j</artifactId>
+ <version>1.5.12-patch-02-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>opensaml</groupId>
+ <artifactId>opensaml</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>axis</groupId>
+ <artifactId>axis-ant</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15</artifactId>
+ <scope>runtime</scope>
+ </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>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-local</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-testutils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${saaj.impl.groupId}</groupId>
+ <artifactId>${saaj.impl.artifactId}</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <profiles>
+ <profile>
+ <id>ibmjdk</id>
+ <activation>
+ <property>
+ <name>java.vendor</name>
+ <value>IBM Corporation</value>
+ </property>
+ </activation>
+ <dependencies>
<dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-api</artifactId>
- <version>${project.version}</version>
+ <groupId>com.sun.xml.parsers</groupId>
+ <artifactId>jaxp-ri</artifactId>
+ <scope>test</scope>
</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-common-utilities</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-ws-policy</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-ws-addr</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.xml.soap</groupId>
- <artifactId>saaj-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.security</groupId>
- <artifactId>wss4j</artifactId>
- <version>1.5.12-patch-01</version>
- <exclusions>
- <exclusion>
- <groupId>axis</groupId>
- <artifactId>axis</artifactId>
- </exclusion>
- <exclusion>
- <groupId>opensaml</groupId>
- <artifactId>opensaml</artifactId>
- </exclusion>
- <exclusion>
- <groupId>axis</groupId>
- <artifactId>axis-ant</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.1</version>
- <exclusions>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk15</artifactId>
- <scope>runtime</scope>
- </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>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxws</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-local</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-testutils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${saaj.impl.groupId}</groupId>
- <artifactId>${saaj.impl.artifactId}</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-
- <profiles>
- <profile>
- <id>ibmjdk</id>
- <activation>
- <property>
- <name>java.vendor</name>
- <value>IBM Corporation</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.sun.xml.parsers</groupId>
- <artifactId>jaxp-ri</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
+ </dependencies>
+ </profile>
+ </profiles>
</project>
Modified: thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/pom.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/pom.xml 2012-10-22 17:27:05 UTC (rev
16940)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/pom.xml 2012-10-23 04:20:48 UTC (rev
16941)
@@ -18,211 +18,217 @@
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>
+ <parent>
+ <artifactId>cxf-parent</artifactId>
+ <groupId>org.apache.cxf</groupId>
+ <version>2.2.12-patch-05-SNAPSHOT</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf.systests</groupId>
+ <artifactId>cxf-systests-jaxws</artifactId>
+ <name>Apache CXF JAX-WS System Tests</name>
+ <version>2.2.12-patch-05-SNAPSHOT</version>
+ <url>http://cxf.apache.org</url>
+ <build>
+ <plugins>
+ <plugin>
<groupId>org.apache.cxf</groupId>
- <version>2.2.12-patch-05-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.systests</groupId>
- <artifactId>cxf-systests-jaxws</artifactId>
- <name>Apache CXF JAX-WS System Tests</name>
- <version>2.2.12-patch-05-SNAPSHOT</version>
- <url>http://cxf.apache.org</url>
-
- <build>
- <plugins>
- <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_jaxws</testWsdlRoot>
- </configuration>
- <goals>
- <goal>wsdl2java</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>test-jar</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>
+ <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_jaxws</testWsdlRoot>
+ </configuration>
+ <goals>
+ <goal>wsdl2java</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>test-jar</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-servlet_2.5_spec</artifactId>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_3.0_spec</artifactId>
+ <scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-common-utilities</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-management</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-databinding-xmlbeans</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-bindings-soap</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-bindings-http</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.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-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>spring-web</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>${spring.mock}</artifactId>
- </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>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.fastinfoset</groupId>
- <artifactId>FastInfoset</artifactId>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-testsupport</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <properties>
- <surefire.fork.mode>pertest</surefire.fork.mode>
- </properties>
-
+ </dependencies>
+ </profile>
+ </profiles>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-servlet_2.5_spec</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-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-management</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-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-databinding-xmlbeans</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-bindings-soap</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-bindings-http</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.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-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>spring-web</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>${spring.mock}</artifactId>
+ </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>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.fastinfoset</groupId>
+ <artifactId>FastInfoset</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-testsupport</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <surefire.fork.mode>pertest</surefire.fork.mode>
+ </properties>
</project>
Added:
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/CXF4130Provider.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/CXF4130Provider.java
(rev 0)
+++
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/CXF4130Provider.java 2012-10-23
04:20:48 UTC (rev 16941)
@@ -0,0 +1,89 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.provider;
+
+import java.io.StringReader;
+
+import javax.annotation.Resource;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Provider;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceProvider;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+@WebServiceProvider(serviceName = "InBandSoapHeaderService",
+ targetNamespace = "http://cxf.apache.org/soapheader/inband",
+ portName = "InBandSoapHeaderSoapHttpPort",
+ wsdlLocation = "/wsdl_systest_jaxws/cxf4130.wsdl")
+@ServiceMode(value = javax.xml.ws.Service.Mode.MESSAGE)
+public class CXF4130Provider implements Provider<SOAPMessage> {
+
+ @Resource
+ protected WebServiceContext context;
+
+ public SOAPMessage invoke(SOAPMessage request) {
+ try {
+ Document soapBodyDomDocument =
request.getSOAPBody().extractContentAsDocument();
+ Node node = soapBodyDomDocument.getDocumentElement();
+ String requestMsgName = node.getLocalName();
+ String responseText = null;
+
+ if ("FooRequest".equals(requestMsgName)) {
+ responseText = "<SOAP-ENV:Envelope "
+ +
"xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+ + "<SOAP-ENV:Header>"
+ + "<FooResponseHeader
xmlns:ns2=\"http://cxf.apache.org/soapheader/inband\">"
+ + "FooResponseHeader</FooResponseHeader>"
+ + "</SOAP-ENV:Header>"
+ + "<SOAP-ENV:Body>"
+ + "<ns2:FooResponse
xmlns:ns2=\"http://cxf.apache.org/soapheader/inband\">"
+ + "<ns2:Return>Foo Response
Body</ns2:Return>"
+ + "</ns2:FooResponse>"
+ + "</SOAP-ENV:Body>"
+ + "</SOAP-ENV:Envelope>\n";
+
+ } else {
+ throw new WebServiceException("Error in InBand Provider JAX-WS
service -- Unknown Request: "
+ + requestMsgName);
+ }
+
+ // Create a SOAP request message
+ MessageFactory soapmsgfactory = MessageFactory.newInstance();
+ SOAPMessage responseMessage = soapmsgfactory.createMessage();
+ StreamSource responseMessageSrc = null;
+
+ responseMessageSrc = new StreamSource(new StringReader(responseText));
+ responseMessage.getSOAPPart().setContent(responseMessageSrc);
+ responseMessage.saveChanges();
+
+ return responseMessage;
+
+ } catch (Exception e) {
+ throw new WebServiceException(e);
+ }
+
+ }
+
+}
Added:
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/CXF4130Test.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/CXF4130Test.java
(rev 0)
+++
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/CXF4130Test.java 2012-10-23
04:20:48 UTC (rev 16941)
@@ -0,0 +1,96 @@
+/**
+ * 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.provider;
+
+
+import java.io.InputStream;
+
+import javax.xml.ws.Endpoint;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.TestUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CXF4130Test extends AbstractBusClientServerTestBase {
+
+ public static final String ADDRESS
+ = "http://localhost:" + TestUtil.getPortNumber(Server.class)
+ + "/InBand33MessageServiceProvider/InBandSoapHeaderSoapHttpPort";
+
+ public static class Server extends AbstractBusTestServerBase {
+
+ protected void run() {
+ Object implementor = new CXF4130Provider();
+ Endpoint.publish(ADDRESS, implementor);
+ }
+
+ 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!");
+ }
+ }
+ }
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly",
launchServer(Server.class, true));
+ }
+
+ @Test
+ public void testCxf4130() throws Exception {
+ InputStream body = getClass().getResourceAsStream("cxf4130data.txt");
+ HttpClient client = new HttpClient();
+ PostMethod post = new PostMethod(ADDRESS);
+ post.setRequestEntity(new InputStreamRequestEntity(body, "text/xml"));
+ client.executeMethod(post);
+
+ Document doc = StaxUtils.read(post.getResponseBodyAsStream());
+ Element root = doc.getDocumentElement();
+ Node child = root.getFirstChild();
+
+ boolean foundBody = false;
+ while (child != null) {
+ if ("Body".equals(child.getLocalName())) {
+ foundBody = true;
+ assertEquals(1, child.getChildNodes().getLength());
+ assertEquals("FooResponse",
child.getFirstChild().getLocalName());
+ }
+ child = child.getNextSibling();
+ }
+ assertTrue("Did not find the soap:Body element", foundBody);
+ }
+
+}
Added:
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/cxf4130data.txt
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/cxf4130data.txt
(rev 0)
+++
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/cxf4130data.txt 2012-10-23
04:20:48 UTC (rev 16941)
@@ -0,0 +1,8 @@
+<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:inb="http://cxf.apache.org/soapheader/inband">
+ <soapenv:Header>
+ <inb:FooRequestHeader>?</inb:FooRequestHeader>
+ </soapenv:Header>
+ <soapenv:Body>
+ <inb:FooRequest/>
+ </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file
Added:
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/resources/wsdl_systest_jaxws/cxf4130.wsdl
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/resources/wsdl_systest_jaxws/cxf4130.wsdl
(rev 0)
+++
thirdparty/cxf/branches/cxf-2.2.12/systests/jaxws/src/test/resources/wsdl_systest_jaxws/cxf4130.wsdl 2012-10-23
04:20:48 UTC (rev 16941)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://cxf.apache.org/soapheader/inband"
targetNamespace="http://cxf.apache.org/soapheader/inband">
+ <types>
+ <schema elementFormDefault="qualified"
targetNamespace="http://cxf.apache.org/soapheader/inband"
xmlns="http://www.w3.org/2001/XMLSchema">
+>
+ <element name="FooRequest">
+ <complexType>
+ <sequence/>
+ </complexType>
+ </element>
+
+ <element name="FooResponse">
+ <complexType>
+ <sequence>
+ <element name="Return" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="FooRequestHeader" type="string"/>
+ <element name="FooResponseHeader" type="string"/>
+ </schema>
+ </types>
+
+ <message name="FooRequest">
+ <part name="FooRequestHeader"
element="tns:FooRequestHeader"/>
+ <part name="FooRequest" element="tns:FooRequest"/>
+ </message>
+ <message name="FooResponse">
+ <part name="FooResponseHeader"
element="tns:FooResponseHeader"/>
+ <part name="FooResponse" element="tns:FooResponse"/>
+ </message>
+ <portType name="InBandSoapHeaderPortType">
+ <operation name="Foo">
+ <input name="FooRequest" message="tns:FooRequest"/>
+ <output name="FooResponse" message="tns:FooResponse"/>
+ </operation>
+ </portType>
+ <binding name="InBandSoapHeaderSoapHttpBinding"
type="tns:InBandSoapHeaderPortType">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="Foo">
+ <soap:operation/>
+ <input>
+ <soap:header message="tns:FooRequest" part="FooRequestHeader"
use="literal"/>
+ <soap:body parts="FooRequest" use="literal"/>
+ </input>
+ <output>
+ <soap:header message="tns:FooResponse"
part="FooResponseHeader" use="literal"/>
+ <!-- mmurphy - The follow line is from customer's original WSDL -->
+ <!-- <soap:body parts="FooCallbackPollResponse"
use="literal"/> -->
+ <!-- mmurphy - Replacing with suggestion from Seumas -->
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="InBandSoapHeaderService">
+ <port name="InBandSoapHeaderSoapHttpPort"
binding="tns:InBandSoapHeaderSoapHttpBinding">
+ <soap:address
location="http://localhost:5640/InBand33MessageServiceProvider/InBandSoapHeaderSoapHttpPort"/>
+ </port>
+ </service>
+</definitions>