Search in sources :

Example 6 with CardCall

use of iso.std.iso_iec._24727.tech.schema.CardCall in project open-ecard by ecsec.

the class AndroidMarshaller method parseCardCall.

private synchronized CardCall parseCardCall(XmlPullParser parser) throws XmlPullParserException, IOException, ParserConfigurationException {
    CardCall c = new CardCall();
    int eventType;
    do {
        parser.next();
        eventType = parser.getEventType();
        if (eventType == XmlPullParser.START_TAG) {
            if (parser.getName().equals("CommandAPDU")) {
                c.setCommandAPDU(StringUtils.toByteArray(parser.nextText()));
            } else if (parser.getName().equals("ResponseAPDU")) {
                c.getResponseAPDU().add(this.parseResponseAPDUType(parser));
            }
        }
    } while (!(eventType == XmlPullParser.END_TAG && parser.getName().equals("CardCall")));
    return c;
}
Also used : CardCall(iso.std.iso_iec._24727.tech.schema.CardCall)

Example 7 with CardCall

use of iso.std.iso_iec._24727.tech.schema.CardCall in project open-ecard by ecsec.

the class AndroidMarshaller method parseConclusion.

private synchronized Conclusion parseConclusion(XmlPullParser parser) throws XmlPullParserException, IOException, ParserConfigurationException {
    Conclusion conc = new Conclusion();
    int eventType;
    do {
        parser.next();
        eventType = parser.getEventType();
        if (eventType == XmlPullParser.START_TAG) {
            if (parser.getName().equals("RecognizedCardType")) {
                conc.setRecognizedCardType(parser.nextText());
            } else if (parser.getName().equals("CardCall")) {
                conc.getCardCall().add(this.parseCardCall(parser));
            }
        }
    } while (!(eventType == XmlPullParser.END_TAG && parser.getName().equals("Conclusion")));
    return conc;
}
Also used : Conclusion(iso.std.iso_iec._24727.tech.schema.Conclusion)

Aggregations

CardCall (iso.std.iso_iec._24727.tech.schema.CardCall)5 BeginTransaction (iso.std.iso_iec._24727.tech.schema.BeginTransaction)2 BeginTransactionResponse (iso.std.iso_iec._24727.tech.schema.BeginTransactionResponse)2 CardApplicationConnect (iso.std.iso_iec._24727.tech.schema.CardApplicationConnect)2 CardApplicationConnectResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationConnectResponse)2 CardApplicationDisconnect (iso.std.iso_iec._24727.tech.schema.CardApplicationDisconnect)2 CardApplicationDisconnectResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationDisconnectResponse)2 CardApplicationPath (iso.std.iso_iec._24727.tech.schema.CardApplicationPath)2 CardApplicationPathResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationPathResponse)2 CardApplicationPathType (iso.std.iso_iec._24727.tech.schema.CardApplicationPathType)2 ChannelHandleType (iso.std.iso_iec._24727.tech.schema.ChannelHandleType)2 Connect (iso.std.iso_iec._24727.tech.schema.Connect)2 ConnectResponse (iso.std.iso_iec._24727.tech.schema.ConnectResponse)2 ConnectionHandleType (iso.std.iso_iec._24727.tech.schema.ConnectionHandleType)2 DIDAuthenticate (iso.std.iso_iec._24727.tech.schema.DIDAuthenticate)2 DIDAuthenticateResponse (iso.std.iso_iec._24727.tech.schema.DIDAuthenticateResponse)2 DestroyChannel (iso.std.iso_iec._24727.tech.schema.DestroyChannel)2 DestroyChannelResponse (iso.std.iso_iec._24727.tech.schema.DestroyChannelResponse)2 Disconnect (iso.std.iso_iec._24727.tech.schema.Disconnect)2 DisconnectResponse (iso.std.iso_iec._24727.tech.schema.DisconnectResponse)2