Author: dkulp
Date: Wed May 23 17:11:57 2012
New Revision: 1341951
URL: http://svn.apache.org/viewvc?rev=1341951&view=rev
Log:
[CAMEL-4641] Part 2 - get a very basic cxf_message mode test working
Added:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
(with props)
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/RAWDataFormatFeature.java
- copied, changed from r1341854,
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest.java
(with props)
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest-context.xml
(with props)
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java?rev=1341951&r1=1341950&r2=1341951&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
Wed May 23 17:11:57 2012
@@ -43,8 +43,9 @@ import org.apache.camel.RuntimeCamelExce
import org.apache.camel.Service;
import org.apache.camel.component.cxf.common.header.CxfHeaderFilterStrategy;
import org.apache.camel.component.cxf.common.message.CxfConstants;
-import org.apache.camel.component.cxf.feature.MessageDataFormatFeature;
+import org.apache.camel.component.cxf.feature.CXFMessageDataFormatFeature;
import org.apache.camel.component.cxf.feature.PayLoadDataFormatFeature;
+import org.apache.camel.component.cxf.feature.RAWDataFormatFeature;
import org.apache.camel.impl.DefaultEndpoint;
import org.apache.camel.impl.SynchronousDelegateProducer;
import org.apache.camel.spi.HeaderFilterStrategy;
@@ -61,6 +62,7 @@ import org.apache.cxf.common.injection.R
import org.apache.cxf.common.util.ClassHelper;
import org.apache.cxf.common.util.ModCountCopyOnWriteArrayList;
import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.databinding.source.SourceDataBinding;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.ClientImpl;
import org.apache.cxf.endpoint.Endpoint;
@@ -207,7 +209,6 @@ public class CxfEndpoint extends Default
// address
sfb.setAddress(getAddress());
- // service class
sfb.setServiceClass(cls);
sfb.setInInterceptors(in);
@@ -259,8 +260,11 @@ public class CxfEndpoint extends Default
if (!CxfEndpointUtils.hasAnnotation(cls, WebServiceProvider.class)) {
if (getDataFormat() == DataFormat.PAYLOAD) {
sfb.getFeatures().add(new
PayLoadDataFormatFeature(allowStreaming));
+ } else if (getDataFormat().dealias() == DataFormat.CXF_MESSAGE) {
+ sfb.getFeatures().add(new CXFMessageDataFormatFeature());
+ sfb.setDataBinding(new SourceDataBinding());
} else if (getDataFormat().dealias() == DataFormat.RAW) {
- MessageDataFormatFeature feature = new
MessageDataFormatFeature();
+ RAWDataFormatFeature feature = new RAWDataFormatFeature();
feature.addInIntercepters(getInInterceptors());
feature.addOutInterceptors(getOutInterceptors());
sfb.getFeatures().add(feature);
@@ -282,7 +286,7 @@ public class CxfEndpoint extends Default
}
// set the document-literal wrapped style
- if (getWrappedStyle() != null) {
+ if (getWrappedStyle() != null && getDataFormat().dealias() !=
DataFormat.CXF_MESSAGE) {
sfb.getServiceFactory().setWrapped(getWrappedStyle());
}
@@ -419,10 +423,13 @@ public class CxfEndpoint extends Default
// apply feature here
if (getDataFormat().dealias() == DataFormat.RAW) {
- MessageDataFormatFeature feature = new MessageDataFormatFeature();
+ RAWDataFormatFeature feature = new RAWDataFormatFeature();
feature.addInIntercepters(getInInterceptors());
feature.addOutInterceptors(getOutInterceptors());
factoryBean.getFeatures().add(feature);
+ } else if (getDataFormat().dealias() == DataFormat.CXF_MESSAGE) {
+ factoryBean.getFeatures().add(new CXFMessageDataFormatFeature());
+ factoryBean.setDataBinding(new SourceDataBinding());
} else if (getDataFormat() == DataFormat.PAYLOAD) {
factoryBean.getFeatures().add(new
PayLoadDataFormatFeature(allowStreaming));
factoryBean.setDataBinding(new HybridSourceDataBinding());
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java?rev=1341951&r1=1341950&r2=1341951&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
Wed May 23 17:11:57 2012
@@ -306,6 +306,9 @@ public class CxfProducer extends Default
} else if (endpoint.getDataFormat().dealias() == DataFormat.RAW) {
params = new Object[1];
params[0] = exchange.getIn().getMandatoryBody(InputStream.class);
+ } else if (endpoint.getDataFormat().dealias() ==
DataFormat.CXF_MESSAGE) {
+ params = new Object[1];
+ params[0] = exchange.getIn().getBody();
}
if (LOG.isTraceEnabled()) {
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java?rev=1341951&r1=1341950&r2=1341951&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java
Wed May 23 17:11:57 2012
@@ -52,7 +52,6 @@ public enum DataFormat {
* CXF_MESSAGE is the message that is received from the transport layer
* and then processed through the full set of CXF interceptors. This
* provides the same functionality as the CXF MESSAGE mode providers.
- * Streaming and non-streaming are both supported.
*/
CXF_MESSAGE,
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java?rev=1341951&r1=1341950&r2=1341951&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
Wed May 23 17:11:57 2012
@@ -618,6 +618,9 @@ public class DefaultCxfBinding implement
} else if (dataFormat.dealias() == DataFormat.RAW) {
answer = message.getContent(InputStream.class);
+
+ } else if (dataFormat.dealias() == DataFormat.CXF_MESSAGE) {
+ answer = message.getContent(List.class).get(0);
}
LOG.trace("Extracted body from CXF message = {}", answer);
@@ -722,6 +725,8 @@ public class DefaultCxfBinding implement
answer = out.getBody(CxfPayload.class);
} else if (dataFormat.dealias() == DataFormat.RAW) {
answer = out.getBody(InputStream.class);
+ } else if (dataFormat.dealias() == DataFormat.CXF_MESSAGE) {
+ answer = out.getBody();
}
return answer;
}
Added:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java?rev=1341951&view=auto
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
(added)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
Wed May 23 17:11:57 2012
@@ -0,0 +1,125 @@
+/**
+ * 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.feature;
+
+import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.Source;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.binding.Binding;
+import org.apache.cxf.binding.soap.SoapBinding;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
+import org.apache.cxf.jaxws.interceptors.MessageModeInInterceptor;
+import org.apache.cxf.jaxws.interceptors.MessageModeOutInterceptor;
+import org.apache.cxf.service.model.BindingMessageInfo;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.MessageInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * MessageDataFormatFeature sets up the CXF endpoint interceptor for handling
the
+ * Message in Message data format.
+ * </p>
+ */
+public class CXFMessageDataFormatFeature extends AbstractDataFormatFeature {
+ private static final Logger LOG =
LoggerFactory.getLogger(CXFMessageDataFormatFeature.class);
+
+
+ @Override
+ public void initialize(Client client, Bus bus) {
+ setupEndpoint(client.getEndpoint());
+ }
+
+ @Override
+ public void initialize(Server server, Bus bus) {
+ setupEndpoint(server.getEndpoint());
+ }
+
+ protected void setupEndpoint(Endpoint ep) {
+ resetPartTypes(ep.getBinding());
+
+ Class<?> fmt = Source.class;
+ if (ep.getBinding() instanceof SoapBinding) {
+ ep.getInInterceptors().add(new SAAJInInterceptor());
+ SAAJOutInterceptor out = new SAAJOutInterceptor();
+ ep.getOutInterceptors().add(out);
+ ep.getOutInterceptors().add(new MessageModeOutInterceptor(out,
ep.getBinding().getBindingInfo().getName()));
+ fmt = SOAPMessage.class;
+ } else {
+ ep.getOutInterceptors().add(new
MessageModeOutInterceptor(Source.class,
ep.getBinding().getBindingInfo().getName()));
+ }
+ ep.getInInterceptors().add(new MessageModeInInterceptor(fmt,
ep.getBinding().getBindingInfo().getName()));
+ ep.put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS,
Boolean.TRUE);
+ }
+
+ @Override
+ protected Logger getLogger() {
+ return LOG;
+ }
+
+ private void resetPartTypes(Binding bop2) {
+ // The HypbridSourceDatabinding, based on JAXB, will possibly set
+ // JAXB types into the parts. Since we need the Source objects,
+ // we'll reset the types to either Source (for streaming), or null
+ // (for non-streaming, defaults to DOMSource.
+ for (BindingOperationInfo bop : bop2.getBindingInfo().getOperations())
{
+ resetPartTypes(bop);
+ }
+ }
+
+ private void resetPartTypes(BindingOperationInfo bop) {
+ if (bop.isUnwrapped()) {
+ bop = bop.getWrappedOperation();
+ }
+ if (bop.isUnwrappedCapable()) {
+
resetPartTypeClass(bop.getWrappedOperation().getOperationInfo().getInput());
+
resetPartTypeClass(bop.getWrappedOperation().getOperationInfo().getOutput());
+ resetPartTypeClass(bop.getWrappedOperation().getInput());
+ resetPartTypeClass(bop.getWrappedOperation().getOutput());
+ }
+ resetPartTypeClass(bop.getOperationInfo().getInput());
+ resetPartTypeClass(bop.getOperationInfo().getOutput());
+ resetPartTypeClass(bop.getInput());
+ resetPartTypeClass(bop.getOutput());
+ }
+
+ protected void resetPartTypeClass(BindingMessageInfo bmi) {
+ if (bmi != null) {
+ int size = bmi.getMessageParts().size();
+ for (int x = 0; x < size; x++) {
+ bmi.getMessageParts().get(x).setTypeClass(Source.class);
+ }
+ }
+ }
+ protected void resetPartTypeClass(MessageInfo msgInfo) {
+ if (msgInfo != null) {
+ int size = msgInfo.getMessageParts().size();
+ for (int x = 0; x < size; x++) {
+ msgInfo.getMessageParts().get(x).setTypeClass(Source.class);
+ }
+ }
+ }
+
+}
Propchange:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/CXFMessageDataFormatFeature.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java?rev=1341951&r1=1341950&r2=1341951&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java
Wed May 23 17:11:57 2012
@@ -17,16 +17,6 @@
package org.apache.camel.component.cxf.feature;
-import
org.apache.camel.component.cxf.interceptors.RawMessageContentRedirectInterceptor;
-import org.apache.cxf.Bus;
-import org.apache.cxf.endpoint.Client;
-import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.frontend.WSDLGetInterceptor;
-import org.apache.cxf.interceptor.LoggingOutInterceptor;
-import org.apache.cxf.phase.Phase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
/**
* <p>
* MessageDataFormatFeature sets up the CXF endpoint interceptor for handling
the
@@ -40,62 +30,6 @@ import org.slf4j.LoggerFactory;
* Out phases: {Phase.PREPARE_SEND, Phase.WRITE, Phase.SEND,
Phase.PREPARE_SEND_ENDING}
* </p>
*/
-public class MessageDataFormatFeature extends AbstractDataFormatFeature {
- private static final Logger LOG =
LoggerFactory.getLogger(MessageDataFormatFeature.class);
-
- // filter the unused in phase interceptor
- private static final String[] REMAINING_IN_PHASES = {Phase.RECEIVE,
Phase.USER_STREAM,
- Phase.INVOKE, Phase.POST_INVOKE};
- // filter the unused in phase interceptor
- private static final String[] REMAINING_OUT_PHASES = {Phase.PREPARE_SEND,
Phase.USER_STREAM,
- Phase.WRITE, Phase.SEND, Phase.PREPARE_SEND_ENDING};
-
- @Override
- public void initialize(Client client, Bus bus) {
- //check if there is logging interceptor
- removeInterceptorWhichIsOutThePhases(client.getInInterceptors(),
REMAINING_IN_PHASES, getInInterceptorNames());
-
removeInterceptorWhichIsOutThePhases(client.getEndpoint().getInInterceptors(),
REMAINING_IN_PHASES, getInInterceptorNames());
- client.getEndpoint().getBinding().getInInterceptors().clear();
-
- //we need to keep the LoggingOutputInterceptor
- getOutInterceptorNames().add(LoggingOutInterceptor.class.getName());
- removeInterceptorWhichIsOutThePhases(client.getOutInterceptors(),
REMAINING_OUT_PHASES, getOutInterceptorNames());
-
removeInterceptorWhichIsOutThePhases(client.getEndpoint().getOutInterceptors(),
REMAINING_OUT_PHASES, getOutInterceptorNames());
- client.getEndpoint().getBinding().getOutInterceptors().clear();
- client.getEndpoint().getOutInterceptors().add(new
RawMessageContentRedirectInterceptor());
- }
-
- @Override
- public void initialize(Server server, Bus bus) {
- // currently we do not filter the bus
- // remove the interceptors
-
- // keep the WSDLGetInterceptor
- getInInterceptorNames().add(WSDLGetInterceptor.class.getName());
-
-
removeInterceptorWhichIsOutThePhases(server.getEndpoint().getService().getInInterceptors(),
REMAINING_IN_PHASES, getInInterceptorNames());
-
removeInterceptorWhichIsOutThePhases(server.getEndpoint().getInInterceptors(),
REMAINING_IN_PHASES, getInInterceptorNames());
-
-
- //we need to keep the LoggingOutputInterceptor
- getOutInterceptorNames().add(LoggingOutInterceptor.class.getName());
-
- // Do not using the binding interceptor any more
- server.getEndpoint().getBinding().getInInterceptors().clear();
-
-
removeInterceptorWhichIsOutThePhases(server.getEndpoint().getService().getOutInterceptors(),
REMAINING_OUT_PHASES, getOutInterceptorNames());
-
removeInterceptorWhichIsOutThePhases(server.getEndpoint().getOutInterceptors(),
REMAINING_OUT_PHASES, getOutInterceptorNames());
-
- // Do not use the binding interceptor any more
- server.getEndpoint().getBinding().getOutInterceptors().clear();
- server.getEndpoint().getOutInterceptors().add(new
RawMessageContentRedirectInterceptor());
-
- }
-
- @Override
- protected Logger getLogger() {
- return LOG;
- }
-
-
+@Deprecated
+public class MessageDataFormatFeature extends RAWDataFormatFeature {
}
Copied:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/RAWDataFormatFeature.java
(from r1341854,
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java)
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/RAWDataFormatFeature.java?p2=camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/RAWDataFormatFeature.java&p1=camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java&r1=1341854&r2=1341951&rev=1341951&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/RAWDataFormatFeature.java
Wed May 23 17:11:57 2012
@@ -40,8 +40,8 @@ import org.slf4j.LoggerFactory;
* Out phases: {Phase.PREPARE_SEND, Phase.WRITE, Phase.SEND,
Phase.PREPARE_SEND_ENDING}
* </p>
*/
-public class MessageDataFormatFeature extends AbstractDataFormatFeature {
- private static final Logger LOG =
LoggerFactory.getLogger(MessageDataFormatFeature.class);
+public class RAWDataFormatFeature extends AbstractDataFormatFeature {
+ private static final Logger LOG =
LoggerFactory.getLogger(RAWDataFormatFeature.class);
// filter the unused in phase interceptor
private static final String[] REMAINING_IN_PHASES = {Phase.RECEIVE,
Phase.USER_STREAM,
Added:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest.java?rev=1341951&view=auto
==============================================================================
---
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest.java
(added)
+++
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest.java
Wed May 23 17:11:57 2012
@@ -0,0 +1,24 @@
+/**
+ * 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.wsa;
+
+import org.springframework.test.context.ContextConfiguration;
+
+@ContextConfiguration
+public class WSAddressingCXFMSGTest extends WSAddressingTest {
+
+}
Propchange:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest-context.xml
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest-context.xml?rev=1341951&view=auto
==============================================================================
---
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest-context.xml
(added)
+++
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest-context.xml
Wed May 23 17:11:57 2012
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ 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.
+ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://camel.apache.org/schema/cxf"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
+ http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
+ http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
+ ">
+ <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <cxf:cxfEndpoint id="routerEndpoint"
+
address="http://localhost:${CXFTestSupport.port1}/WSAddressingCXFMSGTest/SoapContext/SoapPort"
endpointName="tns:SoapPort"
+ serviceName="tns:SOAPService" wsdlURL="/wsdl/hello_world.wsdl"
+ serviceClass="org.apache.hello_world_soap_http.Greeter"
+ xmlns:tns="http://apache.org/hello_world_soap_http">
+ <cxf:inInterceptors>
+ <ref bean="logInbound" />
+ </cxf:inInterceptors>
+ <cxf:outInterceptors>
+ <ref bean="loggingOutInterceptor" />
+ </cxf:outInterceptors>
+ <cxf:features>
+ <wsa:addressing
xmlns:wsa="http://cxf.apache.org/ws/addressing" />
+ </cxf:features>
+ </cxf:cxfEndpoint>
+ <cxf:cxfEndpoint id="serviceEndpoint"
+
address="http://localhost:${CXFTestSupport.port2}/WSAddressingCXFMSGTest/SoapContext/SoapPort"
endpointName="tns:SoapPort"
+ serviceName="tns:SOAPService" wsdlURL="/wsdl/hello_world.wsdl"
+ serviceClass="org.apache.hello_world_soap_http.Greeter"
+ xmlns:tns="http://apache.org/hello_world_soap_http">
+ <cxf:inInterceptors>
+ <ref bean="logInbound" />
+ </cxf:inInterceptors>
+ <cxf:outInterceptors>
+ <ref bean="loggingOutInterceptor" />
+ </cxf:outInterceptors>
+ <!-- cxf:features>
+ <wsa:addressing
xmlns:wsa="http://cxf.apache.org/ws/addressing" />
+ </cxf:features-->
+ </cxf:cxfEndpoint>
+
+ <bean id="removeRequestOutHeaderProcessor"
+
class="org.apache.camel.component.cxf.wsa.WSAddressingTest$RemoveRequestOutHeaderProcessor"
/>
+
+ <bean id="loggingOutInterceptor"
class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
+ <bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor" />
+
+ <camelContext id="camel" trace="true"
xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from
uri="cxf:bean:routerEndpoint?dataFormat=CXF_MESSAGE" />
+ <!-- need to remove the addressing header, since the
back end service doesn't support addressing -->
+ <process ref="removeRequestOutHeaderProcessor" />
+ <to
uri="cxf:bean:serviceEndpoint?dataFormat=CXF_MESSAGE" />
+ </route>
+ </camelContext>
+</beans>
\ No newline at end of file
Propchange:
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest-context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest-context.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsa/WSAddressingCXFMSGTest-context.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml