InType
- type of input data (i.e. of the data got from the route).OutType
- type of output data (i.e. of the data returned to the route).public abstract class AbstractWsProducer<AuditDatasetType extends WsAuditDataset,ConfigType extends WsTransactionConfiguration<AuditDatasetType>,InType,OutType>
extends org.apache.camel.impl.DefaultProducer
Constructor and Description |
---|
AbstractWsProducer(AbstractWsEndpoint<AuditDatasetType,ConfigType> endpoint,
JaxWsClientFactory<AuditDatasetType> clientFactory,
Class<InType> requestClass,
Class<OutType> responseClass)
Constructs the producer.
|
Modifier and Type | Method and Description |
---|---|
protected abstract OutType |
callService(Object client,
InType body)
Sends the given request body to a Web Service via the given client proxy.
|
protected void |
cleanRequestContext(org.apache.cxf.jaxws.context.WrappedMessageContext requestContext)
Request context is shared among subsequent requests, so we have to clean it.
|
protected void |
configureClient(Object o)
Sets thread safety & timeout options of the given CXF client.
|
protected void |
enrichRequestContext(org.apache.camel.Exchange exchange,
org.apache.cxf.jaxws.context.WrappedMessageContext requestContext)
Enriches the given Web Service request context
on the basis of the given Camel exchange, and vice versa.
|
protected void |
enrichResponseMessage(org.apache.camel.Message message,
org.apache.cxf.jaxws.context.WrappedMessageContext responseContext)
Enriches the given response message from the Web Service request context data.
|
protected String[] |
getAlternativeRequestKeys(org.apache.camel.Exchange exchange)
Determines the set of correlation keys for the request message contained
in the given exchange, which are alternative to the WS-Addressing message ID.
|
protected Object |
getClient()
Retrieves the client stub for the Web Service.
|
AbstractWsEndpoint<AuditDatasetType,ConfigType> |
getEndpoint() |
Class<InType> |
getRequestClass() |
Class<OutType> |
getResponseClass() |
WsTransactionConfiguration |
getWsTransactionConfiguration() |
void |
process(org.apache.camel.Exchange exchange) |
createExchange, createExchange, createExchange, doStart, doStop, isSingleton, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public AbstractWsProducer(AbstractWsEndpoint<AuditDatasetType,ConfigType> endpoint, JaxWsClientFactory<AuditDatasetType> clientFactory, Class<InType> requestClass, Class<OutType> responseClass)
endpoint
- the endpoint that creates this producer.clientFactory
- the factory for clients to produce messages for the service.requestClass
- type of request messages.protected abstract OutType callService(Object client, InType body) throws Exception
Exception
protected void enrichRequestContext(org.apache.camel.Exchange exchange, org.apache.cxf.jaxws.context.WrappedMessageContext requestContext)
protected String[] getAlternativeRequestKeys(org.apache.camel.Exchange exchange)
Per default, this method returns null
.
exchange
- Camel exchange containing a request message.null
alternative keys,
or null
, when no keys could have been extracted.protected void enrichResponseMessage(org.apache.camel.Message message, org.apache.cxf.jaxws.context.WrappedMessageContext responseContext)
public AbstractWsEndpoint<AuditDatasetType,ConfigType> getEndpoint()
getEndpoint
in interface org.apache.camel.EndpointAware
getEndpoint
in class org.apache.camel.impl.DefaultProducer
protected void configureClient(Object o)
protected void cleanRequestContext(org.apache.cxf.jaxws.context.WrappedMessageContext requestContext)
protected Object getClient()
This method caches the client stub instance and therefore requires thread synchronization.
public WsTransactionConfiguration getWsTransactionConfiguration()
Copyright © 2018 Open eHealth Foundation. All rights reserved.