You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2012/03/21 00:13:35 UTC
svn commit: r1303200 - in /axis/axis2/java/rampart/branches/1_5_x: ./
modules/documentation/src/site/xdoc/download/1.5.1/download.xml
modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
Author: veithen
Date: Tue Mar 20 23:13:35 2012
New Revision: 1303200
URL: http://svn.apache.org/viewvc?rev=1303200&view=rev
Log:
Merged r1303198 to the 1.5 branch for debugging purposes.
Modified:
axis/axis2/java/rampart/branches/1_5_x/ (props changed)
axis/axis2/java/rampart/branches/1_5_x/modules/documentation/src/site/xdoc/download/1.5.1/download.xml (props changed)
axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
Propchange: axis/axis2/java/rampart/branches/1_5_x/
------------------------------------------------------------------------------
Merged /axis/axis2/java/rampart/trunk:r1303198
Propchange: axis/axis2/java/rampart/branches/1_5_x/modules/documentation/src/site/xdoc/download/1.5.1/download.xml
------------------------------------------------------------------------------
Merged /axis/axis2/java/rampart/trunk/modules/documentation/src/site/xdoc/download/1.5.1/download.xml:r1303198
Modified: axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java?rev=1303200&r1=1303199&r2=1303200&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java (original)
+++ axis/axis2/java/rampart/branches/1_5_x/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java Tue Mar 20 23:13:35 2012
@@ -54,68 +54,62 @@ public abstract class TestClient extends
/**
*/
- public void testRequest() {
- try {
+ public void testRequest() throws Exception {
+ // Get the repository location from the args
+ String repo = Constants.TESTING_PATH + "rahas_client_repo";
+
+ ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo,
+ null);
+ ServiceClient serviceClient = new ServiceClient(configContext, null);
+ Options options = new Options();
+
+ System.setProperty("javax.net.ssl.keyStorePassword", "password");
+ System.setProperty("javax.net.ssl.keyStoreType", "JKS");
+ System.setProperty("javax.net.ssl.trustStore", "/home/ruchith/Desktop/interop/certs/interop2.jks");
+ System.setProperty("javax.net.ssl.trustStorePassword", "password");
+ System.setProperty("javax.net.ssl.trustStoreType","JKS");
+
+ options.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
+// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/UTSAMLHoK"));
+// options.setTo(new EndpointReference("https://www-lk.wso2.com:8443/axis2/services/UTSAMLHoK"));
+// options.setTo(new EndpointReference("https://192.18.49.133:2343/jaxws-s1-sts/sts"));
+// options.setTo(new EndpointReference("https://207.200.37.116/SxSts/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport"));
+// options.setTo(new EndpointReference("http://localhost:9090/SxSts/Scenario_4_IssuedToken_MutualCertificate10"));
+
+// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/MutualCertsSAMLHoK"));
+// options.setTo(new EndpointReference("http://www-lk.wso2.com:8888/axis2/services/MutualCertsSAMLHoK"));
+// options.setTo(new EndpointReference("https://131.107.72.15/trust/Addressing2004/UserName"));
+// options.setTo(new EndpointReference("https://131.107.72.15/trust/UserName"));
+// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/trust/X509WSS10"));
+// options.setTo(new EndpointReference("https://131.107.72.15/trust/UserName"));
+// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/jaxws-s4-sts/sts"));
+// options.setTo(new EndpointReference("http://127.0.0.1:9090/jaxws-s4/simple"));
+// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/UTSAMLBearer"));
+
+ options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+ options.setAction(this.getRequestAction());
+// options.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, this.getWSANamespace());
+
+ options.setTimeOutInMilliSeconds(200 * 1000);
+ OutflowConfiguration clientOutflowConfiguration = getClientOutflowConfiguration();
+ if (clientOutflowConfiguration != null) {
+ configContext.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, clientOutflowConfiguration.getProperty());
+ }
+ InflowConfiguration clientInflowConfiguration = getClientInflowConfiguration();
+ if (clientInflowConfiguration != null) {
+ configContext.setProperty(WSSHandlerConstants.INFLOW_SECURITY, clientInflowConfiguration.getProperty());
+ }
- // Get the repository location from the args
- String repo = Constants.TESTING_PATH + "rahas_client_repo";
+ serviceClient.engageModule(new QName("addressing"));
+ serviceClient.engageModule(new QName("rampart"));
- ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo,
- null);
- ServiceClient serviceClient = new ServiceClient(configContext, null);
- Options options = new Options();
-
- System.setProperty("javax.net.ssl.keyStorePassword", "password");
- System.setProperty("javax.net.ssl.keyStoreType", "JKS");
- System.setProperty("javax.net.ssl.trustStore", "/home/ruchith/Desktop/interop/certs/interop2.jks");
- System.setProperty("javax.net.ssl.trustStorePassword", "password");
- System.setProperty("javax.net.ssl.trustStoreType","JKS");
-
- options.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
-// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/UTSAMLHoK"));
-// options.setTo(new EndpointReference("https://www-lk.wso2.com:8443/axis2/services/UTSAMLHoK"));
-// options.setTo(new EndpointReference("https://192.18.49.133:2343/jaxws-s1-sts/sts"));
-// options.setTo(new EndpointReference("https://207.200.37.116/SxSts/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport"));
-// options.setTo(new EndpointReference("http://localhost:9090/SxSts/Scenario_4_IssuedToken_MutualCertificate10"));
-
-// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/MutualCertsSAMLHoK"));
-// options.setTo(new EndpointReference("http://www-lk.wso2.com:8888/axis2/services/MutualCertsSAMLHoK"));
-// options.setTo(new EndpointReference("https://131.107.72.15/trust/Addressing2004/UserName"));
-// options.setTo(new EndpointReference("https://131.107.72.15/trust/UserName"));
-// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/trust/X509WSS10"));
-// options.setTo(new EndpointReference("https://131.107.72.15/trust/UserName"));
-// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/jaxws-s4-sts/sts"));
-// options.setTo(new EndpointReference("http://127.0.0.1:9090/jaxws-s4/simple"));
-// options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/UTSAMLBearer"));
-
- options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
- options.setAction(this.getRequestAction());
-// options.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, this.getWSANamespace());
-
- options.setTimeOutInMilliSeconds(200 * 1000);
- OutflowConfiguration clientOutflowConfiguration = getClientOutflowConfiguration();
- if (clientOutflowConfiguration != null) {
- configContext.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, clientOutflowConfiguration.getProperty());
- }
- InflowConfiguration clientInflowConfiguration = getClientInflowConfiguration();
- if (clientInflowConfiguration != null) {
- configContext.setProperty(WSSHandlerConstants.INFLOW_SECURITY, clientInflowConfiguration.getProperty());
- }
-
- serviceClient.engageModule(new QName("addressing"));
- serviceClient.engageModule(new QName("rampart"));
-
- serviceClient.setOptions(options);
-
- //Blocking invocation
-
- OMElement result = serviceClient.sendReceive(getRequest());
-
- this.validateRsponse(result);
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
+ serviceClient.setOptions(options);
+
+ //Blocking invocation
+
+ OMElement result = serviceClient.sendReceive(getRequest());
+
+ this.validateRsponse(result);
}
protected String getWSANamespace() {