Have you looked at SoapUI ? I've used it successfully on many occasions to mock 
SOAP endpoints for Integration Tests.


I'm not surehow far you can push it for WS-Policy but it's worth a look.


If not then it's worth building a JAX-WS Mock Service which behaves like the 
real target and deploying it.

________________________________
From: japearson <japear...@agiledigital.com.au>
Sent: 02 August 2016 12:46:17
To: users@cxf.apache.org
Subject: How to provide mocked/canned responses for CXF SOAP JAX-WS Services?

I'd like to setup a test environment where I can mock SOAP JAX-WS webservices
by providing canned SOAP Body responses in XML files.  I still want CXF to
apply WS-Policy to the response, so that the right signatures are there,
etc.

It would be nice to be able to simply have a generic interface that I can
just provide a WSDL and map operations to responses, with the possibility of
doing it by XPath too.  Which would mean that for a particular operation you
could have a range of canned responses based on different XPath expressions.

Would it be easy to do with CXF?  Can you expose arbitrary endpoints without
writing custom Java Code for each web service?  Ie, I'm happy to have some
common code to set up a bunch of webservices with different WSDL's and
canned responses.

The purpose is so that I can write integration tests for web services that
communicate with other webservices, but I'd like to create mocked/fake
versions of the web service dependencies so that running integration tests
doesn't require all the real web services to be deployed.



--
View this message in context: 
https://apac01.safelinks.protection.outlook.com/?url=http%3a%2f%2fcxf.547215.n5.nabble.com%2fHow-to-provide-mocked-canned-responses-for-CXF-SOAP-JAX-WS-Services-tp5770933.html&data=01%7c01%7cGraeme.Hill%40empired.com%7c554cf96e5e5d43beaedd08d3ba8ff7b8%7cb1ac35c5fd1143baa811f82cc883731f%7c0&sdata=nmw56ZdplfKYM5tv28cpNoqXn%2fUwZcTICsNxuGqPKEg%3d
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to