Hello,

I’ve tried RemoteServiceClient and now I’m trying with HttpConnector as a 
binding component..
I’m using lwcontainer and deploying on it a service assembly.

The client is like this:
                HttpClient client = new HttpClient();
                GetMethod get = new 
GetMethod("http://localhost:8912/test?testProperty=111";);
                try {
                        client.executeMethod(get);
                →       System.out.println(get.getResponseBodyAsString());
                } catch (Exception e) {
                        e.printStackTrace();
                }finally {
                        get.releaseConnection();
                }       


Component bean is:
public class TestBroker extends TransformComponentSupport {

    private static final Log log = LogFactory.getLog(TestBroker.class); 

        protected boolean transform(MessageExchange exchange, NormalizedMessage 
in, NormalizedMessage out) throws MessagingException {
                String test = (String) in.getProperty("testProperty");
                System.out.println("Property received:" + test);
                out.setProperty("testProperty", test + " -- added");
                return true;
        }
}

HttpConnector and Component are configured like this:
        
                  <sm:activationSpec componentName="loanBrokerHttpBinding"
                                     destinationService="lb:test-broker">
                        <sm:component>
                                <bean 
class="org.apache.servicemix.components.http.HttpConnector">
                                        <property name="host" 
value="localhost"/>
                                        <property name="port" value="8912"/>
                                </bean>
                        </sm:component>
                  </sm:activationSpec>
                  <sm:activationSpec componentName="test-broker" 
                             service="lb:test-broker">
                    <sm:component>
                      <bean class="loanbroker.TestBroker" />
                    </sm:component>
                  </sm:activationSpec>

My problem is that I don’t receive the message back, but the component receive 
the request since it print “Property Received: 111”

 
Thanks in advance,
        João

Reply via email to