Brocade Virtual ADX XML API Programmer’s Guide (Supporting Instrukcja Użytkownika Strona 15

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 878
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 14
Brocade Virtual ADX XML API Programmer’s Guide 5
53-1003248-01
Creating client-specific APIs from client stubs
1
The following output results from the execution of the "getChassisInfo.pl" script:
C:\>getChassisInfo.pl
Chassis Model : SI-1216-4-PREM
Chassis Serial : E2SA02F038
The contents of the “getChassisInfo.pl” script are as follows:
use SOAP::Lite;
my $soap = SOAP::Lite
-> uri('urn:webserviceapi')
-> proxy('http://username:[email protected]/WS/SYS')
-> ns('urn:webservicesapi','urn');
my $result = $soap->getChassis();
unless ($result->fault)
{
print "\nChassis Model : "
.$result->valueof('//chassisData/identification/model');
print "\nChassis Serial : "
.$result->valueof('//chassisData/identification/serialNum')
} else
{
print join ', ',
$result->faultcode,
$result->faultstring;
}
import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
public class Example1_client {
public static void main (String[] args)
throws Exception {
System.out.println("\n\nCalling the SOAP Server to say hello\n\n");
URL url = new URL (args[0]);
String name = args[1];
Call call = new Call ( );
call.setTargetObjectURI("urn:Example1");
call.setMethodName("sayHello");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC;);
Vector params = new Vector ( );
params.addElement (new Parameter("name", String.class, name, null));
call.setParams (params);
System.out.print("The SOAP Server says: ");
Przeglądanie stron 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 877 878

Komentarze do niniejszej Instrukcji

Brak uwag