Invokeing Gfac Web Service

There is a three ways to invoke a Gfac Web Service

Using Command line Client

  1. You need to set your GFAC_HOME enviorment varable e.g. in bash $export GFAC_HOME=
  2. You need WSDL url of the Gfac service you need to invoke. Usually this url is of the form http://:port/?wsdl
  3. You need to know the operation name you need to invoke
  4. Run the command client.sh wsdl-url method-name parm1-name=value1 ... parmn-name=[value11,value12...]
    e.g. client.sh http://linbox3.extreme.indiana.edu:6666/?wsdl Run parm1=Hello parm2=[1,2,3,4]
  5. You could have any number of normal foo=bar or array types foo=[bar1,bar2.. ] mixed, each will be added to the request message in order

From Java Client

Following code shows how to call a Gfac Service from a java Client. This client supports Strings and Arrays of Strings. Parameters are passed as a two dimensional object array. First parameter must be a String which represent the name of the parameter and second can be a String, String[] or a collection class which includes Strings. Add all Gfac jars to the class path

	String wsdlLocation = ....
	String operation = .....
			
	String[] parameterTypeArray1 = new String[]{"foo1", "foo2",.....};
			
	Object[][] params = new Object[][]{{"foo","bar"} ....., parameterTypeArray1, ...};
			
	SimpleWSClient client = new SimpleWSClient();
	WSIFMessageElement response = (WSIFMessageElement)client.sendSOAPMessage(wsdlLocation,params,operation);
	String result = response.getObjectPart(name);
        .......
	
	

Use Portlets Web interface

please refer to Gfac portlet guide for more information.

Copyright © 2002-2006 The Trustees of Indiana University. All rights Reserved.