For a component test with Citrus Framework I simulate a backend system that is called through SOAP.
<citrus-ws:server id="backendSimulationServer"
port="8080"
auto-start="true"
interceptors="serverInterceptors"
timeout="5000"/>
I get SOAP requests from the component and send back responses.
runner.receive(action -> action.endpoint("backendSimulationServer")
.name("search-request")
.payload(new ClassPathResource("testfiles/search-request-expectation.xml"))
);
runner.send(action -> action.endpoint("backendSimulationServer")
.name("search-response")
.payload(new ClassPathResource("testfiles/search-response.xml"))
);
But now I have to answer to a request with an MTOM attachment response. I found the citrus example that uses .attachment
on a soap().client()
, but .attachment
is not available for my server simulation.
Is this possible with Java DSL or do I re-write the testcase in XML DSL to achieve this?