Class HttpSoapConnection
- java.lang.Object
-
- com.aquima.interactions.foundation.connectivity.impl.AbstractSoapClient
-
- com.aquima.interactions.foundation.connectivity.impl.HttpSoapConnection
-
- All Implemented Interfaces:
IConnection
,ISoapConnection
public class HttpSoapConnection extends AbstractSoapClient implements 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
Constructors Constructor Description HttpSoapConnection(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IHttpConnection
getHttpConnection()
ConnectionType
getType()
This method returns the type of the connection object.String
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.String
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 Detail
-
HttpSoapConnection
public HttpSoapConnection(IHttpConnection connection)
Create a http soap connection with a specified http connection.- Parameters:
connection
- The http connection (required).
-
HttpSoapConnection
public HttpSoapConnection(String name, String url)
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
public HttpSoapConnection(String name, String url, String username, String password)
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 Detail
-
getHttpConnection
protected IHttpConnection getHttpConnection()
-
getUrl
public String 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
public void invoke(ISoapRequest request, ISoapResponseHandler responseHandler) throws IOException
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
public ConnectionType 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.
-
-