hi,

My Client-config.wsdd looks like:
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

        <globalConfiguration>
                <parameter name="adminPassword" value="admin"/>
                <parameter name="attachments.Directory" value="C:tmp"/>
                <parameter name="attachments.implementation"
value="org.apache.axis.attachments.AttachmentsImpl"/>
                <parameter name="sendMultiRefs" value="false"/>
                <parameter name="sendXsiTypes" value="false"/>
                <parameter name="sendXMLDeclaration" value="true"/>
                <parameter name="axis.sendMinimizedElements" value="true"/>
                
                <!-- Referenz auf die Handlerchains bei allen Services -->
                <requestFlow>
                        <chain type="VRSStandardRequestChain"/>
                </requestFlow>
                <responseFlow>
                        <chain type="VRSStandardResponseChain"/>
                </responseFlow>         

        </globalConfiguration>

        <!-- Handler bei Servicenehmern und Servicegebern -->
        <handler name="VRSValidation"
type="java:de.genoip.vrs.axis.handler.validation.VRSValidationHandler"/>
        <handler name="VRSNamespace"
type="java:de.genoip.vrs.axis.handler.VRSNamespaceHandler"/>
        <handler name="VRSAddTRMVersion"
type="java:de.genoip.vrs.axis.handler.protocol.VRSAddProtocolHandler"/>
        <handler name="VRSCheckTRMVersion"
type="java:de.genoip.vrs.axis.handler.protocol.VRSExtractProtocolHandler"/>
        <handler name="VRSCompression"
type="java:de.genoip.vrs.axis.handler.compression.VRSCompressionHandler"/>
        <handler name="VRSDeCompression"
type="java:de.genoip.vrs.axis.handler.compression.VRSDeCompressionHandler"/>
        <handler name="VRSAddSession"
type="java:de.genoip.vrs.axis.trm22.handler.session.VRSAddSessionHandler"/>
        <handler name="VRSExtractSession"
type="java:de.genoip.vrs.axis.trm22.handler.session.VRSExtractSessionHandler"/>
        <handler name="VRSExtractIdentity22"
type="java:de.genoip.vrs.axis.trm22.handler.identity.VRSExtractIdentityHandler"/>
        <handler name="VRSExtractIdentity24"
type="java:de.genoip.vrs.axis.trm24.handler.identity.VRSExtractIdentityHandler"/>
       
        <handler name="VRSExtractIdentity26"
type="java:de.genoip.vrs.axis.trm26.handler.identity.VRSExtractIdentityHandler"/>
       
        <handler name="VRSExtractAuthorisation"
type="java:de.genoip.vrs.axis.handler.security.VRSExtractSecurityHandler"/>
        <handler name="VRSAddTicket"
type="java:de.genoip.vrs.axis.handler.ticket.VRSAddTicketHandler"/>
        <handler name="VRSExtractTicket"
type="java:de.genoip.vrs.axis.handler.ticket.VRSExtractTicketHandler"/>
        <handler name="VRSAddSecurity24"
type="java:de.genoip.vrs.axis.trm24.handler.security.VRSAddSecurityHandler"/>
        <handler name="VRSValidateSecurity24"
type="java:de.genoip.vrs.axis.trm24.handler.security.VRSValidateSecurityHandler"/>
        <handler name="VRSAddTarget26"
type="java:de.genoip.vrs.axis.trm26.handler.target.VRSAddTargetHandler"/>
        <handler name="VRSExtractTarget26"
type="java:de.genoip.vrs.axis.trm26.handler.target.VRSExtractTargetHandler"/>
        

        
        <!-- Handler nur bei Servicenehmern -->
        <handler name="VRSAddService"
type="java:de.genoip.vrs.axis.handler.service.VRSAddServiceHandler"/>
        <handler name="VRSAddIdentity22"
type="java:de.genoip.vrs.axis.trm22.handler.identity.VRSAddIdentityHandler"/>
        <handler name="VRSAddIdentity26"
type="java:de.genoip.vrs.axis.trm26.handler.identity.VRSAddIdentityHandler"/>   
        <handler name="VRSAddSecurity20"
type="java:de.genoip.vrs.axis.handler.security.VRSAddSecurityHandler"/>
        <handler name="VRSException20"
type="java:de.genoip.vrs.axis.handler.faults.VRSFaultHandler"/>
        <handler name="VRSException22"
type="java:de.genoip.vrs.axis.trm22.handler.faults.VRSFaultHandler"/>   
        <handler name="VRSAddMandator"
type="java:de.genoip.vrs.axis.trm22.handler.mandator.VRSAddMandatorHandler"/>

        <!-- Definitionen der Handlerchains bei Servicenehmern -->
        <chain name="VRSStandardRequestChain">
                <handler type="VRSNamespace"/>

                <handler type="VRSValidation"/>
                <handler type="VRSCompression"/>
                <handler type="VRSAddTRMVersion"/>
                <handler type="VRSAddService"/>
                <handler type="VRSAddIdentity22"/>
                <handler type="VRSAddIdentity26"/>
                <handler type="VRSAddSecurity20"/>
                <handler type="VRSAddSession"/>
                <handler type="VRSAddMandator"/>
                <handler type="VRSAddTarget26"/>
                <handler type="VRSAddTicket"/>
                <handler type="VRSAddSecurity24"/>
        </chain>
        <chain name="VRSStandardResponseChain">
                <handler type="VRSExtractTicket"/>
                <handler type="VRSException20"/>
                <handler type="VRSException22"/>
                <handler type="VRSValidateSecurity24"/>
                <handler type="VRSDeCompression"/>
                <handler type="VRSValidation"/>
                <handler type="VRSExtractIdentity22"/>
                <handler type="VRSExtractIdentity24"/>
                <handler type="VRSExtractIdentity26"/>
                <handler type="VRSExtractAuthorisation"/>
                <handler type="VRSExtractSession"/>
                <handler type="VRSExtractTarget26"/>
                <handler type="VRSCheckTRMVersion"/>

        </chain>


        <!-- Transportdefinitionen -->
        <transport name="http"
pivot="java:org.apache.axis.transport.http.HTTPSender"/>
        <transport name="vrssim"
pivot="java:de.genoip.vrs.axis.transport.sim.VRSSIMSender"/>
        <!-- transport name="vrssoc"
pivot="java:de.genoip.vrs.axis.transport.soc.VRSSOCSender"/ -->
        <!-- transport name="vrsmq"
pivot="java:de.genoip.vrs.axis.transport.mq52.VRSMQSender"/ -->

</deployment>


----------------------------------
I had to create my own engine config which extends SimpleProvider for SSL
functionality.
So that when i create a new Service, i pass my own engine config object to
it;i.e new Service(MyEngineConfiguration).
My question is:
1. Is there a way of telling my custom engine config to read the
client-config.wsdd?
BETTER
2. how do i assign my handlers{or chain of handler} in the client config
mentioned above to my own engine config

------------------
this is how my engine config looks like

/**
 * 
 */


//import java.util.HashMap;
import java.util.Hashtable;

import org.apache.axis.AxisEngine;
import org.apache.axis.AxisProperties;
import org.apache.axis.ConfigurationException;
import org.apache.axis.EngineConfiguration;
import org.apache.axis.Handler;
import org.apache.axis.SimpleTargetedChain;
import org.apache.axis.WSDDEngineConfiguration;
import org.apache.axis.configuration.SimpleProvider;
import org.apache.axis.deployment.wsdd.WSDDDeployment;
import org.apache.axis.encoding.TypeMappingRegistry;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.transport.http.HTTPSender;
import org.apache.axis.transport.http.HTTPTransport;
import org.apache.ws.axis.security.WSDoAllSender;

/**
 * <p>
 * Axis Client Configuration
 * </p>
 * @author Richard Unger
 */
public class MyAxisEngineConfig extends SimpleProvider{

        /**
         * Keystore filename
         */
        private String keystore = null;
        /**
         * Keystore type
         */
        private String keystoretype = null;
        /**
         * Keystore password
         */
        private String keystorepin = null;
        /**
         * Key password
         */
        private String keypin = null;
        
        /*
         * serviceOptions
         * */
        Hashtable serviceOptions = null;
        String serviceName = null;
        
        public String getKeyPassPhrase() {
                return keypin;
        }

        public void setKeyPassPhrase(String keypin) {
                this.keypin = keypin;
        }

        /**
         * Truststore filename
         */
        private String truststore = null;
        /**
         * Truststore PIN
         */
        private String truststorepin = null;
        /**
         * Truststore Type
         */
        private String truststoreType = null;
        /**
         * true to disable XML formatting
         */
        private boolean disablePrettyXML = true;
        /**
         * true to enable namespace prefix optimization (see Axis docs)
         */
        private boolean enableNamespacePrefixOptimization = false;

        /**
         * Constructor
         */
        public MyAxisEngineConfig() {
                super();
        }

        /**
         * @param arg0
         */
        public MyAxisEngineConfig(EngineConfiguration arg0) {
                super(arg0);
        }

        /**
         * @param arg0
         */
        public MyAxisEngineConfig(TypeMappingRegistry arg0) {
                super(arg0);
        }

        
        
        
        /**
         * @see
org.apache.axis.configuration.SimpleProvider#configureEngine(org.apache.axis.AxisEngine)
         */
        @Override
        public void configureEngine(AxisEngine engine) throws
ConfigurationException {
                super.configureEngine(engine);
                engine.refreshGlobalOptions();
        }

        /**
         * @param keystore the keystore to set
         */
        public void setKeystore(String keystore) {
                this.keystore = keystore;
        }

        /**
         * @param keystorepin the keystorepin to set
         */
        public void setKeystorePassword(String keystorepin) {
                this.keystorepin = keystorepin;
        }

        /**
         * @param keystoretype the keystoretype to set
         */
        public void setKeystoreType(String keystoretype) {
                this.keystoretype = keystoretype;
        }

        /**
         * @param truststore the truststore to set
         */
        public void setTruststore(String truststore) {
                this.truststore = truststore;
        }

        /**
         * @param truststorepin the truststorepin to set
         */
        public void setTruststorePassword(String truststorepin) {
                this.truststorepin = truststorepin;
        }

        /**
         * @return the truststoreType
         */
        public String getTruststoreType() {
                return truststoreType;
        }

        /**
         * @param truststoreType the truststoreType to set
         */
        public void setTruststoreType(String truststoreType) {
                this.truststoreType = truststoreType;
        }
        
        public void setServiceOptions(String name, Hashtable options){
                serviceName = name;
                serviceOptions = options;
        }

        /**
         * <p>
         * Initialize, with logging off
         * </p>
         */
        public void initialize() {
                initialize(false);
        }       
        
        /**
         * <p>
         * Initialize
         * </p>
         * @param logging true if logging is desired
         */
        @SuppressWarnings("unchecked")
        public void initialize(boolean logging) {
                AxisProperties.setProperty("axis.socketSecureFactory",
"com.apps.axis.MySecureSocketFactory");
        
AxisProperties.setProperty("axis.socketFactory","org.apache.axis.components.net.DefaultSocketFactory");

                Hashtable opts = new Hashtable();
        opts.put(AxisEngine.PROP_DISABLE_PRETTY_XML, disablePrettyXML);
        opts.put(AxisEngine.PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION,
enableNamespacePrefixOptimization);
        setGlobalOptions(opts);
        
        Handler pivot = new HTTPSender();
        if (truststore!=null){
                pivot.setOption("truststore",truststore);
                if (truststoreType!=null)
                        pivot.setOption("truststoreType",truststoreType);
                if (truststorepin!=null)
                        pivot.setOption("truststorePass",truststorepin);
        }
        
        if (keystore != null){
                pivot.setOption("clientauth","true");
                pivot.setOption("keystore", keystore);
            if (keystoretype!=null)
                pivot.setOption("keystoreType", keystoretype);
            if (keystorepin!=null){
                pivot.setOption("keystorePass", keystorepin);           
            }
            if (keypin!=null){
                pivot.setOption("keypass",keypin);              
            }
        }
        
        Handler transport = new SimpleTargetedChain(pivot);
        deployTransport(HTTPTransport.DEFAULT_TRANSPORT_NAME, transport);
        
        /*
         * Deploy service handlers
         * */
        if(serviceOptions != null){
                //Need to add required handler as provided in service options
                Handler requestHandler = new WSDoAllSender();
                requestHandler.setOptions(serviceOptions);
                deployService(serviceName, new SOAPService(requestHandler, 
pivot,
null));
        }
        }

        /**
         * @return the disablePrettyXML
         */
        public boolean isDisablePrettyXML() {
                return disablePrettyXML;
        }

        /**
         * @param disablePrettyXML the disablePrettyXML to set
         */
        public void setDisablePrettyXML(boolean disablePrettyXML) {
                this.disablePrettyXML = disablePrettyXML;
        }

        /**
         * @return the enableNamespacePrefixOptimization
         */
        public boolean isEnableNamespacePrefixOptimization() {
                return enableNamespacePrefixOptimization;
        }

        /**
         * @param enableNamespacePrefixOptimization the
enableNamespacePrefixOptimization to set
         */
        public void setEnableNamespacePrefixOptimization(
                        boolean enableNamespacePrefixOptimization) {
                this.enableNamespacePrefixOptimization =
enableNamespacePrefixOptimization;
        }
                
}

-- 
View this message in context: 
http://old.nabble.com/how-to-invoke-a-chain-of-handlers-if-am-creating-my-own-engine-config-tp27714289p27714289.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to