Package org.uddi.custody_v3

Examples of org.uddi.custody_v3.TransferToken


         * @param keyBagXML
         * @return status msg
         */
        public String AcceptCustodyTranferToken(String tokenXML, String keyBagXML) {
                try {
                        TransferEntities te = new TransferEntities();
                        te.setAuthInfo(GetToken());
                        StringReader sr = new StringReader(tokenXML.trim());
                        te.setTransferToken(JAXB.unmarshal(sr, TransferToken.class));
                        sr = new StringReader(keyBagXML.trim());
                        te.setKeyBag(JAXB.unmarshal(sr, org.uddi.custody_v3.KeyBag.class));

                        try {
                                custody.transferEntities(te);
                        } catch (Exception ex) {
                                if (isExceptionExpiration(ex)) {
                                        token = null;
                                        te.setAuthInfo(GetToken());
                                        custody.transferEntities(te);

                                } else {
                                        throw ex;
                                }
View Full Code Here


                Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                Holder<byte[]> tokenOUT = new Holder<byte[]>();
                custodyTransferPortTypeJoe.getTransferToken(authInfoJoe, kb, nodeidOUT, expiresOUT, tokenOUT);

                //sam accepts
                TransferEntities te = new TransferEntities();
                te.setAuthInfo(authInfoSam);
                te.setKeyBag(kb);
                TransferToken tt = new TransferToken();
                tt.setExpirationTime(expiresOUT.value);
                tt.setNodeID(nodeidOUT.value);
                tt.setOpaqueToken(tokenOUT.value);
                te.setTransferToken(tt);

                custodyTransferPortTypeSam.transferEntities(te);

                //confirm the transfer
                GetOperationalInfo go = new GetOperationalInfo();
View Full Code Here

                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
                        custodyTransferPortTypeJoe.getTransferToken(authInfoJoe, kb, nodeidOUT, expiresOUT, tokenOUT);


                        //sam accepts
                        TransferEntities te = new TransferEntities();
                        te.setAuthInfo(authInfoSam);
                        te.setKeyBag(kb);
                        te.getKeyBag().getKey().add("uddi:uddi.joepublisher.com:" + UUID.randomUUID().toString());
                        TransferToken tt = new TransferToken();
                        tt.setExpirationTime(expiresOUT.value);
                        tt.setNodeID(nodeidOUT.value);
                        tt.setOpaqueToken(tokenOUT.value);
                        te.setTransferToken(tt);

                        custodyTransferPortTypeSam.transferEntities(te);
                        Assert.fail();
                } catch (Exception ex) {
                        //  HandleException(ex);
View Full Code Here

                }

                //The magic part happens here, the user ROOT needs to give the user UDDI the token information out of band
                //in practice, all values must match exactly
                //UDDI now accepts the transfer
                TransferEntities te = new TransferEntities();
                te.setAuthInfo(toUserAuthToken);
                te.setKeyBag(kb);
                TransferToken tt = new TransferToken();
                tt.setExpirationTime(expiresOUT.value);
                tt.setNodeID(nodeidOUT.value);
                tt.setOpaqueToken(tokenOUT.value);
                te.setTransferToken(tt);
                System.out.println("Excuting transfer...");
                custodyTransferPortType.transferEntities(te);
                System.out.println("Complete! verifing ownership change...");

                //confirm the transfer
View Full Code Here

                                        }
                                }
                        }
                        if (method.equalsIgnoreCase("getTransferToken")) {
                                GetTransferToken r = ((GetTransferToken) request);
                                TransferToken tt = new TransferToken();
                                Holder<String> node = new Holder<String>();
                                Holder<XMLGregorianCalendar> xcal = new Holder<XMLGregorianCalendar>();
                                Holder<byte[]> ttoken = new Holder<byte[]>();
                                try {
                                        custody.getTransferToken(GetToken(), r.getKeyBag(), node, xcal, ttoken);
                                        tt.setNodeID(node.value);
                                        tt.setOpaqueToken(ttoken.value);
                                        tt.setExpirationTime(xcal.value);
                                        response = tt;
                                } catch (Exception ex) {
                                        if (isExceptionExpiration(ex)) {
                                                token = null;
                                                custody.getTransferToken(GetToken(), r.getKeyBag(), node, xcal, ttoken);
                                                tt.setNodeID(node.value);
                                                tt.setOpaqueToken(ttoken.value);
                                                tt.setExpirationTime(xcal.value);
                                                response = tt;

                                        } else {
                                                throw ex;
                                        }
View Full Code Here

                //sam accepts
                TransferEntities te = new TransferEntities();
                te.setAuthInfo(authInfoSam);
                te.setKeyBag(kb);
                TransferToken tt = new TransferToken();
                tt.setExpirationTime(expiresOUT.value);
                tt.setNodeID(nodeidOUT.value);
                tt.setOpaqueToken(tokenOUT.value);
                te.setTransferToken(tt);

                custodyTransferPortTypeSam.transferEntities(te);

                //confirm the transfer
View Full Code Here

                        //sam accepts
                        TransferEntities te = new TransferEntities();
                        te.setAuthInfo(authInfoSam);
                        te.setKeyBag(kb);
                        te.getKeyBag().getKey().add("uddi:uddi.joepublisher.com:" + UUID.randomUUID().toString());
                        TransferToken tt = new TransferToken();
                        tt.setExpirationTime(expiresOUT.value);
                        tt.setNodeID(nodeidOUT.value);
                        tt.setOpaqueToken(tokenOUT.value);
                        te.setTransferToken(tt);

                        custodyTransferPortTypeSam.transferEntities(te);
                        Assert.fail();
                } catch (Exception ex) {
View Full Code Here

                //in practice, all values must match exactly
                //UDDI now accepts the transfer
                TransferEntities te = new TransferEntities();
                te.setAuthInfo(toUserAuthToken);
                te.setKeyBag(kb);
                TransferToken tt = new TransferToken();
                tt.setExpirationTime(expiresOUT.value);
                tt.setNodeID(nodeidOUT.value);
                tt.setOpaqueToken(tokenOUT.value);
                te.setTransferToken(tt);
                System.out.println("Excuting transfer...");
                custodyTransferPortType.transferEntities(te);
                System.out.println("Complete! verifing ownership change...");
View Full Code Here

TOP

Related Classes of org.uddi.custody_v3.TransferToken

Copyright © 2018 www.massapicom. 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.