Nitesh Jain
Nitesh Jain

Reputation: 177

How to write a cxf service that uses plain xml over http

I have developed REST and SOAP services using Apache CXF,was wondering if i could develop a service that takes xml over http and validates using XSD.

Developed a REST service which accepts xml, but wanted a pure XML based service.

is there any example that i can start with ?

Thanks.

Upvotes: 0

Views: 191

Answers (1)

bgossit
bgossit

Reputation: 1086

For a plain HTTP service with XML validation you can combine the Jetty HTTP component with the Validation component.

For example, it could be as simple as:

<route>
    <from uri="jetty:http://0.0.0.0/myapp/myservice" />
    <to uri="validator:myschema.xsd" />
    <!-- other components -->
</route>

And send your XML as the HTTP POST body.

Upvotes: 1

Related Questions