@ComponentProfile(summary="Execute a webservice using CXF", tag="service,webservices,cxf") public class ApacheSoapService extends ServiceImp
SOAP Service Requester that will invoke a webservice using the payload of the message as the operation argument (the service looks after the SOAP envelope).
Note that this service attempts to set the system property org.apache.cxf.stax.allowInsecureParser
to 1 to remove
the dependency on the woodstox stax implementation. Woodstox causes an incompatibility with XStream when it comes to
unmarshalling CDATA tags, which can present problems if you are embedding XML as part of PollingTrigger
or PayloadFromMetadataService
in your adapter configuration. This will cause a
warning in the log file which can be safely ignored.
If you wish to use woodstox, then explicitly set the property to your preferred value (probably false
)as the service
will only attempt to set it if it has not already been set.
In the adapter configuration file this class is aliased as apache-cxf-soap-service which is the preferred alternative to the fully qualified classname when building your configuration.
License Required: STANDARD
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
ApacheSoapService() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeService() |
void |
doService(AdaptrisMessage msg) |
TimeInterval |
getConnectionTimeout()
The time to wait for a connection to this service invocation.
|
java.lang.Boolean |
getEnableDebug()
Provide additional web service debugging information.
|
java.lang.String |
getNamespace()
The namespace of this Service.
|
java.lang.String |
getPassword()
Optional password for HTTP basic authentication.
|
java.lang.String |
getPortName()
The port name for the WSDL.
|
TimeInterval |
getRequestTimeout()
The time to wait for a request completion for this service invocation.
|
java.lang.String |
getServiceName()
The name of the Service to be invoked.
|
java.lang.String |
getSoapAction()
The SOAP Action to be used.
|
java.lang.String |
getUsername()
Optional username for HTTP basic authentication.
|
java.lang.String |
getWsdlPortUrl()
This optional property may be used to specify a different service address to that specified in the WSDL.
|
java.lang.String |
getWsdlUrl()
The URL from which to download the WSDL.
|
protected void |
initService() |
void |
prepare() |
void |
setConnectTimeout(TimeInterval ti)
The time to wait for a connection to this service invocation.
|
void |
setEnableDebug(java.lang.Boolean enableDebug)
Whether to provide additional debugging information.
|
void |
setNamespace(java.lang.String namespace)
The namespace of this Service.
|
void |
setPassword(java.lang.String pw)
Optional password for HTTP basic authentication.
|
void |
setPortName(java.lang.String portName)
The port name for the WSDL.
|
void |
setRequestTimeout(TimeInterval rt)
The time to wait for a request completion for this service invocation.
|
void |
setServiceName(java.lang.String serviceName)
The name of the Service to be invoked.
|
void |
setSoapAction(java.lang.String soapAction)
The SOAP Action to be used.
|
void |
setUsername(java.lang.String username)
Optional username for HTTP basic authentication.
|
void |
setWsdlPortUrl(java.lang.String wsdlPortUrl)
This optional property may be used to specify a different service address to that specified in the WSDL.
|
void |
setWsdlUrl(java.lang.String wsdlUrl)
The URL from which to download the WSDL.
|
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsConfirmation, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isConfirmation, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, rethrowServiceException, retrieveComponentState, setContinueOnFail, setIsConfirmation, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
protected void closeService()
closeService
in class ServiceImp
protected void initService() throws CoreException
initService
in class ServiceImp
CoreException
public void doService(AdaptrisMessage msg) throws ServiceException
ServiceException
public void prepare() throws CoreException
CoreException
public java.lang.String getWsdlUrl()
public void setWsdlUrl(java.lang.String wsdlUrl)
wsdlUrl
- public java.lang.String getPortName()
public void setPortName(java.lang.String portName)
portName
- public java.lang.String getServiceName()
public void setServiceName(java.lang.String serviceName)
serviceName
- public java.lang.String getNamespace()
public void setNamespace(java.lang.String namespace)
namespace
- public java.lang.String getSoapAction()
public void setSoapAction(java.lang.String soapAction)
soapAction
- public java.lang.String getWsdlPortUrl()
public void setWsdlPortUrl(java.lang.String wsdlPortUrl)
wsdlPortUrl
- public java.lang.Boolean getEnableDebug()
public void setEnableDebug(java.lang.Boolean enableDebug)
enableDebug
- true = provide web service debug informationpublic TimeInterval getConnectionTimeout()
public void setConnectTimeout(TimeInterval ti)
ti
- the connect timeout, if unspecified defaults to 10 secondspublic TimeInterval getRequestTimeout()
public void setRequestTimeout(TimeInterval rt)
rt
- the request timeout, if unspecified defaults to 50 seconds.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- public java.lang.String getPassword()
public void setPassword(java.lang.String pw)
pw
- the password which may be encoded by Password.encode(String, String)
Copyright Adaptris