Exemplo n.º 1
0
        public void PublishBinding(string url, string serviceKey)
        {
            try
            {
                get_authTokenRequest r = new get_authTokenRequest();
                r.get_authToken        = new get_authToken1();
                r.get_authToken.cred   = util.DE(encryptedpassword);
                r.get_authToken.userID = username;
                get_authTokenResponse res = securityclient.get_authToken(r);

                save_bindingRequest req = new save_bindingRequest();
                req.save_binding                               = new save_binding1();
                req.save_binding.authInfo                      = res.authToken.authInfo;
                req.save_binding.bindingTemplate               = new bindingTemplate2[1];
                req.save_binding.bindingTemplate[0]            = new bindingTemplate2();
                req.save_binding.bindingTemplate[0].serviceKey = serviceKey;
                accessPoint2 ap = new accessPoint2();
                ap.useType = "endpoint";
                ap.Value   = url;
                req.save_binding.bindingTemplate[0].Item = ap;


                find_bindingResponse1 res2 = publishclient.save_binding(req);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public string PublishBusiness(string name)
        {
            try
            {
                get_authTokenRequest r = new get_authTokenRequest();
                r.get_authToken        = new get_authToken1();
                r.get_authToken.cred   = util.DE(encryptedpassword);
                r.get_authToken.userID = username;
                get_authTokenResponse res = securityclient.get_authToken(r);

                save_businessRequest
                    req = new save_businessRequest();
                req.save_business = new save_business1();
                req.save_business.businessEntity                  = new businessEntity2[1];
                req.save_business.businessEntity[0]               = new businessEntity2();
                req.save_business.businessEntity[0].name          = new name1[1];
                req.save_business.businessEntity[0].name[0]       = new name1();
                req.save_business.businessEntity[0].name[0].Value = name;
                req.save_business.authInfo = res.authToken.authInfo;
                get_businessDetailResponse1 res2 = publishclient.save_business(req);
                return(res2.businessDetail.businessEntity[0].businessKey);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 3
0
        public string PublishService(string name, string bizkey)
        {
            try
            {
                get_authTokenRequest r = new get_authTokenRequest();
                r.get_authToken        = new get_authToken1();
                r.get_authToken.cred   = util.DE(encryptedpassword);
                r.get_authToken.userID = username;
                get_authTokenResponse res = securityclient.get_authToken(r);

                save_serviceRequest req = new save_serviceRequest();


                req.save_service                                  = new save_service1();
                req.save_service.authInfo                         = res.authToken.authInfo;
                req.save_service.businessService                  = new businessService2[1];
                req.save_service.businessService[0]               = new businessService2();
                req.save_service.businessService[0].businessKey   = bizkey;
                req.save_service.businessService[0].name          = new name1[1];
                req.save_service.businessService[0].name[0]       = new name1();
                req.save_service.businessService[0].name[0].Value = name;
                get_serviceDetailResponse1 res2 = publishclient.save_service(req);
                return(res2.serviceDetail.businessService[0].serviceKey);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 4
0
        public void PublishBinding(string url, string serviceKey)
        {
            try
            {
                get_authTokenRequest r = new get_authTokenRequest();
                r.get_authToken = new get_authToken1();
                r.get_authToken.cred = util.DE(encryptedpassword);
                r.get_authToken.userID = username;
                get_authTokenResponse res = securityclient.get_authToken(r);

                save_bindingRequest req = new save_bindingRequest();
                req.save_binding = new save_binding1();
                req.save_binding.authInfo = res.authToken.authInfo;
                req.save_binding.bindingTemplate = new bindingTemplate2[1];
                req.save_binding.bindingTemplate[0] = new bindingTemplate2();
                req.save_binding.bindingTemplate[0].serviceKey = serviceKey;
                accessPoint2 ap = new accessPoint2();
                ap.useType = "endpoint";
                ap.Value = url;
                req.save_binding.bindingTemplate[0].Item = ap;

                find_bindingResponse1 res2 = publishclient.save_binding(req);

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 5
0
    public authToken get_authToken(get_authToken get_authToken1)
    {
        get_authTokenRequest inValue = new get_authTokenRequest();

        inValue.get_authToken = get_authToken1;
        get_authTokenResponse retVal = ((Publish)(this)).get_authToken(inValue);

        return(retVal.authToken);
    }
Exemplo n.º 6
0
        /// <summary>
        /// get an authentication token from the uddi v3 security api
        /// </summary>
        /// <param name="username">required</param>
        /// <param name="password">optional</param>
        /// <param name="securityEndpointAddress">optional</param>
        /// <returns></returns>
        public string getAuthToken()
        {
            if (String.IsNullOrEmpty(username))
            {
                throw new ArgumentNullException("username");
            }


            try
            {
                get_authTokenRequest authN = new get_authTokenRequest();
                authN.get_authToken        = new get_authToken1();
                authN.get_authToken.userID = username;
                authN.get_authToken.cred   = util.DE(encryptedpassword);
                get_authTokenResponse authTok = securityclient.get_authToken(authN);
                return(authTok.authToken.authInfo);
            }
            catch (Exception ex)
            {
                //throw new DiscoveryFailureException(ex);
                return(null);
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// get an authentication token from the uddi v3 security api
        /// </summary>
        /// <param name="username">required</param>
        /// <param name="password">optional</param>
        /// <param name="securityEndpointAddress">optional</param>
        /// <returns></returns>
        public string getAuthToken()
        {
            if (String.IsNullOrEmpty(username))
                throw new ArgumentNullException("username");

            try
            {

                get_authTokenRequest authN = new get_authTokenRequest();
                authN.get_authToken = new get_authToken1();
                authN.get_authToken.userID = username;
                authN.get_authToken.cred = util.DE(encryptedpassword);
                get_authTokenResponse authTok = securityclient.get_authToken(authN);
                return authTok.authToken.authInfo;
            }
            catch (Exception ex)
            {
                //throw new DiscoveryFailureException(ex);
                return null;
            }
        }
Exemplo n.º 8
0
        public string PublishService(string name, string bizkey)
        {
            try
            {
                get_authTokenRequest r = new get_authTokenRequest();
                r.get_authToken = new get_authToken1();
                r.get_authToken.cred = util.DE(encryptedpassword);
                r.get_authToken.userID = username;
                get_authTokenResponse res = securityclient.get_authToken(r);

                save_serviceRequest req = new save_serviceRequest();

                req.save_service = new save_service1();
                req.save_service.authInfo = res.authToken.authInfo;
                req.save_service.businessService = new businessService2[1];
                req.save_service.businessService[0] = new businessService2();
                req.save_service.businessService[0].businessKey = bizkey;
                req.save_service.businessService[0].name = new name1[1];
                req.save_service.businessService[0].name[0] = new name1();
                req.save_service.businessService[0].name[0].Value = name;
                get_serviceDetailResponse1 res2 = publishclient.save_service(req);
                return res2.serviceDetail.businessService[0].serviceKey;

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 9
0
        public string PublishBusiness(string name)
        {
            try
            {
                get_authTokenRequest r = new get_authTokenRequest();
                r.get_authToken = new get_authToken1();
                r.get_authToken.cred = util.DE(encryptedpassword);
                r.get_authToken.userID = username;
                get_authTokenResponse res = securityclient.get_authToken(r);

                save_businessRequest
                    req = new save_businessRequest();
                req.save_business = new save_business1();
                req.save_business.businessEntity = new businessEntity2[1];
                req.save_business.businessEntity[0] = new businessEntity2();
                req.save_business.businessEntity[0].name = new name1[1];
                req.save_business.businessEntity[0].name[0] = new name1();
                req.save_business.businessEntity[0].name[0].Value = name;
                req.save_business.authInfo = res.authToken.authInfo;
                get_businessDetailResponse1 res2 = publishclient.save_business(req);
                return res2.businessDetail.businessEntity[0].businessKey;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 10
0
 get_authTokenResponse Publish.get_authToken(get_authTokenRequest request)
 {
     return(base.Channel.get_authToken(request));
 }