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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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
>>
>>
>
>