Class HttpSoapConnection
java.lang.Object
com.aquima.interactions.foundation.connectivity.impl.AbstractSoapClient
com.aquima.interactions.foundation.connectivity.impl.HttpSoapConnection
- All Implemented Interfaces:
IConnection
,ISoapConnection
Class providing a simple implementation to interact with http SOAP interfaces. Soap 1.1 with basic http
authentication is supported.
In version 9.0 this class has been renamed from SoapClient to HttpSoapConnection.
- Since:
- 5.1
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsConstructorDescriptionHttpSoapConnection
(IHttpConnection connection) Create a http soap connection with a specified http connection.HttpSoapConnection
(String name, String url) Create a http soap connection for a specific Url.HttpSoapConnection
(String name, String url, String username, String password) Create a http soap connection for a specific Url with basic http authorization. -
Method Summary
Modifier and TypeMethodDescriptionprotected IHttpConnection
getType()
This method returns the type of the connection object.getUrl()
This method returns the url used for connecting to the endpoint.void
invoke
(ISoapRequest request, ISoapResponseHandler responseHandler) Send an XML request to a SOAP endpoint by providing the header and body elements.toString()
Methods inherited from class com.aquima.interactions.foundation.connectivity.impl.AbstractSoapClient
getName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.aquima.interactions.foundation.connectivity.IConnection
getName
-
Constructor Details
-
HttpSoapConnection
Create a http soap connection with a specified http connection.- Parameters:
connection
- The http connection (required).
-
HttpSoapConnection
Create a http soap connection for a specific Url.- Parameters:
name
- The name of this connection (required).url
- The url of the webservice (required).
-
HttpSoapConnection
Create a http soap connection for a specific Url with basic http authorization. With http authorization the username and password will be send in the http request header using base64 encoding.- Parameters:
name
- The name of this connection (required).url
- The url of the webservice (required).username
- The username used for authorization when connecting to the url.password
- The password used for authorization when connecting to the url.
-
-
Method Details
-
getHttpConnection
-
getUrl
Description copied from interface:ISoapConnection
This method returns the url used for connecting to the endpoint.- Specified by:
getUrl
in interfaceISoapConnection
- Returns:
- The url
-
invoke
Description copied from interface:ISoapConnection
Send an XML request to a SOAP endpoint by providing the header and body elements. This method will create a soap 1.1 envelope with the provided elements and sends it to the soap endpoint.- Specified by:
invoke
in interfaceISoapConnection
- Specified by:
invoke
in classAbstractSoapClient
- Parameters:
request
- The soap request responsible for creating the request, may not be null.responseHandler
- The handler that is used when the connection handles the response.- Throws:
IOException
- When an error occurs connecting to SOAP endpoint.
-
getType
Description copied from interface:IConnection
This method returns the type of the connection object.- Specified by:
getType
in interfaceIConnection
- Overrides:
getType
in classAbstractSoapClient
- Returns:
- the type of the connection object.
-
toString
-