Announcement Announcement Module
No announcement yet.
validating interceptor and imported xsd issue? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • validating interceptor and imported xsd issue?

    I'm having an issue trying to use the PayloadValidatingInterceptor.
    My XSD file topic.xsd includes another xsd file Common.xsd
    with a namespace common.

    I then define an element like this:
    <element name="topicRetrieveResponse">
    <element name="topicId" type="int" />
    <element name="topic" type="string" />
    <element name="dateAdd" type="date" />
    <element name="dateUpdate" type="date" />
    <element name="test" type="common:TxInfoType"></element>

    In my application context I want to define the validatingInterceptor, but I have a problem referencing the schema: I can't have to schema properties like this:
    <property name="schema" value="/wsdl/topic.xsd"/>
    <property name="schema" value="/wsdl/Common.xsd"/>

    However including one or the other is wrong. Including just the topic.xsd I get an error trying to find the field in the topic xsd based on Common.xsd:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'validatingInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.xml.validation.XmlValidationEx ception: Could not create Schema: src-resolve: Cannot resolve the name 'common:TxInfoType' to a(n) 'type definition' component.; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'common:TxInfoType' to a(n) 'type definition' component.

    And just including Common.xsd I can't find the fields that are in the Topic.xsd:

    2006-08-04 13:53:56,844 DEBUG [ ameEndpointMapping] - Looking up endpoint for [{}topicRetrieveRequest]
    2006-08-04 13:53:56,876 WARN [ nterceptor] - XML validation error on request: cvc-elt.1: Cannot find the declaration of element 'q0:topicRetrieveRequest'.
    2006-08-04 13:53:56,891 DEBUG [] - MessageDispatcher with name 'messageDispatcher' sends response [[email protected] 9b8d0]

    Which all makes sense, but is it possible to use the validatingInterceptor with an XSD that imports another XSD?
    ... Rich

  • #2
    You will have to use the schemas property to use multiple schema's for the PayloadValidatingInterceptor. This property has been added after the M1 release was released (see, so you will have to use a nightly build or wait for the M2 release (due August 18th).


    • #3

      Thanks Arjen - glad to know there is a solution for this problem.
      ... Rich