Example #1
0
        public static void main(string[] args)
        {
            UDDIClient clerkManager = null;
            Transport transport = null;
            UDDIClerk clerk = null;
            try
            {
                clerkManager = new UDDIClient("uddi.xml");

                transport = clerkManager.getTransport("default");

                UDDI_Security_SoapBinding security = transport.getUDDISecurityService();
                UDDI_Inquiry_SoapBinding inquiry = transport.getUDDIInquiryService();
                UDDI_Publication_SoapBinding publish = transport.getUDDIPublishService();
                JUDDIApiService juddi= transport.getJUDDIApiService();

                clerk = clerkManager.getClerk("default");

               clerk   newclerk = new clerk();
               newclerk.node = new node();
                newclerk.node.name = "juddicloud";
                newclerk.publisher = "root";
                newclerk.password = "******";

                newclerk.name = "juddicloud";
                UDDIClerk cc =new UDDIClerk(newclerk);

                  save_clerk saveClerk = new save_clerk();
                saveClerk.authInfo = clerk.getAuthToken(clerk.getUDDINode().getSecurityUrl());
                saveClerk.clerk = new clerk[] { newclerk };
              clerk[] ret=  juddi.save_Clerk(saveClerk);

              Console.Out.WriteLine(ret.Length);

            }
            catch (Exception ex)
            {
                while (ex != null)
                {
                    System.Console.WriteLine("Error! " + ex.Message);
                    ex = ex.InnerException;
                }
            }
            finally
            {
                if (transport != null && transport is IDisposable)
                {
                    ((IDisposable)transport).Dispose();
                }
                if (clerk != null)
                    clerk.Dispose();
            }
        }
Example #2
0
        /// <summary>
        ///  This calls a jUDDI implementation specific API call and is used to help 
        /// configure internode communication between jUDDI servers. This is NOT 
        /// part of the UDDI specification. Note: this API call should only
        /// be used with secure ports (SSL/TLS)
        /// </summary>
        /// <param name="senderClerk"></param>
        /// <returns></returns>
        public clerk[] saveClerk(UDDIClerk senderClerk)
        {
            clerk[] clerkDetail = null;
            try
            {
                log.debug("Sending Clerk " + senderClerk.getName() + " info to jUDDI " + getUDDINode().getName());
                save_clerk saveClerk = new save_clerk();
                saveClerk.authInfo = (getAuthToken(senderClerk.getUDDINode().getSecurityUrl()));
                saveClerk.clerk = new clerk[] { (getApiClerk()) };
                clerkDetail = getUDDINode().getTransport().getJUDDIApiService(senderClerk.getUDDINode().getJuddiApiUrl()).save_Clerk(saveClerk);
            }
            catch (Exception e)
            {
                log.error("Unable to save clerk " + getName()
                        + " ." + e.Message, e);
            }

            return clerkDetail;
        }
Example #3
0
 /// <remarks/>
 public void save_ClerkAsync(save_clerk save_ClerkRequest)
 {
     this.save_ClerkAsync(save_ClerkRequest, null);
 }
Example #4
0
 /// <remarks/>
 public void save_ClerkAsync(save_clerk save_ClerkRequest, object userState)
 {
     if ((this.save_ClerkOperationCompleted == null))
     {
         this.save_ClerkOperationCompleted = new System.Threading.SendOrPostCallback(this.Onsave_ClerkOperationCompleted);
     }
     this.InvokeAsync("save_Clerk", new object[] {
             save_ClerkRequest}, this.save_ClerkOperationCompleted, userState);
 }
Example #5
0
 /// <remarks/>
 public System.IAsyncResult Beginsave_Clerk(save_clerk save_ClerkRequest, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("save_Clerk", new object[] {
             save_ClerkRequest}, callback, asyncState);
 }