How to perform request validation using jaxrs via XSD in fuse ?

Solution Verified - Updated -

Issue

  • User is trying to validate incoming jax-rs requests using XSD validation. However, deploying the project fails with error
11:31:47,125 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | 21 - org.apache.aries.blueprint.core - 1.4.2 | Unable to start blueprint container for bundle camel-blueprint
java.lang.NullPointerException
    at org.apache.aries.blueprint.container.RecipeBuilder.getValue(RecipeBuilder.java:355)[21:org.apache.aries.blueprint.core:1.4.2]
    at org.apache.aries.blueprint.container.RecipeBuilder.getValue(RecipeBuilder.java:334)[21:org.apache.aries.blueprint.core:1.4.2]
    at org.apache.aries.blueprint.container.RecipeBuilder.createBeanRecipe(RecipeBuilder.java:278)[21:org.apache.aries.blueprint.core:1.4.2]
[...]
  • REST service endpoint is configured following way
<cxf:rsServer id="rsServer" address="/xsdvalidation"
            loggingFeatureEnabled="false" loggingSizeLimit="20">

        <cxf:schemaLocations>
            <cxf:schemaLocation>/SampleRequest.xsd</cxf:schemaLocation>
        </cxf:schemaLocations>

        <cxf:serviceBeans>
            <bean id="restServiceDefinition" class="xxx.yyy.zzz.SampleServiceImpl" />
        </cxf:serviceBeans>
    </cxf:rsServer>
  • How can user validate requests using XSD's?

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.