Ejemplo n.º 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();
            }
        }
Ejemplo n.º 2
0
 /**
  * The API Clerk is the JAXWS generated "Clerk" element that is used
  * both on the jUDDI Client and on the jUDDI Web Service (not part of
  * the UDDI spec).
  *
  * @return
  */
 public clerk getApiClerk()
 {
     clerk apiClerk = new clerk();
     apiClerk.name = (name);
     apiClerk.node = (uddinode.getApiNode());
     apiClerk.password = (password);
     apiClerk.publisher = (publisher);
     return apiClerk;
 }