WebSphere Extended Deployment, Version 6.0.x     운영 체제: AIX, HP-UX, Linux, Solaris, Windows, z/OS

장기간 실행 스케줄러 웹 서비스 클라이언트 예제

다음은 장기간 실행 스케줄러 웹 서비스 클라이언트 예제를 보여줍니다.

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));
//service calls
     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);

     //set target operation to showAllJobs
     call.setOperationName(new QName(targetNamespace,"showAllJobs"));
     call.setReturnType(QNAME_TYPE_STRING);

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



Related concepts
장기간 실행 스케줄러 응용프로그램에 대한 웹 서비스 구성

개념 주제    

이용 약관 | 피드백 마지막 갱신 날짜: Mar 21, 2006 11:34:03 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.
이 Information Center는 Eclipse 테크놀러지로 강화되었습니다. (http://www.eclipse.org)