[ 
https://issues.apache.org/jira/browse/CAMEL-5503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13442306#comment-13442306
 ] 

Claus Ibsen commented on CAMEL-5503:
------------------------------------

Thanks for the patch. 

1)
I think the attribute should be named to be consistent with our DSL

header -> headerName

eg this is what we use in the DSL
{code:xml}
<xs:complexType name="setHeaderDefinition">
<xs:complexContent>
<xs:extension base="tns:noOutputExpressionNode">
<xs:sequence/>
<xs:attribute name="headerName" type="xs:string" use="required"/>
<xs:anyAttribute namespace="##other" processContents="skip"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
{code}

2)
Don't we have an @XQuery as well? If so it can also apply on this as well.
Its in camel-saxon component.


                
> Expanding Bean Binding annotations to define explicitly what to apply it to
> ---------------------------------------------------------------------------
>
>                 Key: CAMEL-5503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5503
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Alan Foster
>            Assignee: Willem Jiang
>            Priority: Trivial
>         Attachments: CAMEL-5503.patch
>
>
> Currently the bean binding annotations are applied to the body like so :
>     public void doSomething(@XPath("//foo/bar/text()") String someValue) {
>     }
> It would be nice if you could specify what you want to apply it to; for 
> instance you could specify to apply it to headers/properties etc
> In terms of annotations it may look something like:
>     public void doSomething(@XPath("//foo/bar/text()", @Header("someHeader")) 
> String someValue) {
>     }
> For backwards compatability it would of course still apply to the body by 
> default, but we can still offer the ability to use it apply it explicitly ie
>     @XPath("//baz/text(), @Body) String someOtherValue
> I feel like this would be a useful addition to camel's bean binding.
> If anyone feels this is a good idea, I am offering to try it out and see how 
> it goes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to