Hi Mark, Most likely you haven't set the Axis Classpath. It could be done in several different ways as for example the one described at the Axis Installation page:
http://ws.apache.org/axis/java/install.html#ClasspathSetup ---- Or just follow the instruction below: Add these lines to your build.xml and it should start working. <property name="axis.home" value="C:\axis-1_4" /> <!--The value should be your AXIS home directory--> <path id="axis.classpath"> <fileset dir="${axis.home}/lib"> <include name="**/*.jar" /> </fileset> </path> <taskdef resource="axis-tasks.properties" classpathref="axis.classpath" /> PS. This is a refence to http://ws.apache.org/axis/java/ant/ant.html Best Regards, Ricardo Mark Babcock-3 wrote: > > Ricardo, > > Thank you for that amazing help. However, I'm having problems with the > ant tag axis-wsdl2java. Getting the name is undefined. > > -----Original Message----- > From: r1c4r60 [mailto:[EMAIL PROTECTED] > Sent: Monday, June 25, 2007 9:22 AM > To: [email protected] > Subject: Re: WSDL2Java for HTTPS > > > Hi, > > This is a way to solve the WSDL over HTTPS issue reported by so many > resulting in "No Trusted Certificate". > > 1 - Export Certificate from Internet Explorer > > 1.1 -> Access the service WSDL location (Ex. https://foo.com/bar?wsdl) > 1.2 -> Internet explorer will prompt a security alert > 1.3 -> Select the "View Certificate" button > 1.4 -> Navigate to the tab "Details" > 1.5 -> Select the "Copy to File.." button > 1.6 -> Certificate Export Wizard will be displayed. Select "NEXT" > button. > 1.7 -> The option "DER encoded binary X.509 (.CER) will by default be > selected. Select "Next" > 1.8 -> Place the file where it suits you better. (Ex. foobar) PS. Don't > add > an extension. It will be store as: [given name].cer > 1.9 -> Select "Next" > 1.10 -> The "Completing Certificate Export Wizard" will be displayed. > 1.11 -> Select "Finish" > 1.12 -> The will be a pop-up saying "The export was successful" > > 2 - Importing the certificate signature into the keystore > > 2.1 -> Find out which keystore is being used by ANT by using the > command: > ant -diagnostics > 2.2 -> Lots of information will be displayed. Find the key "java.home" > (Ex. > "java.home : C:\j2sdk1.4.2_14\jre") > 2.3 -> Thereby the truststore being used by ANT is in: > C:\j2sdk1.4.2_14\jre\lib\security\cacerts > 2.4 -> Now you have to import the certificate into the keystore: > "keytool > -import -trustcacerts -keystore > "C:\j2sdk1.4.2_14\jre\lib\security\cacerts" > -storepass changeit -alias [foo bar] -file [the name you gave in step > 1.8].cer" > 2.5 -> Verify if the entry was created correctly. > "C:\j2sdk1.4.2_14\jre\lib\security>keytool -keystore cacerts -storepass > changeit -list -alias [foo bar]" > > 3 - Run the Ant task > > <target name="wsdl2java"> > <mkdir dir="src/main/java-generated"/> > <axis-wsdl2java > output="src/main/java-generated" > testcase="false" > verbose="true" > serverside="false" > url="https://foo.com/bar?wsdl"/> > </target> > > Best Regards, > Ricardo > > > Mark Babcock-3 wrote: >> >> I am trying to generate stubs with the WSDL2Java tool >> >> I imported my certificate into my keystore (cacerts) using >> >> The keytool. >> >> >> >> When I run my build file I get the following exception: >> >> >> >> [java] javax.net.ssl.SSLHandshakeException: >> sun.security.validator.Validato >> >> rException: PKIX path building failed: >> sun.security.provider.certpath.SunCertPat >> >> hBuilderException: unable to find valid certification path to > requested >> target >> >> >> >> <?xml version="1.0" encoding="UTF-8"?> >> >> >> >> <!-- ========================================= --> >> >> <!-- xxx wsdl2java --> >> >> <!-- ========================================= --> >> >> >> >> <project name="xxxWSDL2Java" default="main" basedir="."> >> >> >> >> >> >> <!-- >> ==================================================================== > --> >> >> <!-- creates axis stubs for webservices >> --> >> >> <!-- >> ==================================================================== > --> >> >> <target name="generateWebServiceStubs" depends=""> > >> >> <java classname="org.apache.axis.wsdl.WSDL2Java" >> fork="true"> >> >> <classpath> >> >> <pathelement location="axis.jar"/> >> >> <pathelement location="axis-ant.jar" /> >> >> <pathelement location="jaxrpc.jar" /> >> >> <pathelement >> location="commons-logging-1.0.4.jar" /> >> >> <pathelement >> location="commons-discovery-0.2.jar" /> >> >> <pathelement location="wsdl4j-1.5.1.jar" /> >> >> </classpath> >> >> <arg value="https://URL/"/> >> >> <arg value="-o" /> >> >> <arg value="-Djavax.net.ssl.trustStore=c:/program >> files/javajre1.6.0_01/lib/security/cacerts" /> >> >> </java> >> >> </target> >> >> >> >> <target name="main" depends="generateWebServiceStubs"> >> >> <echo> >> >> Building xxx WSDL 2 Java\par >> >> </echo> >> >> </target> >> >> </project> >> >> >> >> >> >> >> > > -- > View this message in context: > http://www.nabble.com/WSDL2Java-for-HTTPS-tf3965233.html#a11286558 > Sent from the Axis - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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] > > > -- View this message in context: http://www.nabble.com/WSDL2Java-for-HTTPS-tf3965233.html#a11288117 Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
