Hi,
I'm new to camel (and spring and web services), so apologies if the question
seems obvious. I'm trying to map some of the values received in a web
service call to a new endpoint. To validate what I'm doing I figured I'd
take one of the values from my service and route it to a file using the file
endpoint.
I've defined a web service which can receive calls. Having got my web
service receive calls fine I've defined my camel routing as follows:

    <bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
    <bean id="testProcessor" class="com.company.TestProcessor"></bean>

    <cxf:cxfEndpoint id="notificationEndpoint"
                     address="http://localhost:9080/Notification";
                     serviceClass="com.company.NotificationImpl">
        <cxf:inInterceptors>
            <ref bean="logInbound"/>
        </cxf:inInterceptors>
    </cxf:cxfEndpoint>

    <camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring";>
        <route>
            <from uri="cxf:bean:notificationEndpoint"/>
            <process ref="testProcessor"/>
        </route>
    </camelContext>

I've added in the logging interceptor so I can see what's going on. My web
service again starts fine. I can make calls to it and see the output which
looking something like this:

15-Apr-2008 12:45:57 org.apache.cxf.interceptor.LoggingInInterceptor logging
INFO: Inbound Message
----------------------------
Encoding: UTF-8
Headers: {content-type=[text/xml;charset="utf-8"], connection=[keep-alive],
Host=[localhost:9080], Content-Length=[430], SOAPAction=[""],
User-Agent=[JAX-WS RI 2.1.2_01-hudson-189-], Accept=[text/xml,
multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2]}
Messages: 
Message:

Payload: <?xml version="1.0" ?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/";><S:Body>...</S:Body></S:Envelope>

I added a simple processor just to see what was coming back. I can see a:

org.apache.cxf.message.MessageContentsList 

when I check exchange.getIn(). What is this object? I can see the input
parameter I want is the second item in this list. In my case this is a class
MyMessage which has a getMessage method on it. The JavaDoc for the
MessageContentsList isn't very helpful. I'm not sure what I should be doing
with it, how it gets populated and how I'd know where my class is in the
list.

So, back to the point of my question. How in my route can I get access to
the object of the 'from' endpoint?

I'm using Camel 1.3 and Java 1.6.0_05.
-- 
View this message in context: 
http://www.nabble.com/Handling-CXF-endpoint-values-tp16700361s22882p16700361.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to