【问题标题】:Problem consuming Webservice with certificate使用证书使用 Web 服务时出现问题
【发布时间】:2022-09-25 06:37:57
【问题描述】:

我在使用具有使用证书加密数据的安全性的 SOAP WebService 时遇到问题。 我正在使用 GeneXus 17(但我对 GeneXus X Evolution 2 和 3 进行了同样的测试)生成 Java。 我做了所有必要的步骤来生成证书和密钥库,然后我在 KB 和那里指定的对象中添加了所有内容,但是在执行它时它给了我以下错误:

\"C:\\Program Files\\Java\\jdk1.8.0_241\\bin\\java.exe\" com.rendiciongastos17.aobtnerrendicionespendientessoap
Exception in thread \"main\" java.lang.RuntimeException: DOCTYPE is disallowed when the feature \"http://apache.org/xml/features/disallow-doctype-decl\" set to true.(-5)
at com.rendiciongastos17.SdtClients.getrendicionespendientesintegracion(SdtClients.java:386)
at com.rendiciongastos17.aobtnerpendingrendicionessoap.privateExecute(aobtnerpendingrendicionessoap.java:61)
at com.renditionexpenses17.aobtnerpendingrenditionssoap.execute_int(aobtnerpendingrenditionssoap.java:46)
at com.renditionexpenses17.aobtnerrenditionspendingsoap.execute(aobtnerrenditionspendingsoap.java:38)
at com.surrenderpending17.aobtnerrenderpendingsoap.executeCmdLine(aobtnerrenderpendingsoap.java:22)
at com.renditionexpenses17.aobtnerrenditionspendingsoap.main(aobtnerrenditionspendingsoap.java:15)
Failed: Execution

现在,如果我将 WSDL 导入 SOAPUI 并运行它,它就可以了。

我唯一的代码是:

java System.setProperty(\"javax.net.ssl.trustStore\", \"d:\\\\caolix\");
java System.setProperty(\"javax.net.ssl.trustStorePassword\", \"Riogas1710\");

&location = GetLocation(\'Clients\')
&location.Authentication = 1
&location.AuthenticationMethod = 0
&location.AuthenticationRealm = \"UnRealm\"
&location.AuthenticationUser = \"riogas\"
&location.AuthenticationPassword = \"xcrtdymx\"

&RendicionesPendientesDeIntegracion = &wsClients.GetRendicionesPendientesIntegracion()

击键的位置是正确的,我看不出它是什么。

  • 请不要发布代码图像,而是直接复制粘贴您的代码。

标签: java soap genexus


【解决方案1】:

此错误可能与 SAC 编号 #48044#49588#51075 有关,请在执行任何操作之前查看它们。如果不是,则错误是因为端点没有返回 XML,或者介于两者之间。您在谈论“加密数据的证书”,但是没有代码可以“加密数据”本身,将属性设置为 trustStore 是不够的,您必须使用 Security API 加密数据. 最后但并非最不重要的一点是,我确实看到 Web 服务提供商使用基于领域的身份验证,检查参数是否正常。很少见具有基于领域的身份验证的端点,但是,谁知道...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-02
    • 2019-01-05
    相关资源
    最近更新 更多