You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2010/02/08 10:18:11 UTC
svn commit: r907587 [2/2] - in /camel/trunk:
camel-core/src/main/java/org/apache/camel/ components/
components/camel-soap/ components/camel-soap/src/
components/camel-soap/src/main/ components/camel-soap/src/main/java/
components/camel-soap/src/main/ja...
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapRoundtripTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapRoundtripTest.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapRoundtripTest.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapRoundtripTest.java Mon Feb 8 09:18:06 2010
@@ -0,0 +1,72 @@
+/**
+ * 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.converter.soap;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+
+import com.example.customerservice.GetCustomersByName;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.converter.soap.name.ElementNameStrategy;
+import org.apache.camel.converter.soap.name.TypeNameStrategy;
+import org.apache.camel.test.CamelTestSupport;
+
+public class SoapRoundtripTest extends CamelTestSupport {
+ @EndpointInject(uri = "mock:result")
+ protected MockEndpoint resultEndpoint;
+
+ @Produce(uri = "direct:start")
+ protected ProducerTemplate producer;
+
+ public void testRoundTrip() throws IOException, InterruptedException {
+ resultEndpoint.expectedMessageCount(1);
+ GetCustomersByName request = new GetCustomersByName();
+ request.setName("Müller");
+ producer.sendBody(request);
+ resultEndpoint.assertIsSatisfied();
+ Exchange exchange = resultEndpoint.getExchanges().get(0);
+ GetCustomersByName received = exchange.getIn().getBody(
+ GetCustomersByName.class);
+ Assert.assertNotNull(received);
+ Assert.assertEquals("Müller", received.getName());
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ String jaxbPackage = GetCustomersByName.class.getPackage()
+ .getName();
+
+ @Override
+ public void configure() throws Exception {
+ ElementNameStrategy elNameStrat = new TypeNameStrategy();
+ SoapJaxbDataFormat soapDataFormat = new SoapJaxbDataFormat(
+ jaxbPackage, elNameStrat);
+ from("direct:start").marshal(soapDataFormat).unmarshal(
+ soapDataFormat).to("mock:result");
+ }
+ };
+ }
+
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapRoundtripTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapRoundtripTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapServerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapServerTest.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapServerTest.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapServerTest.java Mon Feb 8 09:18:06 2010
@@ -0,0 +1,76 @@
+/**
+ * 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.converter.soap;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.Assert;
+
+import com.example.customerservice.GetCustomersByName;
+
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.converter.soap.name.ElementNameStrategy;
+import org.apache.camel.converter.soap.name.TypeNameStrategy;
+import org.apache.camel.test.CamelTestSupport;
+
+public class SoapServerTest extends CamelTestSupport {
+
+ @Produce(uri = "direct:start")
+ protected ProducerTemplate producer;
+
+ public void testSuccess() throws IOException, InterruptedException {
+ sendAndCheckReply("request.xml", "response.xml");
+ }
+
+ public void testFault() throws IOException, InterruptedException {
+ sendAndCheckReply("requestFault.xml", "responseFault.xml");
+ }
+
+ private void sendAndCheckReply(String requestResource, String responseResource) throws IOException {
+ context.setTracing(true);
+ InputStream requestIs = this.getClass().getResourceAsStream(requestResource);
+ InputStream responseIs = this.getClass().getResourceAsStream(responseResource);
+ Object reply = producer.requestBody(requestIs);
+ String replySt = context.getTypeConverter().convertTo(String.class, reply);
+ Assert.assertEquals(TestUtil.readStream(responseIs), replySt);
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ String jaxbPackage = GetCustomersByName.class.getPackage().getName();
+
+ @Override
+ public void configure() throws Exception {
+ ElementNameStrategy elNameStrat = new TypeNameStrategy();
+ SoapJaxbDataFormat soapDataFormat = new SoapJaxbDataFormat(jaxbPackage, elNameStrat);
+ CustomerServerBean serverBean = new CustomerServerBean();
+ from("direct:start").onException(Exception.class) //
+ .handled(true) //
+ .marshal(soapDataFormat) //
+ .end() //
+ .unmarshal(soapDataFormat) //
+ .bean(serverBean) //
+ .marshal(soapDataFormat);
+ }
+ };
+ }
+
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapServerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapServerTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapUnMarshalTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapUnMarshalTest.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapUnMarshalTest.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapUnMarshalTest.java Mon Feb 8 09:18:06 2010
@@ -0,0 +1,73 @@
+/**
+ * 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.converter.soap;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.Assert;
+
+import com.example.customerservice.GetCustomersByName;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.converter.soap.name.ElementNameStrategy;
+import org.apache.camel.converter.soap.name.TypeNameStrategy;
+import org.apache.camel.test.CamelTestSupport;
+
+public class SoapUnMarshalTest extends CamelTestSupport {
+ private static final String SERVICE_PACKAGE = GetCustomersByName.class
+ .getPackage().getName();
+
+ @EndpointInject(uri = "mock:result")
+ protected MockEndpoint resultEndpoint;
+
+ @Produce(uri = "direct:start")
+ protected ProducerTemplate producer;
+
+ public void testUnMarshalSoap() throws IOException, InterruptedException {
+ resultEndpoint.expectedMessageCount(1);
+ InputStream in = this.getClass().getResourceAsStream("request.xml");
+ producer.sendBody(in);
+ resultEndpoint.assertIsSatisfied();
+ Exchange exchange = resultEndpoint.getExchanges().get(0);
+ Object body = exchange.getIn().getBody();
+ Assert.assertEquals(GetCustomersByName.class, body.getClass());
+ GetCustomersByName request = (GetCustomersByName) body;
+ Assert.assertEquals("Smith", request.getName());
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() throws Exception {
+ ElementNameStrategy elNameStrat = new TypeNameStrategy();
+ SoapJaxbDataFormat soapDataFormat = new SoapJaxbDataFormat(
+ SERVICE_PACKAGE, elNameStrat);
+ from("direct:start").unmarshal(soapDataFormat)
+ .to("mock:result");
+ }
+ };
+ }
+
+}
\ No newline at end of file
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapUnMarshalTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/SoapUnMarshalTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/TestUtil.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/TestUtil.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/TestUtil.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/TestUtil.java Mon Feb 8 09:18:06 2010
@@ -0,0 +1,43 @@
+/**
+ * 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.converter.soap;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public final class TestUtil {
+ private TestUtil() {
+ }
+
+ public static String readStream(InputStream is) throws IOException {
+ try {
+ StringBuilder sb = new StringBuilder();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ is, "UTF-8"));
+ String line;
+ while ((line = reader.readLine()) != null) {
+ sb.append(line).append("\n");
+ }
+ return sb.toString();
+ } finally {
+ is.close();
+ }
+ }
+
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/TestUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/TestUtil.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithNamespace.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithNamespace.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithNamespace.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithNamespace.java Mon Feb 8 09:18:06 2010
@@ -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.converter.soap.name;
+
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name = "test", namespace = "http://mynamespace")
+public class AnnotatedClassWithNamespace {
+
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithNamespace.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithNamespace.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithoutNamespace.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithoutNamespace.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithoutNamespace.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithoutNamespace.java Mon Feb 8 09:18:06 2010
@@ -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.converter.soap.name;
+
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name = "test")
+public class AnnotatedClassWithoutNamespace {
+
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithoutNamespace.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/AnnotatedClassWithoutNamespace.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ExceptionNameStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ExceptionNameStrategyTest.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ExceptionNameStrategyTest.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ExceptionNameStrategyTest.java Mon Feb 8 09:18:06 2010
@@ -0,0 +1,47 @@
+/**
+ * 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.converter.soap.name;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.Assert;
+
+import com.example.customerservice.NoSuchCustomerException;
+
+import org.apache.camel.impl.DefaultClassResolver;
+import org.junit.Test;
+
+public class ExceptionNameStrategyTest {
+
+ @Test
+ public void testServiceInterfaceStrategyWithServer() {
+ ExceptionNameStrategy strategy = new ExceptionNameStrategy();
+ DefaultClassResolver resolver = new DefaultClassResolver();
+ QName elName = strategy.findQNameForSoapActionOrType("",
+ NoSuchCustomerException.class, resolver);
+ Assert.assertEquals("http://customerservice.example.com/", elName
+ .getNamespaceURI());
+ Assert.assertEquals("NoSuchCustomer", elName.getLocalPart());
+
+ try {
+ elName = strategy.findQNameForSoapActionOrType("", Class.class, resolver);
+ Assert.fail();
+ } catch (Exception e) {
+ // expected here
+ }
+ }
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ExceptionNameStrategyTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ExceptionNameStrategyTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/QNameStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/QNameStrategyTest.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/QNameStrategyTest.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/QNameStrategyTest.java Mon Feb 8 09:18:06 2010
@@ -0,0 +1,47 @@
+/**
+ * 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.converter.soap.name;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.Assert;
+
+import com.example.customerservice.GetCustomersByName;
+
+import org.apache.camel.impl.DefaultClassResolver;
+import org.apache.camel.spi.ClassResolver;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class QNameStrategyTest {
+
+ /**
+ * The strategy should always produce the QName that
+ * it was given on the constructor
+ */
+ @Test
+ public void testQName() {
+ QName elementName = new QName("http://my.name.org", "myElement");
+ QNameStrategy strategy = new QNameStrategy(elementName);
+ ClassResolver resolver = new DefaultClassResolver();
+
+ QName actualElementName = strategy.findQNameForSoapActionOrType(null, GetCustomersByName.class, resolver);
+ Assert.assertEquals(elementName, actualElementName);
+ }
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/QNameStrategyTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/QNameStrategyTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ServiceInterfaceStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ServiceInterfaceStrategyTest.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ServiceInterfaceStrategyTest.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ServiceInterfaceStrategyTest.java Mon Feb 8 09:18:06 2010
@@ -0,0 +1,101 @@
+/**
+ * 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.converter.soap.name;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.Assert;
+
+import com.example.customerservice.CustomerService;
+import com.example.customerservice.GetCustomersByName;
+import com.example.customerservice.GetCustomersByNameResponse;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.impl.DefaultClassResolver;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
+
+public class ServiceInterfaceStrategyTest {
+ private static final Log LOG = LogFactory.getLog(ServiceInterfaceStrategyTest.class);
+
+ @Test
+ public void testServiceInterfaceStrategyWithClient() {
+ ServiceInterfaceStrategy strategy = new ServiceInterfaceStrategy(CustomerService.class, true);
+ DefaultClassResolver resolver = new DefaultClassResolver();
+ QName elName = strategy.findQNameForSoapActionOrType("", GetCustomersByName.class, resolver);
+ Assert.assertEquals("http://customerservice.example.com/", elName.getNamespaceURI());
+ Assert.assertEquals("getCustomersByName", elName.getLocalPart());
+
+ QName elName2 = strategy.findQNameForSoapActionOrType("getCustomersByName", GetCustomersByName.class, resolver);
+ Assert.assertEquals("http://customerservice.example.com/", elName2.getNamespaceURI());
+ Assert.assertEquals("getCustomersByName", elName2.getLocalPart());
+
+ try {
+ elName = strategy.findQNameForSoapActionOrType("test", Class.class, resolver);
+ Assert.fail();
+ } catch (RuntimeCamelException e) {
+ LOG.debug("Caught expected message: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void testServiceInterfaceStrategyWithServer() {
+ ServiceInterfaceStrategy strategy = new ServiceInterfaceStrategy(CustomerService.class, false);
+ DefaultClassResolver resolver = new DefaultClassResolver();
+ QName elName = strategy.findQNameForSoapActionOrType("", GetCustomersByNameResponse.class, resolver);
+ Assert.assertEquals("http://customerservice.example.com/", elName.getNamespaceURI());
+ Assert.assertEquals("getCustomersByNameResponse", elName.getLocalPart());
+
+ QName elName2 = strategy.findQNameForSoapActionOrType("getCustomersByName", GetCustomersByName.class, resolver);
+ Assert.assertEquals("http://customerservice.example.com/", elName2.getNamespaceURI());
+ Assert.assertEquals("getCustomersByNameResponse", elName2.getLocalPart());
+
+ try {
+ elName = strategy.findQNameForSoapActionOrType("test", Class.class, resolver);
+ Assert.fail();
+ } catch (RuntimeCamelException e) {
+ LOG.debug("Caught expected message: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void testServiceInterfaceStrategyWithRequestWrapperAndClient() {
+ ServiceInterfaceStrategy strategy = new ServiceInterfaceStrategy(com.example.customerservice2.CustomerService.class, true);
+ DefaultClassResolver resolver = new DefaultClassResolver();
+ QName elName = strategy.findQNameForSoapActionOrType("", com.example.customerservice2.GetCustomersByName.class, resolver);
+ Assert.assertEquals("http://customerservice2.example.com/", elName.getNamespaceURI());
+ Assert.assertEquals("getCustomersByName", elName.getLocalPart());
+
+ try {
+ elName = strategy.findQNameForSoapActionOrType("test", Class.class, resolver);
+ Assert.fail();
+ } catch (RuntimeCamelException e) {
+ LOG.debug("Caught expected message: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void testWithNonWebservice() {
+ try {
+ new ServiceInterfaceStrategy(ElementNameStrategy.class, true);
+ Assert.fail();
+ } catch (RuntimeCamelException e) {
+ LOG.debug("Caught expected message: " + e.getMessage());
+ }
+ }
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ServiceInterfaceStrategyTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/ServiceInterfaceStrategyTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/TypeNameStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/TypeNameStrategyTest.java?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/TypeNameStrategyTest.java (added)
+++ camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/TypeNameStrategyTest.java Mon Feb 8 09:18:06 2010
@@ -0,0 +1,66 @@
+/**
+ * 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.converter.soap.name;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.Assert;
+
+import com.example.customerservice.GetCustomersByName;
+
+import org.apache.camel.impl.DefaultClassResolver;
+import org.apache.camel.spi.ClassResolver;
+import org.junit.Test;
+
+public class TypeNameStrategyTest {
+
+ @Test
+ public void testTypeNameStrategy() {
+ TypeNameStrategy strategy = new TypeNameStrategy();
+ ClassResolver resolver = new DefaultClassResolver();
+ QName name = strategy.findQNameForSoapActionOrType("", GetCustomersByName.class, resolver);
+ Assert.assertEquals("http://customerservice.example.com/", name.getNamespaceURI());
+ Assert.assertEquals("getCustomersByName", name.getLocalPart());
+ }
+
+ @Test
+ public void testNoAnnotation() {
+ TypeNameStrategy strategy = new TypeNameStrategy();
+ ClassResolver resolver = new DefaultClassResolver();
+ try {
+ strategy.findQNameForSoapActionOrType("", String.class, resolver);
+ Assert.fail();
+ } catch (RuntimeException e) {
+ // Expected here
+ }
+ }
+
+ @Test
+ public void testNoPackageInfo() {
+ TypeNameStrategy strategy = new TypeNameStrategy();
+ ClassResolver resolver = new DefaultClassResolver();
+ try {
+ strategy.findQNameForSoapActionOrType("", AnnotatedClassWithoutNamespace.class, resolver);
+ Assert.fail();
+ } catch (RuntimeException e) {
+ // Expected here as there is no package info and no namespace on class
+ }
+ QName name = strategy.findQNameForSoapActionOrType("", AnnotatedClassWithNamespace.class, resolver);
+ Assert.assertEquals("test", name.getLocalPart());
+ Assert.assertEquals("http://mynamespace", name.getNamespaceURI());
+ }
+}
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/TypeNameStrategyTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/java/org/apache/camel/converter/soap/name/TypeNameStrategyTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-soap/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/log4j.properties?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/log4j.properties (added)
+++ camel/trunk/components/camel-soap/src/test/resources/log4j.properties Mon Feb 8 09:18:06 2010
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=DEBUG, file
+
+# uncomment this to turn on debug of camel
+log4j.logger.org.apache.camel=DEBUG
+
+log4j.logger.org.apache.activemq.spring=WARN
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-jaxb-test.log
+log4j.appender.file.append=true
Propchange: camel/trunk/components/camel-soap/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService.wsdl
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService.wsdl?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService.wsdl (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService.wsdl Mon Feb 8 09:18:06 2010
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="CustomerServiceService" targetNamespace="http://customerservice.example.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://customerservice.example.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <wsdl:types>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://customerservice.example.com/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://customerservice.example.com/">
+ <xs:element name="getCustomersByName" type="tns:getCustomersByName"/>
+ <xs:element name="getCustomersByNameResponse" type="tns:getCustomersByNameResponse"/>
+ <xs:complexType name="getCustomersByName">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="getCustomersByNameResponse">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:customer"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="customer">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="address" nillable="true" type="xs:string"/>
+ <xs:element name="numOrders" type="xs:int"/>
+ <xs:element name="revenue" type="xs:double"/>
+ <xs:element minOccurs="0" name="test" type="xs:decimal"/>
+ <xs:element minOccurs="0" name="birthDate" type="xs:dateTime"/>
+ <xs:element minOccurs="0" name="type" type="tns:customerType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="customerType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="PRIVATE"/>
+ <xs:enumeration value="BUSINESS"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>
+ <xs:complexType name="NoSuchCustomer">
+ <xs:sequence>
+ <xs:element name="customerId" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="getCustomersByNameResponse">
+ <wsdl:part name="parameters" element="tns:getCustomersByNameResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getCustomersByName">
+ <wsdl:part name="parameters" element="tns:getCustomersByName">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="NoSuchCustomerException">
+ <wsdl:part name="NoSuchCustomerException" element="tns:NoSuchCustomer">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="CustomerService">
+ <wsdl:operation name="getCustomersByName">
+ <wsdl:input name="getCustomersByName" message="tns:getCustomersByName">
+ </wsdl:input>
+ <wsdl:output name="getCustomersByNameResponse" message="tns:getCustomersByNameResponse">
+ </wsdl:output>
+ <wsdl:fault name="NoSuchCustomerException" message="tns:NoSuchCustomerException">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CustomerServiceServiceSoapBinding" type="tns:CustomerService">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getCustomersByName">
+ <soap:operation soapAction="getCustomersByName" style="document"/>
+ <wsdl:input name="getCustomersByName">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getCustomersByNameResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="NoSuchCustomerException">
+ <soap:fault name="NoSuchCustomerException" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CustomerServiceService">
+ <wsdl:port name="CustomerServicePort" binding="tns:CustomerServiceServiceSoapBinding">
+ <soap:address location="http://localhost:9090/CustomerServicePort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService2.wsdl
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService2.wsdl?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService2.wsdl (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService2.wsdl Mon Feb 8 09:18:06 2010
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="CustomerServiceService" targetNamespace="http://customerservice2.example.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://customerservice2.example.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <wsdl:types>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://customerservice2.example.com/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://customerservice2.example.com/">
+ <xs:element name="getCustomersByName" type="tns:getCustomersByName"/>
+ <xs:element name="getCustomersByNameResponse" type="tns:getCustomersByNameResponse"/>
+ <xs:complexType name="getCustomersByName">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="getCustomersByNameResponse">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:customer"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="customer">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="address" nillable="true" type="xs:string"/>
+ <xs:element name="numOrders" type="xs:int"/>
+ <xs:element name="revenue" type="xs:double"/>
+ <xs:element minOccurs="0" name="test" type="xs:decimal"/>
+ <xs:element minOccurs="0" name="birthDate" type="xs:dateTime"/>
+ <xs:element minOccurs="0" name="type" type="tns:customerType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="customerType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="PRIVATE"/>
+ <xs:enumeration value="BUSINESS"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:element name="NoSuchCustomer" type="tns:NoSuchCustomer"/>
+ <xs:complexType name="NoSuchCustomer">
+ <xs:sequence>
+ <xs:element name="customerId" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="getCustomersByNameResponse">
+ <wsdl:part name="parameters" element="tns:getCustomersByNameResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getCustomersByName">
+ <wsdl:part name="parameters" element="tns:getCustomersByName">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="NoSuchCustomerException">
+ <wsdl:part name="NoSuchCustomerException" element="tns:NoSuchCustomer">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="CustomerService">
+ <wsdl:operation name="getCustomersByName">
+ <wsdl:input name="getCustomersByName" message="tns:getCustomersByName">
+ </wsdl:input>
+ <wsdl:output name="getCustomersByNameResponse" message="tns:getCustomersByNameResponse">
+ </wsdl:output>
+ <wsdl:fault name="NoSuchCustomerException" message="tns:NoSuchCustomerException">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CustomerServiceServiceSoapBinding" type="tns:CustomerService">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getCustomersByName">
+ <soap:operation soapAction="getCustomersByName" style="document"/>
+ <wsdl:input name="getCustomersByName">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getCustomersByNameResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="NoSuchCustomerException">
+ <soap:fault name="NoSuchCustomerException" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CustomerServiceService">
+ <wsdl:port name="CustomerServicePort" binding="tns:CustomerServiceServiceSoapBinding">
+ <soap:address location="http://localhost:9090/CustomerServicePort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService2.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService2.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/CustomerService2.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedFault.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedFault.xml?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedFault.xml (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedFault.xml Mon Feb 8 09:18:06 2010
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:Envelope xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://customerservice.example.com/">
+ <ns2:Body>
+ <ns2:Fault>
+ <faultcode xmlns:ns4="com.example.customerservice">ns4:NoSuchCustomerException</faultcode>
+ <faultstring>No customer found</faultstring>
+ <detail>
+ <ns3:NoSuchCustomer>
+ <customerId>None</customerId>
+ </ns3:NoSuchCustomer>
+ </detail>
+ </ns2:Fault>
+ </ns2:Body>
+</ns2:Envelope>
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedFault.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedFault.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedFault.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedResult.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedResult.xml?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedResult.xml (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedResult.xml Mon Feb 8 09:18:06 2010
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:Envelope xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://customerservice.example.com/">
+ <ns2:Body>
+ <ns3:getCustomersByName>
+ <name>Smith</name>
+ </ns3:getCustomersByName>
+ </ns2:Body>
+</ns2:Envelope>
\ No newline at end of file
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedResult.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedResult.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/SoapMarshalTestExpectedResult.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/binding.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/binding.xml?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/binding.xml (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/binding.xml Mon Feb 8 09:18:06 2010
@@ -0,0 +1,27 @@
+<!--
+
+ 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.
+
+-->
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation=""
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="wsdl:definitions">
+ <enableWrapperStyle>false</enableWrapperStyle>
+ </bindings>
+</bindings>
\ No newline at end of file
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/binding.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/binding.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/binding.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/request.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/request.xml?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/request.xml (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/request.xml Mon Feb 8 09:18:06 2010
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <ns2:getCustomersByName xmlns:ns2="http://customerservice.example.com/">
+ <name>Smith</name>
+ </ns2:getCustomersByName>
+ </soap:Body>
+</soap:Envelope>
\ No newline at end of file
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/request.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/request.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/request.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/requestFault.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/requestFault.xml?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/requestFault.xml (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/requestFault.xml Mon Feb 8 09:18:06 2010
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <ns2:getCustomersByName xmlns:ns2="http://customerservice.example.com/">
+ <name>none</name>
+ </ns2:getCustomersByName>
+ </soap:Body>
+</soap:Envelope>
\ No newline at end of file
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/requestFault.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/requestFault.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/requestFault.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/response.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/response.xml?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/response.xml (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/response.xml Mon Feb 8 09:18:06 2010
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:Envelope xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://customerservice.example.com/">
+ <ns2:Body>
+ <ns3:getCustomersByNameResponse>
+ <return>
+ <name>Smith</name>
+ <numOrders>0</numOrders>
+ <revenue>100000.0</revenue>
+ </return>
+ </ns3:getCustomersByNameResponse>
+ </ns2:Body>
+</ns2:Envelope>
\ No newline at end of file
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/response.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/response.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/response.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/responseFault.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/responseFault.xml?rev=907587&view=auto
==============================================================================
--- camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/responseFault.xml (added)
+++ camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/responseFault.xml Mon Feb 8 09:18:06 2010
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:Envelope xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://customerservice.example.com/">
+ <ns2:Body>
+ <ns2:Fault>
+ <faultcode xmlns:ns4="com.example.customerservice">ns4:NoSuchCustomerException</faultcode>
+ <faultstring>Customer not found</faultstring>
+ <detail>
+ <ns3:NoSuchCustomer>
+ <customerId>none</customerId>
+ </ns3:NoSuchCustomer>
+ </detail>
+ </ns2:Fault>
+ </ns2:Body>
+</ns2:Envelope>
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/responseFault.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/responseFault.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-soap/src/test/resources/org/apache/camel/converter/soap/responseFault.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: camel/trunk/components/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/pom.xml?rev=907587&r1=907586&r2=907587&view=diff
==============================================================================
--- camel/trunk/components/pom.xml (original)
+++ camel/trunk/components/pom.xml Mon Feb 8 09:18:06 2010
@@ -89,6 +89,7 @@
<module>camel-servlet</module>
<module>camel-smpp</module>
<module>camel-snmp</module>
+ <module>camel-soap</module>
<module>camel-spring</module>
<module>camel-spring-integration</module>
<module>camel-spring-javaconfig</module>