Google Apps Security and Compliance Services Web Services Manual de usuario Pagina 35

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 70
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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);
Vista de pagina 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 69 70

Comentarios a estos manuales

Sin comentarios