WebSphere Extended Deployment, Version 6.0.x     Systèmes d'exploitation : AIX, HP-UX, Linux, Solaris, Windows, z/OS

Exemple de client de services Web du planificateur pour exécution longue

Vous trouverez ci-dessous un exemple de client de services Web du planificateur pour exécution longue.

public class LRSWebServiceClient{

	private static String NS_XSD = "http://www.w3.org/2001/XMLSchema";

	public static void main(String[] args) throws Exception  {
	    
     String targetNamespace = "http://longrun.websphere.ibm.com";
     String serviceName = "JobSchedulerWebService";
     String endPoint = "http://localhost:9080/LongRunningJobSchedulerWebSvcRouter/
services/JobScheduler";
     QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");

     //get service factory instance
     ServiceFactory serviceFactory = ServiceFactory.newInstance();

     //create service
     Service service = serviceFactory.createService(new QName(targetNamespace,serviceName));

     //appels du service
     Call call = (Call)service.createCall();
     call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
     call.setProperty(Call.OPERATION_STYLE_PROPERTY,"wrapped");
     call.setTargetEndpointAddress(endPoint);
     call.removeAllParameters();
     call.setPortTypeName(new QName(targetNamespace,serviceName));
     call.setReturnType(XMLType.SOAP_ARRAY);

     //définition de l'opération cible vers showAllJobs
     call.setOperationName(new QName(targetNamespace,"showAllJobs"));
     call.setReturnType(QNAME_TYPE_STRING);

     //appel du service
     System.out.println("Response:\n");
     System.out.println(call.invoke(null));		
	}
}



Related concepts
Configuration des services Web pour l'application du planificateur pour exécution longue

Rubrique Concept    

Conditions d'utilisation | Commentaires Dernière mise à jour le : Mar 16, 2006 9:58:13 AM EST
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r0/index.jsp?topic=?topic=/com.ibm.websphere.xd.doc/info/scheduler/cxdlrexam.html

© Copyright IBM 2005, 2006. All Rights Reserved.
Ce centre de documentation s'appuie sur la technologie Eclipse. (http://www.eclipse.org)