示例#1
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.&lt;br&gt;
        /// Note: this API call should only be used with secure ports (SSL/TLS)
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
        public node[] saveNode(apiv3.node node)
        {
            node[] nodeDetail = null;
            try
            {
                log.info("Sending Node " + node.name + " info to jUDDI " + getUDDINode().getName());
                save_node saveNode = new save_node();
                saveNode.authInfo = (getAuthToken(this.getUDDINode().getSecurityUrl()));
                saveNode.node = new node[] { (node) };
                nodeDetail = getUDDINode().getTransport().getJUDDIApiService(this.getUDDINode().getJuddiApiUrl()).save_Node(saveNode);
            }
            catch (Exception e)
            {
                log.error("Unable to save node " + node.name
                        + " ." + e.Message, e);
            }

            return nodeDetail;
        }
示例#2
0
 /// <remarks/>
 public void save_NodeAsync(save_node save_NodeRequest, object userState)
 {
     if ((this.save_NodeOperationCompleted == null))
     {
         this.save_NodeOperationCompleted = new System.Threading.SendOrPostCallback(this.Onsave_NodeOperationCompleted);
     }
     this.InvokeAsync("save_Node", new object[] {
             save_NodeRequest}, this.save_NodeOperationCompleted, userState);
 }
示例#3
0
 /// <remarks/>
 public System.IAsyncResult Beginsave_Node(save_node save_NodeRequest, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("save_Node", new object[] {
             save_NodeRequest}, callback, asyncState);
 }
示例#4
0
 /// <remarks/>
 public void save_NodeAsync(save_node save_NodeRequest)
 {
     this.save_NodeAsync(save_NodeRequest, null);
 }
示例#5
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");

                node n1 = new node();
                n1.clientName = "juddicloud";
                //the following are optional
                /*
                 * max length is 255
                 * proxy transport
                 * factory*
                 * juddiapi url
                 */
                n1.proxyTransport = "org.apache.juddi.v3.client.transport.JAXWSTransport";
                n1.custodyTransferUrl = "http://uddi-jbossoverlord.rhcloud.com/services/custody-transfer";
                n1.inquiryUrl = "http://uddi-jbossoverlord.rhcloud.com/services/inquiry";
                n1.publishUrl = "http://uddi-jbossoverlord.rhcloud.com/services/publish";
                n1.securityUrl = "http://uddi-jbossoverlord.rhcloud.com/services/security";
                n1.subscriptionUrl = "http://uddi-jbossoverlord.rhcloud.com/services/subscription";
                n1.subscriptionListenerUrl = "http://uddi-jbossoverlord.rhcloud.com/services/subscription-listener";
                n1.name = "juddicloud";
                n1.description = "juddicloud";
                save_node saveNode = new save_node();
                saveNode.authInfo = (clerk.getAuthToken(clerk.getUDDINode().getSecurityUrl()));
                saveNode.node = new node[] { (n1) };
                PrintJUDDI<save_node> p = new PrintJUDDI<save_node>();
                Console.Out.WriteLine("Before sending");
                Console.Out.WriteLine(p.print(saveNode));

                node[] nodes = clerk.getUDDINode().getTransport().getJUDDIApiService(clerk.getUDDINode().getJuddiApiUrl()).save_Node(saveNode);

             //  clerk.saveNode(n1);

            }
            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();
            }
        }