Hi,

Following works. Important thing is you have to set the identity keystore
which contains the client certificate and the trust keystore which contains
the certificate authorities to validate the certificates with the system
properties.

<project name="quickstartadb" basedir="." default="generate.service">
    <property name="wsdl.uri" value="
https://localhost:9002/soap/SimpleStockQuoteService?wsdl"/>
    <target name="init">
        <path id="javac.classpath">
            <pathelement path="../../../lib"/>
            <fileset dir="../../../lib">
                <include name="**/*.jar"/>
            </fileset>
        </path>
    </target>
    <target name="generate.service" depends="init">
        <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"
classpathref="javac.classpath">
            <sysproperty key="javax.net.ssl.keyStore"
value="/home/upul/testapps/esb-sec/synapse-1.2-SNAPSHOT/lib/identity.jks"/>
            <sysproperty key="javax.net.ssl.keyStorePassword"
value="password"/>
            <sysproperty key="javax.net.ssl.trustStore"
value="/home/upul/testapps/esb-sec/synapse-1.2-SNAPSHOT/lib/trust.jks"/>
            <sysproperty key="javax.net.ssl.trustStorePassword"
value="password"/>
            <arg line="-uri ${wsdl.uri}"/>
            <arg line="-ss"/>
            <arg line="-sd"/>
        </java>
    </target>
</project>

Hope this helps.

Upul


On Tue, Mar 4, 2008 at 2:01 PM, Eric Chow <[EMAIL PROTECTED]> wrote:

> Hello,
>
> How can I generate Java proxy stub with axis2 wsdl2java that will
> consume the WSDL through HTTPS and require a client cert for login?
>
> Would you please to show me how can I do this in ant build ?
>
> Best regards,
> Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to