XMLDA.NET Reference
XmlServer Class
Members  Example  See Also  Send Feedback
xmldanet Namespace : XmlServer Class

Glossary Item Box

The XmlServer class inherits from the XML-DA SOAP proxy stub class OpcXmlDA and supports access to XML-DA and OPC DA servers and contains additional helper classes.

Object Model

XmlServer Class

Syntax

Visual Basic (Usage)Copy Code
Dim instance As XmlServer
C# 
public class XmlServer : xmldanet.xmlda.OpcXmlDA 

Remarks

This class inherits from the OpcXmlDA web service proxy stub class, making all web service method accessible through this class.
The application does not need to add a web reference.

Example

C#Copy Code
string srvUrl = "http://tswinc.us/XMLDADemo/ts_sim/OpcDaGateway.asmx";

      private void Browse_Click(object sender, System.EventArgs e)
      {
         XmlServer Srv = new XmlServer( srvUrl );
         try
         {
            //------------ Get the current server status
            ServerStatus status ;
            Srv.GetStatus( null, null, out status );

            //------------ browse the server into a TreeNode structure
            OPCError[] err ;
            TreeNode[] tn = Srv.BrowseTree( null, null, false, null, true, true, out err );
         }
         catch( Exception ex )
         {
            MessageBox.Show( ex.Message, "Error at Browse" );
         }
      }
Visual BasicCopy Code
Dim srvUrl As String = "http://tswinc.us/XMLDADemo/ts_sim/OpcDaGateway.asmx"

   Private Sub Browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Browse.Click
      Dim Srv As XmlServer = New XmlServer(srvUrl)
      Try
         '------------ Get the current server status
         Dim status As ServerStatus
         Srv.GetStatus(Nothing, Nothing, status)

         '------------ browse the server into a TreeNode structure
         Dim err As OPCError()
         Dim tn As TreeNode() = Srv.BrowseTree(Nothing, Nothing, False, Nothing, True, True, err)
      Catch ex As Exception
         MessageBox.Show(ex.Message, "Error at Browse")
      End Try
   End Sub

Inheritance Hierarchy

System.Object
   xmldanet.xmlda.OpcXmlDA
      xmldanet.XmlServer

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family

See Also

© 2002-2012 Advosol Inc. All Rights Reserved.