Search in sources :

Example 16 with WSException

use of org.openecard.common.WSHelper.WSException in project open-ecard by ecsec.

the class UnblockPINAction method execute.

@Override
public void execute() {
    // check if a german identity card is inserted, if not wait for it
    ConnectionHandleType cHandle = waitForCardType(GERMAN_IDENTITY_CARD);
    if (cHandle == null) {
        logger.debug("User cancelled card insertion.");
        return;
    }
    cHandle = connectToRootApplication(cHandle);
    RecognizedState pinState = recognizeState(cHandle);
    boolean nativePace;
    try {
        nativePace = genericPACESupport(cHandle);
    } catch (WSException e) {
        logger.error("Could not get capabilities from reader.");
        return;
    }
    UnblockPINDialog uc = new UnblockPINDialog(gui, dispatcher, cHandle, pinState, !nativePace);
    uc.show();
    Disconnect d = new Disconnect();
    d.setSlotHandle(cHandle.getSlotHandle());
    dispatcher.safeDeliver(d);
}
Also used : ConnectionHandleType(iso.std.iso_iec._24727.tech.schema.ConnectionHandleType) UnblockPINDialog(org.openecard.plugins.pinplugin.gui.UnblockPINDialog) Disconnect(iso.std.iso_iec._24727.tech.schema.Disconnect) WSException(org.openecard.common.WSHelper.WSException)

Aggregations

WSException (org.openecard.common.WSHelper.WSException)16 ConnectionHandleType (iso.std.iso_iec._24727.tech.schema.ConnectionHandleType)5 EstablishChannelResponse (iso.std.iso_iec._24727.tech.schema.EstablishChannelResponse)4 StepActionResult (org.openecard.gui.executor.StepActionResult)4 DIDAuthenticationDataType (iso.std.iso_iec._24727.tech.schema.DIDAuthenticationDataType)3 Disconnect (iso.std.iso_iec._24727.tech.schema.Disconnect)3 EstablishChannel (iso.std.iso_iec._24727.tech.schema.EstablishChannel)3 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)3 AuthDataMap (org.openecard.common.anytype.AuthDataMap)3 AuthDataResponse (org.openecard.common.anytype.AuthDataResponse)3 DispatcherException (org.openecard.common.interfaces.DispatcherException)3 ExecutionResults (org.openecard.gui.executor.ExecutionResults)3 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 TransformerException (javax.xml.transform.TransformerException)2 APDUException (org.openecard.common.apdu.exception.APDUException)2 Step (org.openecard.gui.definition.Step)2 CardApplicationConnect (iso.std.iso_iec._24727.tech.schema.CardApplicationConnect)1 CardApplicationConnectResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationConnectResponse)1 CardApplicationDisconnect (iso.std.iso_iec._24727.tech.schema.CardApplicationDisconnect)1