This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch mock
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 2aa18b39f968e4be8120ffbb1c4db7facb1ad5e5
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Apr 16 10:21:25 2019 +0200

    CAMEL-13421: Remove BeanInvocation from camel-bean
---
 components/camel-jaxb/pom.xml                      |   1 +
 .../converter/jaxb/FallbackTypeConverter.java      |   7 -
 .../camel/component/xquery/XQueryBuilder.java      |  13 --
 .../src/main/docs/soapjaxb-dataformat.adoc         |  53 +-----
 .../camel/dataformat/soap/SoapJaxbDataFormat.java  |  59 +------
 .../soap/MultiPartClientMarshalTest.java           |  96 -----------
 .../dataformat/soap/MultiPartCxfServerTest.java    | 192 ---------------------
 .../soap/MultiPartCxfServerTest-context.xml        |  49 ------
 8 files changed, 5 insertions(+), 465 deletions(-)

diff --git a/components/camel-jaxb/pom.xml b/components/camel-jaxb/pom.xml
index 27da40c..66eecfe 100644
--- a/components/camel-jaxb/pom.xml
+++ b/components/camel-jaxb/pom.xml
@@ -42,6 +42,7 @@
 
     <dependencies>
 
+        <!-- needs camel-core due to stax converter -->
         <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-core</artifactId>
diff --git 
a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
 
b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
index 08cb0a6..3e4a676 100644
--- 
a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
+++ 
b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
@@ -43,11 +43,9 @@ import javax.xml.transform.Source;
 import org.apache.camel.Converter;
 import org.apache.camel.Exchange;
 import org.apache.camel.FallbackConverter;
-import org.apache.camel.Processor;
 import org.apache.camel.StreamCache;
 import org.apache.camel.TypeConversionException;
 import org.apache.camel.TypeConverter;
-import org.apache.camel.component.bean.BeanInvocation;
 import org.apache.camel.converter.jaxp.StaxConverter;
 import org.apache.camel.spi.TypeConverterRegistry;
 import org.apache.camel.support.ExchangeHelper;
@@ -94,11 +92,6 @@ public class FallbackTypeConverter {
     @FallbackConverter
     @Converter(fallback = true)
     public Object convertTo(Class<?> type, Exchange exchange, Object value, 
TypeConverterRegistry registry) {
-        if (BeanInvocation.class.isAssignableFrom(type) || 
Processor.class.isAssignableFrom(type)) {
-            // JAXB cannot convert to a BeanInvocation / Processor, so we need 
to indicate this
-            // to avoid Camel trying to do this when using beans with JAXB 
payloads
-            return null;
-        }
 
         boolean prettyPrint = defaultPrettyPrint;
         String property = exchange != null ? 
exchange.getContext().getGlobalOption(PRETTY_PRINT) : null;
diff --git 
a/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
 
b/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
index 9a7c573..016f3d2 100644
--- 
a/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
+++ 
b/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
@@ -72,7 +72,6 @@ import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
 import org.apache.camel.RuntimeExpressionException;
 import org.apache.camel.StringSource;
-import org.apache.camel.component.bean.BeanInvocation;
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.spi.NamespaceAware;
 import org.apache.camel.support.MessageHelper;
@@ -525,18 +524,6 @@ public abstract class XQueryBuilder implements Expression, 
Predicate, NamespaceA
                     source = getSource(exchange, body);
                 }
 
-                // special for bean invocation
-                if (source == null) {
-                    if (body instanceof BeanInvocation) {
-                        // if its a null bean invocation then handle that
-                        BeanInvocation bi = 
exchange.getContext().getTypeConverter().convertTo(BeanInvocation.class, body);
-                        if (bi.getArgs() != null && bi.getArgs().length == 1 
&& bi.getArgs()[0] == null) {
-                            // its a null argument from the bean invocation so 
use null as answer
-                            source = null;
-                        }
-                    }
-                }
-
                 if (source == null) {
                     // indicate it was not possible to convert to a Source type
                     throw new NoTypeConversionAvailableException(body, 
Source.class);
diff --git a/components/camel-soap/src/main/docs/soapjaxb-dataformat.adoc 
b/components/camel-soap/src/main/docs/soapjaxb-dataformat.adoc
index 059e911..9e739c2 100644
--- a/components/camel-soap/src/main/docs/soapjaxb-dataformat.adoc
+++ b/components/camel-soap/src/main/docs/soapjaxb-dataformat.adoc
@@ -189,61 +189,10 @@ ServiceInterfaceStrategy strat =  new 
ServiceInterfaceStrategy(com.example.custo
 SoapJaxbDataFormat soapDataFormat = new 
SoapJaxbDataFormat("com.example.customerservice.multipart", strat);
 
-------------------------------------------------------------------------------------------------------------------------------------------
 
-#### Multi-part Request
-
-The payload parameters for a multi-part request are initiazlied using a
-`BeanInvocation` object that reflects the signature of the target
-operation. The camel-soap DataFormat maps the content in the
-`BeanInvocation` to fields in the SOAP header and body in accordance
-with the JAX-WS mapping when the `marshal()` processor is invoked.
-
-[source,java]
-----------------------------------------------------------------------------------------
-BeanInvocation beanInvocation = new BeanInvocation();
-
-// Identify the target method
-beanInvocation.setMethod(MultiPartCustomerService.class.getMethod("getCustomersByName",
 
-    GetCustomersByName.class, 
com.example.customerservice.multipart.Product.class));
-
-// Populate the method arguments
-GetCustomersByName getCustomersByName = new GetCustomersByName();
-getCustomersByName.setName("Dr. Multipart");
-                
-Product product = new Product();
-product.setName("Multiuse Product");
-product.setDescription("Useful for lots of things.");
-                
-Object[] args = new Object[] {getCustomersByName, product};
-
-// Add the arguments to the bean invocation
-beanInvocation.setArgs(args);
-
-// Set the bean invocation object as the message body
-exchange.getIn().setBody(beanInvocation); 
-----------------------------------------------------------------------------------------
-
-#### Multi-part Response
-
-A multi-part soap response may include an element in the soap body and
-will have one or more elements in the soap header. The camel-soap
-DataFormat will unmarshall the element in the soap body (if it exists)
-and place it onto the body of the out message in the exchange. Header
-elements will *not* be marshaled into their JAXB mapped object types.
-Instead, these elements are placed into the camel out message header
-`org.apache.camel.dataformat.soap.UNMARSHALLED_HEADER_LIST`. The
-elements will appear either as element instance values, or as
-JAXBElement values, depending upon the setting for the
-`ignoreJAXBElement` property. This property is inherited from
-camel-jaxb.
-
-You can also have the camel-soap DataFormate ignore header content
-all-together by setting the `ignoreUnmarshalledHeaders` value to `true`.
-
 #### Holder Object mapping
 
 JAX-WS specifies the use of a type-parameterized `javax.xml.ws.Holder`
-object for `In/Out` and `Out` parameters. A `Holder` object may be used
-when building the `BeanInvocation`, or you may use an instance of the
+object for `In/Out` and `Out` parameters. You may use an instance of the
 parameterized-type directly. The camel-soap DataFormat marshals Holder
 values in accordance with the JAXB mapping for the class of the
 `Holder`'s value. No mapping is provided for `Holder` objects in an
diff --git 
a/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
 
b/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
index 0fcdcb3..206dbd6 100644
--- 
a/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
+++ 
b/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
@@ -19,12 +19,9 @@ package org.apache.camel.dataformat.soap;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
@@ -33,8 +30,6 @@ import javax.xml.namespace.QName;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.component.bean.BeanInvocation;
 import org.apache.camel.converter.jaxb.JaxbDataFormat;
 import org.apache.camel.dataformat.soap.name.ElementNameStrategy;
 import org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy;
@@ -134,14 +129,6 @@ public class SoapJaxbDataFormat extends JaxbDataFormat {
         checkElementNameStrategy(exchange);
 
         String soapAction = getSoapActionFromExchange(exchange);
-        if (soapAction == null && inputObject instanceof BeanInvocation) {
-            BeanInvocation beanInvocation = (BeanInvocation) inputObject;
-            WebMethod webMethod = 
beanInvocation.getMethod().getAnnotation(WebMethod.class);
-            if (webMethod != null && webMethod.action() != null) {
-                soapAction = webMethod.action();
-            }
-        }
-
         Object envelope = adapter.doMarshal(exchange, inputObject, stream, 
soapAction);
 
         // and continue in super
@@ -149,11 +136,8 @@ public class SoapJaxbDataFormat extends JaxbDataFormat {
     }
 
     /**
-     * Create body content from a non Exception object. If the inputObject is a
-     * BeanInvocation the following should be considered: The first parameter
-     * will be used for the SOAP body. BeanInvocations with more than one
-     * parameter are not supported. So the interface should be in doc lit bare
-     * style.
+     * Create body content from a non Exception object.
+     * So the interface should be in doc lit bare style.
      * 
      * @param inputObject
      *            object to be put into the SOAP body
@@ -168,44 +152,7 @@ public class SoapJaxbDataFormat extends JaxbDataFormat {
                                                          List<Object> 
headerElements) {
         List<Object> bodyParts = new ArrayList<>();
         List<Object> headerParts = new ArrayList<>();
-        if (inputObject instanceof BeanInvocation) {
-            BeanInvocation bi = (BeanInvocation)inputObject;
-            Annotation[][] annotations = 
bi.getMethod().getParameterAnnotations();
-
-            List<WebParam> webParams = new ArrayList<>();
-            for (Annotation[] singleParameterAnnotations : annotations) {
-                for (Annotation annotation : singleParameterAnnotations) {
-                    if (annotation instanceof WebParam) {
-                        webParams.add((WebParam)annotation);
-                    }
-                }
-            }
-
-            if (webParams.size() > 0) {
-                if (webParams.size() == bi.getArgs().length) {
-                    int index = -1;
-                    for (Object o : bi.getArgs()) {
-                        if (webParams.get(++index).header()) {
-                            headerParts.add(o);
-                        } else {
-                            bodyParts.add(o);
-                        }
-                    }
-                } else {
-                    throw new RuntimeCamelException("The number of bean 
invocation parameters does not "
-                                                        + "match the number of 
parameters annotated with @WebParam for the method [ "
-                                                        + 
bi.getMethod().getName() + "].");
-                }
-            } else {
-                // try to map all objects for the body
-                for (Object o : bi.getArgs()) {
-                    bodyParts.add(o);
-                }
-            }
-
-        } else {
-            bodyParts.add(inputObject);
-        }
+        bodyParts.add(inputObject);
 
         List<Object> bodyElements = new ArrayList<>();
         for (Object bodyObj : bodyParts) {
diff --git 
a/components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/MultiPartClientMarshalTest.java
 
b/components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/MultiPartClientMarshalTest.java
deleted file mode 100644
index 9f1e705..0000000
--- 
a/components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/MultiPartClientMarshalTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.dataformat.soap;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.example.customerservice.multipart.GetCustomersByName;
-import com.example.customerservice.multipart.MultiPartCustomerService;
-import com.example.customerservice.multipart.Product;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.bean.BeanInvocation;
-import org.apache.camel.component.xquery.XQueryBuilder;
-import org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
-
-
-public class MultiPartClientMarshalTest extends CamelTestSupport {
-        
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-
-            @Override
-            public void configure() throws Exception {
-                
-                ServiceInterfaceStrategy strat =  
-                       new 
ServiceInterfaceStrategy(com.example.customerservice.multipart.MultiPartCustomerService.class,
 true);
-                SoapJaxbDataFormat soapDataFormat = new 
SoapJaxbDataFormat("com.example.customerservice.multipart", strat);
-                              
-                from("direct:start")
-                        .marshal(soapDataFormat)
-                        .log("marshal to: ${body}")
-                        .end();
-            }
-        };
-    }
-    
-    @Test
-    public void testSendPayload() throws Exception {
-                
-        Exchange exchange = template.send("direct:start",  new Processor() {
-
-            public void process(Exchange exchange) throws Exception {
-                BeanInvocation beanInvocation = new BeanInvocation();
-                GetCustomersByName getCustomersByName = new 
GetCustomersByName();
-                getCustomersByName.setName("Dr. Multipart");
-                
beanInvocation.setMethod(MultiPartCustomerService.class.getMethod("getCustomersByName",
 
-                        GetCustomersByName.class, 
com.example.customerservice.multipart.Product.class));
-                
-                Product product = new Product();
-                product.setName("Multiuse Product");
-                product.setDescription("Useful for lots of things.");
-                
-                Object[] args = new Object[] {getCustomersByName, product};
-                beanInvocation.setArgs(args);
-                exchange.getIn().setBody(beanInvocation); 
-            }
-        });
-
-        if (exchange.getException() != null) {
-            throw exchange.getException();
-        }
-           
-        Map<String, String> nsMap = new HashMap<>();
-        nsMap.put("soap", "http://schemas.xmlsoap.org/soap/envelope/";);
-        nsMap.put("example", "http://multipart.customerservice.example.com/";);
-        XQueryBuilder builder = 
XQueryBuilder.xquery("//soap:Envelope/soap:Header/example:product/name");
-        builder.setNamespaces(nsMap);
-        String result = builder.evaluateAsString(exchange);
-        assertTrue(result.equals("Multiuse Product"));
-        
-        
-        builder = 
XQueryBuilder.xquery("//soap:Envelope/soap:Body/example:getCustomersByName/name");
-        builder.setNamespaces(nsMap);
-        result = builder.evaluateAsString(exchange);
-        assertTrue(result.equals("Dr. Multipart"));
-    }  
-}
diff --git 
a/components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/MultiPartCxfServerTest.java
 
b/components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/MultiPartCxfServerTest.java
deleted file mode 100644
index 34616f5..0000000
--- 
a/components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/MultiPartCxfServerTest.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * 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.dataformat.soap;
-
-import java.util.List;
-
-import javax.xml.ws.Endpoint;
-import javax.xml.ws.Holder;
-
-import com.example.customerservice.multipart.Company;
-import com.example.customerservice.multipart.Customer;
-import com.example.customerservice.multipart.GetCustomersByName;
-import com.example.customerservice.multipart.GetCustomersByNameResponse;
-import com.example.customerservice.multipart.MultiPartCustomerService;
-import com.example.customerservice.multipart.Product;
-import com.example.customerservice.multipart.SaveCustomer;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.bean.BeanInvocation;
-import org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-import static org.junit.Assert.assertTrue;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration
-public class MultiPartCxfServerTest extends RouteBuilder {
-    
-    protected static Endpoint endpoint;
-    
-    @Produce(uri = "direct:start")
-    ProducerTemplate producerTemplate;
-
-    
-    @Override
-    public void configure() throws Exception {
-        ServiceInterfaceStrategy strat =  
-            new 
ServiceInterfaceStrategy(com.example.customerservice.multipart.MultiPartCustomerService.class,
 true);
-        SoapJaxbDataFormat soapDataFormat = new 
SoapJaxbDataFormat("com.example.customerservice.multipart", strat);
-                   
-        from("direct:start")
-             .marshal(soapDataFormat)
-             .log("marshal to: ${body}")
-             .to("direct:cxfEndpoint")
-             .unmarshal(soapDataFormat)
-             .end();
-    }  
-    
-    @Test
-    public void testSendRequestWithInPart() throws Exception {
-                
-        Exchange exchange = producerTemplate.send("direct:start",  new 
Processor() {
-
-            public void process(Exchange exchange) throws Exception {
-                BeanInvocation beanInvocation = new BeanInvocation();
-                GetCustomersByName getCustomersByName = new 
GetCustomersByName();
-                getCustomersByName.setName("Dr. Multipart");
-                
beanInvocation.setMethod(MultiPartCustomerService.class.getMethod("getCustomersByName",
 
-                        GetCustomersByName.class, 
com.example.customerservice.multipart.Product.class));
-                
-                Product product = new Product();
-                product.setName("Multipart Product");
-                product.setDescription("Useful for lots of things.");
-                
-                Object[] args = new Object[] {getCustomersByName, product};
-                beanInvocation.setArgs(args);
-                exchange.getIn().setBody(beanInvocation); 
-            }
-        });
-        
-        if (exchange.getException() != null) {
-            throw exchange.getException();
-        }
-        
-        Object responseObj = exchange.getOut().getBody();
-        assertTrue(responseObj instanceof GetCustomersByNameResponse);
-        GetCustomersByNameResponse response = (GetCustomersByNameResponse) 
responseObj;
-        assertTrue(response.getReturn().get(0).getName().equals("Multipart 
Product"));
- 
-    }
-    
-
-    @Test
-    public void testSendRequestWithInAndInOutParts() throws Exception {
-        
-        Exchange exchange = producerTemplate.send("direct:start",  new 
Processor() {
-
-            public void process(Exchange exchange) throws Exception {
-                BeanInvocation beanInvocation = new BeanInvocation();
-              
-                
beanInvocation.setMethod(MultiPartCustomerService.class.getMethod("saveCustomer",
 
-                        SaveCustomer.class, Product.class, Holder.class));
-                
-                Customer customer = new Customer();
-                customer.setName("TestCustomer");
-                customer.setRevenue(50000);
-                SaveCustomer saveCustomer = new SaveCustomer();
-                saveCustomer.setCustomer(customer);
-                
-                Product product = new Product();
-                product.setName("Multiuse Product");
-                product.setDescription("Useful for lots of things.");
-                
-                Holder<Company> holder = new Holder<>();
-                
-                Object[] args = new Object[] {saveCustomer, product, holder};
-                beanInvocation.setArgs(args);
-                exchange.getIn().setBody(beanInvocation); 
-            }
-           
-        });
-        
-        if (exchange.getException() != null) {
-            throw exchange.getException();
-        }
-        
-        @SuppressWarnings("unchecked")
-        List<Object> headers = (List<Object>) 
exchange.getOut().getHeader(SoapJaxbDataFormat.SOAP_UNMARSHALLED_HEADER_LIST);
-        assertTrue(headers.size() == 1);
-        Object companyHeaderObj = headers.get(0);
-        assertTrue(companyHeaderObj instanceof Company);
-        
assertTrue(((Company)companyHeaderObj).getName().equals("MultipartSoft"));
-    }
-    
-    /**
-     * This test validates the end-to-end behavior of the service interface 
mapping when a parameter type
-     * is defined with a different QName in two different Web method. It also 
tests the case where a 
-     * QName and type are directly reused across methods.
-     */
-    @Test
-    public void testSendRequestWithReusedInAndInOutParts() throws Exception {
-        
-        Exchange exchange = producerTemplate.send("direct:start",  new 
Processor() {
-
-            public void process(Exchange exchange) throws Exception {
-                BeanInvocation beanInvocation = new BeanInvocation();
-              
-                
beanInvocation.setMethod(MultiPartCustomerService.class.getMethod("saveCustomerToo",
 
-                        SaveCustomer.class, Product.class, Holder.class));
-                
-                Customer customer = new Customer();
-                customer.setName("TestCustomerToo");
-                customer.setRevenue(50000);
-                SaveCustomer saveCustomer = new SaveCustomer();
-                saveCustomer.setCustomer(customer);
-                
-                Product product = new Product();
-                product.setName("Multiuse Product");
-                product.setDescription("Useful for lots of things.");
-                
-                Holder<Company> holder = new Holder<>();
-                
-                Object[] args = new Object[] {saveCustomer, product, holder};
-                beanInvocation.setArgs(args);
-                exchange.getIn().setBody(beanInvocation); 
-            }
-           
-        });
-        
-        if (exchange.getException() != null) {
-            throw exchange.getException();
-        }
-        
-        @SuppressWarnings("unchecked")
-        List<Object> headers = (List<Object>) 
exchange.getOut().getHeader(SoapJaxbDataFormat.SOAP_UNMARSHALLED_HEADER_LIST);
-        assertTrue(headers.size() == 1);
-        Object companyHeaderObj = headers.get(0);
-        assertTrue(companyHeaderObj instanceof Company);
-        
assertTrue(((Company)companyHeaderObj).getName().equals("MultipartSoft"));
-    }
-   
-}
diff --git 
a/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/MultiPartCxfServerTest-context.xml
 
b/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/MultiPartCxfServerTest-context.xml
deleted file mode 100644
index cf15528..0000000
--- 
a/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/MultiPartCxfServerTest-context.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?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:context="http://www.springframework.org/schema/context";
-       xmlns:jaxws="http://cxf.apache.org/jaxws";
-       xmlns:customer="http://multipart.customerservice.example.com/";
-       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
-               http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context.xsd
-               http://cxf.apache.org/core 
http://cxf.apache.org/schemas/core.xsd
-               http://cxf.apache.org/jaxws 
http://cxf.apache.org/schemas/jaxws.xsd
-               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd";>
-
-       <import resource="classpath:META-INF/cxf/cxf.xml" />
-       <import resource="classpath:META-INF/cxf/cxf-extension-camel.xml" />
-
-       <bean id="serviceImpl" 
class="org.apache.camel.dataformat.soap.MultiPartCustomerServiceImpl"/>
-       
-       <jaxws:endpoint id="multiPartCustomerServiceEndpoint" 
-               serviceName="customer:MultiPartCustomerServiceService" 
-               endpointName="customer:MultiPartCustomerServicePort"
-               address="camel://direct:cxfEndpoint"
-               implementor="#serviceImpl"
-       />
-       
-       <camelContext id="camelContext" 
xmlns="http://camel.apache.org/schema/spring";>
-               <routeBuilder ref="testClass" />    
-       </camelContext>
-       
-       <bean id="testClass" 
class="org.apache.camel.dataformat.soap.MultiPartCxfServerTest"/>
-
-</beans>

Reply via email to