8

http://static.springsource.org/spring-amqp/docs/1.0.x/reference/html/ mentions the rabbit: namespace, but never mentions what is the schema location. Googling (and naming conventions) ended up with:

http://www.springframework.org/schema/rabbit/spring-rabbit.xsd

but this files does not exist. So where is the xsd?

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
  • Find a spring jar with META-INF/spring.schemas that has a reference to the rabbit xsd. The problem was resolved by adding this maven dependency `code` org.springframework.integration spring-integration-amqp 2.1.3.RELEASE `code` – Bob Sep 27 '12 at 02:35

6 Answers6

9

Today XML schema located at:

http://www.springframework.org/schema/rabbit/spring-rabbit-1.3.xsd
http://www.springframework.org/schema/rabbit/spring-rabbit-1.4.xsd
http://www.springframework.org/schema/rabbit/spring-rabbit-1.5.xsd

Pick any you need!

gavenkoa
  • 45,285
  • 19
  • 251
  • 303
7

As a temporary solution, I'm using this schema location to enable autocomplete. Otherwise it is located in the spring-rabbit jar (but the IDE does not detect it):

That is (from a comment from stacker):

I have the following at the top of my schema declaration:

<?xml version="1.0" encoding="UTF-8"?>
<beans  xmlns="http://www.springframework.org/schema/beans" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p" 
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:rabbit="http://www.springframework.org/schema/rabbit"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-3.1.xsd
            http://www.springframework.org/schema/rabbit
            https://raw.github.com/SpringSource/spring-amqp/master/spring-rabbit/src/main/resources/org/springframework/amqp/rabbit/config/spring-rabbit-1.0.xsd">
Community
  • 1
  • 1
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
6

I confirm Bozho's solution.

So basically at the top of my schema declaration I have the following:

<?xml version="1.0" encoding="UTF-8"?>
<beans  xmlns="http://www.springframework.org/schema/beans" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p" 
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:rabbit="http://www.springframework.org/schema/rabbit"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-3.1.xsd
            http://www.springframework.org/schema/rabbit
            https://raw.github.com/SpringSource/spring-amqp/master/spring-rabbit/src/main/resources/org/springframework/amqp/rabbit/config/spring-rabbit-1.0.xsd">
Community
  • 1
  • 1
stacker
  • 61
  • 2
4

Find a spring jar with META-INF/spring.schemas that has a reference to the rabbit xsd. The problem was resolved in my config by adding this maven dependency

    <dependency>
        <groupId>org.springframework.integration</groupId>
        <artifactId>spring-integration-amqp</artifactId>
        <version>2.1.3.RELEASE</version>
    </dependency>

or

    <dependency>
        <groupId>org.springframework.amqp</groupId>
        <artifactId>spring-rabbit</artifactId>
        <version>1.1.1.RELEASE</version>
    </dependency>
Bob
  • 780
  • 9
  • 10
2

I know this question is older and my answer probably would not have worked at the time of the original question, but in case anyone happens on to this question after today...

The spring rabbit xsd is currently located here:

http://www.springframework.org/schema/rabbit/spring-rabbit-1.0.xsd

And to use it, you must have spring-rabbit-1.0.0.RELEASE.jar in your classpath.

Cris Holdorph
  • 319
  • 1
  • 5
1

It should be included in the AMQP jars. According to this thread you should use the snapshot version instead of RC1 and then you shouldn't receive any errors.

abalogh
  • 8,239
  • 2
  • 34
  • 49