Forum Discussion

Michael_Uray's avatar
Michael_Uray
Frequent Visitor
4 years ago

SoapUI to read Open eCard App - causes ClassCastException

Hello guys,

I try to connect to the Open eCard App to read out some data from a social insurence card, but it ends for some reason in the following exception error:

Spoiler
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')

Not sure what causes this.

 

This is my first time that I try to work with SOAP or REST, means there is probably less understanding on my side how all this works together.

 

I did create a new SOAP project with the following initial WSDL:

http://ws.openecard.org/schema/ISO24727-3.wsdl

 

Then I ran the Initialize function which should get executed first according to the manual.

The port 24727 should be fine (see browser tests below) and is the only port on which the Open ECard App is listen to.

 

 

I did try another couple things:

 

Installed the Open eCard App on the PC.

https://www.openecard.org/en/download/pc/

 

It looks as if it is running properly, since it responses if it gets opened by a webbrowser:

http://127.0.0.1:24727 changes to http://127.0.0.1:24727/index.html and shows the following screen:

 

 

 

http://127.0.0.1:24727/getStatus

provided the following information if a smartcard is plugged

Spoiler
<?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>

and these information if no smartcard is plugged:

Spoiler
<?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>

I also tried to run

http://127.0.0.1:24727/waitForChange?session=BgLLTCAcp7e3tcxwv-43fg

which caused the browser to wait until a card was plugged or unplugged.

I have found this procedure in this test file.

 

So far as I understand in the meanwhile is this not SOAP, ist must be something else, but the documentation document refers to SOAP so far as I can see.

 

Overview of the eCard-API-Framework:
https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR03112/TR-03112-api_teil1.pdf?__blob=publicationFile&v=1

 

eCard-API-Framework – ISO 24727-3-Interface:
https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR03112/TR-03112-api_teil4.pdf?__blob=publicationFile&v=1

 

There are some more documents on the bottom of the page, not sure if they are relevant.
https://www.bsi.bund.de/DE/Publikationen/TechnischeRichtlinien/tr03112/TR-03112_node.html

 

It sounded easy to me to read out name and social insurance number from this card, but it looks it is rather complex.

I spent in the meanwhile many hours but I am still no even able to establish a simple connection to the Open eCard App.

 

What I am doing wrong to run into these errors/exceptions?

Do you have any other suggestions how to read out data from this card? I thought to look at DSIRead as soon as the communication is working.

No RepliesBe the first to reply