locked
WSDL2Java problem in V5 RRS feed

  • Question

  • In V4 we used the WSDL2Java tool to automatically generate the Java stubs from WSDL files.
    However, the same method only works for three out of the five V5 WSDL files. For two of them, CampaignManagementService.wsdl and ReportingService.wsdl, we got the following same error message:

    howard@howard-bai:~> java -Djava.ext.dirs=/home/howard/workspace/SEMapi/lib org.apache.axis.wsdl.WSDL2Java --NStoPkg https://adcenter.microsoft.com/api/advertiser/v5=com.become.sem.msn.service -o /home/howard/SEMapi_tst/ -T 1.3 /home/howard/SEMapi_tst/WSDL/MSN_V5.Date.02.13.08/CampaignManagementService.wsdl
    WSDLException (at /wsdlBig Smileefinitions/wsdl:types/xsdTongue Tiedchema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'https://adcenterapi.microsoft.com/Api/Advertiser/V5/CampaignManagement/CampaignManagementService.svc?xsd=xsd1', relative to 'file:/home/howard/SEMapi_tst/WSDL/MSN_V5.Date.02.13.08/CampaignManagementService.wsdl'.: RSA premaster secret error: javax.net.ssl.SSLKeyException: RSA premaster secret error
            at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:97)
            at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:574)
            at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:197)
            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:405)
            at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
            at java.net.URLConnection.getContent(URLConnection.java:688)
            at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContent(HttpsURLConnectionImpl.java:406)
            at java.net.URL.getContent(URL.java:1023)
            at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)
            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: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
            at javax.crypto.KeyGenerator.<init>(DashoA13*..)
            at javax.crypto.KeyGenerator.getInstance(DashoA13*..)
            at com.sun.net.ssl.internal.ssl.JsseJce.getKeyGenerator(JsseJce.java:223)
            at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:89)
            ... 26 more

            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)
    howard@howard-bai:~> 


    The V5 WSDL files are downloaded from the following link:
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=761713&SiteID=1

    Any help is highly appreciated!

    Tuesday, April 22, 2008 7:55 PM

All replies

  • Hi,

     

    Did you run wsdl2java from the downloaded wsdl files (which I assume does work for you) or did you point wsdl2java to the online versions?

    Jeff Dillon, API Support

     

    Wednesday, April 23, 2008 11:01 PM
  • Hi Jeff,

    I run WSDL2Java using downloaded WSDLs.
    The error has gone after I switched to Java 1.5, instead of Java 1.6.


    Wednesday, April 30, 2008 10:11 PM