public class WSCache extends ConnectorCache<WSCache.Key>
Using this cache and the WSConnection.getCache()
method simplifies the cache management logic. Under the hood,
this cache instance is ultimately being stored using the map returned from
ConnectorContext.getConnectorCache()
. By default, this cache will live as long as the
Connector instance. In order to have cache information "expire" after a certain amount of time, the ConnectorCache.isValid()
method should be overloaded in a fashion similar to the ExpiringConnectorCache
utility class.
Modifier and Type | Class and Description |
---|---|
static class |
WSCache.Key
Key used for WSCache instances.
|
Constructor and Description |
---|
WSCache(WSCache.Key key) |
Modifier and Type | Method and Description |
---|---|
protected Object |
getAuthType()
Returns the authentication type for the webservice.
|
javax.wsdl.Definition |
getDefinition()
Returns the currently parsed WSDL Definition, creating if necessary.
|
WebServiceOperation |
getOperation(String operationName,
com.boomi.webservices.ProtocolHandler protocolHandler)
Returns the currently parsed WebServiceOperation for the given operation name and protocol version, loading it if
necessary from the currently loaded WSDL definition (retrieved from
getDefinition() ). |
protected Object |
getPassword()
Returns the password for the webservice.
|
com.boomi.webservices.SchemaMap |
getSchemaMap()
Loads the schema map of the currently parsed WSDL Definition, creating if necessary.
|
String |
getTargetNamespace()
Returns the target namespace of the WSDL.
|
protected Object |
getUsername()
Returns the username for the webservice.
|
protected String |
getWsdlUrl()
Returns the wsdl url for the webservice.
|
protected javax.wsdl.Definition |
readBasicAuthWsdl(javax.wsdl.xml.WSDLReader reader)
Reads a wsdl possibly protected by http basic auth using the given WSDLReader and the available credentials.
|
protected javax.wsdl.Definition |
readWsdl(javax.wsdl.xml.WSDLReader reader)
Reads a wsdl using the given WSDLReader.
|
clearCache, getCache, getKey, isValid
public WSCache(WSCache.Key key)
protected String getWsdlUrl()
Default implementation returns the url used as the cache key.
protected Object getUsername()
Default implementation returns the username used as the cache key.
protected Object getPassword()
Default implementation returns the password used as the cache key.
protected Object getAuthType()
Default implementation returns the authentication type used as the cache key.
public javax.wsdl.Definition getDefinition()
readWsdl(javax.wsdl.xml.WSDLReader)
.public com.boomi.webservices.SchemaMap getSchemaMap() throws com.boomi.webservices.SchemaModelException
readWsdl(javax.wsdl.xml.WSDLReader)
.com.boomi.webservices.SchemaModelException
protected javax.wsdl.Definition readWsdl(javax.wsdl.xml.WSDLReader reader) throws javax.wsdl.WSDLException, IOException
getDefinition()
to create a Definition when necessary.
Default implementation reads the wsdl from the url returned by getWsdlUrl()
, optionally attempting http
basic auth if appropriate for the currently configured authentication type. Subclasses may need to override this
method if the wsdl is available locally (packaged in the connector jar) or is behind some other sort of security
barrier.
javax.wsdl.WSDLException
IOException
protected javax.wsdl.Definition readBasicAuthWsdl(javax.wsdl.xml.WSDLReader reader) throws javax.wsdl.WSDLException, IOException
This is called from readWsdl(WSDLReader)
if getAuthType()
returns
WebServiceAuthenticationType.BASIC
.
javax.wsdl.WSDLException
IOException
public WebServiceOperation getOperation(String operationName, com.boomi.webservices.ProtocolHandler protocolHandler)
getDefinition()
).public String getTargetNamespace()