Examples of RegisterResult


Examples of org.wso2.xkms2.RegisterResult

            System.out.print(bytes[i]);
        }
    }

    public static RegisterResult createRegisterResult() {
        RegisterResult result = new RegisterResult();
        result.setId(getRamdomId());
        return result;
    }
View Full Code Here

Examples of org.wso2.xkms2.RegisterResult

            } catch (KeyStoreException e) {
                LOG.error("Adding the certificate to keystore failed", e);
                throw new XKMSException(e);
            }

            RegisterResult result = XKMSUtil.createRegisterResult();
            buildResultType(request, result, aliase, keystore);
            return result;

        } catch (XKMSException ex) {

            RegisterResult resultType = XKMSUtil.createRegisterResult();
            buildFault(request, resultType, ex);
            return resultType;
        }
    }
View Full Code Here

Examples of org.wso2.xkms2.RegisterResult

    private RegisterResultBuilder() {
    }

    public XKMSElement buildElement(OMElement element) throws XKMSException {
        RegisterResult registerResult = new RegisterResult();
        super.buildElement(element, registerResult);

        OMElement keyBindingElem;
        for (Iterator iterator = element
                .getChildrenWithName(XKMS2Constants.ELE_KEY_BINDING); iterator
                .hasNext();) {
            keyBindingElem = (OMElement) iterator.next();
            registerResult
                    .addKeyBinding((KeyBinding) KeyBindingBuilder.INSTANCE
                            .buildElement(keyBindingElem));
        }

        OMElement privateKeyElem = element
                .getFirstChildWithName(XKMS2Constants.Q_ELEM_PRIVATE_KEY);
        if (privateKeyElem != null) {
            PrivateKey privateKey = (PrivateKey) PrivateKeyBuilder.INSTANCE.buildElement(privateKeyElem);
            registerResult.setPrivateKey(privateKey);
        }

        return registerResult;
    }
View Full Code Here

Examples of org.wso2.xkms2.RegisterResult

        super("RegisterResultBuilderTest");
    }

    public void testBuild() throws XKMSException {
        OMElement registerResultElem = getResourceAsElement("T1_RegisterResult-http.xml");
        RegisterResult registerResult = (RegisterResult) RegisterResultBuilder.INSTANCE
                .buildElement(registerResultElem);
        assertNotNull(registerResult);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.