Hi Andre,

On first sight I think this one is not correct:

...
<bean method="generateRequest" ref="xacmlRequest">
            <to uri="activemq:topic:xacml.authzRequests"/>
</bean>
...

should be

<route>
        <from uri="direct:start"/>
        <bean method="generateRequest" ref="xacmlRequest">
        </bean>
          <to uri="activemq:topic:xacml.authzRequests"/>
    </route>

Best regards - Claus

Am Mittwoch, den 15.06.2011, 01:28 +0200 schrieb Andrè <[email protected]>:
i got this class
<code>
public class XacmlRequester {

        @Produce(uri = "activemq:topic:xacml.authzRequests")
        ProducerTemplate producer;

        @InOnly
        @Consume(uri = "file:src/data/requests?noop=true")
        public void generateRequest(File request){
                System.setProperty("com.sun.xacml.ContextSchema",
"schema/access_control-xacml-2.0-context-schema-os.xsd");
                System.setProperty("com.sun.xacml.PolicySchema",
"schema/access_control-xacml-2.0-policy-schema-os.xsd");
                RequestCtx req;
                try {
                        req = RequestCtx.getInstance(new 
FileInputStream(request));
                        producer.sendBody(req);
                } catch (FileNotFoundException e) {
                        System.out.println("datei nicht gefunden");
                        e.printStackTrace();
                } catch (ParsingException e) {
                        System.out.println("Parserfehler");
                        e.printStackTrace();
                }

        }
}
</code>
which i added in the camel-context and in a route this :
 <bean class="de.tarent.abiege.camel.producer.XacmlRequester"
id="xacmlRequest"/>
...
      <route>
        <from uri="direct:start"/>
        <bean method="generateRequest" ref="xacmlRequest">
            <to uri="activemq:topic:xacml.authzRequests"/>
        </bean>
    </route>
      <route>
        <from uri="activemq:topic:xacml.authzRequests"/>
        <log message="request consumed hopefully"/>
        <to uri="file:target/messages/requests"/>
    </route>

So my intention is, consuming an xml Xacml-Request, parsing it and sending
it
but when i let the "camel:run" *g*
there is no log message
but there is something like that
"route6 started and consuming from:
Endpoint[activemq://topic:xacml.authzRequests]"
so where is my request, any idea?


--
View this message in context:

http://camel.465427.n5.nabble.com/what-did-i-forgot-Bean-integration-through-direct-start-tp4490510p4490510.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to