1
resposta

Implementei o exercício e não há saída. Pode ser versão do Camel?

Olá. Implementei a seguinte rota:

final XStream xstream = new XStream();
xstream.alias("negociacao", Negociacao.class);
from("timer://negociacoes?fixedRate=true&delay=3s&period=360s")
        .to("http4://argentumws.caelum.com.br/negociacoes")
        .convertBodyTo(String.class)
        .unmarshal(new XStreamDataFormat(xstream))
        .split(body()).log("${body}").end();

Mas nada é impresso no Console do eclipse. Estou usando uma versão nova do camel e meu maven dependencies está assim:

<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <camel.version>2.24.1</camel.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-http4</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xstream</artifactId>
            <version>2.16.1</version>
        </dependency>

        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.8</version>
        </dependency>

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xmljson</artifactId>
            <version>2.23.3</version>
        </dependency>
        <dependency>
            <groupId>xom</groupId>
            <artifactId>xom</artifactId>
            <version>1.2.5</version>
        </dependency>

Alguma sugestão de mudança?

1 resposta

Se você roda com debug, chega a entrar no método toString de Negociacao?