You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Gert Vanthienen (JIRA)" <ji...@apache.org> on 2007/04/27 13:31:36 UTC

[jira] Commented: (SM-902) File Binding example error with JaxenStringXPathExpression

    [ https://issues.apache.org/activemq/browse/SM-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39050 ] 

Gert Vanthienen commented on SM-902:
------------------------------------

I have run into the same issue once again, now while building an Auditor which wants to save all messages being handled by ServiceMix to the disk.  From the moment I read the message content, the stream becomes unusable, so it's impossible to read it for auditing purposes and again within the service that actually needs the contents.

Wouldn't it be better to change our NormalizedMessageImpl to that it automatically transforms any (not-rereadable) StreamSource being set into e.g. a StringSource to solve all these types of problems in one move?  Or would that be too much of a performance overhead?

>  File Binding example error with JaxenStringXPathExpression 
> ------------------------------------------------------------
>
>                 Key: SM-902
>                 URL: https://issues.apache.org/activemq/browse/SM-902
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-components
>    Affects Versions: 3.1
>         Environment: window xp, java1.5, 
>            Reporter: Sangwoo Han
>            Priority: Minor
>         Attachments: SM-902.patch
>
>
> I have tried example-file binding with servicemix3.1 (latest version) 
> and the file generated in outbox was empty !! size zero ! 
> So I commented out the rename part (filename property with JaxenStringXPathExpression) 
> and it generated file with original file content. It worked !! 
> Guillaume Nodet(gnodet) suspects a problem with the input stream which is not converted before evaluating 
> the expression.
> ======
>  <sm:component> 
>     <bean class="org.apache.servicemix.components.file.FileWriter"> 
>       <property name="directory" value="D:/outbox" /> 
>       <property name="marshaler"> 
>         <bean 
>           class="org.apache.servicemix.components.util.DefaultFileMarshaler"> 
>         <!-- <property name="fileName"> 
>            <bean 
>                class="org.apache.servicemix.expression.JaxenStringXPathExpression"> 
>               <constructor-arg 
>                   value="concat('sample_', /sample/@id, '.xml')" /> 
>        </bean> 
>      </property> 
>      --> 
>      </bean> 
>   </property> 
>    </bean> 
>   </sm:component>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.