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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content