Ok,
in the case i write my own bean, i have to invoke the token service
inside from my bean? I wouldn't really like that idea. Maybe bpel is
just the better option in this case?

cheers, Johannes
> Content enerichment is a very generic pattern and the default one
> provided by11 servicemix-eip uses a very simple scheme which is to
> aggregate the original request and the response from the service
> called into a single message by concatenating them.
> If it does not suit your needs, as it seems to be the case, you should
> define your own aggregation strategy.  You can do that by extending
> the ContentEnricher class and overriding the needed methods.
> Actually, the ContentEnricher should be split into two classes, one
> would be AbstractContentEnricher that provides the JBI exchange
> processing and the current one would inherit the
> AbstractContentEnricher to provide the default and simple behavior
> (feel free to submit a patch for this if you want).  Btw, another
> enhancement for the ContentEnricher class would be to support sending
> exchanges asynchronously.
>
> Anyway, as the current class is not really extensible, you'd have to
> copy it, modify the enrichment logic and deploy it using the spring
> syntax instead of using the eip namespace:
>
> <beans>
>    <bean id="myEnricherEndpoint" class="youclass">
>      <property name="service" value="uri:service" />
>      <property name="endpoint" value="endpoint" />
>      ...
>    </bean>
> </beans>
>
>
>
> On Mon, Oct 6, 2008 at 5:51 PM, Johannes Elsinghorst
> <[EMAIL PROTECTED]> wrote:
>   
>> Hi Lukasz,
>>
>>     
>>> Here's how ContentEnricher works on SM EIP:
>>> actually it is similar to pipeline but the response from transformation
>>> service is concatenated with the original request like:
>>> <root><orinalRequest>originalMessageContent</originalRequest><tranformerResponse>transformerResponse</transformerResponse>
>>> </root>
>>> (you can customize this tag by CE properties).
>>> Most propably you'll need to do XSLT after that (so CE alone rarely gives
>>> you all what you want).
>>>
>>>       
>> Yes, concatenation is not what i need.
>>     
>>> As for the token service you don't need to write a bean to call it. The
>>> easiest way to call external service is to use CXF Provider (or HTTP
>>> provider if you don't use SOAP).
>>>
>>>       
>> Yes, of  course. My Question was how would i insert the response from
>> the token service invokation into the invokation of the actual service.
>> In theory this should be done
>> via the content enrichment pattern. Or in bpel i would assign the
>> repsonse to a temp variable and use this in the following invokation.
>> How can i do this in a smx way?
>>
>> cheers, Johannes
>>     
>>> regards
>>> Lukasz
>>>
>>>
>>> JMan_JE wrote:
>>>
>>>       
>>>> Hi,
>>>>
>>>> I need to enrich a message sent to a web service with a security token.
>>>> This token is obtained by calling another webservice first.
>>>> So, in theory i have to enrich the actual message with the token, but
>>>> how can i do that using eip (either camel or smx)? Is there an easy way?
>>>> I do not want to write a java bean that is responsible for calling the
>>>> token service or something like that. I could do it via a bpel process,
>>>> but that
>>>>  looks kind of overkill to me. So, can someone point me in the right
>>>> direction?
>>>>
>>>> cheers, Johannes
>>>>
>>>>
>>>>
>>>>         
>>>       
>>     
>
>
>
>   

Reply via email to