You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/03/09 16:54:36 UTC

svn commit: r751715 - in /cxf/sandbox/interopfest/wssec10/src/main/java/interop: client/ server/

Author: dkulp
Date: Mon Mar  9 15:54:36 2009
New Revision: 751715

URL: http://svn.apache.org/viewvc?rev=751715&view=rev
Log:
Update for cxf checkstyle rules to prep for moving into samples

Modified:
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/Client.java
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/KeystorePasswordCallback.java
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/UTPasswordCallback.java
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/KeystorePasswordCallback.java
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncrypt.java
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncryptRsa15TripleDes.java
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/PingServiceBase.java
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/Server.java
    cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/UserNameOverTransport.java

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/Client.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/Client.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/Client.java Mon Mar  9 15:54:36 2009
@@ -1,8 +1,4 @@
 /**
- * Copyright (c) 1993-2007 IONA Technologies PLC.
- *            All Rights Reserved.
- */
-/**
  * 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
@@ -29,7 +25,6 @@
 import java.util.List;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
 
 import org.apache.cxf.bus.spring.SpringBusFactory;
 
@@ -52,11 +47,11 @@
     public static void main(String argv[])
         throws Exception {
         if (argv.length < 1) {
-           argv = new String[] {
-                                "UserNameOverTransport",
-                                "MutualCertificate10SignEncrypt",
-                                "MutualCertificate10SignEncryptRsa15TripleDes"
-                                };
+            argv = new String[] {
+                "UserNameOverTransport",
+                "MutualCertificate10SignEncrypt",
+                "MutualCertificate10SignEncryptRsa15TripleDes"
+            };
         }
 
         new SpringBusFactory().createBus("etc/client.xml");
@@ -82,13 +77,6 @@
                         IPingService.class
                     );
                 
-                /*
-                ((BindingProvider)port)
-                    .getRequestContext()
-                        .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
-                             "http://localhost:9000/MutualCertificate10SignEncryptRsa15TripleDes");
-                */
-                
                 final String output = port.echo(INPUT);
                 if (!INPUT.equals(output)) {
                     System.err.println(
@@ -110,18 +98,18 @@
     }
     
     private static URL getWsdlLocation(String portPrefix) {
-    	try {
-    	    if ("UserNameOverTransport".equals(portPrefix)) {
-    	        return new URL("https://localhost:9001/" + portPrefix + "?wsdl");
-    	    } else if ("MutualCertificate10SignEncrypt".equals(portPrefix)) {
-    	        return new URL("http://localhost:9002/" + portPrefix + "?wsdl");
-    	    } else if ("MutualCertificate10SignEncryptRsa15TripleDes".equals(portPrefix)) {
-    	        return new URL("http://localhost:9000/" + portPrefix + "?wsdl");
-    	    }
-    	} catch (MalformedURLException mue) {
-    	    return null;
-    	}
-    	return null;
+        try {
+            if ("UserNameOverTransport".equals(portPrefix)) {
+                return new URL("https://localhost:9001/" + portPrefix + "?wsdl");
+            } else if ("MutualCertificate10SignEncrypt".equals(portPrefix)) {
+                return new URL("http://localhost:9002/" + portPrefix + "?wsdl");
+            } else if ("MutualCertificate10SignEncryptRsa15TripleDes".equals(portPrefix)) {
+                return new URL("http://localhost:9000/" + portPrefix + "?wsdl");
+            }
+        } catch (MalformedURLException mue) {
+            return null;
+        }
+        return null;
     }
 
 }

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/KeystorePasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/KeystorePasswordCallback.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/KeystorePasswordCallback.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/KeystorePasswordCallback.java Mon Mar  9 15:54:36 2009
@@ -1,12 +1,25 @@
 /**
- *        Copyright (c) 1993-2006 IONA Technologies PLC.
- *                       All Rights Reserved.
+ * 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 interop.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;

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/UTPasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/UTPasswordCallback.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/UTPasswordCallback.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/client/UTPasswordCallback.java Mon Mar  9 15:54:36 2009
@@ -1,8 +1,21 @@
 /**
- *        Copyright (c) 1993-2007 IONA Technologies PLC.
- *                       All Rights Reserved.
+ * 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 interop.client;
 
 import java.io.IOException;

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/KeystorePasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/KeystorePasswordCallback.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/KeystorePasswordCallback.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/KeystorePasswordCallback.java Mon Mar  9 15:54:36 2009
@@ -1,6 +1,20 @@
 /**
- *        Copyright (c) 1993-2006 IONA Technologies PLC.
- *                       All Rights Reserved.
+ * 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 interop.server;
 
@@ -38,17 +52,17 @@
         for (int i = 0; i < callbacks.length; i++) {
             WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
             try {
-            	Integer.parseInt(pc.getIdentifier());
-            	//Its an alias generated for a pfx file,
-            	//this seems to be the way sun seem to load
-            	//.pfc files into keystores, assigning an int value
-            	//as the key aliases,
-            	//The above is an issue when doing encrypt or signing only.
-            	//Perhaps using a more suitable keystore format like .jks would be better
-            	pc.setPassword("password");
+                Integer.parseInt(pc.getIdentifier());
+                //Its an alias generated for a pfx file,
+                //this seems to be the way sun seem to load
+                //.pfc files into keystores, assigning an int value
+                //as the key aliases,
+                //The above is an issue when doing encrypt or signing only.
+                //Perhaps using a more suitable keystore format like .jks would be better
+                pc.setPassword("password");
                 return;
             } catch (NumberFormatException nfe) {
-            	//not a pfx alias, carry on to next
+                //not a pfx alias, carry on to next
             }
 
             String pass = passwords.get(pc.getIdentifier());

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncrypt.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncrypt.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncrypt.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncrypt.java Mon Mar  9 15:54:36 2009
@@ -1,6 +1,20 @@
 /**
- *        Copyright (c) 1993-2007 IONA Technologies PLC.
- *                       All Rights Reserved.
+ * 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 interop.server;
 

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncryptRsa15TripleDes.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncryptRsa15TripleDes.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncryptRsa15TripleDes.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/MutualCertificate10SignEncryptRsa15TripleDes.java Mon Mar  9 15:54:36 2009
@@ -1,6 +1,20 @@
 /**
- *        Copyright (c) 1993-2007 IONA Technologies PLC.
- *                       All Rights Reserved.
+ * 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 interop.server;
 

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/PingServiceBase.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/PingServiceBase.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/PingServiceBase.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/PingServiceBase.java Mon Mar  9 15:54:36 2009
@@ -1,6 +1,20 @@
 /**
- *        Copyright (c) 1993-2007 IONA Technologies PLC.
- *                       All Rights Reserved.
+ * 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 interop.server;
 

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/Server.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/Server.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/Server.java Mon Mar  9 15:54:36 2009
@@ -1,8 +1,4 @@
 /**
- * Copyright (c) 1993-2007 IONA Technologies PLC.
- *            All Rights Reserved.
- */
-/**
  * 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
@@ -20,11 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package interop.server;
 
-import javax.xml.ws.Endpoint;
-
 import org.apache.cxf.bus.spring.SpringBusFactory;
 
 public class Server {

Modified: cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/UserNameOverTransport.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/UserNameOverTransport.java?rev=751715&r1=751714&r2=751715&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/UserNameOverTransport.java (original)
+++ cxf/sandbox/interopfest/wssec10/src/main/java/interop/server/UserNameOverTransport.java Mon Mar  9 15:54:36 2009
@@ -1,6 +1,20 @@
 /**
- *        Copyright (c) 1993-2007 IONA Technologies PLC.
- *                       All Rights Reserved.
+ * 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 interop.server;