@Component @Primary public class TestWsUriBuilder extends Object implements WebServiceUriBuilder
WebServiceUriBuilder for using in tests.
"direct" component is used instead of specific web service implementation, e.g. "spring-ws".
Advantage is that it's no further needed to use "advice" for changing input route URI.
Direct URI has the following format: "direct:inWS_"/"direct:outWS_" + local part of the request qName.
Example of using in test:
Produce(uri = TestWsUriBuilder.URI_WS_IN + "syncHelloRequest")
private ProducerTemplate producer;
| Modifier and Type | Field and Description |
|---|---|
static String |
URI_WS_IN |
static String |
URI_WS_OUT
URI of web service output endpoint for SOAP 1.1.
|
static String |
URI_WS12_OUT
URI of web service output endpoint for SOAP 1.2.
|
| Constructor and Description |
|---|
TestWsUriBuilder() |
| Modifier and Type | Method and Description |
|---|---|
String |
getInWsUri(QName qName,
String endpointMappingRef,
String params)
Gets "from" URI for handling incoming WS messages.
|
String |
getOutWsSoap12Uri(String connectionUri,
String messageSenderRef,
String soapAction)
Constructs a "to" URI for sending WS messages to external systems,
i.e., Camel Web Service Endpoint URI for contacting an external system via SOAP 1.2.
|
String |
getOutWsUri(String connectionUri,
String messageSenderRef,
String soapAction)
Constructs a "to" URI for sending WS messages to external systems,
i.e., Camel Web Service Endpoint URI for contacting an external system via SOAP 1.1.
|
public static final String URI_WS_IN
public static final String URI_WS_OUT
public static final String URI_WS12_OUT
public String getOutWsUri(String connectionUri, String messageSenderRef, String soapAction)
WebServiceUriBuildergetOutWsUri in interface WebServiceUriBuilderconnectionUri - the URI to connect to the external system, e.g.: http://localhost:8080/vfmock/ws/mm7messageSenderRef - the message sender ref (bean id/name in Spring context)soapAction - the SOAP action to be invoked,
can be null for implicit handling of SOAP messages by the external systempublic String getOutWsSoap12Uri(String connectionUri, String messageSenderRef, String soapAction)
WebServiceUriBuildergetOutWsSoap12Uri in interface WebServiceUriBuilderconnectionUri - the URI to connect to the external system, e.g.: http://localhost:8080/vfmock/ws/mm7messageSenderRef - the message sender ref (bean id/name in Spring context)soapAction - the SOAP action to be invoked,
can be null for implicit handling of SOAP messages by the external systempublic String getInWsUri(QName qName, String endpointMappingRef, @Nullable String params)
WebServiceUriBuildergetInWsUri in interface WebServiceUriBuilderqName - the operation QName (namespace + local part)endpointMappingRef - the endpoint mapping ref (bean id/name in Spring context)params - the endpoint URI parametersCopyright © 2018 Pivotal Software, Inc.. All rights reserved.