I've been looking at the Camel. It's pretty cool. I attached a patch
to the camel-cxf component which has a lot of "TODOs" but hopefully I
can start contributing. :-) BTW, I am not sure we need to deal with
Destination and Conduit (transport) directly. I think we can use
custom message observer and interceptors in CXF to obtain messages at
various phases of processing.
- William
Index:
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfTest.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfTest.java
(revision 525687)
+++
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfTest.java
(working copy)
@@ -19,32 +19,17 @@
import junit.framework.TestCase;
import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
import org.apache.camel.Processor;
-import org.apache.camel.TypeConverter;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.util.CamelClient;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.cxf.Bus;
import org.apache.cxf.bus.CXFBusFactory;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.transport.Destination;
-import org.apache.cxf.transport.DestinationFactory;
-import org.apache.cxf.transport.DestinationFactoryManager;
-import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.transport.local.LocalConduit;
-import org.apache.cxf.transport.local.LocalTransportFactory;
-import org.xmlsoap.schemas.wsdl.http.AddressType;
+import org.apache.cxf.endpoint.ServerImpl;
+import org.apache.cxf.frontend.ServerFactoryBean;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
/**
* @version $Revision$
@@ -52,104 +37,55 @@
public class CxfTest extends TestCase {
private static final transient Log log = LogFactory.getLog(CxfTest.class);
protected CamelContext camelContext = new DefaultCamelContext();
- protected CamelClient client = new CamelClient(camelContext);
+ protected CamelClient<CxfExchange> client = new
CamelClient<CxfExchange>(camelContext);
- public void testInvokeOfServer() throws Exception {
- // lets register a service
- EndpointInfo ei = new EndpointInfo(null,
"http://schemas.xmlsoap.org/soap/http");
- AddressType a = new AddressType();
- a.setLocation("http://localhost/test");
- ei.addExtensor(a);
+ final private String transportAddress = "http://localhost:28080/test";
+ final private String testMessage = "Hello World!";
+ private ServerImpl server;
+
+ @Override
+ protected void setUp() throws Exception {
+
+ // start a service
+ ServerFactoryBean svrBean = new ServerFactoryBean();
- Bus bus = CXFBusFactory.getDefaultBus();
- DestinationFactoryManager dfm =
bus.getExtension(DestinationFactoryManager.class);
- DestinationFactory factory =
dfm.getDestinationFactory(LocalTransportFactory.TRANSPORT_ID);
+ svrBean.setAddress(transportAddress);
+ svrBean.setServiceClass(HelloServiceImpl.class);
+ svrBean.setBus(CXFBusFactory.getDefaultBus());
- Destination destination = factory.getDestination(ei);
- destination.setMessageObserver(new EchoObserver());
+ server = (ServerImpl)svrBean.create();
+ server.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ if (server != null) {
+ server.stop();
+ }
+ }
+
+ public void testInvokeOfServer() throws Exception {
- // now lets invoke it via Camel
- CxfExchange exchange = (CxfExchange)
client.send("cxf:http://localhost/test", new Processor<Exchange>() {
- public void process(Exchange exchange) {
- exchange.getIn().setHeader("requestHeader", "foo");
- exchange.getIn().setBody("<hello>world</hello>");
- }
- });
+ CxfExchange exchange = (CxfExchange)
+ client.send(getUri(),
+ new Processor<CxfExchange>() {
+ public void process(final CxfExchange exchange) {
+ final List<String> params = new
ArrayList<String>();
+ params.add(testMessage);
+ exchange.getIn().setBody(params);
+ }
+ });
org.apache.camel.Message out = exchange.getOut();
- Message cxfOutMessage = exchange.getOutMessage();
- log.info("Received output message: " + out + " and CXF out: " +
cxfOutMessage);
- assertEquals("replyHeader on CXF", "foo2",
cxfOutMessage.get("replyHeader"));
- assertEquals("replyHeader on Camel", "foo2",
out.getHeader("replyHeader"));
-
- String output = out.getBody(String.class);
- log.info("Received output text: " + output);
+ Object[] output = (Object[])out.getBody();
+ log.info("Received output text: " + output[0]);
+
+ assertEquals("reply body on Camel", testMessage, output[0]);
}
- protected class EchoObserver implements MessageObserver {
- public void onMessage(Message message) {
- try {
- log.info("Received message: " + message + " with content
types: " + message.getContentFormats());
-
- Conduit backChannel =
message.getDestination().getBackChannel(message, null, null);
- message.remove(LocalConduit.DIRECT_DISPATCH);
-
- TypeConverter converter = camelContext.getTypeConverter();
- String request = converter.convertTo(String.class,
message.getContent(InputStream.class));
- log.info("Request body: " + request);
-
- org.apache.cxf.message.Exchange exchange =
message.getExchange();
- MessageImpl reply = new MessageImpl();
- reply.put("foo", "bar");
- assertEquals("foo header", "bar", reply.get("foo"));
-
- reply.put("replyHeader", message.get("requestHeader") + "2");
-
- Set<Map.Entry<String, Object>> entries = reply.entrySet();
- assertEquals("entrySet.size()", 2, entries.size());
-
- //reply.setContent(String.class, "<reply>true</reply>");
- InputStream payload = converter.convertTo(InputStream.class,
"<reply>true</reply>");
- reply.setContent(InputStream.class, payload);
- exchange.setOutMessage(reply);
-
- log.info("sending reply: " + reply);
- backChannel.send(message);
-
-/*
- backChannel.send(message);
-
- OutputStream out = message.getContent(OutputStream.class);
- InputStream in = message.getContent(InputStream.class);
-
- copy(in, out, 1024);
-
- out.close();
- in.close();
-*/
- }
- catch (Exception e) {
- log.error("Caught: " + e, e);
- fail("Caught: " + e);
- }
- }
+ private String getUri() {
+ return "cxf:" + transportAddress
+ + "?sei=org.apache.camel.component.cxf.HelloService&method=echo";
}
-
- private static void copy(final InputStream input, final OutputStream
output, final int bufferSize)
- throws IOException {
- try {
- final byte[] buffer = new byte[bufferSize];
-
- int n = input.read(buffer);
- while (-1 != n) {
- output.write(buffer, 0, n);
- n = input.read(buffer);
- }
- }
- finally {
- input.close();
- output.close();
- }
- }
}
Index:
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/HelloService.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/HelloService.java
(revision 0)
+++
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/HelloService.java
(revision 0)
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.camel.component.cxf;
+
+public interface HelloService {
+ String sayHello();
+ void ping();
+ String echo(String text);
+}
Property changes on:
C:\repos\camel\trunk\camel-cxf\src\test\java\org\apache\camel\component\cxf\HelloService.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Index:
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/HelloServiceImpl.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/HelloServiceImpl.java
(revision 0)
+++
C:/repos/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/HelloServiceImpl.java
(revision 0)
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.camel.component.cxf;
+
+public class HelloServiceImpl implements HelloService {
+
+ public String echo(String text) {
+ return text;
+ }
+
+ public void ping() {
+
+ }
+
+ public String sayHello() {
+ return "hello";
+ }
+
+}
+
Property changes on:
C:\repos\camel\trunk\camel-cxf\src\test\java\org\apache\camel\component\cxf\HelloServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Index:
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
(revision 525687)
+++
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
(working copy)
@@ -17,14 +17,14 @@
*/
package org.apache.camel.component.cxf;
+import java.util.Properties;
+
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.impl.DefaultEndpoint;
-import org.apache.cxf.BusException;
+import org.apache.cxf.Bus;
import org.apache.cxf.message.Message;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.local.LocalTransportFactory;
/**
* The endpoint in the service engine
@@ -34,21 +34,21 @@
public class CxfEndpoint extends DefaultEndpoint<CxfExchange> {
private CxfBinding binding;
private final CxfComponent component;
- private final EndpointInfo endpointInfo;
private boolean inOut = true;
+ private Properties properties;
- public CxfEndpoint(String uri, CxfComponent component, EndpointInfo
endpointInfo) {
+ public CxfEndpoint(String uri, CxfComponent component, Properties
properties) {
super(uri, component);
this.component = component;
- this.endpointInfo = endpointInfo;
+ this.properties = properties;
}
public Producer<CxfExchange> createProducer() throws Exception {
- return startService(new CxfProducer(this, getLocalTransportFactory()));
+ return startService(new CxfProducer(this));
}
public Consumer<CxfExchange> createConsumer(Processor<CxfExchange>
processor) throws Exception {
- return startService(new CxfConsumer(this, processor,
getLocalTransportFactory()));
+ return startService(new CxfConsumer(this, processor));
}
public CxfExchange createExchange() {
@@ -78,15 +78,15 @@
this.inOut = inOut;
}
- public LocalTransportFactory getLocalTransportFactory() throws
BusException {
- return component.getLocalTransportFactory();
+ public CxfComponent getComponent() {
+ return component;
}
-
- public EndpointInfo getEndpointInfo() {
- return endpointInfo;
+
+ public String getProperty(String key) {
+ return properties.getProperty(key);
}
- public CxfComponent getComponent() {
- return component;
+ public Bus getBus() {
+ return component.getBus();
}
}
Index:
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
(revision 525687)
+++
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
(working copy)
@@ -19,61 +19,65 @@
import java.net.URI;
import java.util.Map;
+import java.util.Properties;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.impl.DefaultComponent;
import org.apache.cxf.Bus;
-import org.apache.cxf.BusException;
import org.apache.cxf.bus.CXFBusFactory;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.DestinationFactoryManager;
-import org.apache.cxf.transport.local.LocalTransportFactory;
-import org.xmlsoap.schemas.wsdl.http.AddressType;
/**
* @version $Revision$
*/
public class CxfComponent extends DefaultComponent<CxfExchange> {
- private LocalTransportFactory localTransportFactory;
+ private Bus bus;
public CxfComponent() {
+ bus = CXFBusFactory.getDefaultBus();
}
public CxfComponent(CamelContext context) {
super(context);
+ bus = CXFBusFactory.getDefaultBus();
}
@Override
protected Endpoint<CxfExchange> createEndpoint(String uri, String
remaining, Map parameters) throws Exception {
- URI u = new URI(remaining);
-
- // TODO this is a hack!!!
- EndpointInfo endpointInfo = new EndpointInfo(null,
"http://schemas.xmlsoap.org/soap/http");
- AddressType a = new AddressType();
- a.setLocation(remaining);
- endpointInfo.addExtensor(a);
-
- return new CxfEndpoint(uri, this, endpointInfo);
+ return new CxfEndpoint(getAddress(remaining), this,
getQueryAsProperties(new URI(remaining)));
}
- public LocalTransportFactory getLocalTransportFactory() throws
BusException {
- if (localTransportFactory == null) {
- localTransportFactory = findLocalTransportFactory();
- if (localTransportFactory == null) {
- localTransportFactory = new LocalTransportFactory();
+ /**
+ * Read query parameters from uri
+ * @param u
+ * @return parameter value pairs as properties
+ */
+ private Properties getQueryAsProperties(URI u) {
+ Properties retval = new Properties();
+ if (u.getQuery() != null) {
+ String [] parameters = u.getQuery().split("&");
+ for (int i = 0; i < parameters.length; i++) {
+ String[] s = parameters[i].split("=");
+ retval.put(s[0], s[1]);
}
}
- return localTransportFactory;
+ return retval;
}
-
- public void setLocalTransportFactory(LocalTransportFactory
localTransportFactory) {
- this.localTransportFactory = localTransportFactory;
+
+ /**
+ * Remove query from uri
+ * @param uri
+ * @return substring before the "?" character
+ */
+ private String getAddress(String uri) {
+ int index = uri.indexOf("?");
+ if (-1 != index) {
+ return uri.substring(0, index);
+ }
+ return uri;
}
- protected LocalTransportFactory findLocalTransportFactory() throws
BusException {
- Bus bus = CXFBusFactory.getDefaultBus();
- DestinationFactoryManager dfm =
bus.getExtension(DestinationFactoryManager.class);
- return (LocalTransportFactory)
dfm.getDestinationFactory(LocalTransportFactory.TRANSPORT_ID);
+ public Bus getBus() {
+ return bus;
}
}
Index:
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
(revision 525687)
+++
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
(working copy)
@@ -19,18 +19,10 @@
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.impl.DefaultProducer;
-import org.apache.cxf.message.ExchangeImpl;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.transport.Destination;
-import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.transport.local.LocalConduit;
-import org.apache.cxf.transport.local.LocalTransportFactory;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientFactoryBean;
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
+import java.util.List;
/**
* Sends messages from Camel into the CXF endpoint
@@ -38,88 +30,53 @@
* @version $Revision$
*/
public class CxfProducer extends DefaultProducer<CxfExchange> {
- private CxfEndpoint endpoint;
- private final LocalTransportFactory transportFactory;
- private Destination destination;
- private Conduit conduit;
- private ResultFuture future = new ResultFuture();
+ private CxfEndpoint cxfEndpoint;
+ private Client client;
- public CxfProducer(CxfEndpoint endpoint, LocalTransportFactory
transportFactory) {
+ public CxfProducer(CxfEndpoint endpoint) {
super(endpoint);
- this.endpoint = endpoint;
- this.transportFactory = transportFactory;
+ cxfEndpoint = endpoint;
}
public void process(CxfExchange exchange) {
- try {
- CxfBinding binding = endpoint.getBinding();
- MessageImpl m = binding.createCxfMessage(exchange);
- ExchangeImpl e = new ExchangeImpl();
- e.setInMessage(m);
- m.put(LocalConduit.DIRECT_DISPATCH, Boolean.TRUE);
- m.setDestination(destination);
- synchronized (conduit) {
- conduit.send(m);
- // now lets wait for the response
- if (endpoint.isInOut()) {
- Message response = future.getResponse();
-
- // TODO - why do we need to ignore the returned message
and get the out message from the exchange!
- response = e.getOutMessage();
- binding.storeCxfResponse(exchange, response);
- }
- }
- }
- catch (IOException e) {
+ List params = exchange.getIn().getBody(List.class);
+ Object[] response = null;
+ try {
+ response =
client.invoke(cxfEndpoint.getProperty(CxfConstants.METHOD), params.toArray());
+ } catch (Exception e) {
throw new RuntimeCamelException(e);
}
+
+ CxfBinding binding = cxfEndpoint.getBinding();
+ binding.storeCxfResponse(exchange, response);
}
@Override
protected void doStart() throws Exception {
super.doStart();
- EndpointInfo endpointInfo = endpoint.getEndpointInfo();
- destination = transportFactory.getDestination(endpointInfo);
-
- // Set up a listener for the response
- conduit = transportFactory.getConduit(endpointInfo);
- conduit.setMessageObserver(future);
+
+ // TODO Add support for sending message inputstream. Currently, we
only handle
+ // method invocation with pojo.
+
+ // TODO Add support for endpoints associated with a WSDL
+ if (client == null) {
+ ClientFactoryBean cfBean = new ClientFactoryBean();
+ cfBean.setAddress(getEndpoint().getEndpointUri());
+ cfBean.setBus(cxfEndpoint.getBus());
+
cfBean.setServiceClass(Class.forName(cxfEndpoint.getProperty(CxfConstants.SEI)));
+ client = cfBean.create();
+ }
}
@Override
protected void doStop() throws Exception {
- super.doStop();
-
- if (conduit != null) {
- conduit.close();
+ if (client != null) {
+ client.getConduit().close();
+ client = null;
}
+
+ super.doStop();
}
- protected class ResultFuture implements MessageObserver {
- Message response;
- CountDownLatch latch = new CountDownLatch(1);
-
- public Message getResponse() {
- while (response == null) {
- try {
- latch.await();
- }
- catch (InterruptedException e) {
- // ignore
- }
- }
- return response;
- }
-
- public synchronized void onMessage(Message message) {
- try {
- message.remove(LocalConduit.DIRECT_DISPATCH);
- this.response = message;
- }
- finally {
- latch.countDown();
- }
- }
- }
}
Index:
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
(revision 525687)
+++
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
(working copy)
@@ -75,4 +75,11 @@
out.setBody(getBody(response));
}
}
+
+ public void storeCxfResponse(CxfExchange exchange, Object response) {
+ CxfMessage out = exchange.getOut();
+ if (response != null) {
+ out.setBody(response);
+ }
+ }
}
Index:
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
(revision 525687)
+++
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
(working copy)
@@ -19,10 +19,9 @@
import org.apache.camel.Processor;
import org.apache.camel.impl.DefaultConsumer;
+import org.apache.cxf.endpoint.ServerImpl;
+import org.apache.cxf.frontend.ServerFactoryBean;
import org.apache.cxf.message.Message;
-import org.apache.cxf.transport.Destination;
-import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.transport.local.LocalTransportFactory;
/**
* A consumer of exchanges for a service in CXF
@@ -30,38 +29,48 @@
* @version $Revision$
*/
public class CxfConsumer extends DefaultConsumer<CxfExchange> {
- private CxfEndpoint endpoint;
- private final LocalTransportFactory transportFactory;
- private Destination destination;
+ protected CxfEndpoint cxfEndpoint;
+ private ServerImpl server;
- public CxfConsumer(CxfEndpoint endpoint, Processor<CxfExchange> processor,
LocalTransportFactory transportFactory) {
+ public CxfConsumer(CxfEndpoint endpoint, Processor<CxfExchange> processor)
{
super(endpoint, processor);
- this.endpoint = endpoint;
- this.transportFactory = transportFactory;
+ this.cxfEndpoint = endpoint;
}
@Override
protected void doStart() throws Exception {
super.doStart();
- destination =
transportFactory.getDestination(endpoint.getEndpointInfo());
- destination.setMessageObserver(new MessageObserver() {
- public void onMessage(Message message) {
- incomingCxfMessage(message);
- }
- });
+ // TODO we need to add custom cxf message observer and wire the
+ // incomingCxfMessage method. Also, custom cxf interceptors are
+ // needed in order to object SOAP/XML message. Currently, the
+ // CXF service invoker will invoke the service class.
+ if (server != null) {
+ // start a cxf service
+ ServerFactoryBean svrBean = new ServerFactoryBean();
+
+ svrBean.setAddress(getEndpoint().getEndpointUri());
+
svrBean.setServiceClass(Class.forName(cxfEndpoint.getProperty(CxfConstants.IMPL)));
+ svrBean.setBus(cxfEndpoint.getBus());
+
+ server = (ServerImpl)svrBean.create();
+ server.start();
+ }
}
@Override
protected void doStop() throws Exception {
- if (destination != null) {
- destination.shutdown();
+ if (server != null) {
+ server.stop();
+ server = null;
}
+
super.doStop();
}
+ // TODO this method currently is not being called.
protected void incomingCxfMessage(Message message) {
- CxfExchange exchange = endpoint.createExchange(message);
+ CxfExchange exchange = cxfEndpoint.createExchange(message);
getProcessor().process(exchange);
}
}
Index:
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
===================================================================
---
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
(revision 0)
+++
C:/repos/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
(revision 0)
@@ -0,0 +1,33 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.camel.component.cxf;
+
+/**
+ * Constants used in this module
+ *
+ * @version $Revision$
+ */
+public interface CxfConstants {
+
+ String METHOD = "method";
+ String SEI = "sei";
+ String IMPL = "impl";
+
+}
Property changes on:
C:\repos\camel\trunk\camel-cxf\src\main\java\org\apache\camel\component\cxf\CxfConstants.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Index: C:/repos/camel/trunk/camel-cxf/pom.xml
===================================================================
--- C:/repos/camel/trunk/camel-cxf/pom.xml (revision 525687)
+++ C:/repos/camel/trunk/camel-cxf/pom.xml (working copy)
@@ -22,6 +22,10 @@
<modelVersion>4.0.0</modelVersion>
+ <properties>
+ <cxf.version>2.0-incubator-RC-SNAPSHOT</cxf.version>
+ </properties>
+
<parent>
<groupId>org.apache.camel</groupId>
<artifactId>camel-parent</artifactId>
@@ -51,25 +55,38 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-local</artifactId>
- <version>2.0-incubator-RC-SNAPSHOT</version>
+ <version>${cxf.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${cxf.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-simple</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-management</artifactId>
- <version>2.0-incubator-RC-SNAPSHOT</version>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-testutils</artifactId>
- <version>2.0-incubator-RC-SNAPSHOT</version>
+ <version>${cxf.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-tools-common</artifactId>
- <version>2.0-incubator-RC-SNAPSHOT</version>
+ <version>${cxf.version}</version>
</dependency>