Well, there is a third option you may want to consider: JAX-RS You could
easily create a service that accepts an XML POST and returns a new XML. You
could then extend it later to provide other RESTful methods and such if need
be. Just a thought to throw out there. :-)
Of the two you presented, I PERSONALLY prefer generating XSD's and a WSDL,
mostly because I prefer defined contracts. That said, if you generate the
XSD/WSDL, either solution can provide validation and such. Thus, it comes
down to what you prefer.
Dan
On Fri February 19 2010 3:11:52 am Oliver Wulff wrote:
> Hi there
>
> I use CXF usually to implement web services for wsdl-first approach with a
> JAXB/SOAP.
>
> Now, all I have are two samle XML requests and responses which are sent
> over HTTP. I have to implement a tactical solution which will be replaced
> at some stage.
>
> I've found two approaches to implement this:
>
> 1) create XSDs for the above requests and a WSDL with a Pure XML WSDL
> binding. Then I should be able to work as usual (WSDL to java)
>
> 2) Use the "provider services" approach like this:
>
> @WebServiceProvider
> @ServiceMode(value=Service.Mode.PAYLOAD)
> public class stockQuoteProvider implements Provider<DOMSource>
> {
> ...
> }
> Can you recommend one?
>
> Thanks for your feedback
> Oli
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog