Eclipse - Generate web service client using wizard for a https .NET web service
===

I am trying to create a java client app to call our client's service (.NET) on its https binding. the eclipse wizard is fine with standard http (as you all are aware)

I have actually been able to achieve this with JBoss's wsconsume utility (but only this) so far.

When i try to use Eclipse's web-service client wizard things get a lot more convoluted...

I think it would be simpler if the client wasn't importing xsd's into their wsdl to define some of the elements, e.g.

    <xsd:schema targetNamespace="http://tempuri.org/Imports">
    <xsd:import schemaLocation="https://client.net/MyService.svc?xsd=xsd0" namespace="http://tempuri.org/"/>
    <xsd:import schemaLocation="https://client.net/MyService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
    <xsd:import schemaLocation="https://client.net/MyService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/Common.Contracts"/>
    </xsd:schema>

So i downloaded the wsdl, but the wizrd obviously fails when it tries to parse the imported xsd's:

           IWAB0399E Error in generating Java from WSDL:  javax.wsdl.WSDLException: WSDLException
         (at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=OTHER_ERROR: An error occurred 
        trying to resolve schema referenced at 'https://client.net/MyService.svc?xsd=xsd1', 
    relative to 'file:/C:/workspace/test/test.ping/wsdl/MyService.wsdl'.: 
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path 
    building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The stack trace is massive, but it seems fairly obvious what the problem is, sorry:

        IWAB0399E Error in generating Java from WSDL:  javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'https://live.fsl.umusic.net/PingService.svc?xsd=xsd1', 
    relative to 'file:/C:/workspace/test/test.ping/wsdl/MyService.wsdl'.: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
            javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'https://client.net/MyService.svc?xsd=xsd1', relative to 'file:/C:/workspace/test/test.ping/wsdl/MyService.wsdl'.: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
            at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
            at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
            at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
            at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
            at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
            at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
            at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
            at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
            at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
            at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
            at java.lang.Thread.run(Thread.java:619)
            Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
            at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591)
            at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187)
            at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181)
            at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1035)
            at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:124)
            at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
            at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)
            at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:415)
            at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1026)
            at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
            at java.net.URL.openStream(URL.java:1009)
            at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)
            ... 11 more
            Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
            at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:285)
            at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:191)
            at sun.security.validator.Validator.validate(Validator.java:218)
            at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
            at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
            at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
            at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1014)
            ... 24 more
            Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
            at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
            at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
            at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:280)
            ... 30 more

So when i download each xsd and spend 15 minutes changing the references in the local wsdl to point to the local xsd's it generates the stubs ok (hallelujah)

but this is short lived, because the calls then hit a 404:

        AxisFault faultCode: {http://xml.apache.org/axis/}HTTP 
    faultSubcode: 
    faultString: (404)Not Found 
    faultActor: faultNode: 
    faultDetail: {}:
    return code: 404
        {http://xml.apache.org/axis/}HttpErrorCode:404
    
    (404)Not Found at 
    org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744) at 
    org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at 
    org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at 
    org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at 
    org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at 
    org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at 
    org.apache.axis.client.Call.invokeEngine(Call.java:2784) at 
    org.apache.axis.client.Call.invoke(Call.java:2767) at 
    org.apache.axis.client.Call.invoke(Call.java:2443) at 
    org.apache.axis.client.Call.invoke(Call.java:2366) at 
    org.apache.axis.client.Call.invoke(Call.java:1812) at 
    org.tempuri.BasicHttpBinding_MyServiceStub.pong(BasicHttpBinding_MyServiceStub.java:155) at
    app.Ping.main(Ping.java:39)

i can generate the stubs using Jboss's wsconsume, and that actually works ok, so i'm a bit bugged as to why eclipse can't do it... (im using indigo)

Maybe i am missing something simple? or is it a case of looking through the stubs and changing some of the org.apache.axis.client.Call.invoke settings manually?

Or is there something i can do to eclipse in this case? like use a cert store for itself?

Any other suggestions or should i throw in the towel and go back to wsconsume?

Thanks all