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:
CanUseSharedResource<HttpSession>,FrankElement,HasApplicationContext,HasName,HasPhysicalDestination,IConfigurable,IScopeProvider,ISender,ISenderWithParameters,IWithParameters,NameAware,HasKeystore,HasTruststore,ConfigurableLifecycle,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.AbstractHttpSender
AbstractHttpSender.HttpMethodNested classes/interfaces inherited from class org.frankframework.http.AbstractHttpSession
AbstractHttpSession.OauthAuthenticationMethod -
Field Summary
Fields inherited from class org.frankframework.http.AbstractHttpSender
CORRELATION_ID_HEADER, headerParamsSet, MESSAGE_ID_HEADER, parametersToSkipWhenEmptySet, paramList, requestOrBodyParamsSet, staticUri, urlParameterFields inherited from class org.frankframework.http.AbstractHttpSession
AUTHENTICATION_METHOD_KEY, logFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure this component.protected MessageextractResult(HttpResponseHandler responseHandler, PipeLineSession session) Custom implementation to extract the response and format it to a String result.protected org.apache.http.client.methods.HttpRequestBasegetMethod(URI uri, Message message, ParameterValueList parameters, PipeLineSession session) Custom implementation to create aHttpRequestobject.voidsetEncodingStyle(String encodingStyle) the encodingstyle to be set in the messageheadervoidHide this property from being set.voidsetNamespaceDefs(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-definitionsvoidsetServiceNamespace(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 sentvoidsetServiceNamespaceParam(String serviceNamespaceParam) parameter to obtain the servicenamespacevoidsetSoap(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)voidsetSoapAction(String soapAction) the soapactionuri to be set in the requestheadervoidsetSoapActionParam(String soapActionParam) parameter to obtain the soapactionurivoidsetThrowApplicationFaults(boolean b) controls whether soap faults generated by the application generate an exception, or are treated as 'normal' messagesvoidsetWssAuthAlias(String string) alias used to obtain credentials for authentication to web services securityvoidsetWssPassword(String string) password used to obtain credentials for authentication to web services securityvoidsetWssPasswordDigest(boolean b) when true, the password is sent digested. otherwise it is sent in clear textvoidsetWssUserName(String string) username used to obtain credentials for authentication to web services securityMethods inherited from class org.frankframework.http.HttpSender
createRequestMethod, getResponseBody, setEncodeMessages, setFirstBodyPartName, setMtomContentTransferEncoding, setMultipartXmlSessionKey, setPostType, setTreatInputMessageAsParametersMethods inherited from class org.frankframework.http.AbstractHttpSender
addParameter, appendParameters, getCredentials, getLogPrefix, getOauthAuthenticationMethod, getObjectType, getParameterList, getPhysicalDestinationName, getTokenEndpoint, sendMessage, setCharSet, setContentType, setHeadersParams, setParametersToSkipWhenEmpty, setResultStatusCodeSessionKey, setStyleSheetName, setUrl, setUrlParam, setXhtml, start, stop, validateResponseCodeMethods inherited from class org.frankframework.http.AbstractHttpSession
areCookiesDisabled, execute, getDomainAwareCredentials, getSSLConnectionSocketFactory, getURI, isRunning, setAllowSelfSignedCertificates, setAuthAlias, setAuthDomain, setAuthenticatedTokenRequest, setClientAlias, setClientId, setClientSecret, setConnectionIdleTimeout, setConnectionTimeToLive, setDisableCookies, setFollowRedirects, setHttpClient, setHttpContext, setIgnoreCertificateExpiredException, setIgnoreRedirects, setKeyManagerAlgorithm, setKeystore, setKeystoreAlias, setKeystoreAliasAuthAlias, setKeystoreAliasPassword, setKeystoreAuthAlias, setKeystorePassword, setKeystoreType, setMaxConnections, setMaxExecuteRetries, setOauthAuthenticationMethod, setPassword, setPrefillProxyAuthCache, setProtocol, setProxyAuthAlias, setProxyHost, setProxyPassword, setProxyPort, setProxyRealm, setProxyUsername, setSamlAssertionExpiry, setSamlAudience, setSamlIssuer, setSamlNameId, setScope, setStaleChecking, setStaleTimeout, setSupportedCipherSuites, setTimeout, setTokenEndpoint, setTokenExpiry, setTrustManagerAlgorithm, setTruststore, setTruststoreAuthAlias, setTruststorePassword, setTruststoreType, setUsername, setVerifyHostnameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.CanUseSharedResource
getSharedResource, setSharedResourceRefMethods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
getPhase, isAutoStartup, isConfiguredMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.encryption.HasKeystore
getKeyManagerAlgorithm, getKeystore, getKeystoreAlias, getKeystoreAliasAuthAlias, getKeystoreAliasPassword, getKeystoreAuthAlias, getKeystorePassword, getKeystoreTypeMethods inherited from interface org.frankframework.encryption.HasTruststore
getTrustManagerAlgorithm, getTruststore, getTruststoreAuthAlias, getTruststorePassword, getTruststoreType, isAllowSelfSignedCertificates, isIgnoreCertificateExpiredException, isVerifyHostnameMethods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrowMethods inherited from interface org.frankframework.core.ISenderWithParameters
consumesSessionVariableMethods inherited from interface org.springframework.context.Lifecycle
isRunningMethods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Constructor Details
-
WebServiceSender
public WebServiceSender()
-
-
Method Details
-
configure
Description copied from interface:IConfigurableConfigure this component.configure()is called once at startup of the framework in the configure method of the owner of thisIConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure(), to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configurein interfaceIConfigurable- Overrides:
configurein 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, @Nonnull ParameterValueList parameters, PipeLineSession session) throws SenderException Description copied from class:AbstractHttpSenderCustom implementation to create aHttpRequestobject.- Overrides:
getMethodin 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
HttpRequestobject - Throws:
SenderException
-
extractResult
protected Message extractResult(HttpResponseHandler responseHandler, PipeLineSession session) throws SenderException, IOException Description copied from class:AbstractHttpSenderCustom implementation to extract the response and format it to a String result.
It is important that theresponsewill be read or will beclosed.- Overrides:
extractResultin classHttpSender- Parameters:
responseHandler-HttpResponseHandlerthat contains the response informationsession-PipeLineSessionwhich may be null- Returns:
- a string that will be passed to the pipeline
- Throws:
SenderExceptionIOException
-
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:
setMethodTypein classAbstractHttpSender
-
setSoapAction
the soapactionuri to be set in the requestheader -
setSoapActionParam
parameter to obtain the soapactionuri -
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
-
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 -
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
-