Class AbstractWsProducer<AuditDatasetType extends WsAuditDataset,ConfigType extends WsTransactionConfiguration<AuditDatasetType>,InType,OutType>

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultProducer
org.openehealth.ipf.platform.camel.ihe.ws.AbstractWsProducer<AuditDatasetType,ConfigType,InType,OutType>
Type Parameters:
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).
All Implemented Interfaces:
AutoCloseable, EndpointAware, IsSingleton, Processor, Producer, Service, ShutdownableService, StatefulService, SuspendableService
Direct Known Subclasses:
ChPpq1Producer, Hl7v3ContinuationAwareProducer, Iti44Producer, Iti55DeferredResponseProducer, SimpleWsProducer, XdsSubmissionProducer

public abstract class AbstractWsProducer<AuditDatasetType extends WsAuditDataset,ConfigType extends WsTransactionConfiguration<AuditDatasetType>,InType,OutType> extends org.apache.camel.support.DefaultProducer
Camel producer used to make calls to a Web Service.
Author:
Jens Riemschneider, Dmytro Rud
  • Constructor Details

  • Method Details

    • process

      public void process(Exchange exchange) throws Exception
      Throws:
      Exception
    • callService

      protected abstract OutType callService(Object client, InType body) throws Exception
      Sends the given request body to a Web Service via the given client proxy.
      Throws:
      Exception
    • enrichRequestContext

      protected void enrichRequestContext(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.
    • getAlternativeRequestKeys

      protected String[] getAlternativeRequestKeys(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. An example of alternative key is the query ID in HL7v3-based transactions.

      Per default, this method returns null.

      Parameters:
      exchange - Camel exchange containing a request message.
      Returns:
      A non-empty collection of non-null alternative keys, or null, when no keys could have been extracted.
    • enrichResponseMessage

      protected void enrichResponseMessage(Message message, org.apache.cxf.jaxws.context.WrappedMessageContext responseContext)
      Enriches the given response message from the Web Service request context data.
    • getEndpoint

      Specified by:
      getEndpoint in interface EndpointAware
      Overrides:
      getEndpoint in class org.apache.camel.support.DefaultProducer
    • configureClient

      protected void configureClient(Object o)
      Sets thread safety & timeout options of the given CXF client.
    • cleanRequestContext

      protected void cleanRequestContext(org.apache.cxf.jaxws.context.WrappedMessageContext requestContext)
      Request context is shared among subsequent requests, so we have to clean it.
    • getWsTransactionConfiguration

      public WsTransactionConfiguration getWsTransactionConfiguration()
      Returns:
      the info describing the Web Service.
    • getRequestClass

      public Class<InType> getRequestClass()
    • getResponseClass

      public Class<OutType> getResponseClass()