Programmer's Guide (Supporting ADX v03.1.00) Manual

Brocade Virtual ADX XML API Programmer’s Guide 853
53-1003248-01
Example: Unbinding a real server from a VIP
B
# Make the SOAP Call and store the XML result in a variable
# Response is stored in "$xml_result" as XML. Further action can be taken based on
the Response Content.
$xml_result = $syssoap->call('urn:writeConfig');
# Get the elapsed time (Time taken for the SOAP Response to arrive after the
request was sent)
$response_time = &get_elapsed_time($request_time);
# Write the Time taken to the Test Case LOG File
print LOG "Time taken to Write Configuration to Startup Config file:
$response_time\n";
print LOG "===== Operation Complete =====\n\n";
# Close the Log file
close LOG;
Java example
package adx;
/**
*
* Include the following jar files in Java project
* 1.axis.jar
* 2.commons-discovery-0.2.jar
* 3.commons-logging-1.1.1.jar
* 4.jaxrpc.jar
* 5.wsdl4j-1.5.1.jar
* 6.adx-wsdl.jar (Use axis to generate jar from SYS-service and SLB-service
WSDLs)
*
* * Flow *
* // Initialize SYS Service
* // Initialize SLB Service
* // Call api's
*/
import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import javax.xml.rpc.Stub;
import org.apache.axis.MessageContext;
import org.apache.axis.transport.http.HTTPConstants;
import com.brocade.slb.connector.webservicesapi.AdcSlbLocator;
import com.brocade.slb.connector.webservicesapi.AdcSlbServicePortType;
import com.brocade.slb.connector.webservicesapi.AdcSysInfoLocator;
import com.brocade.slb.connector.webservicesapi.AdcSysInfoServicePortType;
import
com.brocade.slb.connector.webservicesapi.BindRealServerPortToVipPort_datatype;
import com.brocade.slb.connector.webservicesapi.CreateRealServerPort_datatype;
import com.brocade.slb.connector.webservicesapi.CreateRealServer_datatype;
import com.brocade.slb.connector.webservicesapi.CreateVirtualServerPort_datatype;
import
com.brocade.slb.connector.webservicesapi.CreateVirtualServerWithConfiguration_dat
atype;
import com.brocade.slb.connector.webservicesapi.DeleteRealServer_datatype;
import com.brocade.slb.connector.webservicesapi.DeleteVirtualServer_datatype;
import com.brocade.slb.connector.webservicesapi.GetVersion_datatype;
import com.brocade.slb.connector.webservicesapi.L4Port;