org.pentaho.di.trans.steps.webservices.wsdl
Class ControlWsdlLocator

java.lang.Object
  extended by org.pentaho.di.trans.steps.webservices.wsdl.ControlWsdlLocator
All Implemented Interfaces:
javax.wsdl.xml.WSDLLocator

public final class ControlWsdlLocator
extends Object
implements javax.wsdl.xml.WSDLLocator

Implementation of WSDLLocator for Beehive controls. This WSDLLocator implementation may open multiple input streams, its cleanup() method should always be called once the WSDL file has been parsed.


Constructor Summary
ControlWsdlLocator(String wsdlName, BeanContext beanContext)
          Create a new wsdl locator for the wsdl file with the specified name.
 
Method Summary
 void cleanup()
          Close any InputStreams opened by this locator.
 void close()
           
 InputSource getBaseInputSource()
          Find the InputSource for the WSDL file stored in _wsdlName.
 String getBaseURI()
          Get the base URI for the wsdl file.
 InputSource getImportInputSource(String string, String string1)
          Not implemented.
 String getLatestImportURI()
          Not implemented.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlWsdlLocator

public ControlWsdlLocator(String wsdlName,
                          BeanContext beanContext)
Create a new wsdl locator for the wsdl file with the specified name.

Parameters:
wsdlName - Name of the WSDL file to try to load. Name may include file path elements.
beanContext - The ControlBeanContext of the control which wants to load a WSDL file.
Method Detail

cleanup

public void cleanup()
Close any InputStreams opened by this locator.


getBaseInputSource

public InputSource getBaseInputSource()
Find the InputSource for the WSDL file stored in _wsdlName. This method attempts to find a WSDL file by:
  1. If the _wsdlName can be converted to a URL, use url.openStream()
  2. Attempt to locate _wsdlName using the bean context's getResourceAsStream()
  3. Attempt to locate _wsdlName using the current class loader's getResourceAsStream()

Specified by:
getBaseInputSource in interface javax.wsdl.xml.WSDLLocator
Returns:
An InputSource for the WSDL file.

getBaseURI

public String getBaseURI()
Get the base URI for the wsdl file.

Specified by:
getBaseURI in interface javax.wsdl.xml.WSDLLocator
Returns:
null if _wsdlName is not a valid URI.

getImportInputSource

public InputSource getImportInputSource(String string,
                                        String string1)
Not implemented.

Specified by:
getImportInputSource in interface javax.wsdl.xml.WSDLLocator
Parameters:
string -
string1 -
Returns:
null

getLatestImportURI

public String getLatestImportURI()
Not implemented.

Specified by:
getLatestImportURI in interface javax.wsdl.xml.WSDLLocator
Returns:
null

close

public void close()
Specified by:
close in interface javax.wsdl.xml.WSDLLocator