Using the XML payload validation for any random XML

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using the XML payload validation for any random XML

lebuitrago
Hello,

Is there a way to use Citrus' payload validation on any XML that we choose?

For example, can I get an XML, dynamically from somewhere, and inject it into Citrus so I can run something like the following on it?

receive(action -> action.endpoint("${CustomXML_NoTrueEndpointExists}")
        .validate("//vs:Custom",           "CustomValue1")
        .validate("//vs:Custom/Code",  "CustomValue2"));

Basically, I'm looking to leverage Citrus to validate my own XMLs as well, not just those that would come from a service call to some endpoint.

Hope my question is clear.

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Using the XML payload validation for any random XML

Christoph Deppisch
Administrator
You could be using a channel endpoint for that which is a simple in memory endpoint. See channel endpoints for that.

You would then have to send in your XML and receive that very same XML in next step.