Package org.frankframework.http
Class WebServiceSender
java.lang.Object
org.frankframework.http.AbstractHttpSession
org.frankframework.http.AbstractHttpSender
org.frankframework.http.HttpSender
org.frankframework.http.WebServiceSender
- All Implemented Interfaces:
AdapterAware
,CanUseSharedResource<HttpSession>
,HasPhysicalDestination
,IConfigurable
,IConfigurationAware
,INamedObject
,IScopeProvider
,ISender
,ISenderWithParameters
,IWithParameters
,HasKeystore
,HasTruststore
,ConfigurableLifecycle
,HasStatistics
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.Lifecycle
,org.springframework.context.Phased
,org.springframework.context.SmartLifecycle
Sender that sends a message via a WebService.
- Since:
- 7.0
- Version:
- 2.0
- Author:
- Gerrit van Brakel, Niels Meijer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.frankframework.http.HttpSender
HttpSender.PostType
Nested classes/interfaces inherited from class org.frankframework.http.AbstractHttpSender
AbstractHttpSender.HttpMethod
-
Field Summary
Fields inherited from class org.frankframework.http.AbstractHttpSender
CORRELATION_ID_HEADER, headerParamsSet, MESSAGE_ID_HEADER, parametersToSkipWhenEmptySet, paramList, requestOrBodyParamsSet, staticUri, urlParameter
Fields inherited from class org.frankframework.http.AbstractHttpSession
log
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure this component.protected Message
extractResult
(HttpResponseHandler responseHandler, PipeLineSession session) Custom implementation to extract the response and format it to a String result.protected org.apache.http.client.methods.HttpRequestBase
getMethod
(URI uri, Message message, ParameterValueList parameters, PipeLineSession session) Custom implementation to create aHttpRequest
object.boolean
isSoap()
boolean
boolean
void
setEncodingStyle
(String encodingStyle) the encodingstyle to be set in the messageheadervoid
setEncodingStyleURI
(String encodingStyle) Deprecated, for removal: This API element is subject to removal in a future version.void
Hide this property from being set.void
setNamespaceDefs
(String namespaceDefs) namespace defintions to be added in the soap envelope tag. must be in the form of a comma or space separated list ofprefix=namespaceuri
-definitionsvoid
setServiceNamespace
(String serviceNamespace) the namespace of the message sent. identifies the service to be called. may be overriden by an actual namespace setting in the message to be sentvoid
setServiceNamespaceParam
(String serviceNamespaceParam) parameter to obtain the servicenamespacevoid
setServiceNamespaceURI
(String serviceNamespace) Deprecated, for removal: This API element is subject to removal in a future version.void
setServiceNamespaceURIParam
(String serviceNamespaceParam) Deprecated, for removal: This API element is subject to removal in a future version.void
setSoap
(boolean b) whentrue
, messages sent are put in a soap envelope and the soap envelope is removed from received messages (soap envelope will not be visible to the pipeline)void
setSoapAction
(String soapAction) the soapactionuri to be set in the requestheadervoid
setSoapActionParam
(String soapActionParam) parameter to obtain the soapactionurivoid
setSoapActionURI
(String soapAction) Deprecated, for removal: This API element is subject to removal in a future version.void
setSoapActionURIParam
(String soapActionParam) Deprecated, for removal: This API element is subject to removal in a future version.void
setThrowApplicationFaults
(boolean b) controls whether soap faults generated by the application generate an exception, or are treated as 'normal' messagesvoid
setWssAuthAlias
(String string) alias used to obtain credentials for authentication to web services securityvoid
setWssPassword
(String string) password used to obtain credentials for authentication to web services securityvoid
setWssPasswordDigest
(boolean b) when true, the password is sent digested. otherwise it is sent in clear textvoid
setWssUserName
(String string) username used to obtain credentials for authentication to web services securityMethods inherited from class org.frankframework.http.HttpSender
elementToFormBodyPart, getFirstBodyPartName, getMethod, getMtomContentTransferEncoding, getMultipartXmlSessionKey, getPostType, getResponseBody, getTreatInputMessageAsParameters, isEncodeMessages, isParamsInUrl, setEncodeMessages, setFirstBodyPartName, setMtomContentTransferEncoding, setMultipartXmlSessionKey, setParamsInUrl, setPostType, setTreatInputMessageAsParameters
Methods inherited from class org.frankframework.http.AbstractHttpSender
addParameter, appendParameters, getCharSet, getContentType, getDomain, getFullContentType, getHeadersParams, getHttpMethod, getLogPrefix, getObjectType, getParameterList, getParametersToSkipWhenEmpty, getPhysicalDestinationName, getResultStatusCodeSessionKey, getStyleSheetName, getUrl, getUrlParam, isXhtml, sendMessage, setCertificate, setCertificateAuthAlias, setCertificatePassword, setCertificateType, setCharSet, setContentType, setHeadersParams, setParametersToSkipWhenEmpty, setResultStatusCodeSessionKey, setSharedResourceRef, setStyleSheetName, setUrl, setUrlParam, setXhtml, start, stop, validateResponseCode
Methods inherited from class org.frankframework.http.AbstractHttpSession
areCookiesDisabled, execute, getAdapter, getApplicationContext, getAuthAlias, getAuthDomain, getClientAuthAlias, getClientId, getClientSecret, getConfigurationClassLoader, getConnectionIdleTimeout, getConnectionTimeToLive, getDefaultHttpClientContext, getHttpClient, getKeyManagerAlgorithm, getKeystore, getKeystoreAlias, getKeystoreAliasAuthAlias, getKeystoreAliasPassword, getKeystoreAuthAlias, getKeystorePassword, getKeystoreType, getMaxConnections, getMaxExecuteRetries, getName, getPassword, getProxyAuthAlias, getProxyHost, getProxyPassword, getProxyPort, getProxyRealm, getProxyUsername, getScope, getSSLConnectionSocketFactory, getStaleTimeout, getTimeout, getTokenEndpoint, getTokenExpiry, getTrustManagerAlgorithm, getTruststore, getTruststoreAuthAlias, getTruststorePassword, getTruststoreType, getURI, getUsername, isAllowSelfSignedCertificates, isAuthenticatedTokenRequest, isFollowRedirects, isIgnoreCertificateExpiredException, isIgnoreRedirects, isPrefillProxyAuthCache, isRunning, isStaleChecking, isVerifyHostname, setAdapter, setAllowSelfSignedCertificates, setApplicationContext, setAuthAlias, setAuthDomain, setAuthenticatedTokenRequest, setClientAlias, setClientId, setClientSecret, setConfigurationMetrics, setConnectionIdleTimeout, setConnectionTimeToLive, setDisableCookies, setFollowRedirects, setHttpClient, setHttpContext, setIgnoreCertificateExpiredException, setIgnoreRedirects, setKeyManagerAlgorithm, setKeystore, setKeystoreAlias, setKeystoreAliasAuthAlias, setKeystoreAliasPassword, setKeystoreAuthAlias, setKeystorePassword, setKeystoreType, setMaxConnections, setMaxExecuteRetries, setName, setPassword, setPrefillProxyAuthCache, setProtocol, setProxyAuthAlias, setProxyHost, setProxyPassword, setProxyPort, setProxyRealm, setProxyUsername, setScope, setStaleChecking, setStaleTimeout, setSupportedCipherSuites, setTimeout, setTokenEndpoint, setTokenExpiry, setTrustManagerAlgorithm, setTruststore, setTruststoreAuthAlias, setTruststorePassword, setTruststoreType, setUsername, setVerifyHostname
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.CanUseSharedResource
getSharedResource
Methods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
getPhase, isAutoStartup
Methods inherited from interface org.frankframework.core.IConfigurationAware
getApplicationContext, getName
Methods inherited from interface org.frankframework.core.INamedObject
getName, setName
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrow
Methods inherited from interface org.frankframework.core.ISenderWithParameters
consumesSessionVariable
Methods inherited from interface org.springframework.context.Lifecycle
isRunning
Methods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Constructor Details
-
WebServiceSender
public WebServiceSender()
-
-
Method Details
-
configure
Description copied from interface:ConfigurableLifecycle
Configure this component.In the case of a container, this will propagate the start signal to all components that apply.
- Specified by:
configure
in interfaceConfigurableLifecycle
- Specified by:
configure
in interfaceIConfigurable
- Specified by:
configure
in interfaceISender
- Overrides:
configure
in classHttpSender
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
getMethod
protected org.apache.http.client.methods.HttpRequestBase getMethod(URI uri, Message message, ParameterValueList parameters, PipeLineSession session) throws SenderException Description copied from class:AbstractHttpSender
Custom implementation to create aHttpRequest
object.- Overrides:
getMethod
in classHttpSender
- Parameters:
uri
- endpoint to send the message tomessage
- to be sentparameters
- ParameterValueList that contains all the senders parameterssession
- PipeLineSession to retrieve or store data from, or NULL when not set- Returns:
- a
HttpRequest
object - Throws:
SenderException
-
extractResult
protected Message extractResult(HttpResponseHandler responseHandler, PipeLineSession session) throws SenderException, IOException Description copied from class:AbstractHttpSender
Custom implementation to extract the response and format it to a String result.
It is important that theresponse
will be read or will beclosed
.- Overrides:
extractResult
in classHttpSender
- Parameters:
responseHandler
-HttpResponseHandler
that contains the response informationsession
-PipeLineSession
which may be null- Returns:
- a string that will be passed to the pipeline
- Throws:
SenderException
IOException
-
setSoap
public void setSoap(boolean b) whentrue
, messages sent are put in a soap envelope and the soap envelope is removed from received messages (soap envelope will not be visible to the pipeline)- Default value
- true
-
setMethodType
Hide this property from being set. SOAP should always be POST- Overrides:
setMethodType
in classAbstractHttpSender
-
setSoapActionURI
@Deprecated(forRemoval=true, since="7.6.0") @ConfigurationWarning("the attribute \'soapActionURI\' has been renamed to \'soapAction\'") public void setSoapActionURI(String soapAction) Deprecated, for removal: This API element is subject to removal in a future version. -
setSoapActionURIParam
@Deprecated(forRemoval=true, since="7.6.0") @ConfigurationWarning("the attribute \'soapActionURIParam\' has been renamed to \'soapActionParam\'") public void setSoapActionURIParam(String soapActionParam) Deprecated, for removal: This API element is subject to removal in a future version. -
setSoapAction
the soapactionuri to be set in the requestheader -
setSoapActionParam
parameter to obtain the soapactionuri -
setEncodingStyleURI
@Deprecated(forRemoval=true, since="7.6.0") @ConfigurationWarning("the attribute \'encodingStyleURI\' has been renamed to \'encodingStyle\'") public void setEncodingStyleURI(String encodingStyle) Deprecated, for removal: This API element is subject to removal in a future version. -
setEncodingStyle
the encodingstyle to be set in the messageheader -
setThrowApplicationFaults
public void setThrowApplicationFaults(boolean b) controls whether soap faults generated by the application generate an exception, or are treated as 'normal' messages- Default value
- true
-
setServiceNamespaceURI
@Deprecated(forRemoval=true, since="7.6.0") @ConfigurationWarning("the attribute \'serviceNamespaceURI\' has been renamed to \'serviceNamespace\'") public void setServiceNamespaceURI(String serviceNamespace) Deprecated, for removal: This API element is subject to removal in a future version. -
setServiceNamespace
the namespace of the message sent. identifies the service to be called. may be overriden by an actual namespace setting in the message to be sent -
setServiceNamespaceURIParam
@Deprecated(forRemoval=true, since="7.6.0") @ConfigurationWarning("the attribute \'serviceNamespaceURIParam\' has been renamed to \'serviceNamespaceParam\'") public void setServiceNamespaceURIParam(String serviceNamespaceParam) Deprecated, for removal: This API element is subject to removal in a future version. -
setServiceNamespaceParam
parameter to obtain the servicenamespace -
setNamespaceDefs
namespace defintions to be added in the soap envelope tag. must be in the form of a comma or space separated list ofprefix=namespaceuri
-definitions -
setWssUserName
username used to obtain credentials for authentication to web services security -
setWssPassword
password used to obtain credentials for authentication to web services security -
setWssAuthAlias
alias used to obtain credentials for authentication to web services security -
setWssPasswordDigest
public void setWssPasswordDigest(boolean b) when true, the password is sent digested. otherwise it is sent in clear text- Default value
- true
-
isSoap
public boolean isSoap() -
getSoapAction
-
getSoapActionParam
-
getEncodingStyle
-
getServiceNamespace
-
getServiceNamespaceParam
-
getNamespaceDefs
-
isThrowApplicationFaults
public boolean isThrowApplicationFaults() -
getWssAuthAlias
-
getWssUserName
-
getWssPassword
-
isWssPasswordDigest
public boolean isWssPasswordDigest()
-