Dim saveMsg As New save_business Dim busDet As New businessDetail Dim ReqEnv As New UddiEnv.Envelope Dim ResEnv As UddiEnv.Envelope Dim Req As New UddiEnv.RequestManager Dim busEnt As UDDI10.businessEntity Dim busServ As UDDI10.businessService Dim bindTempl As UDDI10.bindingTemplate Dim model As UDDI10.tModelInstanceInfo Req.tracePath = "C:\Temp\UDDITrace\publish\" Req.trace = True Req.Mode = test Req.Authenticate txtUser.Text,txtPWD.Text If Req.UDDIErrno = 0 Then txtStatus.Text = "Authentication successful" Else txtStatus = "Error in authentication. Error text is: " & Req.UDDIErrorText Exit Sub End If DoEvents Set ReqEnv.Plugin = saveMsg Set busEnt = saveMsg.AddbusinessEntity busEnt.Name = txtCompName.Text busEnt.AddDescription = txtDescr.Text Set busServ = busEnt.businessServices.AddBusinessService busServ.Name = txtServiceName.Text busServ.AddDescription = txtServiceDescr.Text Set bindTempl = busServ.bindingTemplates.AddBindingTemplate bindTempl.accessPoint = txtAccessURL.Text bindTempl.AddDescription = txtBindingDescr.Text Set model = bindTempl.tModelInstanceDetails.AddtModelInstanceInfo model.tModelKey = txttModelKey.Text Set ResEnv = Req.UDDIRequest(ReqEnv) If Req.UDDIErrno = 0 Then Set ResEnv.Plugin = busDet busKey = busDet.businessEntity.Item(1).businessKey txtStatus.Text = "Plublised successfully. Bus Key is: " & busKey Else txtStatus = "Error in authentication. Error text is: " & Req.UDDIErrorText End If Req.End_Session