au.edu.anu.portal.portlets.sakaiconnector.support
Class WebServiceSupport

java.lang.Object
  extended by au.edu.anu.portal.portlets.sakaiconnector.support.WebServiceSupport

public class WebServiceSupport
extends Object

A set of services for making Web Service calls

Author:
Steve Swinsburg (steve.swinsburg@anu.edu.au)

Constructor Summary
WebServiceSupport()
           
 
Method Summary
static String call(String endpoint, String method, Map<String,Map<String,String>> params)
          Make a web service call to the given endpoint, calling the method and using the params supplied
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebServiceSupport

public WebServiceSupport()
Method Detail

call

public static String call(String endpoint,
                          String method,
                          Map<String,Map<String,String>> params)
Make a web service call to the given endpoint, calling the method and using the params supplied

Parameters:
endpoint - wsdl url
method - method to call
params - LinkedHashMap of params: 1. Must be in order required to be sent 2. Must be keyed on the parameter name to be sent, must match the webservice param exactly or it will fail 3. Should contained a single Map of items, containing 'value' and 'type' keys 4. The type attribute will be converted and supported values are string or boolean, case insensitive
Returns:
the response, or null if any exception is thrown.


Copyright © 2009-2012 Division of Information, Australian National University. All Rights Reserved.