Web Services
OpenHub framework uses Spring Web Services as library for consuming and publishing web services.
See How to implement web services? for more details about creating and publishing web service API.
Main Spring configuration is in org.openhubframework.openhub.core.config.WebServiceConfig class that contains:
- MessageDispatcherServlet configuration
- logging interceptor SoapEnvelopeLoggingInterceptor
- endpointMapping CamelEndpointMapping
- custom adapter for recieving messages with extended error handler (ErrorCodeAwareWebServiceMessageReceiverHandlerAdapter)
- common XSD types (commonTypes-v1.0)
- SOAP messages factories supporting version 1.1 and 1.2
- interceptor for validation HeaderAndPayloadValidatingInterceptor
- each module with web service support implements WebServiceValidatingSources contract for getting XSD schemas from the module
@Component @Profile(ExampleProperties.EXAMPLE_PROFILE) public class ExampleWebServiceValidatingSources implements WebServiceValidatingSources { @Override public Resource[] getXsdSchemas() { return new Resource[] {ExampleWebServiceConfig.HELLO_OPERATIONS_XSD_RESOURCE}; } @Override public String[] getIgnoreRequests() { return new String[] {"{http://openhubframework.org/ws/HelloService-v1}syncHelloRequest"}; } }
Spring Web services (better to say MessageDispatcherServlet) place their beans into root Spring application context.
Part of the OpenHub framework is CloseableHttpComponentsMessageSender - enhanced HTTP sender.