com.consol.citrus.dsl.endpoint.CitrusEndpoints Java Examples

The following examples show how to use com.consol.citrus.dsl.endpoint.CitrusEndpoints. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SimulatorWebServiceIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public WebServiceClient simulatorClient() {
    return CitrusEndpoints.soap().client()
            .defaultUri(String.format("http://localhost:%s/services/ws/simulator", 8080))
            .interceptor(loggingClientInterceptor())
            .messageFactory(messageFactory())
            .faultStrategy(ErrorHandlingStrategy.PROPAGATE)
            .build();
}
 
Example #2
Source File: EndpointConfig.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsSyncEndpoint simulatorEndpoint() {
    return CitrusEndpoints.jms()
            .synchronous()
            .connectionFactory(connectionFactory())
            .destination("Citrus.Simulator.Inbound")
            .timeout(10000L)
            .build();
}
 
Example #3
Source File: SimulatorMailIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public MailClient simulatorMailClient() {
    return CitrusEndpoints.mail().client()
            .host("localhost")
            .port(2222)
            .build();
}
 
Example #4
Source File: SimulatorWebServiceClientIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public HttpClient simulatorRestEndpoint() {
    return CitrusEndpoints.http().client()
            .requestUrl(String.format("http://localhost:%s", 8080))
            .contentType(MediaType.APPLICATION_JSON_VALUE)
            .build();
}
 
Example #5
Source File: SimulatorWebServiceClientIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public WebServiceServer testSoapServer() {
    return CitrusEndpoints.soap().server()
            .autoStart(true)
            .port(8090)
            .timeout(5000L)
            .build();
}
 
Example #6
Source File: SimulatorJmsIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public HttpClient simulatorRestEndpoint() {
    return CitrusEndpoints.http().client()
            .requestUrl(String.format("http://localhost:%s", 8080))
            .contentType(MediaType.APPLICATION_JSON_VALUE)
            .build();
}
 
Example #7
Source File: SimulatorJmsIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsEndpoint simulatorStatusEndpoint() {
    return CitrusEndpoints.jms()
            .asynchronous()
            .connectionFactory(connectionFactory())
            .destination("Fax.Status")
            .build();
}
 
Example #8
Source File: SimulatorJmsIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsEndpoint simulatorInboundEndpoint() {
    return CitrusEndpoints.jms()
            .asynchronous()
            .connectionFactory(connectionFactory())
            .destination("Fax.Inbound")
            .build();
}
 
Example #9
Source File: Simulator.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsEndpoint simulatorJmsStatusEndpoint() {
    return CitrusEndpoints.jms()
            .asynchronous()
            .destination(statusDestinationName)
            .connectionFactory(connectionFactory())
            .build();
}
 
Example #10
Source File: SimulatorWebServiceIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public WebServiceClient simulatorClient() {
    return CitrusEndpoints.soap().client()
            .defaultUri(String.format("http://localhost:%s/services/ws/HelloService/v1", 8080))
            .interceptor(loggingClientInterceptor())
            .messageFactory(messageFactory())
            .build();
}
 
Example #11
Source File: GetBeanDefinitionConfig.java    From citrus-admin with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsEndpoint jmsInboundEndpoint() {
    return CitrusEndpoints
            .jms()
            .asynchronous()
            .destination("jms.inbound.queue")
            .build();
}
 
Example #12
Source File: HttpClientConfig.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public HttpClient simulatorHttpClientEndpoint() {
    return CitrusEndpoints.http()
            .client()
            .timeout(defaultTimeout)
            .requestUrl(String.format("https://localhost:%s/", port))
            .requestFactory(sslRequestFactory())
            .build();
}
 
Example #13
Source File: SimulatorJmsIT.java    From citrus-simulator with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsSyncEndpoint simulatorEndpoint() {
    return CitrusEndpoints.jms()
            .synchronous()
            .connectionFactory(connectionFactory())
            .destination("Citrus.Simulator.Inbound")
            .timeout(10000L)
            .build();
}
 
Example #14
Source File: EndpointConfig.java    From camelinaction2 with Apache License 2.0 5 votes vote down vote up
/**
 * Citrus Http client
 * do a sync request/reply over HTTP on localhost:8080/order with a GET call and timeout for 60 seconds
 */
@Bean
public HttpClient statusHttpClient() {
    return CitrusEndpoints.http()
            .client()
            .requestUrl("http://localhost:8080/order")
            .requestMethod(HttpMethod.GET)
            .contentType("text/xml")
            .timeout(60000L)
            .build();
}
 
Example #15
Source File: EndpointConfig.java    From camelinaction2 with Apache License 2.0 5 votes vote down vote up
/**
 * Citrus JMS endpoint
 * do a sync request/reply over JMS on the queue named order.status with a timeout of 10 seconds
 */
@Bean
public JmsEndpoint statusEndpoint() {
    return CitrusEndpoints.jms().synchronous()
        .connectionFactory(jmsConnectionFactory())
        .destination("order.status")
        .timeout(10000L)
        .build();
}
 
Example #16
Source File: AddBeanJavaConfig.java    From citrus-admin with Apache License 2.0 5 votes vote down vote up
@Bean
public HttpClient httpClient() {
    return CitrusEndpoints
            .http()
            .client()
            .requestUrl("http://localhost:8080/foo")
            .build();
}
 
Example #17
Source File: JavaConfig.java    From citrus-admin with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsEndpoint sampleEndpoint() {
    return CitrusEndpoints
            .jms()
            .asynchronous()
            .destination("jms.inbound.queue")
            .build();
}
 
Example #18
Source File: GetBeanDefinitionConfig.java    From citrus-admin with Apache License 2.0 5 votes vote down vote up
@Bean(name = "jmsSyncEndpoint")
public JmsSyncEndpoint jmsEndpoint() {
    return CitrusEndpoints
            .jms()
            .synchronous()
            .destination("jms.inbound.sync.queue")
            .build();
}
 
Example #19
Source File: GetBeanDefinitionConfig.java    From citrus-admin with Apache License 2.0 5 votes vote down vote up
@Bean("httpClient")
public HttpClient client() {
    return CitrusEndpoints
            .http()
            .client()
            .requestUrl("http://localhost:8080/foo")
            .build();
}
 
Example #20
Source File: GetBeanDefinitionConfig.java    From citrus-admin with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsEndpoint jmsOutboundEndpoint() {
    return CitrusEndpoints
            .jms()
            .asynchronous()
            .destination("jms.outbound.queue")
            .build();
}
 
Example #21
Source File: SimulatorRestIT.java    From citrus-simulator with Apache License 2.0 4 votes vote down vote up
@Bean
public HttpClient simulatorUiClient() {
    return CitrusEndpoints.http().client()
            .requestUrl(String.format("http://localhost:%s", 8080))
            .build();
}
 
Example #22
Source File: SimulatorRestIT.java    From citrus-simulator with Apache License 2.0 4 votes vote down vote up
@Bean
public HttpClient petstoreClient() {
    return CitrusEndpoints.http().client()
            .requestUrl(String.format("http://localhost:%s/petstore/v2", 8080))
            .build();
}
 
Example #23
Source File: SimulatorRestIT.java    From citrus-simulator with Apache License 2.0 4 votes vote down vote up
@Bean
public HttpClient simulatorClient() {
    return CitrusEndpoints.http().client()
            .requestUrl(String.format("http://localhost:%s/services/rest/simulator", 8080))
            .build();
}
 
Example #24
Source File: EndpointConfig.java    From citrus-simulator with Apache License 2.0 4 votes vote down vote up
@Bean
public HttpClient simulatorClient() {
    return CitrusEndpoints.http().client()
            .requestUrl(String.format("http://localhost:%s/services/rest/simulator", 8080))
            .build();
}