You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Andrea Zoppello <zo...@tiscali.it> on 2007/03/12 17:05:57 UTC

EIPXPathSplitter + Drools 3.1 Problems??

Hi,

I'm trying to port a service assembly that work correctly in smx 3.0 to 
smx 3.1.

The strutcure of my service assembly is

HTTP(BC) --> EIP XPATH Splitter --> Drools Router -> Stream or Mail

The XPath Splitter split on the xpath expression (/ACTIONS/ACTION ) then
each /ACTION element will be processed and i write a simple drl file that
evaluate the "name" attribute and go to the mail  or to the screen.

The strange thing is that if i've a input like this:
<ACTIONS>
 <ACTION  name="START_ACTION" 
class="it.eng.spago.dispatching.action.util.PublishAction" scope="REQUEST">
    <CONFIG/>
</ACTION>
</ACTIONS>
with only one ACTION inside ACTIONS element it works.

If i've a input like:
<ACTIONS>
 <ACTION  name="START_ACTION" 
class="it.eng.spago.dispatching.action.util.PublishAction" scope="REQUEST">
    <CONFIG/>
</ACTION>
<ACTION  name="TWO" 
class="it.eng.spago.dispatching.action.util.PublishAction" scope="REQUEST">
    <CONFIG/>
</ACTION>
</ACTIONS>
it does not work anymore.

I've write two separated service assembly to test the EIP Xpath splitter 
and Drools 3.1
router separately, and each one seems to get the right behaviour.

The problem is when i try to use the two together.

Does anyone have some suggestion?  

If it's possible i can attach my sa zip file, but i do that the post 
will be rejected.

thanks in advance


Re: EIPXPathSplitter + Drools 3.1 Problems??

Posted by Andrea Zoppello <zo...@tiscali.it>.
Hi Guillaume,

sure
Here there's  the xbean for  http-su:
 <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
        xmlns:http="http://servicemix.apache.org/http/1.0"
        xmlns:foo="http://servicemix.org/cheese">
      
                <http:endpoint
                    defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
                    service="foo:mySplitterTestSplitter"
                    endpoint="myWebServiceTestSplitter"
                    role="consumer"
                    locationURI="http://0.0.0.0:8192/tsplitter/"
                    soap="true">
                </http:endpoint>
</beans>
here there's the xbean for eip-su:
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
        xmlns:eip="http://servicemix.apache.org/eip/1.0"
        xmlns:foo="http://servicemix.org/cheese">

                 <eip:xpath-splitter 
service="foo:mySplitterTestSplitter" endpoint="mySplitterTestSplitter"
                    xpath="/ACTIONS/ACTION">
                    <eip:target>
                        <eip:exchange-target 
service="foo:myRouterTestRouter"/>
                    </eip:target>
                </eip:xpath-splitter>
</beans>

Here there's the xbean for drools-su:
<?xml version="1.0"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
        xmlns:drools="http://servicemix.apache.org/drools/1.0"
        xmlns:foo="http://servicemix.org/cheese>            
                <drools:endpoint service="foo:myRouterTestRouter"
                                         endpoint="myRouterTestRouter"
                                        
 ruleBaseResource="classpath:myRouterTestRouter.drl"/>
</beans>

The the lw-su file ( servicemix.xml )
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
            xmlns:foo="http://servicemix.org/cheese"
            >


<classpath>
    <location>.</location>
</classpath>


<sm:serviceunit id="jbi">
    <sm:activationSpecs>
       
    <!-- ####################### myScreenOutputTestSplitter 
######################## -->
    <sm:activationSpec componentName="myScreenOutputTestSplitter" 
service="foo:myScreenOutputTestSplitter">
        <sm:component>
       <bean  xmlns="http://xbean.org/schemas/spring/1.0"
               
class="org.apache.servicemix.components.util.StreamWriterComponent">
       </bean>
      </sm:component>
    </sm:activationSpec>
       
    <!-- ####################### myMailServerTestSplitter 
######################## -->
    <sm:activationSpec componentName="myMailServerTestSplitter" 
service="foo:myMailServerTestSplitter">
        <sm:component>
       <bean class="org.apache.servicemix.components.email.MimeMailSender">
             <property name="marshaler">
                 <bean 
class="org.apache.servicemix.components.email.MimeMailMarshaler">
                      <property name="from">
                          <bean 
class="org.apache.servicemix.expression.ConstantExpression">
                             <constructor-arg value="ServiceMix" />
                          </bean>
                     </property>
                      <property name="to">
                          <bean 
class="org.apache.servicemix.expression.ConstantExpression">
                             <constructor-arg value="zoppello@eng.it" />
                          </bean>
                     </property>
                      <property name="subject">
                          <bean 
class="org.apache.servicemix.expression.ConstantExpression">
                             <constructor-arg value="wwwww" />
                          </bean>
                     </property>
                      <property name="text">
                          <bean 
class="org.apache.servicemix.expression.ConstantExpression">
                             <constructor-arg value="sdsdsfdfd" />
                          </bean>
                     </property>
                  </bean>
            </property>
             <property name="sender">
                 <bean 
class="org.springframework.mail.javamail.JavaMailSenderImpl">
                      <property name="host"  value="mail.eng.it" />
                      <property name="port"  value="25" />
                  </bean>
            </property>
       </bean>
      </sm:component>
    </sm:activationSpec>
       
    </sm:activationSpecs>
</sm:serviceunit>
</beans>

The drl file packaged in drool-su is:

package org.apache.servicemix.drools
 
import org.apache.servicemix.drools.model.Exchange;

global org.apache.servicemix.drools.model.JbiHelper jbi;

   
    rule "RuleNum1"
    when
        me : Exchange( status == Exchange.ACTIVE, in : in != null )
       
        eval( in.xpath("//ACTION/@name = 'START_ACTION'") )
    then
        jbi.getLogger().debug("****************** me"+ me);
        jbi.getLogger().debug("****************** in"+ in);
        jbi.getLogger().debug("Evaluated as true RuleNum2");
       
          
jbi.route("service:http://servicemix.org/cheese/myMailServerTestSplitter");
    end
   
    rule "RuleNum2"
    when
        me : Exchange( status == Exchange.ACTIVE, in : in != null )
       
        eval( in.xpath("//ACTION/@name != 'START_ACTION'") )
    then
        jbi.getLogger().debug("****************** me"+ me);
        jbi.getLogger().debug("****************** in"+ in);
        jbi.getLogger().debug("Evaluated as true RuleNum3");
       
          
jbi.route("service:http://servicemix.org/cheese/myScreenOutputTestSplitter");
    end
Guillaume Nodet ha scritto:
> Can you just paste your xbean.xml config files ?
> I really don't see any reason why it would not work,
> but maybe a library has changed which gives this side effect ...
>
> On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>>
>> Hi,
>>
>> I'm trying to port a service assembly that work correctly in smx 3.0 to
>> smx 3.1.
>>
>> The strutcure of my service assembly is
>>
>> HTTP(BC) --> EIP XPATH Splitter --> Drools Router -> Stream or Mail
>>
>> The XPath Splitter split on the xpath expression (/ACTIONS/ACTION ) then
>> each /ACTION element will be processed and i write a simple drl file 
>> that
>> evaluate the "name" attribute and go to the mail  or to the screen.
>>
>> The strange thing is that if i've a input like this:
>> <ACTIONS>
>> <ACTION  name="START_ACTION"
>> class="it.eng.spago.dispatching.action.util.PublishAction"
>> scope="REQUEST">
>>     <CONFIG/>
>> </ACTION>
>> </ACTIONS>
>> with only one ACTION inside ACTIONS element it works.
>>
>> If i've a input like:
>> <ACTIONS>
>> <ACTION  name="START_ACTION"
>> class="it.eng.spago.dispatching.action.util.PublishAction"
>> scope="REQUEST">
>>     <CONFIG/>
>> </ACTION>
>> <ACTION  name="TWO"
>> class="it.eng.spago.dispatching.action.util.PublishAction"
>> scope="REQUEST">
>>     <CONFIG/>
>> </ACTION>
>> </ACTIONS>
>> it does not work anymore.
>>
>> I've write two separated service assembly to test the EIP Xpath splitter
>> and Drools 3.1
>> router separately, and each one seems to get the right behaviour.
>>
>> The problem is when i try to use the two together.
>>
>> Does anyone have some suggestion?
>>
>> If it's possible i can attach my sa zip file, but i do that the post
>> will be rejected.
>>
>> thanks in advance
>>
>>
>
>


Re: EIPXPathSplitter + Drools 3.1 Problems??

Posted by Guillaume Nodet <gn...@gmail.com>.
Can you just paste your xbean.xml config files ?
I really don't see any reason why it would not work,
but maybe a library has changed which gives this side effect ...

On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>
> Hi,
>
> I'm trying to port a service assembly that work correctly in smx 3.0 to
> smx 3.1.
>
> The strutcure of my service assembly is
>
> HTTP(BC) --> EIP XPATH Splitter --> Drools Router -> Stream or Mail
>
> The XPath Splitter split on the xpath expression (/ACTIONS/ACTION ) then
> each /ACTION element will be processed and i write a simple drl file that
> evaluate the "name" attribute and go to the mail  or to the screen.
>
> The strange thing is that if i've a input like this:
> <ACTIONS>
> <ACTION  name="START_ACTION"
> class="it.eng.spago.dispatching.action.util.PublishAction"
> scope="REQUEST">
>     <CONFIG/>
> </ACTION>
> </ACTIONS>
> with only one ACTION inside ACTIONS element it works.
>
> If i've a input like:
> <ACTIONS>
> <ACTION  name="START_ACTION"
> class="it.eng.spago.dispatching.action.util.PublishAction"
> scope="REQUEST">
>     <CONFIG/>
> </ACTION>
> <ACTION  name="TWO"
> class="it.eng.spago.dispatching.action.util.PublishAction"
> scope="REQUEST">
>     <CONFIG/>
> </ACTION>
> </ACTIONS>
> it does not work anymore.
>
> I've write two separated service assembly to test the EIP Xpath splitter
> and Drools 3.1
> router separately, and each one seems to get the right behaviour.
>
> The problem is when i try to use the two together.
>
> Does anyone have some suggestion?
>
> If it's possible i can attach my sa zip file, but i do that the post
> will be rejected.
>
> thanks in advance
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: EIPXPathSplitter + Drools 3.1 Problems??

Posted by Guillaume Nodet <gn...@gmail.com>.
Yes, please do.

On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>
> Now it works....
>
> Thanks.
>
> In the next days i will be out of the office, next monday i will put
> a Jira if you agree.
>
> Andrea
>
> Guillaume Nodet ha scritto:
> > Hum, good point.
> > I have already seen such problems, where the xpath expression
> > was evaluated wrt to the root element, instead of the given element.
> > In the XPathSplitter, could you try changing the line 68->74 to:
> >
> >    protected Source[] split(Source main) throws Exception {
> >        SourceTransformer st = new SourceTransformer();
> >        Node doc = new SourceTransformer().toDOMNode(main);
> >        NodeList nodes = (NodeList) xpathExpression.evaluateXPath(doc);
> >        Source[] parts = new Source[nodes.getLength()];
> >        for (int i = 0; i < parts.length; i++) {
> >            parts[i] = new DOMSource(st.toDOMDocument(nodes.item(i)));
> >        }
> >        return parts;
> >    }
> >
> >
> >
> > On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
> >>
> >> Now i try with the log level to DEBUG.
> >>
> >> I've just a doubt. Maybe the problem can arise if the splitter eip
> >> component
> >> and the drools router are evaluating xpath in the same DOM document.
> >>
> >> I don't know the internals but i would expect that when the splitter
> >> components
> >> has done his job the resulting sub-elements will be processes ad
> >> separated documents
> >> not related to the original DOM processed by the splitter.
> >>
> >> What do you think about that??
> >>
> >>
> >> Guillaume Nodet ha scritto:
> >> > Everything looks ok.
> >> > Did you raise the log level to DEBUG and see if it contains
> >> > something interesting ?
> >> >
> >> > On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I'm trying to port a service assembly that work correctly in smx
> >> 3.0 to
> >> >> smx 3.1.
> >> >>
> >> >> The strutcure of my service assembly is
> >> >>
> >> >> HTTP(BC) --> EIP XPATH Splitter --> Drools Router -> Stream or Mail
> >> >>
> >> >> The XPath Splitter split on the xpath expression (/ACTIONS/ACTION )
> >> then
> >> >> each /ACTION element will be processed and i write a simple drl file
> >> >> that
> >> >> evaluate the "name" attribute and go to the mail  or to the screen.
> >> >>
> >> >> The strange thing is that if i've a input like this:
> >> >> <ACTIONS>
> >> >> <ACTION  name="START_ACTION"
> >> >> class="it.eng.spago.dispatching.action.util.PublishAction"
> >> >> scope="REQUEST">
> >> >>     <CONFIG/>
> >> >> </ACTION>
> >> >> </ACTIONS>
> >> >> with only one ACTION inside ACTIONS element it works.
> >> >>
> >> >> If i've a input like:
> >> >> <ACTIONS>
> >> >> <ACTION  name="START_ACTION"
> >> >> class="it.eng.spago.dispatching.action.util.PublishAction"
> >> >> scope="REQUEST">
> >> >>     <CONFIG/>
> >> >> </ACTION>
> >> >> <ACTION  name="TWO"
> >> >> class="it.eng.spago.dispatching.action.util.PublishAction"
> >> >> scope="REQUEST">
> >> >>     <CONFIG/>
> >> >> </ACTION>
> >> >> </ACTIONS>
> >> >> it does not work anymore.
> >> >>
> >> >> I've write two separated service assembly to test the EIP Xpath
> >> splitter
> >> >> and Drools 3.1
> >> >> router separately, and each one seems to get the right behaviour.
> >> >>
> >> >> The problem is when i try to use the two together.
> >> >>
> >> >> Does anyone have some suggestion?
> >> >>
> >> >> If it's possible i can attach my sa zip file, but i do that the post
> >> >> will be rejected.
> >> >>
> >> >> thanks in advance
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: EIPXPathSplitter + Drools 3.1 Problems??

Posted by Andrea Zoppello <zo...@tiscali.it>.
Now it works....

Thanks.

In the next days i will be out of the office, next monday i will put
a Jira if you agree.

Andrea

Guillaume Nodet ha scritto:
> Hum, good point.
> I have already seen such problems, where the xpath expression
> was evaluated wrt to the root element, instead of the given element.
> In the XPathSplitter, could you try changing the line 68->74 to:
>
>    protected Source[] split(Source main) throws Exception {
>        SourceTransformer st = new SourceTransformer();
>        Node doc = new SourceTransformer().toDOMNode(main);
>        NodeList nodes = (NodeList) xpathExpression.evaluateXPath(doc);
>        Source[] parts = new Source[nodes.getLength()];
>        for (int i = 0; i < parts.length; i++) {
>            parts[i] = new DOMSource(st.toDOMDocument(nodes.item(i)));
>        }
>        return parts;
>    }
>
>
>
> On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>>
>> Now i try with the log level to DEBUG.
>>
>> I've just a doubt. Maybe the problem can arise if the splitter eip
>> component
>> and the drools router are evaluating xpath in the same DOM document.
>>
>> I don't know the internals but i would expect that when the splitter
>> components
>> has done his job the resulting sub-elements will be processes ad
>> separated documents
>> not related to the original DOM processed by the splitter.
>>
>> What do you think about that??
>>
>>
>> Guillaume Nodet ha scritto:
>> > Everything looks ok.
>> > Did you raise the log level to DEBUG and see if it contains
>> > something interesting ?
>> >
>> > On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I'm trying to port a service assembly that work correctly in smx 
>> 3.0 to
>> >> smx 3.1.
>> >>
>> >> The strutcure of my service assembly is
>> >>
>> >> HTTP(BC) --> EIP XPATH Splitter --> Drools Router -> Stream or Mail
>> >>
>> >> The XPath Splitter split on the xpath expression (/ACTIONS/ACTION )
>> then
>> >> each /ACTION element will be processed and i write a simple drl file
>> >> that
>> >> evaluate the "name" attribute and go to the mail  or to the screen.
>> >>
>> >> The strange thing is that if i've a input like this:
>> >> <ACTIONS>
>> >> <ACTION  name="START_ACTION"
>> >> class="it.eng.spago.dispatching.action.util.PublishAction"
>> >> scope="REQUEST">
>> >>     <CONFIG/>
>> >> </ACTION>
>> >> </ACTIONS>
>> >> with only one ACTION inside ACTIONS element it works.
>> >>
>> >> If i've a input like:
>> >> <ACTIONS>
>> >> <ACTION  name="START_ACTION"
>> >> class="it.eng.spago.dispatching.action.util.PublishAction"
>> >> scope="REQUEST">
>> >>     <CONFIG/>
>> >> </ACTION>
>> >> <ACTION  name="TWO"
>> >> class="it.eng.spago.dispatching.action.util.PublishAction"
>> >> scope="REQUEST">
>> >>     <CONFIG/>
>> >> </ACTION>
>> >> </ACTIONS>
>> >> it does not work anymore.
>> >>
>> >> I've write two separated service assembly to test the EIP Xpath
>> splitter
>> >> and Drools 3.1
>> >> router separately, and each one seems to get the right behaviour.
>> >>
>> >> The problem is when i try to use the two together.
>> >>
>> >> Does anyone have some suggestion?
>> >>
>> >> If it's possible i can attach my sa zip file, but i do that the post
>> >> will be rejected.
>> >>
>> >> thanks in advance
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Re: EIPXPathSplitter + Drools 3.1 Problems??

Posted by Guillaume Nodet <gn...@gmail.com>.
Hum, good point.
I have already seen such problems, where the xpath expression
was evaluated wrt to the root element, instead of the given element.
In the XPathSplitter, could you try changing the line 68->74 to:

    protected Source[] split(Source main) throws Exception {
        SourceTransformer st = new SourceTransformer();
        Node doc = new SourceTransformer().toDOMNode(main);
        NodeList nodes = (NodeList) xpathExpression.evaluateXPath(doc);
        Source[] parts = new Source[nodes.getLength()];
        for (int i = 0; i < parts.length; i++) {
            parts[i] = new DOMSource(st.toDOMDocument(nodes.item(i)));
        }
        return parts;
    }



On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>
> Now i try with the log level to DEBUG.
>
> I've just a doubt. Maybe the problem can arise if the splitter eip
> component
> and the drools router are evaluating xpath in the same DOM document.
>
> I don't know the internals but i would expect that when the splitter
> components
> has done his job the resulting sub-elements will be processes ad
> separated documents
> not related to the original DOM processed by the splitter.
>
> What do you think about that??
>
>
> Guillaume Nodet ha scritto:
> > Everything looks ok.
> > Did you raise the log level to DEBUG and see if it contains
> > something interesting ?
> >
> > On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
> >>
> >> Hi,
> >>
> >> I'm trying to port a service assembly that work correctly in smx 3.0 to
> >> smx 3.1.
> >>
> >> The strutcure of my service assembly is
> >>
> >> HTTP(BC) --> EIP XPATH Splitter --> Drools Router -> Stream or Mail
> >>
> >> The XPath Splitter split on the xpath expression (/ACTIONS/ACTION )
> then
> >> each /ACTION element will be processed and i write a simple drl file
> >> that
> >> evaluate the "name" attribute and go to the mail  or to the screen.
> >>
> >> The strange thing is that if i've a input like this:
> >> <ACTIONS>
> >> <ACTION  name="START_ACTION"
> >> class="it.eng.spago.dispatching.action.util.PublishAction"
> >> scope="REQUEST">
> >>     <CONFIG/>
> >> </ACTION>
> >> </ACTIONS>
> >> with only one ACTION inside ACTIONS element it works.
> >>
> >> If i've a input like:
> >> <ACTIONS>
> >> <ACTION  name="START_ACTION"
> >> class="it.eng.spago.dispatching.action.util.PublishAction"
> >> scope="REQUEST">
> >>     <CONFIG/>
> >> </ACTION>
> >> <ACTION  name="TWO"
> >> class="it.eng.spago.dispatching.action.util.PublishAction"
> >> scope="REQUEST">
> >>     <CONFIG/>
> >> </ACTION>
> >> </ACTIONS>
> >> it does not work anymore.
> >>
> >> I've write two separated service assembly to test the EIP Xpath
> splitter
> >> and Drools 3.1
> >> router separately, and each one seems to get the right behaviour.
> >>
> >> The problem is when i try to use the two together.
> >>
> >> Does anyone have some suggestion?
> >>
> >> If it's possible i can attach my sa zip file, but i do that the post
> >> will be rejected.
> >>
> >> thanks in advance
> >>
> >>
> >
> >
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: EIPXPathSplitter + Drools 3.1 Problems??

Posted by Andrea Zoppello <zo...@tiscali.it>.
Now i try with the log level to DEBUG.

I've just a doubt. Maybe the problem can arise if the splitter eip component
and the drools router are evaluating xpath in the same DOM document.

I don't know the internals but i would expect that when the splitter 
components
has done his job the resulting sub-elements will be processes ad 
separated documents
not related to the original DOM processed by the splitter.

What do you think about that??


Guillaume Nodet ha scritto:
> Everything looks ok.
> Did you raise the log level to DEBUG and see if it contains
> something interesting ?
>
> On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>>
>> Hi,
>>
>> I'm trying to port a service assembly that work correctly in smx 3.0 to
>> smx 3.1.
>>
>> The strutcure of my service assembly is
>>
>> HTTP(BC) --> EIP XPATH Splitter --> Drools Router -> Stream or Mail
>>
>> The XPath Splitter split on the xpath expression (/ACTIONS/ACTION ) then
>> each /ACTION element will be processed and i write a simple drl file 
>> that
>> evaluate the "name" attribute and go to the mail  or to the screen.
>>
>> The strange thing is that if i've a input like this:
>> <ACTIONS>
>> <ACTION  name="START_ACTION"
>> class="it.eng.spago.dispatching.action.util.PublishAction"
>> scope="REQUEST">
>>     <CONFIG/>
>> </ACTION>
>> </ACTIONS>
>> with only one ACTION inside ACTIONS element it works.
>>
>> If i've a input like:
>> <ACTIONS>
>> <ACTION  name="START_ACTION"
>> class="it.eng.spago.dispatching.action.util.PublishAction"
>> scope="REQUEST">
>>     <CONFIG/>
>> </ACTION>
>> <ACTION  name="TWO"
>> class="it.eng.spago.dispatching.action.util.PublishAction"
>> scope="REQUEST">
>>     <CONFIG/>
>> </ACTION>
>> </ACTIONS>
>> it does not work anymore.
>>
>> I've write two separated service assembly to test the EIP Xpath splitter
>> and Drools 3.1
>> router separately, and each one seems to get the right behaviour.
>>
>> The problem is when i try to use the two together.
>>
>> Does anyone have some suggestion?
>>
>> If it's possible i can attach my sa zip file, but i do that the post
>> will be rejected.
>>
>> thanks in advance
>>
>>
>
>


Re: EIPXPathSplitter + Drools 3.1 Problems??

Posted by Guillaume Nodet <gn...@gmail.com>.
Everything looks ok.
Did you raise the log level to DEBUG and see if it contains
something interesting ?

On 3/12/07, Andrea Zoppello <zo...@tiscali.it> wrote:
>
> Hi,
>
> I'm trying to port a service assembly that work correctly in smx 3.0 to
> smx 3.1.
>
> The strutcure of my service assembly is
>
> HTTP(BC) --> EIP XPATH Splitter --> Drools Router -> Stream or Mail
>
> The XPath Splitter split on the xpath expression (/ACTIONS/ACTION ) then
> each /ACTION element will be processed and i write a simple drl file that
> evaluate the "name" attribute and go to the mail  or to the screen.
>
> The strange thing is that if i've a input like this:
> <ACTIONS>
> <ACTION  name="START_ACTION"
> class="it.eng.spago.dispatching.action.util.PublishAction"
> scope="REQUEST">
>     <CONFIG/>
> </ACTION>
> </ACTIONS>
> with only one ACTION inside ACTIONS element it works.
>
> If i've a input like:
> <ACTIONS>
> <ACTION  name="START_ACTION"
> class="it.eng.spago.dispatching.action.util.PublishAction"
> scope="REQUEST">
>     <CONFIG/>
> </ACTION>
> <ACTION  name="TWO"
> class="it.eng.spago.dispatching.action.util.PublishAction"
> scope="REQUEST">
>     <CONFIG/>
> </ACTION>
> </ACTIONS>
> it does not work anymore.
>
> I've write two separated service assembly to test the EIP Xpath splitter
> and Drools 3.1
> router separately, and each one seems to get the right behaviour.
>
> The problem is when i try to use the two together.
>
> Does anyone have some suggestion?
>
> If it's possible i can attach my sa zip file, but i do that the post
> will be rejected.
>
> thanks in advance
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/