You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This operator can be used to access an external web service and enrich incomming elements with the results from the web service. Different processing modes are available, data can be cached.

Parameter:

  • serviceMethod: Method by which the web service should be accessed: Possible Values 'REST' and 'SOAP'
  • wsdlLocation: url to the location of the wsdl file, i.e. what is the address of the web service for soap
  • operation: operation used to call a SOAP-Webservice
  • method: How to access the web service. For REST this is typically GET. Other methods are POST_ARGUMENTS, POST_DOCUMENT
  • url:static part of the url, will be used in request. Remark: Must contain ? to seperate arguments
  • urlSuffix: url part after argument, will be appended at the end of the url (e.g for further static parts)
  • arguments: This is a key value map, first element is the name of the attribute in web service, the second the name of the attribute from the input stream that delivers the input element
  • datafields: the datafields received through the webservice, given as path expressions
  • charset: the charset, e.g. UTF-8
  • parsingMethod: How to extract the values from the returned document: Currently available: 'JSONEXPERIMENTAL','JSONPATH','XMLEXPERIMENTAL','XPATH'
  • keyValueOutput: boolean: If true, received Data from a Webservice are returned as keyValuePair
  • outerjoin
  • multitupleoutput

Caching parameter:

  • Caching
  • Cachesize
  • Expirationtime
  • Removalstrategy

 

#PARSER PQL
#QUERY
input = ACCESS({
 	source=’Source’,
	wrapper=’GenericPull’,
	transport=’File’,
	protocol=’CSV’,
	datahandler=’Tuple’,
	options=[
		[’filename’, ’C:\Users\Daniel\Desktop\Test\Testdaten\cityInf.csv’],
		[’delay’, ’1’]
	 ],
	schema=[[’id’, ’Integer’],[’data’, ’String’]]
	}
)

s01 = WSENRICH({
	 servicemethod=’REST’,
	 method=’GET’,
	 url=’http://api.geonames.org/countryInfo?lang=it&’,
	 urlsuffix=’&username=demo&style=full’,
	 arguments=[[’country’, ’data’]],
	 datafields=[
	 [’//countryCode’, ’String’],
	 [’//countryName’, ’String’],
	 [’//isoNumeric’, ’Integer’]
	 ],
	 parsingMethod=’XPATH’,
	 outerJoin=’false’,
	 caching=’true’,
	 cacheSize=100,
	 expirationTime=300000,
	 removalStrategy=’FIFO’
	 },
 input
)
  • No labels