如何通过 SOAP 与 Open eCard App 通信以从社会保险智能卡中读取数据?

问题描述

我尝试连接到 Open eCard App 以通过智能卡读卡器从社会保险卡中读取一些数据(姓名、社会保险号...)。 - 到目前为止听起来很简单。

据我所知,它提供了一个 SOAP 接口来连接到它的 Web 服务。

为了大致了解它是如何工作的,我确实尝试与 SoapUI 建立连接,但由于某种原因导致出现以下异常错误

Wed Jan 06 02:50:18 CET 2021:DEBUG:Attempt 1 to execute request
Wed Jan 06 02:50:18 CET 2021:DEBUG:Sending request: POST / HTTP/1.1
Wed Jan 06 02:50:18 CET 2021:DEBUG:Receiving response: HTTP/1.1 303 See Other
Wed Jan 06 02:50:18 CET 2021:DEBUG:Connection 0.0.0.0:50144<->127.0.0.1:24727 shut down
Wed Jan 06 02:50:18 CET 2021:DEBUG:Connection 0.0.0.0:50144<->127.0.0.1:24727 closed
Wed Jan 06 02:50:18 CET 2021:ERROR:Exception in request: java.lang.classCastException: class com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.Extendedgetmethod cannot be cast to class com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod (com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.Extendedgetmethod and com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod are in unnamed module of loader 'app')
Wed Jan 06 02:50:18 CET 2021:ERROR:An error occurred [class com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.Extendedgetmethod cannot be cast to class com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod (com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.Extendedgetmethod and com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod are in unnamed module of loader 'app')],see error log for details
Wed Jan 06 02:50:18 CET 2021:INFO:Error getting response for [SAL.Initialize:Request 1]; java.lang.classCastException: class com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.Extendedgetmethod cannot be cast to class com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod (com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.Extendedgetmethod and com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod are in unnamed module of loader 'app')

不确定是什么原因造成的。

这是我第一次尝试使用 SOAP 或 REST,这意味着我现在不太了解所有这些是如何协同工作的。

我确实使用以下初始 WSDL 在 SoapUI 中创建了一个新的 SOAP 项目: http://ws.openecard.org/schema/ISO24727-3.wsdl SoapUI Screenshot

我尝试运行应该根据 manual 首先执行的 Initialize 函数Documenation Screenshot

端口 24727 应该没问题(请参阅下面的浏览器测试),它是 Open eCard 应用程序监听的唯一端口。

我确实尝试了以下方法

在 PC 上安装了 Open eCard 应用程序。

它看起来好像运行正常,因为如果它被网络浏览器打开它就会响应。
http://127.0.0.1:24727 更改为 http://127.0.0.1:24727/index.html显示 html 欢迎画面。

http://127.0.0.1:24727/getStatus 如果插入智能卡,则提供以下信息

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ns12:Status xmlns:ns12="http://ws.openecard.org/schema" xmlns="urn:oasis:names:tc:dss:1.0:core:schema" xmlns:ns10="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns11="http://www.w3.org/2001/04/xmlenc#" xmlns:ns13="http://www.w3.org/2001/04/xmldsig-more#" xmlns:ns14="http://www.w3.org/2007/05/xmldsig-more#" xmlns:ns2="http://www.bsi.bund.de/ecard/api/1.1" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#" xmlns:ns4="urn:iso:std:iso-iec:24727:tech:schema" xmlns:ns5="http://uri.etsi.org/02231/v3.1.2#" xmlns:ns6="http://www.w3.org/2009/xmlenc11#" xmlns:ns7="urn:oasis:names:tc:dss-x:1.0:profiles:verificationreport:schema#" xmlns:ns8="http://uri.etsi.org/01903/v1.3.2#" xmlns:ns9="urn:oasis:names:tc:SAML:1.0:assertion">
  <ns12:ConnectionHandle>
    <ns4:ChannelHandle>
      <ns4:SessionIdentifier>BgLLTCAcp7e3tcxwv-43fg</ns4:SessionIdentifier>
    </ns4:ChannelHandle>
    <ns4:ContextHandle>B45D9988376A1CDA42185A9B773685FD</ns4:ContextHandle>
    <ns4:IFDName>Generic Smart Card Reader Interface 0</ns4:IFDName>
    <ns4:SlotIndex>0</ns4:SlotIndex>
    <ns4:CardApplication>526F6F74446972</ns4:CardApplication>
    <ns4:RecognitionInfo>
      <ns4:CardType>http://cif.chipkarte.at/e-card/g4</ns4:CardType>
    </ns4:RecognitionInfo>
    <ns4:SlotInfo>
      <ns4:ProtectedAuthPath>false</ns4:ProtectedAuthPath>
    </ns4:SlotInfo>
  </ns12:ConnectionHandle>
  <ns12:UserAgent>
    <ns12:Name>Open eCard App</ns12:Name>
    <ns12:VersionMajor>1</ns12:VersionMajor>
    <ns12:VersionMinor>4</ns12:VersionMinor>
    <ns12:VersionSubminor>5</ns12:VersionSubminor>
  </ns12:UserAgent>
  <ns12:SupportedAPIVersions>
    <ns12:Name>http://www.bsi.bund.de/ecard/api</ns12:Name>
    <ns12:VersionMajor>1</ns12:VersionMajor>
    <ns12:VersionMinor>1</ns12:VersionMinor>
    <ns12:VersionSubminor>5</ns12:VersionSubminor>
  </ns12:SupportedAPIVersions>
  <ns12:SupportedCards>
    <ns12:CardType>http://cif.chipkarte.at/e-card/g4</ns12:CardType>
    <ns12:DIDProtocols>urn:oid:1.3.162.15480.3.0.25</ns12:DIDProtocols>
    <ns12:DIDProtocols>urn:oid:1.3.162.15480.3.0.9</ns12:DIDProtocols>
  </ns12:SupportedCards>
  <ns12:SupportedCards>
  ...
  </ns12:SupportedCards>
  <ns12:SupportedDIDProtocols>urn:oid:1.3.162.15480.3.0.14</ns12:SupportedDIDProtocols>
  <ns12:SupportedDIDProtocols>urn:oid:1.3.162.15480.3.0.14.2</ns12:SupportedDIDProtocols>
  <ns12:SupportedDIDProtocols>urn:oid:1.3.162.15480.3.0.25</ns12:SupportedDIDProtocols>
  <ns12:SupportedDIDProtocols>urn:oid:1.3.162.15480.3.0.9</ns12:SupportedDIDProtocols>
</ns12:Status>

以及这些信息(如果没有插入智能卡)。对我来说意味着它通常适用于 Open eCard 应用程序与智能卡读卡器通信并提供网络服务。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ns12:Status xmlns:ns12="http://ws.openecard.org/schema" xmlns="urn:oasis:names:tc:dss:1.0:core:schema" xmlns:ns10="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns11="http://www.w3.org/2001/04/xmlenc#" xmlns:ns13="http://www.w3.org/2001/04/xmldsig-more#" xmlns:ns14="http://www.w3.org/2007/05/xmldsig-more#" xmlns:ns2="http://www.bsi.bund.de/ecard/api/1.1" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#" xmlns:ns4="urn:iso:std:iso-iec:24727:tech:schema" xmlns:ns5="http://uri.etsi.org/02231/v3.1.2#" xmlns:ns6="http://www.w3.org/2009/xmlenc11#" xmlns:ns7="urn:oasis:names:tc:dss-x:1.0:profiles:verificationreport:schema#" xmlns:ns8="http://uri.etsi.org/01903/v1.3.2#" xmlns:ns9="urn:oasis:names:tc:SAML:1.0:assertion">
  <ns12:UserAgent>
    <ns12:Name>Open eCard App</ns12:Name>
    <ns12:VersionMajor>1</ns12:VersionMajor>
    <ns12:VersionMinor>4</ns12:VersionMinor>
    <ns12:VersionSubminor>5</ns12:VersionSubminor>
  </ns12:UserAgent>
  <ns12:SupportedAPIVersions>
    <ns12:Name>http://www.bsi.bund.de/ecard/api</ns12:Name>
    <ns12:VersionMajor>1</ns12:VersionMajor>
    <ns12:VersionMinor>1</ns12:VersionMinor>
    <ns12:VersionSubminor>5</ns12:VersionSubminor>
  </ns12:SupportedAPIVersions>
  <ns12:SupportedCards>
    <ns12:CardType>http://cif.chipkarte.at/e-card/g4</ns12:CardType>
    <ns12:DIDProtocols>urn:oid:1.3.162.15480.3.0.25</ns12:DIDProtocols>
    <ns12:DIDProtocols>urn:oid:1.3.162.15480.3.0.9</ns12:DIDProtocols>
  </ns12:SupportedCards>
  <ns12:SupportedCards>
  ...
  </ns12:SupportedCards>
  <ns12:SupportedDIDProtocols>urn:oid:1.3.162.15480.3.0.14</ns12:SupportedDIDProtocols>
  <ns12:SupportedDIDProtocols>urn:oid:1.3.162.15480.3.0.14.2</ns12:SupportedDIDProtocols>
  <ns12:SupportedDIDProtocols>urn:oid:1.3.162.15480.3.0.25</ns12:SupportedDIDProtocols>
  <ns12:SupportedDIDProtocols>urn:oid:1.3.162.15480.3.0.9</ns12:SupportedDIDProtocols>
</ns12:Status>

我也试过跑 http://127.0.0.1:24727/waitForChange?session=BgLLTCAcp7e3tcxwv-43fg 这导致浏览器一直等到插入或拔出卡。 我在此 test file 中找到了此过程。

不确定这是否是 SOAP?我想这是别的东西,但据我所知,文档文档一般指的是 SOAP。

打开电子贺卡文档:
Overview of the eCard-API-Framework
eCard-API-Framework – ISO 24727-3-Interface

此 (https://www.bsi.bund.de/DE/Publikationen/TechnischeRichtlinien/tr03112/TR-03112_node.html) 页面底部还有一些文档,不确定它们是否相关。 (抱歉,不能在这里发布更多链接,由于我目前的声誉,由于某种原因,限制为 8 个链接

还有用于客户端实现的 Github 存储库 (https://github.com/ecsec/open-ecard)。

从这张卡上读出姓名和社会保险号码听起来很容易,但看起来相当复杂,至少在我缺乏网络服务知识的情况下是这样。我在这期间花了很多时间,但我什至无法与 Open eCard 应用程序建立简单的连接。

遇到这些错误/异常我有什么错? 我还能做些什么来从这样的卡中读取数据?我想在通信正常后立即查看 DSIRead 和类似功能

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)