Announcement Announcement Module
Collapse
No announcement yet.
Placing schema's in seperate jar Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Placing schema's in seperate jar

    Is it possible to place the schemas for the service contracts in a separate jar, and if so how do you reference this location.

    I've tried just depending on this new schema jar but referencing the location using SimpleXsdSchema throws a ServletContext resource [/xsd/messages.xsd]' does not exit

    The schema bean is
    Code:
    <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
       <property name="xsd" value="/xsd/messages.xsd" />
    </bean>
    And I've got xsd/messages in my schema jars resource directory (Using Maven)

    Thanks

  • #2
    Yes it is possible. We are doing this in our project.

    Just reference the schemas with the standard springframework classpath prefix "classpath:", so in your case that would mean this:

    Code:
    <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
       <property name="xsd" value="classpath:/xsd/messages.xsd" />
    </bean>
    See Spring doc here: http://static.springframework.org/sp...s-dependencies
    Last edited by Paul Nyheim; Jun 9th, 2008, 06:36 AM. Reason: update with link to spring documentation

    Comment

    Working...
    X