You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2014/01/16 16:04:24 UTC
svn commit: r1558825 - in
/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy:
./ src/ src/main/ src/main/java/ src/main/java/demo/
src/main/java/demo/wssec/ src/main/java/demo/wssec/client/
src/main/java/demo/wssec/server/ src...
Author: coheigea
Date: Thu Jan 16 15:04:23 2014
New Revision: 1558825
URL: http://svn.apache.org/r1558825
Log:
Adding a WS-SecurityPolicy version of the sign_encr sample
Added:
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/pom.xml
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/Client.java
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/GreeterImpl.java
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/Server.java
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfig.xml
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfigStax.xml
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfig.xml
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfigStax.xml
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Encrypt.properties
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Sign.properties
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_Decrypt.properties
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_SignVerf.properties
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/hello_world.wsdl
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-keystore.jks
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-truststore.jks
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-keystore.jks
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-truststore.jks
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt Thu Jan 16 15:04:23 2014
@@ -0,0 +1,50 @@
+WS-Security Demo (UsernameToken and Timestamp)
+===============================================
+This demo shows how WS-Security support in Apache CXF may be enabled.
+
+WS-Security can be configured to the Client and Server endpoints by adding
+WS-SecurityPolicies into the WSDL.
+
+CXF 3.0.0 supports both a DOM-based (in-memory) and StAX-based (streaming)
+approach to WS-Security. This demo shows how to use both approaches.
+
+The logging feature is used to log the inbound and outbound
+SOAP messages and display these to the console.
+
+Please review the README in the samples directory before continuing.
+
+*** Requirements ***
+
+The samples in this directory use STRONG encryption. The default encryption algorithms
+included in a JRE is not adequate for these samples. The Java Cryptography Extension
+(JCE) Unlimited Strength Jurisdiction Policy Files available on Oracle's JDK download
+page[3] *must* be installed for the examples to work. If you get errors about invalid
+key lengths, the Unlimited Strength files are not installed.
+
+[3] http://www.oracle.com/technetwork/java/javase/downloads/index.html
+
+
+Building and running the demo using Maven
+-----------------------------------------
+From the base directory of this sample (i.e., where this README file is
+located), the Maven pom.xml file can be used to build and run the demo.
+
+Using either UNIX or Windows:
+
+ mvn install (builds the demo)
+
+To use the DOM-based WS-Security functionality:
+
+ mvn -Pserver (from one command line window)
+ mvn -Pclient (from a second command line window)
+
+To use the StAX-based WS-Security functionality:
+
+ mvn -Pstax-server (from one command line window)
+ mvn -Pstax-client (from a second command line window)
+
+On startup, the client makes one invocation.
+
+To remove the code generated from the WSDL file and the .class
+files, run "mvn clean".
+
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/pom.xml?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/pom.xml Thu Jan 16 15:04:23 2014
@@ -0,0 +1,239 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>wssec_ut_policy</artifactId>
+ <name>WS-Security UT Policy Demo</name>
+ <description>WS-Security UT Policy Demo</description>
+ <parent>
+ <groupId>org.apache.cxf.samples</groupId>
+ <artifactId>cxf-samples</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <wsdlOptions>
+ <wsdlOption>
+ <wsdl>${basedir}/src/main/resources/hello_world.wsdl</wsdl>
+ <frontEnd>jaxws21</frontEnd>
+ </wsdlOption>
+ </wsdlOptions>
+ </configuration>
+ <goals>
+ <goal>wsdl2java</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>server</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.wssec.server.Server</mainClass>
+ <arguments>
+ <argument>${basedir}/src/main/resources/ServiceConfig.xml</argument>
+ <argument>secure</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>stax-server</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.wssec.server.Server</mainClass>
+ <arguments>
+ <argument>${basedir}/src/main/resources/ServiceConfigStax.xml</argument>
+ <argument>secure</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>client</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.wssec.client.Client</mainClass>
+ <arguments>
+ <argument>${basedir}/src/main/resources/hello_world.wsdl</argument>
+ <argument>${basedir}/src/main/resources/ClientConfig.xml</argument>
+ <argument>secure</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>stax-client</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.wssec.client.Client</mainClass>
+ <arguments>
+ <argument>${basedir}/src/main/resources/hello_world.wsdl</argument>
+ <argument>${basedir}/src/main/resources/ClientConfigStax.xml</argument>
+ <argument>secure</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>client.unauthenticated</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.wssec.client.Client</mainClass>
+ <arguments>
+ <argument>${basedir}/src/main/config/hello_world_no_policy.wsdl</argument>
+ <argument>${basedir}/src/main/resources/ClientConfig.xml</argument>
+ <argument>secure</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http-jetty</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-ws-policy</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/Client.java?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/Client.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/Client.java Thu Jan 16 15:04:23 2014
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.wssec.client;
+
+import java.io.File;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.hello_world_soap_http.Greeter;
+import org.apache.hello_world_soap_http.SOAPService;
+
+public final class Client {
+
+ private static final QName SERVICE_NAME
+ = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
+
+ private static final QName PORT_NAME =
+ new QName("http://apache.org/hello_world_soap_http", "SoapPort");
+
+
+ private Client() {
+ }
+
+ public static void main(String args[]) throws Exception {
+
+ if (args.length < 2) {
+ System.out.println("please specify wsdl and configuration file");
+ System.exit(1);
+ }
+
+ URL wsdlURL;
+ File wsdlFile = new File(args[0]);
+ if (wsdlFile.exists()) {
+ wsdlURL = wsdlFile.toURI().toURL();
+ } else {
+ wsdlURL = new URL(args[0]);
+ }
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busURL;
+ File busFile = new File(args[1]);
+ if (busFile.exists()) {
+ busURL = busFile.toURI().toURL();
+ } else {
+ busURL = new URL(args[1]);
+ }
+
+ Bus bus = bf.createBus(busFile.toString());
+ BusFactory.setDefaultBus(bus);
+
+ System.out.println(wsdlURL);
+ SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
+ Greeter port = ss.getPort(PORT_NAME, Greeter.class);
+
+ System.out.println("Invoking greetMe...");
+ try {
+ String resp = port.greetMe(System.getProperty("user.name"));
+ System.out.println("Server responded with: " + resp);
+ System.out.println();
+
+ } catch (Exception e) {
+ System.out.println("Invocation failed with the following: " + e.getCause());
+ System.out.println();
+ }
+
+ System.exit(0);
+ }
+
+}
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java Thu Jan 16 15:04:23 2014
@@ -0,0 +1,66 @@
+/**
+ * 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 demo.wssec.client;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
+/**
+ */
+
+public class UTPasswordCallback implements CallbackHandler {
+
+ private Map<String, String> passwords =
+ new HashMap<String, String>();
+
+ public UTPasswordCallback() {
+ passwords.put("Alice", "ecilA");
+ passwords.put("abcd", "dcba");
+ }
+
+ /**
+ * Here, we attempt to get the password from the private
+ * alias/passwords map.
+ */
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+ String pass = passwords.get(pc.getIdentifier());
+ if (pass != null) {
+ pc.setPassword(pass);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Add an alias/password pair to the callback mechanism.
+ */
+ public void setAliasPassword(String alias, String password) {
+ passwords.put(alias, password);
+ }
+}
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/GreeterImpl.java?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/GreeterImpl.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/GreeterImpl.java Thu Jan 16 15:04:23 2014
@@ -0,0 +1,41 @@
+/**
+ * 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 demo.wssec.server;
+
+import java.util.logging.Logger;
+import org.apache.hello_world_soap_http.Greeter;
+
+@javax.jws.WebService(name = "Greeter", serviceName = "SOAPService",
+ targetNamespace = "http://apache.org/hello_world_soap_http")
+public class GreeterImpl implements Greeter {
+
+ private static final Logger LOG =
+ Logger.getLogger(GreeterImpl.class.getPackage().getName());
+
+ /* (non-Javadoc)
+ * @see org.objectweb.hello_world_soap_http.Greeter#greetMe(java.lang.String)
+ */
+ public String greetMe(String me) {
+ LOG.info("Executing operation greetMe");
+ System.out.println("Executing operation greetMe");
+ System.out.println("Message received: " + me + "\n");
+ return "Hello " + me;
+ }
+}
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/Server.java?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/Server.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/Server.java Thu Jan 16 15:04:23 2014
@@ -0,0 +1,71 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.wssec.server;
+
+import java.io.File;
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+
+public class Server {
+
+ protected Server(URL busURL) throws Exception {
+ System.out.println("Starting Server");
+
+ SpringBusFactory bf = new SpringBusFactory();
+ Bus bus = bf.createBus(busURL.toString());
+ BusFactory.setDefaultBus(bus);
+
+ //Object implementor = new GreeterImpl();
+ //String address = "https://localhost:9001/SoapContext/SoapPort";
+ //Endpoint.publish(address, implementor);
+ }
+
+ public static void main(String args[]) throws Exception {
+
+ if (args.length == 0) {
+ System.out.println("please specify configuration file");
+ System.exit(1);
+ }
+
+ System.out.println("The server's security configuration will be taken "
+ + "from server.xml using the bean name : "
+ + "\"{http://apache.org/hello_world_soap_http}"
+ + "GreeterImplPort.http-destination\".");
+ System.out.println();
+
+ URL busURL;
+ File busFile = new File(args[0]);
+ if (busFile.exists()) {
+ busURL = busFile.toURI().toURL();
+ } else {
+ busURL = new URL(args[0]);
+ }
+
+ new Server(busURL);
+ System.out.println("Server ready...");
+
+ Thread.sleep(5 * 60 * 1000);
+ System.out.println("Server exiting");
+ System.exit(0);
+ }
+}
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java Thu Jan 16 15:04:23 2014
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demo.wssec.server;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
+/**
+ */
+
+public class UTPasswordCallback implements CallbackHandler {
+
+ private Map<String, String> passwords =
+ new HashMap<String, String>();
+
+ public UTPasswordCallback() {
+ passwords.put("Alice", "ecilA");
+ passwords.put("abcd", "dcba");
+ passwords.put("clientx509v1", "storepassword");
+ passwords.put("serverx509v1", "storepassword");
+ }
+
+ /**
+ * Here, we attempt to get the password from the private
+ * alias/passwords map.
+ */
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+ String pass = passwords.get(pc.getIdentifier());
+ if (pass != null) {
+ pc.setPassword(pass);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Add an alias/password pair to the callback mechanism.
+ */
+ public void setAliasPassword(String alias, String password) {
+ passwords.put(alias, password);
+ }
+}
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfig.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfig.xml?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfig.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfig.xml Thu Jan 16 15:04:23 2014
@@ -0,0 +1,37 @@
+<?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.
+-->
+<!--
+ ** This file configures the web service client
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.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 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+ <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapPort" createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.username" value="Alice"/>
+ <entry key="ws-security.callback-handler" value="demo.wssec.client.UTPasswordCallback"/>
+ <entry key="ws-security.encryption.properties" value="etc/Client_Encrypt.properties"/>
+ <entry key="ws-security.encryption.username" value="serverx509v1"/>
+ </jaxws:properties>
+ </jaxws:client>
+</beans>
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfigStax.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfigStax.xml?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfigStax.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ClientConfigStax.xml Thu Jan 16 15:04:23 2014
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+ ** This file configures the web service client
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.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 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+ <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapPort" createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.username" value="Alice"/>
+ <entry key="ws-security.callback-handler" value="demo.wssec.client.UTPasswordCallback"/>
+ <entry key="ws-security.encryption.properties" value="etc/Client_Encrypt.properties"/>
+ <entry key="ws-security.encryption.username" value="serverx509v1"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+ </jaxws:client>
+</beans>
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfig.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfig.xml?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfig.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfig.xml Thu Jan 16 15:04:23 2014
@@ -0,0 +1,39 @@
+<?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.
+-->
+<!--
+ ** This file configures the web service provider.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.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 http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jett
y.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+ <!--
+ <http:destination name="{http://apache.org/hello_world_soap_http}GreeterPort.http-destination">
+ </http:destination>
+ -->
+ <jaxws:endpoint xmlns:s="http://apache.org/hello_world_soap_http" id="server" endpointName="s:SoapPort" serviceName="s:SOAPService" implementor="demo.wssec.server.GreeterImpl" address="http://localhost:9001/SoapContext/SoapPort" wsdlLocation="src/main/resources/hello_world.wsdl">
+ <jaxws:properties>
+ <entry key="ws-security.signature.properties" value="etc/Server_Decrypt.properties"/>
+ <entry key="ws-security.callback-handler" value="demo.wssec.server.UTPasswordCallback"/>
+ </jaxws:properties>
+ </jaxws:endpoint>
+</beans>
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfigStax.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfigStax.xml?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfigStax.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/ServiceConfigStax.xml Thu Jan 16 15:04:23 2014
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+ ** This file configures the web service provider.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.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 http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jett
y.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+ <!--
+ <http:destination name="{http://apache.org/hello_world_soap_http}GreeterPort.http-destination">
+ </http:destination>
+ -->
+ <jaxws:endpoint xmlns:s="http://apache.org/hello_world_soap_http" id="server" endpointName="s:SoapPort" serviceName="s:SOAPService" implementor="demo.wssec.server.GreeterImpl" address="http://localhost:9001/SoapContext/SoapPort" wsdlLocation="src/main/resources/hello_world.wsdl">
+ <jaxws:properties>
+ <entry key="ws-security.signature.properties" value="etc/Server_Decrypt.properties"/>
+ <entry key="ws-security.callback-handler" value="demo.wssec.server.UTPasswordCallback"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+ </jaxws:endpoint>
+</beans>
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Encrypt.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Encrypt.properties?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Encrypt.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Encrypt.properties Thu Jan 16 15:04:23 2014
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=storepassword
+org.apache.ws.security.crypto.merlin.keystore.alias=serverx509v1
+org.apache.ws.security.crypto.merlin.keystore.file=keystore/client-truststore.jks
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Sign.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Sign.properties?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Sign.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Client_Sign.properties Thu Jan 16 15:04:23 2014
@@ -0,0 +1,6 @@
+org.apache.ws.security.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=storepassword
+org.apache.ws.security.crypto.merlin.keystore.alias=clientx509v1
+org.apache.ws.security.crypto.merlin.keystore.file=keystore/client-keystore.jks
+
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_Decrypt.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_Decrypt.properties?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_Decrypt.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_Decrypt.properties Thu Jan 16 15:04:23 2014
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=storepassword
+org.apache.ws.security.crypto.merlin.keystore.alias=serverx509v1
+org.apache.ws.security.crypto.merlin.keystore.file=keystore/server-keystore.jks
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_SignVerf.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_SignVerf.properties?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_SignVerf.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/etc/Server_SignVerf.properties Thu Jan 16 15:04:23 2014
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=storepassword
+org.apache.ws.security.crypto.merlin.keystore.alias=clientx509v1
+org.apache.ws.security.crypto.merlin.keystore.file=keystore/server-truststore.jks
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/hello_world.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/hello_world.wsdl?rev=1558825&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/hello_world.wsdl (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/hello_world.wsdl Thu Jan 16 15:04:23 2014
@@ -0,0 +1,128 @@
+<?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://apache.org/hello_world_soap_http" xmlns:x1="http://apache.org/hello_world_soap_http/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http">
+ <wsdl:types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://apache.org/hello_world_soap_http/types" targetNamespace="http://apache.org/hello_world_soap_http/types" elementFormDefault="qualified">
+ <simpleType name="MyStringType">
+ <restriction base="string">
+ <maxLength value="30"/>
+ </restriction>
+ </simpleType>
+ <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>
+ </schema>
+ </wsdl:types>
+ <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:portType name="Greeter">
+ <wsdl:operation name="greetMe">
+ <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+ <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+ <wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#GreetMePolicy"/>
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="greetMe">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeRequest">
+ <soap:body use="literal"/>
+ <wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#GreetMePartsPolicy"/>
+ </wsdl:input>
+ <wsdl:output name="greetMeResponse">
+ <soap:body use="literal"/>
+ <wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#GreetMePartsPolicy"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SOAPService">
+ <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+ <soap:address location="http://localhost:9001/SoapContext/SoapPort"/>
+ </wsdl:port>
+ </wsdl:service>
+ <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="GreetMePolicy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy />
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:EncryptedSupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssUsernameToken11/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:EncryptedSupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="GreetMePartsPolicy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:EncryptedParts xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SignedParts xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+ <sp:Body/>
+ </sp:SignedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</wsdl:definitions>
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-keystore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-keystore.jks?rev=1558825&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-keystore.jks (added) and cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-keystore.jks Thu Jan 16 15:04:23 2014 differ
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-truststore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-truststore.jks?rev=1558825&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-truststore.jks (added) and cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/client-truststore.jks Thu Jan 16 15:04:23 2014 differ
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-keystore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-keystore.jks?rev=1558825&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-keystore.jks (added) and cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-keystore.jks Thu Jan 16 15:04:23 2014 differ
Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-truststore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-truststore.jks?rev=1558825&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-truststore.jks (added) and cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/src/main/resources/keystore/server-truststore.jks Thu Jan 16 15:04:23 2014 differ