Author: ruchithf
Date: Sun Jun 24 10:16:36 2007
New Revision: 550261

URL: http://svn.apache.org/viewvc?view=rev&rev=550261
Log:
fixed the build break
 - Got rid of the deprecated sec-conv prototype work
 - Updated the tests to deal with axis2 changes 


Removed:
    
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/conversation/
    
webservices/rampart/trunk/java/modules/rampart-integration/src/main/java/org/apache/axis2/security/sc/
    
webservices/rampart/trunk/java/modules/rampart-integration/src/test/java/org/apache/axis2/security/sc/
Modified:
    
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllReceiver.java
    
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllSender.java
    webservices/rampart/trunk/java/modules/rampart-integration/pom.xml
    
webservices/rampart/trunk/java/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
    
webservices/rampart/trunk/java/modules/rampart-integration/src/main/resources/ping/src/org/apache/axis2/security/InteropScenarioClient.java
    
webservices/rampart/trunk/java/modules/rampart-integration/src/test/java/org/apache/axis2/security/InteropTestBase.java

Modified: 
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllReceiver.java
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllReceiver.java?view=diff&rev=550261&r1=550260&r2=550261
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllReceiver.java
 (original)
+++ 
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllReceiver.java
 Sun Jun 24 10:16:36 2007
@@ -26,13 +26,9 @@
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.description.Parameter;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.rampart.conversation.ConversationCallbackHandler;
-import org.apache.rampart.conversation.ConversationConfiguration;
-import org.apache.rampart.conversation.Util;
 import org.apache.rampart.util.Axis2Util;
 import org.apache.rampart.util.HandlerParameterDecoder;
 import org.apache.ws.security.SOAPConstants;
@@ -48,6 +44,7 @@
 
 import javax.security.auth.callback.CallbackHandler;
 import javax.xml.namespace.QName;
+
 import java.security.cert.X509Certificate;
 import java.util.Iterator;
 import java.util.Vector;
@@ -80,18 +77,7 @@
         RequestData reqData = new RequestData();
         try {
 
-            Parameter param = ConversationConfiguration
-                    .getParameter(msgContext);
-
-            if (param == null
-                    || WSSHandlerConstants.RST_ACTON_SCT.equals(msgContext
-                            .getWSAAction())
-                    || WSSHandlerConstants.RSTR_ACTON_SCT.equals(msgContext
-                            .getWSAAction())) {
-                this.processBasic(msgContext, useDoom, reqData);
-            } else {
-                this.processSecConv(msgContext);
-            }
+            this.processBasic(msgContext, useDoom, reqData);
         } catch (AxisFault axisFault) {
             setAddressingInformationOnFault(msgContext);
             throw axisFault;
@@ -109,68 +95,6 @@
                 log.debug("WSDoAllReceiver: exit invoke()");
             }
         }
-
-    }
-
-    /**
-     * Use WS-SecureConversation to secure messages
-     * @param msgContext
-     * @throws Exception
-     */
-    private void processSecConv(MessageContext msgContext) throws Exception {
-        // Parse the configuration
-        ConversationConfiguration config = ConversationConfiguration
-                .load(msgContext, false);
-
-        // check if there's an RSTR in the msg and process it if exists
-        SOAPEnvelope env = (SOAPEnvelope) config.getDocument()
-                .getDocumentElement();
-        SOAPHeader header = env.getHeader();
-        if (header != null
-                && header
-                        .getFirstChildWithName(new QName(
-                                WSSHandlerConstants.WST_NS,
-                                
WSSHandlerConstants.REQUEST_SECURITY_TOKEN_RESPONSE_LN)) != null) {
-            OMElement elem = header
-                    .getFirstChildWithName(new QName(
-                            WSSHandlerConstants.WST_NS,
-                            
WSSHandlerConstants.REQUEST_SECURITY_TOKEN_RESPONSE_LN));
-            Util.processRSTR(elem, config);
-        }
-
-        secEngine.processSecurityHeader(config.getDocument(), null,
-                new ConversationCallbackHandler(config), config
-                        .getCrypto());
-
-
-        // Convert back to llom since the inflow cannot use llom
-        msgContext.setEnvelope(Axis2Util
-                .getSOAPEnvelopeFromDOMDocument(config.getDocument(), true));
-        
-        SOAPHeader soapHeader = null;
-        try {
-            soapHeader = msgContext.getEnvelope().getHeader();
-        } catch (OMException ex) {
-            throw new AxisFault(
-                    "WSDoAllReceiver: cannot get SOAP header after security 
processing",
-                    ex);
-        }
-
-        Iterator headers = soapHeader.examineAllHeaderBlocks();
-
-        SOAPHeaderBlock headerBlock = null;
-
-        while (headers.hasNext()) { // Find the wsse header
-            SOAPHeaderBlock hb = (SOAPHeaderBlock) headers.next();
-            if (hb.getLocalName().equals(WSConstants.WSSE_LN)
-                    && 
hb.getNamespace().getNamespaceURI().equals(WSConstants.WSSE_NS)) {
-                headerBlock = hb;
-                break;
-            }
-        }
-
-        headerBlock.setProcessed();
-
 
     }
 

Modified: 
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllSender.java
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllSender.java?view=diff&rev=550261&r1=550260&r2=550261
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllSender.java
 (original)
+++ 
webservices/rampart/trunk/java/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllSender.java
 Sun Jun 24 10:16:36 2007
@@ -16,45 +16,24 @@
 
 package org.apache.rampart.handler;
 
-import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.description.Parameter;
-import org.apache.rampart.RampartException;
-import org.apache.rampart.conversation.ConversationConfiguration;
-import org.apache.rampart.conversation.STSRequester;
-import org.apache.rampart.conversation.Util;
-import org.apache.rampart.util.Axis2Util;
-import org.apache.rampart.util.HandlerParameterDecoder;
-import org.apache.rampart.util.MessageOptimizer;
-import org.apache.rahas.Token;
-import org.apache.rahas.TrustException;
-import org.apache.rahas.TrustUtil;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.rampart.util.Axis2Util;
+import org.apache.rampart.util.HandlerParameterDecoder;
+import org.apache.rampart.util.MessageOptimizer;
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.components.crypto.Crypto;
 import org.apache.ws.security.handler.RequestData;
 import org.apache.ws.security.handler.WSHandlerConstants;
-import org.apache.ws.security.message.WSSecDKEncrypt;
-import org.apache.ws.security.message.WSSecEncryptedKey;
-import org.apache.ws.security.message.WSSecHeader;
-import org.apache.ws.security.message.token.SecurityContextToken;
 import org.apache.ws.security.util.WSSecurityUtil;
-import org.apache.ws.security.util.XmlSchemaDateFormat;
 import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
-import java.security.cert.X509Certificate;
-import java.text.DateFormat;
-import java.util.Date;
 import java.util.Vector;
 
 /**
@@ -79,16 +58,8 @@
         
         RequestData reqData = new RequestData();
         try {
-            Parameter param = 
ConversationConfiguration.getParameter(msgContext);
-            
-            if(param == null || 
WSSHandlerConstants.RST_ACTON_SCT.equals(msgContext.getWSAAction()) ||
-                    
WSSHandlerConstants.RSTR_ACTON_SCT.equals(msgContext.getWSAAction()) ||
-                    
WSSHandlerConstants.RSTR_ACTON_ISSUE.equals(msgContext.getWSAAction())) {
-                //If the msgs are msgs to an STS then use basic WS-Sec
-                processBasic(msgContext, useDoom, reqData);
-            } else {
-                processSecConv(msgContext);
-            }
+            //If the msgs are msgs to an STS then use basic WS-Sec
+            processBasic(msgContext, useDoom, reqData);
             
         } catch (Exception e) {
             throw new AxisFault(e.getMessage(), e);
@@ -100,38 +71,6 @@
             }
         }     
     }
-
-    /**
-     * Use WS-SecureConversation to secure the messages
-     * @param msgContext
-     * @throws Exception
-     */
-    private void processSecConv(MessageContext msgContext) throws Exception {
-        //Parse the Conversation configuration
-        ConversationConfiguration config = 
ConversationConfiguration.load(msgContext, true);
-        if(config != null)
-        msgContext.setEnvelope((SOAPEnvelope) config.getDocument()
-                .getDocumentElement());
-        
-        if(!config.getMsgCtx().isServerSide()) {
-            if(config.getContextIdentifier() == null && 
!config.getMsgCtx().isServerSide()) {
-      
-                String sts = config.getStsEPRAddress();
-                if(sts != null) {
-                  //Use a security token service
-                    Axis2Util.useDOOM(false);
-                    STSRequester.issueRequest(config);
-                    Axis2Util.useDOOM(true);
-                } else {
-                    //Create an an SCT, include it in an RSTR 
-                    // and add the RSTR to the header
-                    this.createRSTR(config);
-                }
-                
-            }
-        }
-        this.constructMessage(config);
-    }
     
     /**
      * This will carryout the WS-Security related operations.
@@ -320,125 +259,6 @@
         if (doDebug) {
             log.debug("WSDoAllSender: exit invoke()");
         }
-    }
-    
-
-    /**
-     * Create the self created <code>wsc:SecurityContextToken</code> and 
-     * add it to a <code>wst:RequestSecurityTokenResponse</code>.
-     * 
-     * This is called in the case where the security context establishment 
-     * is done by one of the parties with out the use of an STS
-     * and the creted SCT is sent across to the other party in an unsolicited 
-     * <code>wst:RequestSecurityTokenResponse</code>
-     * 
-     * @param config
-     * @throws Exception
-     */
-    private void createRSTR(ConversationConfiguration config) throws Exception 
{
-        
-        WSSecEncryptedKey encrKeyBuilder = new WSSecEncryptedKey();
-        Crypto crypto = 
org.apache.rampart.conversation.Util.getCryptoInstace(config);
-        String encryptionUser = config.getEncryptionUser();
-        if(encryptionUser == null) {
-            throw new RampartException("missingEncryptionUser");
-        }
-        X509Certificate cert = crypto.getCertificates(encryptionUser)[0];
-        
-        encrKeyBuilder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
-        try {
-            encrKeyBuilder.setUseThisCert(cert);
-            encrKeyBuilder.prepare(config.getDocument(), crypto);
-        } catch (WSSecurityException e) {
-            throw new TrustException(
-                    "errorInBuildingTheEncryptedKeyForPrincipal",
-                    new String[] { cert.getSubjectDN().getName()}, e);
-        }
-        
-        SecurityContextToken sct = new 
SecurityContextToken(config.getDocument());
-        Util.resgisterContext(sct.getIdentifier(), config);
-        
-        //Creation and expiration times
-        Date creationTime = new Date();
-        Date expirationTime = new Date();
-        
-        expirationTime.setTime(creationTime.getTime() + 300000);
-        
-        Token token = new Token(sct.getIdentifier(), 
(OMElement)sct.getElement(), creationTime, expirationTime);
-        token.setSecret(encrKeyBuilder.getEphemeralKey());
-        
-        config.getTokenStore().add(token);
-        
-        SOAPEnvelope env = config.getMsgCtx().getEnvelope();
-
-        SOAPHeader header = env.getHeader();
-        if(header == null) {
-            header = ((SOAPFactory)env.getOMFactory()).createSOAPHeader(env);
-        }
-        
-        OMElement rstrElem = 
TrustUtil.createRequestSecurityTokenResponseElement(config.getWstVersion(), 
header);
-
-        OMElement rstElem = 
TrustUtil.createRequestedSecurityTokenElement(config.getWstVersion(), rstrElem);
-
-        // Use GMT time in milliseconds
-        DateFormat zulu = new XmlSchemaDateFormat();
-        
-        // Add the Lifetime element
-        TrustUtil.createLifetimeElement(config.getWstVersion(), rstrElem, zulu
-                .format(creationTime), zulu.format(expirationTime));
-        
-        rstElem.addChild((OMElement)sct.getElement());
-        
-        TrustUtil.createRequestedAttachedRef(config.getWstVersion(), rstrElem,
-                "#" + sct.getID(), WSSHandlerConstants.TOK_TYPE_SCT);
-
-        TrustUtil
-                .createRequestedUnattachedRef(config.getWstVersion(), rstrElem,
-                        sct.getIdentifier(), WSSHandlerConstants.TOK_TYPE_SCT);
-        
-        Element encryptedKeyElem = encrKeyBuilder.getEncryptedKeyElement();
-        Element bstElem = encrKeyBuilder.getBinarySecurityTokenElement();
-        
-        OMElement reqProofTok = TrustUtil.createRequestedProofTokenElement(
-                config.getWstVersion(), rstrElem);
-
-        if(bstElem != null) {
-            reqProofTok.addChild((OMElement)bstElem);
-        }
-        
-        reqProofTok.addChild((OMElement)encryptedKeyElem);
-        
-    }
-    
-    private void constructMessage(ConversationConfiguration config) throws 
Exception {
-
-        Document doc = config.getDocument();
-
-        WSSecHeader secHeader = new WSSecHeader();
-        secHeader.insertSecurityHeader(doc);
-
-        Token tempToken = config.getTokenStore().getToken(
-                config.getContextIdentifier());
-        byte[] tempSecret = tempToken.getSecret();
-
-        SecurityContextToken sct = new SecurityContextToken((Element) doc
-                .importNode((Element) tempToken.getToken(), true));
-
-        // Derived key encryption
-        WSSecDKEncrypt encrBuilder = new WSSecDKEncrypt();
-        encrBuilder.setSymmetricEncAlgorithm(WSConstants.AES_128);
-        OMElement attachedReference = tempToken.getAttachedReference();
-        if(attachedReference != null) {
-            encrBuilder.setExternalKey(tempSecret, (Element) doc.importNode(
-                    (Element) attachedReference, true));
-        } else {
-            String tokenId = sct.getID();
-            encrBuilder.setExternalKey(tempSecret, tokenId);
-        }
-        encrBuilder.build(doc, secHeader);
-
-        WSSecurityUtil.prependChildElement(doc, secHeader.getSecurityHeader(),
-                sct.getElement(), false);
     }
     
 }

Modified: webservices/rampart/trunk/java/modules/rampart-integration/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-integration/pom.xml?view=diff&rev=550261&r1=550260&r2=550261
==============================================================================
--- webservices/rampart/trunk/java/modules/rampart-integration/pom.xml 
(original)
+++ webservices/rampart/trunk/java/modules/rampart-integration/pom.xml Sun Jun 
24 10:16:36 2007
@@ -263,6 +263,8 @@
                                       
tofile="target/temp-ramp/META-INF/services.xml"/>
                                 <jar 
jarfile="target/test-resources/rampart_service_repo/services/SecureServiceSC1.aar"
                                      basedir="target/temp-ramp"/>
+                                                               
+                                                               <!-- Service 
SC-1 -->
                                 <copy overwrite="yes"
                                       
file="src/test/resources/rampart/issuer.properties"
                                       
tofile="target/temp-ramp/issuer.properties"/>
@@ -271,102 +273,7 @@
                                       
tofile="target/temp-ramp/META-INF/services.xml"/>
                                 <jar 
jarfile="target/test-resources/rampart_service_repo/services/SecureServiceSC2.aar"
                                      basedir="target/temp-ramp"/>
-                                <!-- Service classes for the SecConv tests -->
-                                <mkdir dir="target/temp-sc"/>
-                                <mkdir dir="target/temp-sc/META-INF"/>
-                                <copy overwrite="yes"
-                                      
file="target/classes/org/apache/axis2/security/sc/Service.class"
-                                      
tofile="target/temp-sc/org/apache/axis2/security/sc/Service.class"/>
-                                <copy overwrite="yes"
-                                      
file="target/classes/org/apache/axis2/security/sc/PWCallback.class"
-                                      
tofile="target/temp-sc/org/apache/axis2/security/sc/PWCallback.class"/>
-                                <copy overwrite="yes" todir="target/temp-sc">
-                                    <fileset 
dir="src/test/resources/security/sc">
-                                        <include name="sctIssuer.properties"/>
-                                        <include name="sts.jks"/>
-                                    </fileset>
-                                </copy>
-                                <!--path id="sc.client.props" 
location="test-resources/security/sc"/-->
-                                <!-- Dimuthu addPath 
id="maven.dependency.classpath" refid="sc.client.props" -->
-                                <mkdir 
dir="target/test-resources/sc_client_repo"/>
-                                <mkdir 
dir="target/test-resources/sc_client_repo/conf"/>
-                                <mkdir 
dir="target/test-resources/sc_client_repo/modules"/>
-                                <copy 
file="target/artifacts/addressing-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_client_repo/modules/addressing-SNAPSHOT.mar"/>
-                                <copy 
file="target/artifacts/rampart-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_client_repo/modules/rampart-SNAPSHOT.mar"/>
-                                <!-- SecConv Test - 1  -->
-                                <mkdir 
dir="target/test-resources/sc_service_repo_1"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_1/conf"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_1/services"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_1/modules"/>
-                                <copy 
file="target/artifacts/rampart-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_1/modules/rampart-SNAPSHOT.mar"/>
-                                <copy 
file="target/artifacts/rahas-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_1/modules/rahas-SNAPSHOT.mar"/>
-                                <copy 
file="target/artifacts/addressing-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_1/modules/addressing-SNAPSHOT.mar"/>
-                                <!-- copy the services.xml and create the aar 
-->
-                                <copy overwrite="yes"
-                                      
file="src/test/resources/security/sc/s1-services.xml"
-                                      
tofile="target/temp-sc/META-INF/services.xml"/>
-                                <jar 
jarfile="target/test-resources/sc_service_repo_1/services/SecureService.aar"
-                                     basedir="target/temp-sc"/>
-                                <!-- SecConv Test - 1 :END -->
-                                <!-- SecConv Test - 2  -->
-                                <mkdir 
dir="target/test-resources/sc_service_repo_2"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_2/conf"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_2/services"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_2/modules"/>
-                                <copy 
file="target/artifacts/rampart-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_2/modules/rampart-SNAPSHOT.mar"/>
-                                <copy 
file="target/artifacts/rahas-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_2/modules/rahas-SNAPSHOT.mar"/>
-                                <copy 
file="target/artifacts/addressing-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_2/modules/addressing-SNAPSHOT.mar"/>
-                                <!-- copy the services.xml and create the aar 
-->
-                                <copy overwrite="yes"
-                                      
file="src/test/resources/security/sc/s2-services.xml"
-                                      
tofile="target/temp-sc/META-INF/services.xml"/>
-                                <jar 
jarfile="target/test-resources/sc_service_repo_2/services/SecureService.aar"
-                                     basedir="target/temp-sc"/>
-                                <!-- SecConv Test - 2 :END -->
-                                <!-- SecConv Test - 3  -->
-                                <mkdir 
dir="target/test-resources/sc_service_repo_3"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_3/conf"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_3/services"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_3/modules"/>
-                                <copy 
file="target/artifacts/rampart-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_3/modules/rampart-SNAPSHOT.mar"/>
-                                <copy 
file="target/artifacts/addressing-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_3/modules/addressing-SNAPSHOT.mar"/>
-                                <!-- copy the services.xml and create the aar 
-->
-                                <copy overwrite="yes"
-                                      
file="src/test/resources/security/sc/s3-services.xml"
-                                      
tofile="target/temp-sc/META-INF/services.xml"/>
-                                <jar 
jarfile="target/test-resources/sc_service_repo_3/services/SecureService.aar"
-                                     basedir="target/temp-sc"/>
-                                <!-- SecConv Test - 3 :END -->
-                                <!-- SecConv Test - 4  -->
-                                <mkdir 
dir="target/test-resources/sc_service_repo_4"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_4/conf"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_4/services"/>
-                                <mkdir 
dir="target/test-resources/sc_service_repo_4/modules"/>
-                                <copy 
file="target/artifacts/rampart-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_4/modules/rampart-SNAPSHOT.mar"/>
-                                <copy 
file="target/artifacts/rahas-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_4/modules/rahas-SNAPSHOT.mar"/>
-                                <copy 
file="target/artifacts/addressing-SNAPSHOT.mar"
-                                      
tofile="target/test-resources/sc_service_repo_4/modules/addressing-SNAPSHOT.mar"/>
-                                <!-- copy the services.xml and create the aar 
-->
-                                <copy overwrite="yes"
-                                      
file="src/test/resources/security/sc/s4-services.xml"
-                                      
tofile="target/temp-sc/META-INF/services.xml"/>
-                                <jar 
jarfile="target/test-resources/sc_service_repo_4/services/SecureService.aar"
-                                     basedir="target/temp-sc"/>
-                                <!-- SecConv Test - 4 :END -->
-                                <!-- clean up temp sc stuff -->
-                                <delete dir="target/temp-sc"/>
+
                                 <!--
                                  Set up the infra for rahas tests and the 
rahas client repo
                                 -->

Modified: 
webservices/rampart/trunk/java/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java?view=diff&rev=550261&r1=550260&r2=550261
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
 (original)
+++ 
webservices/rampart/trunk/java/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
 Sun Jun 24 10:16:36 2007
@@ -95,11 +95,11 @@
 
             OutflowConfiguration clientOutflowConfiguration = 
getClientOutflowConfiguration();
             if (clientOutflowConfiguration != null) {
-                options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, 
clientOutflowConfiguration.getProperty());
+                
configContext.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, 
clientOutflowConfiguration.getProperty());
             }
             InflowConfiguration clientInflowConfiguration = 
getClientInflowConfiguration();
             if (clientInflowConfiguration != null) {
-                options.setProperty(WSSHandlerConstants.INFLOW_SECURITY, 
clientInflowConfiguration.getProperty());
+                configContext.setProperty(WSSHandlerConstants.INFLOW_SECURITY, 
clientInflowConfiguration.getProperty());
             }
 
             serviceClient.engageModule(new QName("addressing"));

Modified: 
webservices/rampart/trunk/java/modules/rampart-integration/src/main/resources/ping/src/org/apache/axis2/security/InteropScenarioClient.java
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-integration/src/main/resources/ping/src/org/apache/axis2/security/InteropScenarioClient.java?view=diff&rev=550261&r1=550260&r2=550261
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-integration/src/main/resources/ping/src/org/apache/axis2/security/InteropScenarioClient.java
 (original)
+++ 
webservices/rampart/trunk/java/modules/rampart-integration/src/main/resources/ping/src/org/apache/axis2/security/InteropScenarioClient.java
 Sun Jun 24 10:16:36 2007
@@ -106,12 +106,12 @@
                 new javax.xml.namespace.QName("rampart"));
 
         if (outflowConfig != null) {
-            stub._getServiceClient().getOptions().setProperty(
+            stub._getServiceClient().getServiceContext().setProperty(
                     WSSHandlerConstants.OUTFLOW_SECURITY,
                     outflowConfig.getProperty());
         }
         if (inflowConfig != null) {
-            stub._getServiceClient().getOptions().setProperty(
+            stub._getServiceClient().getServiceContext().setProperty(
                     WSSHandlerConstants.INFLOW_SECURITY,
                     inflowConfig.getProperty());
         }
@@ -150,12 +150,12 @@
                 new javax.xml.namespace.QName("rampart"));
 
         if (outflowConfig != null) {
-            stub._getServiceClient().getOptions().setProperty(
+            stub._getServiceClient().getServiceContext().setProperty(
                     WSSHandlerConstants.OUTFLOW_SECURITY,
                     outflowConfig.getProperty());
         }
         if (inflowConfig != null) {
-            stub._getServiceClient().getOptions().setProperty(
+            stub._getServiceClient().getServiceContext().setProperty(
                     WSSHandlerConstants.INFLOW_SECURITY,
                     inflowConfig.getProperty());
         }
@@ -165,7 +165,7 @@
             while (keysEnum.hasMoreElements()) {
                 String refKey = (String) keysEnum.nextElement();
                 
-                stub._getServiceClient().getOptions().setProperty(refKey,
+                
stub._getServiceClient().getServiceContext().setProperty(refKey,
                        propRefs.get(refKey));
             }
         }

Modified: 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/java/org/apache/axis2/security/InteropTestBase.java
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-integration/src/test/java/org/apache/axis2/security/InteropTestBase.java?view=diff&rev=550261&r1=550260&r2=550261
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/java/org/apache/axis2/security/InteropTestBase.java
 (original)
+++ 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/java/org/apache/axis2/security/InteropTestBase.java
 Sun Jun 24 10:16:36 2007
@@ -142,29 +142,29 @@
     /**
      * Do test
      */
-//    public void testInteropWithConfigFiles() {
-//        try {
-//
-//            Class interopScenarioClientClass = Class
-//                    
.forName("org.apache.axis2.security.InteropScenarioClient");
-//
-//            Constructor c = interopScenarioClientClass
-//                    .getConstructor(new Class[]{boolean.class});
-//            Object clientObj = c.newInstance(new Object[]{this
-//                    .isUseSOAP12InStaticConfigTest() ? Boolean.TRUE
-//                    : Boolean.FALSE});
-//            Method m = interopScenarioClientClass.getMethod(
-//                    "invokeWithStaticConfig", new Class[]{String.class,
-//                    String.class});
-//            m.invoke(clientObj, new Object[]{
-//                    Constants.TESTING_PATH + getClientRepo(), targetEpr});
-//
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//            fail("Error in introperating with " + targetEpr
-//                    + ", client configuration: " + getClientRepo());
-//        }
-//    }
+    public void testInteropWithConfigFiles() {
+        try {
+
+            Class interopScenarioClientClass = Class
+                    
.forName("org.apache.axis2.security.InteropScenarioClient");
+
+            Constructor c = interopScenarioClientClass
+                    .getConstructor(new Class[]{boolean.class});
+            Object clientObj = c.newInstance(new Object[]{this
+                    .isUseSOAP12InStaticConfigTest() ? Boolean.TRUE
+                    : Boolean.FALSE});
+            Method m = interopScenarioClientClass.getMethod(
+                    "invokeWithStaticConfig", new Class[]{String.class,
+                    String.class});
+            m.invoke(clientObj, new Object[]{
+                    Constants.TESTING_PATH + getClientRepo(), targetEpr});
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            fail("Error in introperating with " + targetEpr
+                    + ", client configuration: " + getClientRepo());
+        }
+    }
 
     public void testInteropWithDynamicConfig() {
         try {
@@ -191,35 +191,35 @@
         }
 
     }
-//
-//    public void testInteropWithDynamicConfigWithProfRefs() {
-//        if(getPropertyRefs() != null) {
-//            try {
-//    
-//                Class interopScenarioClientClass = Class
-//                        
.forName("org.apache.axis2.security.InteropScenarioClient");
-//                Constructor c = interopScenarioClientClass
-//                        .getConstructor(new Class[]{boolean.class});
-//                Object clientObj = c.newInstance(new Object[]{this
-//                        .isUseSOAP12InStaticConfigTest() ? Boolean.TRUE
-//                        : Boolean.FALSE});
-//                Method m = interopScenarioClientClass.getMethod(
-//                        "invokeWithGivenConfigWithProRefs", new Class[]{
-//                        String.class,
-//                        String.class, OutflowConfiguration.class,
-//                        InflowConfiguration.class, Hashtable.class});
-//                m.invoke(clientObj, new Object[]{
-//                        Constants.TESTING_PATH + DEFAULT_CLIENT_REPOSITORY,
-//                        targetEpr, getOutflowConfigurationWithRefs(),
-//                        getInflowConfigurationWithRefs(),
-//                        getPropertyRefs()});
-//            } catch (Exception e) {
-//                e.printStackTrace();
-//                fail("Error in introperating with " + targetEpr
-//                        + ", client configuration: " + getClientRepo());
-//            }
-//        }
-//    }
+
+    public void testInteropWithDynamicConfigWithProfRefs() {
+        if(getPropertyRefs() != null) {
+            try {
+    
+                Class interopScenarioClientClass = Class
+                        
.forName("org.apache.axis2.security.InteropScenarioClient");
+                Constructor c = interopScenarioClientClass
+                        .getConstructor(new Class[]{boolean.class});
+                Object clientObj = c.newInstance(new Object[]{this
+                        .isUseSOAP12InStaticConfigTest() ? Boolean.TRUE
+                        : Boolean.FALSE});
+                Method m = interopScenarioClientClass.getMethod(
+                        "invokeWithGivenConfigWithProRefs", new Class[]{
+                        String.class,
+                        String.class, OutflowConfiguration.class,
+                        InflowConfiguration.class, Hashtable.class});
+                m.invoke(clientObj, new Object[]{
+                        Constants.TESTING_PATH + DEFAULT_CLIENT_REPOSITORY,
+                        targetEpr, getOutflowConfigurationWithRefs(),
+                        getInflowConfigurationWithRefs(),
+                        getPropertyRefs()});
+            } catch (Exception e) {
+                e.printStackTrace();
+                fail("Error in introperating with " + targetEpr
+                        + ", client configuration: " + getClientRepo());
+            }
+        }
+    }
     
     protected abstract OutflowConfiguration getOutflowConfiguration();
 


Reply via email to