faultString: java.net.SocketException: Default SSL context init failed: DER input, Integer tag errorat 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 QuoteFeedWebService_pkg.QuoteFeedWebServiceSoapStub.connect(QuoteFeedWebServiceSoapStub.java:208)
at QFWSTest.main(QFWSTest.java:63)具体的代码看看

解决方案 »

  1.   

    可能是你的证书不是cer格式,Integer tag error是分析格式出错的提示
    你try双击这个cer证书,看能不能在windows直接打开
      

  2.   

    谢谢各位!
    这个是小弟试写的通过证书联结web service的程序,请帮忙看看下面设置证书以及密码的部分是否有明显错误呢?(证书本身与密码都是正确的,.cer可以直接打开,然后通过keytool导入trustStore.jks文件,客户端证书是“c:\\ALO_1.pfx”),另外,此程序用jbuilder写的,在JBuilder里面运行,不会出现上述异常,而在console直接运行导出的.exe,会出现上述异常。 public static void main(String[] args) throws Exception {
    // TODO Auto-generated method stub//  Set system properties to point to the keystores
      // First the trustStore (keystore of trusted certificates)
      System.setProperty("javax.net.ssl.trustStore","c:\\trustStore.jks");
      System.setProperty("javax.net.ssl.trustStorePassword","Password");
      // Now the keystore.  We will just use the certificate itself   System.setProperty("javax.net.ssl.keyStore","c:\\ALO_1.pfx");
      System.setProperty("javax.net.ssl.keyStorePassword","Password");
      System.setProperty("javax.net.ssl.keyStoreType","PKCS12");
    ......
    }
      

  3.   

    现在运行时,会出现下述错误:C:\QFWSTest>java QFWSTest
    Exception in thread "main" java.lang.SecurityException: no manifiest section for
     signature file entry javax/mail/internet/AsciiOutputStream.class
            at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)        at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
            at sun.security.util.SignatureFileVerifier.process(Unknown Source)
            at java.util.jar.JarVerifier.processEntry(Unknown Source)
            at java.util.jar.JarVerifier.update(Unknown Source)
            at java.util.jar.JarFile.initializeVerifier(Unknown Source)
            at java.util.jar.JarFile.getInputStream(Unknown Source)
            at sun.misc.URLClassPath$JarLoader$1.getInputStream(Unknown Source)
            at sun.misc.Resource.cachedInputStream(Unknown Source)
            at sun.misc.Resource.getByteBuffer(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      

  4.   

    String endpoint = "http://localhost:" +"8080"+ "/projectname/ServerClassName.jws";//指明服务所在位置    Service service = new Service(); //创建一个Service实例,注意是必须的!
        Call   call   = (Call) service.createCall();//创建Call实例,也是必须的!
        call.setTargetEndpointAddress( new java.net.URL(endpoint) );//为Call设置服务的位置
        call.setOperationName( "getMeta" );//注意方法名与HelloWorld.java中一样!!    String res = (String) call.invoke( new Object[] {"123"} );//返回String,没有传入参数        System.out.println( res );