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/02/18 18:21:31 UTC
svn commit: r745579 - in
/cxf/sandbox/interopfest/wssec11/src/main/java/interop: client/Client.java
server/KeystorePasswordCallback.java server/Server.java
Author: dkulp
Date: Wed Feb 18 17:21:30 2009
New Revision: 745579
URL: http://svn.apache.org/viewvc?rev=745579&view=rev
Log:
Get server part working for wssec11
Modified:
cxf/sandbox/interopfest/wssec11/src/main/java/interop/client/Client.java
cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/KeystorePasswordCallback.java
cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/Server.java
Modified: cxf/sandbox/interopfest/wssec11/src/main/java/interop/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec11/src/main/java/interop/client/Client.java?rev=745579&r1=745578&r2=745579&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec11/src/main/java/interop/client/Client.java (original)
+++ cxf/sandbox/interopfest/wssec11/src/main/java/interop/client/Client.java Wed Feb 18 17:21:30 2009
@@ -23,6 +23,7 @@
package interop.client;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -76,13 +77,20 @@
//"KD-ES" //NOT YET WORKING [1]
};
}
- //argv = new String[] {argv[10]};
+ //argv = new String[] {argv[0]};
+ URL wsdlLocation = null;
new SpringBusFactory().createBus("etc/client.xml");
List<String> results = new ArrayList<String>();
for (String portPrefix : argv) {
try {
- final PingService11 svc = new PingService11();
+ final PingService11 svc;
+ //wsdlLocation = new URL("http://localhost:9001/" + portPrefix + "PingService?wsdl");
+ if (wsdlLocation == null) {
+ svc = new PingService11();
+ } else {
+ svc = new PingService11(wsdlLocation);
+ }
final IPingService port =
svc.getPort(
new QName(
Modified: cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/KeystorePasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/KeystorePasswordCallback.java?rev=745579&r1=745578&r2=745579&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/KeystorePasswordCallback.java (original)
+++ cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/KeystorePasswordCallback.java Wed Feb 18 17:21:30 2009
@@ -41,6 +41,8 @@
if (pass != null) {
pc.setPassword(pass);
return;
+ } else {
+ pc.setPassword("password");
}
}
}
Modified: cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/Server.java?rev=745579&r1=745578&r2=745579&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/Server.java (original)
+++ cxf/sandbox/interopfest/wssec11/src/main/java/interop/server/Server.java Wed Feb 18 17:21:30 2009
@@ -31,58 +31,40 @@
public class Server {
- protected Server() throws Exception {
- new SpringBusFactory().createBus("etc/server.xml");
-
- // Scenario 4.1
- /*
- addProperties(Endpoint.publish("http://localhost:9001/APingService",
- new APingService()));
- addProperties(Endpoint.publish("http://localhost:9001/A-NoTimestampPingService",
- new ANoTimestampPingService()));
- addProperties(Endpoint.publish("http://localhost:9001/ADPingService",
- new ADPingService()));
- */
-
- // Scenario 4.2
- addProperties(Endpoint.publish("http://home.mesa2.com:9001/UXPingService",
- new UXPingService()));
+ protected Server(String baseUrl) throws Exception {
- //argv = new String[] {"A-ES"}; //NOT WORKING YET
- //argv = new String[] {"AD-ES"}; //NOT WORKING YET
- //argv = new String[] {"UX"}; //NOT WORKING YET
- /*
- argv = new String[] {"UX-NoTimestamp"}; //NOT WORKING YET
- argv = new String[] {"UXD"};
- argv = new String[] {"UXD_IPingService1"};
- argv = new String[] {"UX-SEES"};
- argv = new String[] {"UXD-SEES"};
- argv = new String[] {"X"};
- argv = new String[] {"X_IPingService1"};
- argv = new String[] {"X-NoTimestamp"};
- argv = new String[] {"X-AES128"};
- argv = new String[] {"X-AES192"};
- argv = new String[] {"X-TripleDES"};
- argv = new String[] {"XD"};
- argv = new String[] {"XD_IPingService1"};
- argv = new String[] {"XD-ES"};
- argv = new String[] {"XD-SEES"};
- */
-
- addProperties(Endpoint.publish("http://home.mesa2.com:9001/KPingService",
- new KPingService()));
+ new SpringBusFactory().createBus("etc/server.xml");
+ doPublish(baseUrl + "/APingService", new APingService());
+ doPublish(baseUrl + "/A-NoTimestampPingService", new ANoTimestampPingService());
+ doPublish(baseUrl + "/ADPingService", new ADPingService());
+ doPublish(baseUrl + "/A-ESPingService", new AESPingService());
+ doPublish(baseUrl + "/AD-ESPingService", new ADESPingService());
+ doPublish(baseUrl + "/UXPingService", new UXPingService());
+ doPublish(baseUrl + "/UX-NoTimestampPingService", new UXNoTimestampPingService());
+ doPublish(baseUrl + "/UXDPingService", new UXDPingService());
+ doPublish(baseUrl + "/UX-SEESPingService", new UXSEESPingService());
+ doPublish(baseUrl + "/UXD-SEESPingService", new UXDSEESPingService());
+ doPublish(baseUrl + "/XPingService", new XPingService());
+ doPublish(baseUrl + "/X-NoTimestampPingService", new XNoTimestampPingService());
+ doPublish(baseUrl + "/X-AES128PingService", new XAES128PingService());
+ doPublish(baseUrl + "/X-AES192PingService", new XAES192PingService());
+ doPublish(baseUrl + "/X-TripleDESPingService", new XTripleDESPingService());
+ doPublish(baseUrl + "/XDPingService", new XDPingService());
+ doPublish(baseUrl + "/XD-ESPingService", new XDESPingService());
+ doPublish(baseUrl + "/XD-SEESPingService", new XDSEESPingService());
}
- private final void addProperties(Endpoint ep) {
+ private final void doPublish(String url, Object obj) {
+ Endpoint ep = Endpoint.create(obj);
ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
- ep.getProperties().put(SecurityConstants.ENCRYPT_USERNAME, "Bob");
ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES, "etc/bob.properties");
+ ep.publish(url);
}
public static void main(String args[]) throws Exception {
- new Server();
+ new Server("http://home.dankulp.com:9001");
System.out.println("Server ready...");
- Thread.sleep(60 * 60 * 1000);
+ Thread.sleep(60 * 60 * 10000);
System.out.println("Server exiting");
System.exit(0);
}
@@ -91,25 +73,42 @@
serviceName = "PingService11",
portName = "A_IPingService",
endpointInterface = "interopbaseaddress.interop.IPingService",
- wsdlLocation = "wsdl/WsSecurity11.wsdl")
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
public static class APingService extends PingService {
}
+
@javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
serviceName = "PingService11",
portName = "A-NoTimestamp_IPingService",
endpointInterface = "interopbaseaddress.interop.IPingService",
- wsdlLocation = "wsdl/WsSecurity11.wsdl")
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
public static class ANoTimestampPingService extends PingService {
}
+
@javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
serviceName = "PingService11",
portName = "AD_IPingService",
endpointInterface = "interopbaseaddress.interop.IPingService",
- wsdlLocation = "wsdl/WsSecurity11.wsdl")
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
public static class ADPingService extends PingService {
}
@javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
serviceName = "PingService11",
+ portName = "A-ES_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class AESPingService extends PingService {
+ }
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "AD-ES_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class ADESPingService extends PingService {
+ }
+
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
portName = "UX_IPingService",
endpointInterface = "interopbaseaddress.interop.IPingService",
wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
@@ -117,9 +116,94 @@
}
@javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
serviceName = "PingService11",
- portName = "K_IPingService",
+ portName = "UX-NoTimestamp_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class UXNoTimestampPingService extends PingService {
+ }
+
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "UXD_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class UXDPingService extends PingService {
+ }
+
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "UX-SEES_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class UXSEESPingService extends PingService {
+ }
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "UXD-SEES_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class UXDSEESPingService extends PingService {
+ }
+
+
+
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "X_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class XPingService extends PingService {
+ }
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "X-NoTimestamp_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class XNoTimestampPingService extends PingService {
+ }
+
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "XD_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class XDPingService extends PingService {
+ }
+
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "XD-ES_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class XDESPingService extends PingService {
+ }
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "XD-SEES_IPingService",
endpointInterface = "interopbaseaddress.interop.IPingService",
wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
- public static class KPingService extends PingService {
+ public static class XDSEESPingService extends PingService {
}
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "X-AES128_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class XAES128PingService extends PingService {
+ }
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "X-AES192_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class XAES192PingService extends PingService {
+ }
+ @javax.jws.WebService(targetNamespace = "http://InteropBaseAddress/interop",
+ serviceName = "PingService11",
+ portName = "X-TripleDES_IPingService",
+ endpointInterface = "interopbaseaddress.interop.IPingService",
+ wsdlLocation = "target/wsdl2/WsSecurity11.wsdl")
+ public static class XTripleDESPingService extends PingService {
+ }
+
}