Application Delivery (ADX)

Using the ServerIron ADX XML API with MS Visual Basic - Part 3

by Marcelo on ‎10-29-2013 03:43 PM (3,284 Views)

Use the following code at the beginning of Form1.vb and you should be good to go!

 

Imports System.Text

 

Imports ADX.WebReference.AdcSysInfo

 

----------------------------------------------------------

Public Class Form1

 

Dim ADXSYS AsNew ADX.WebReference.AdcSysInfo

 

Let me know if it works!

Regards,

 

 

 

Dear Marcelo:

                   Web service Reference is ok! but my from1.vb display "type Adcsysinfo.adcsysinfo not define",Please see error.jpg and adx.zip. Thanks.

Hi,

I loaded your project in my computer and I got the same error messages as you. By comparing your project to mine, I see that you created the wsdl proxy as a Service Reference and not a Web Reference. A Web Reference is a wrapper over wsdl.exe and can be used to create proxies for .NET 1.1 or 2.0 clients. A Service Reference is a wrapper over svcutil.exe and also creates clients proxies, however they can only be consumed by .NET 3.0+ clients.

When you added the reference, did you use the Add Web Reference option? If that option is not visible, you should click on Add Service Reference, then Advanced, then Add Web Reference. Try removing the wsdl proxy as a Service Reference, then re-add it as a Web Reference, and do the required additions to the Reference.vb file. Let me know how it goes.

 

P.S.: Please see attached my complete VB project, up to Part 3 (API Demo.zip). I removed your files from the posting.

Regards,

Marcelo

 

 

 

 

Dear Marcelo:

                   Please see attached file(ADX.zip),thanks.

Hi,

Can you send me the full reference.vb file? I will run it on my computer and check the results.

Thanks,

Marcelo

 

 

Dear support:

                   I follow your instruction to run vb.net 2008,but have error,Please help to solve this problem,tks.

 

 

Hi again,

I just posted Part 3 - Working with the AdcSLB API. This part includes code and instructions to create real servers, virtual servers and bindings, as well as to show the real servers and virtual servers listings in a table format. Please see the attached file.

Regards,

Marcelo

 

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hi all,

Part 2 - Working with the AdcSysInfo API -  is ready. It contains instructions about how to create a windows app to show several ADX system parameters. Please see the attached file.
Best Regards,

Marcelo

 

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hi all,

I am working on detailed documents explaining how to use the ADX API with MS Visual Basic. There will be four documents:

 

 

Part 1 - MS Visual Studio setup, creating a proxy-class and authentication with the ServerIron ADX;

Part 2 - Using the SYS API to retreive system information from the ADX;

Part 3 - Using the SLB API to create real servers, virtual servers and bindings;

Part 4 - Using the SLB API to gather session statistics.

 

Part 1 is ready. Please see the attached file.

Best Regards,

Marcelo

 

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hi all,

I will start a wiki to explore the XML/SOAP API that´s new to code 12.3 in the ServerIron ADX. This API is a very powerful tool that gives application developers a programmatic way to create SLB services, gather system statistics and real server/virtual server statistics, and simplify some day-to-day

 

operational tasks.

The documentation included with the ADX code includes examples for java, pearl and PowerShell, but none for Visual Studio. With a couple day´s effort I was able to setup the Visual Studio 2008 environment, create a proxy class using the .wsdl file provided with the API, and after some time I can now authenticate and invoke the getHostName and getVersion methods. Let´s say that´s the first step to build useful, complete apps that can create and monitor real servers and virtual servers programmatically. Actually two .wsdl files are provided - one for gathering and setting system info from the ServerIron (AdcSysinfo) and another to create and monitor SLB services (AdcSlb).

I will start exploring the AdcSysInfo API, then I will move on to the AdcSlb API. Please see attached a file containing some slides showing the VS setup, plus the basic code required to authenticate to and send HTTP/SOAP requests to the ADX.

Here is what needs to be done in the ServerIron ADX: enable SOAP with "web-management soap", create an user account with admin privilege (my example uses "admin" with password "brocade") and enable web authentication with "aaa authentication web default local".

Have fun,

Marcelo