Google Apps Security and Compliance Services Web Services Instrukcja Użytkownika Strona 35

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 70
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 34
Endpoint Resolver 33
JAX WS Example
This v.1.5 Java example was created using JAX.WS 2.0.
try {
// Load and instantiate an instance of our endpoint resolver.
EndpointResolverAPI.EndpointResolverService
endpointResolverService = new
EndpointResolverAPI.EndpointResolverService();
EndpointResolverAPI.EndpointResolverPort endpointResolverPort =
endpointResolverService.getEndpointResolverPort();
// Create an instance of our Automated Batch auth element
AutomatedBatchAPI.AuthElem authCredentials = new
AutomatedBatchAPI.AuthElem();
//Get the email address and password entered by the user
authCredentials.setApiKey("<Software apiKey>");
authCredentials.setEmail("<Email address entered by the user>");
authCredentials.setPword("<Password entered by the user>");
// Okay, now lets create our user sync port, attempting to
override the endpoint URL.
AutomatedBatchAPI.AutomatedBatchPort automatedBatchPort = null;
String automatedBatchEndpoint =
endpointResolverPort.getServiceEndpoint(
authCredentials.getApiKey(),
authCredentials.getEmail(),
EndpointResolverAPI.Service.V_2_AUTOMATED_BATCH
);
// Derive our cluster WSDL location from the Endpoint.
java.net.URL endptURL = new java.net.URL(automatedBatchEndpoint);
java.net.URL clusterWSDL = new java.net.URL(endptURL.getProtocol() +
"://" + endptURL.getHost() + "/dl/api/automatedbatch.wsdl");
javax.xml.namespace.QName serviceName = new
javax.xml.namespace.QName("http://postini.com/PSTN/SOAPAPI/v2/
automatedbatch","AutomatedBatchService");
AutomatedBatchAPI.AutomatedBatchService service = new
AutomatedBatchAPI.AutomatedBatchService(clusterWSDL,serviceName);
Przeglądanie stron 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 69 70

Komentarze do niniejszej Instrukcji

Brak uwag