You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Asen <as...@gmail.com> on 2009/02/06 20:42:19 UTC

content enricher EIP help

Hi there-
I have the following scenario:
external WS client -> http-consumer -> content-enricher -> http-provider ->
external WS provider

When I connect the http-consumer to forward to the content-enricher it does
enriching of the
SOAP message content, but then returns (provides back) to the NMR and the
http-consumer picks it up and return it back to the client
instead of forwarding to the http-provider and executing the remote web
service and then go back the same rout to the external client.

By mine understading
<eip:target>
      <eip:exchange-target service="ns:LoggerWebService" /> <!-- this is the
soap-provider ->
    </eip:target>

should designed the next service in the chain. Is that correct?
It seems that my EnricherBean is InOut and it provides back to the NMR where
my http-consumer
picks it up.

I have this settings for the EIP

<eip:content-enricher service="ns:contentEnricher"
endpoint="contentEnricherEP">
    <eip:enricherTarget>
      <eip:exchange-target service="ns:loggerEnricher" />
    </eip:enricherTarget>
    <eip:target>
      <eip:exchange-target service="ns:LoggerWebService" /> <!-- this is the
soap-provider ->
    </eip:target>
  </eip:content-enricher>

<bean:endpoint service="ns:loggerEnricher" endpoint="ns:LoggerEnricherEP"
bean="#enricherBean"/>

  <bean id="enricherBean"
class="com.gallup.webservices.logger.EnricherBean"/>

Any help will be appreciated.

Re: content enricher EIP help

Posted by Asen <as...@gmail.com>.
Yes, I am trying to get request/response behavior.
The initial request is intercepted ( initial payload is "One" ),
modified ( the string "Two" is appended to the initial "One" )
and the final payload of "OneTwo" is reseived by the targeted web service
which
just simply returns back to the client what is received.
So in the end of the day if the remote client send "One"
should receive "OneTwo" as a response.
What would be the right set of EIP components to be used?





On Fri, Feb 6, 2009 at 6:50 PM, Ashwin Karpe <as...@progress.com> wrote:

>
> Hi,
>
> Have you set the defaultMEP in the HTTPConsumer to InOnly or
> RobustInOnly...?
>
> The ContentEnricher works like a Pipeline and expect to receive an InOnly
> or
> RobustInOnlyExchange and send an InOnly Exchange to the HTTPProvider.
>
> The Bean is sent an InOut Exchange...
>
> Looks like you are trying to get request/response behavior for the service.
> You need to choose a different set of EIP components if that is what you
> need.
>
> Cheers,
>
> Ashwin...
>
>
>
> Asen wrote:
> >
> > Hi there-
> > I have the following scenario:
> > external WS client -> http-consumer -> content-enricher -> http-provider
> > ->
> > external WS provider
> >
> > When I connect the http-consumer to forward to the content-enricher it
> > does
> > enriching of the
> > SOAP message content, but then returns (provides back) to the NMR and the
> > http-consumer picks it up and return it back to the client
> > instead of forwarding to the http-provider and executing the remote web
> > service and then go back the same rout to the external client.
> >
> > By mine understading
> > <eip:target>
> >       <eip:exchange-target service="ns:LoggerWebService" /> <!-- this is
> > the
> > soap-provider ->
> >     </eip:target>
> >
> > should designed the next service in the chain. Is that correct?
> > It seems that my EnricherBean is InOut and it provides back to the NMR
> > where
> > my http-consumer
> > picks it up.
> >
> > I have this settings for the EIP
> >
> > <eip:content-enricher service="ns:contentEnricher"
> > endpoint="contentEnricherEP">
> >     <eip:enricherTarget>
> >       <eip:exchange-target service="ns:loggerEnricher" />
> >     </eip:enricherTarget>
> >     <eip:target>
> >       <eip:exchange-target service="ns:LoggerWebService" /> <!-- this is
> > the
> > soap-provider ->
> >     </eip:target>
> >   </eip:content-enricher>
> >
> > <bean:endpoint service="ns:loggerEnricher" endpoint="ns:LoggerEnricherEP"
> > bean="#enricherBean"/>
> >
> >   <bean id="enricherBean"
> > class="com.gallup.webservices.logger.EnricherBean"/>
> >
> > Any help will be appreciated.
> >
> >
>
>
> -----
> ---
> Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence
> Progress Software Corporation
> 14 Oak Park Drive
> Bedford, MA 01730
> ---
> +1-972-304-9084 (Office)
> +1-972-971-1700 (Mobile)
> ----
> Blog: http://opensourceknowledge.blogspot.com/
>
>
> --
> View this message in context:
> http://www.nabble.com/content-enricher-EIP-help-tp21879388p21883701.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: content enricher EIP help

Posted by Ashwin Karpe <as...@progress.com>.
Hi,

Have you set the defaultMEP in the HTTPConsumer to InOnly or
RobustInOnly...?

The ContentEnricher works like a Pipeline and expect to receive an InOnly or
RobustInOnlyExchange and send an InOnly Exchange to the HTTPProvider.

The Bean is sent an InOut Exchange...

Looks like you are trying to get request/response behavior for the service.
You need to choose a different set of EIP components if that is what you
need.

Cheers,

Ashwin...



Asen wrote:
> 
> Hi there-
> I have the following scenario:
> external WS client -> http-consumer -> content-enricher -> http-provider
> ->
> external WS provider
> 
> When I connect the http-consumer to forward to the content-enricher it
> does
> enriching of the
> SOAP message content, but then returns (provides back) to the NMR and the
> http-consumer picks it up and return it back to the client
> instead of forwarding to the http-provider and executing the remote web
> service and then go back the same rout to the external client.
> 
> By mine understading
> <eip:target>
>       <eip:exchange-target service="ns:LoggerWebService" /> <!-- this is
> the
> soap-provider ->
>     </eip:target>
> 
> should designed the next service in the chain. Is that correct?
> It seems that my EnricherBean is InOut and it provides back to the NMR
> where
> my http-consumer
> picks it up.
> 
> I have this settings for the EIP
> 
> <eip:content-enricher service="ns:contentEnricher"
> endpoint="contentEnricherEP">
>     <eip:enricherTarget>
>       <eip:exchange-target service="ns:loggerEnricher" />
>     </eip:enricherTarget>
>     <eip:target>
>       <eip:exchange-target service="ns:LoggerWebService" /> <!-- this is
> the
> soap-provider ->
>     </eip:target>
>   </eip:content-enricher>
> 
> <bean:endpoint service="ns:loggerEnricher" endpoint="ns:LoggerEnricherEP"
> bean="#enricherBean"/>
> 
>   <bean id="enricherBean"
> class="com.gallup.webservices.logger.EnricherBean"/>
> 
> Any help will be appreciated.
> 
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: http://www.nabble.com/content-enricher-EIP-help-tp21879388p21883701.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.