Hi Lizhao

Set up the Java NIO based http/s transports as follows, by commenting out
<transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
    ....
</transportReceiver>

and uncommenting the following section
    <!-- the non blocking http transport based on HttpCore + NIO extensions-->
    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
        <parameter name="port" locked="false">9000</parameter>
        <parameter name="non-blocking" locked="false">true</parameter>
    </transportReceiver>
    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions-->
    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
        <parameter name="port" locked="false">9002</parameter>
        <parameter name="non-blocking" locked="false">true</parameter>
        <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>identity.jks</Location>
                <Type>JKS</Type>
                <Password>password</Password>
                <KeyPassword>password</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>trust.jks</Location>
                <Type>JKS</Type>
                <Password>password</Password>
            </TrustStore>
        </parameter>
        <!--<parameter name="SSLVerifyClient">require</parameter>
            supports optional|require or defaults to none -->
    </transportReceiver>

If you want to perform two-way authenticatoin, comment out the SSLVerifyClient parameter and set to require or optional
<parameter name="SSLVerifyClient">require</parameter>

Now, you must make your identity store and trust store available to Axis2 through the classpath. What you could do is edit your setenv.sh to look as follows, by appending the lib directory to the start. The identity store should contain one entry that will be used when axis2 listens over https. The trust store will contain the certificates and CA certs that your server trusts

AXIS2_CLASSPATH="$AXIS2_HOME/lib":"$JAVA_HOME/lib/tools.jar":"$AXIS2_CLASSPATH":"$CLASSPATH"

Now copy your certificate stores to the lib directory, you may grab a sample identity.jks and trust.jks from here to check this out.. http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/resources/

Comment out the old http/s senders
<transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">... and
<transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

and uncomment the NIO senders as follows:
    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions-->
    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
        <parameter name="non-blocking" locked="false">true</parameter>
    </transportSender>
    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions-->
    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
        <parameter name="non-blocking" locked="false">true</parameter>
        <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>identity.jks</Location>
                <Type>JKS</Type>
                <Password>password</Password>
                <KeyPassword>password</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>trust.jks</Location>
                <Type>JKS</Type>
                <Password>password</Password>
            </TrustStore>
        </parameter>
        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
    </transportSender>

asankha

Chen, Lizhao wrote:

Hi, Asankha,

 

Can you tell me in detail how to configure the relevant entries on the transport for keystore in axis2.xml?

 

Best Regards!

 

Lizhao Chen

 

86-021-50800850-8395


From: Asankha C. Perera [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2007 2:36 AM
To: axis-user@ws.apache.org
Subject: Re: A question about Axis2 embed SimpleHTTPServer

 

Hi Lizhao

You could use the new non-blocking http/s transport with Axis2 1.3. However, there was an issue with the RC1 release for https, but would work with any new nightly build thats built after this email, or the 1.3 release version.

You will need to uncomment the section to enable the non-blocking transport from the axis2.xml and comment out the old http/s transport. Also you will need to place your identity and trust keystores on the classpath and configure the relevant entries on the transport.

asankha

Chen, Lizhao wrote:

Hi,

 

Can Axis2 embed SimpleHTTPServer start up in https way? The web service deployed in this way can be accessed by https://....

 

Best Regards!

 

Lizhao Chen

 

86-021-50800850-8395

 

============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================
  
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================
  
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to