Writing script to use a WSProxy Filter

WSProxy based filters are utilized using the WSProxyResource and Flow object.

Instructions on deploying a WSProxy Service can be found here.

Script Example

	
/* Service constants */
rawData = "topic:///rawdata";	
filteredData = "topic:///filtereddata";
	
/* Pattern Informatics Service Description */

piService    = "cgl.GIS.services.PIRunner";
piServiceLoc = "http://gf7.ucs.indiana.edu:4700/axis/services/WSSConnector?wsdl";

/* This creates a new WSProxy Resource */
piServiceHandler = new WSProxyResource(piService, piServiceLoc);

/* We define the input and output streams for this service */
/* These are automatically initialized and presented to the WSProxy in the */
/* initService(InputStream[] in, OutputStream[] out) function, On a first-come, first-serve basis */
piServiceHandler.setInput(rawData);
piServiceHandler.setOutput(filteredData);

/* some service specific parameters may be specified */
piServiceHandler.setParameter("MinimumMagnitude", MinimumMagnitude);


/* Finally we define the flow, the above WSproxy is a part of */
f = new Flow();
f.addComponents(piServiceHandler);

/* start the flow, parameter 1 => start the flow, 0 => only show the flow description */
f.start("1");

f.waitUntilFlowCompletes();
	

Last Updated: Feb 20, 2006

(back to Notes)