You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2009/08/13 08:12:51 UTC
svn commit: r803786 - in
/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src:
main/java/org/apache/servicemix/cxfbc/
main/java/org/apache/servicemix/cxfbc/interceptors/
test/java/org/apache/servicemix/cxfbc/ tes...
Author: ffang
Date: Thu Aug 13 06:12:51 2009
New Revision: 803786
URL: http://svn.apache.org/viewvc?rev=803786&view=rev
Log:
[SMXCOMP-616]add schemaValidationEnabled flag for cxf bc consumer
Added:
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/AbstractSchemaValidationInterceptor.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationInInterceptor.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationOutInterceptor.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcSchemaValidationTest.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiandsoapwrapper.xml
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiwrapper.xml
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation.xml
Modified:
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/provider/GreeterImpl.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/hello_world.wsdl
Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=803786&r1=803785&r2=803786&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Thu Aug 13 06:12:51 2009
@@ -49,6 +49,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.attachment.AttachmentImpl;
+
import org.apache.cxf.binding.jbi.JBIFault;
import org.apache.cxf.binding.soap.SoapFault;
import org.apache.cxf.binding.soap.SoapMessage;
@@ -106,6 +107,8 @@
import org.apache.servicemix.cxfbc.interceptors.JbiOperationInterceptor;
import org.apache.servicemix.cxfbc.interceptors.JbiOutWsdl1Interceptor;
import org.apache.servicemix.cxfbc.interceptors.MtomCheckInterceptor;
+import org.apache.servicemix.cxfbc.interceptors.SchemaValidationInInterceptor;
+import org.apache.servicemix.cxfbc.interceptors.SchemaValidationOutInterceptor;
import org.apache.servicemix.jbi.jaxp.SourceTransformer;
import org.apache.servicemix.soap.util.DomUtil;
import org.mortbay.jetty.Handler;
@@ -170,7 +173,8 @@
private ClassLoader suClassLoader;
private boolean x509;
-
+
+ private boolean schemaValidationEnabled;
/**
* @return the wsdl
*/
@@ -440,6 +444,14 @@
cxfService.getInInterceptors().add(
new JbiInWsdl1Interceptor(isUseJBIWrapper(),
isUseSOAPEnvelope()));
+ if (isSchemaValidationEnabled()) {
+ cxfService.getInInterceptors().add(new SchemaValidationInInterceptor(
+ isUseJBIWrapper(), isUseSOAPEnvelope()));
+ }
+ if (isSchemaValidationEnabled()) {
+ cxfService.getOutInterceptors().add(new SchemaValidationOutInterceptor(
+ isUseJBIWrapper(), isUseSOAPEnvelope()));
+ }
cxfService.getInInterceptors().add(new JbiInInterceptor());
cxfService.getInInterceptors().add(
new JbiJAASInterceptor(((CxfBcComponent) this
@@ -1110,5 +1122,21 @@
public boolean isX509() {
return x509;
}
+
+ public boolean isSchemaValidationEnabled() {
+ return schemaValidationEnabled;
+ }
+ /**
+ * Specifies if the endpoint use schemavalidation for the incoming/outgoing message.
+ *
+ * @param schemaValidationEnabled
+ * a boolean
+ * @org.apache.xbean.Property description="Specifies if the endpoint use schemavalidation for the incoming/outgoing message.
+ * Default is <code>false</code>.
+ */
+
+ public void setSchemaValidationEnabled(boolean schemaValidationEnabled) {
+ this.schemaValidationEnabled = schemaValidationEnabled;
+ }
}
Added: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/AbstractSchemaValidationInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/AbstractSchemaValidationInterceptor.java?rev=803786&view=auto
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/AbstractSchemaValidationInterceptor.java (added)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/AbstractSchemaValidationInterceptor.java Thu Aug 13 06:12:51 2009
@@ -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.servicemix.cxfbc.interceptors;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.validation.Schema;
+import org.w3c.dom.Element;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.ServiceModelUtil;
+import org.apache.cxf.wsdl.EndpointReferenceUtils;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.soap.util.DomUtil;
+
+
+public abstract class AbstractSchemaValidationInterceptor extends
+ AbstractSoapInterceptor {
+ private boolean useJBIWrapper = true;
+ private boolean useSOAPEnvelope = true;
+
+ public AbstractSchemaValidationInterceptor(String phase, boolean useJBIWrapper, boolean useSOAPEnvelope) {
+ super(phase);
+ this.useJBIWrapper = useJBIWrapper;
+ this.useSOAPEnvelope = useSOAPEnvelope;
+ }
+
+ protected void validateMessage(SoapMessage message) throws Fault {
+ Service service = ServiceModelUtil.getService(message.getExchange());
+ if (service != null) {
+ Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0));
+ if (schema != null) {
+ javax.xml.validation.Validator validator = schema.newValidator();
+ try {
+ Element sourceMessage = new SourceTransformer().toDOMElement(message.getContent(Source.class));
+ if (!useJBIWrapper && !useSOAPEnvelope) {
+ validator.validate(new DOMSource(sourceMessage));
+ } else {
+ Element partWrapper = DomUtil
+ .getFirstChildElement(sourceMessage);
+ while (partWrapper != null) {
+ Element partContent = DomUtil
+ .getFirstChildElement(partWrapper);
+ validator.validate(new DOMSource(partContent));
+ partWrapper = DomUtil
+ .getNextSiblingElement(partWrapper);
+ }
+ }
+
+ } catch (Exception e) {
+ throw new Fault(e);
+ }
+ }
+ }
+ }
+
+}
Added: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationInInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationInInterceptor.java?rev=803786&view=auto
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationInInterceptor.java (added)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationInInterceptor.java Thu Aug 13 06:12:51 2009
@@ -0,0 +1,37 @@
+/*
+ * 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.servicemix.cxfbc.interceptors;
+
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.Phase;
+
+
+
+public class SchemaValidationInInterceptor extends AbstractSchemaValidationInterceptor {
+
+ public SchemaValidationInInterceptor(boolean useJBIWrapper, boolean useSOAPEnvelope) {
+ super(Phase.PRE_INVOKE, useJBIWrapper, useSOAPEnvelope);
+ addAfter(JbiInWsdl1Interceptor.class.getName());
+ }
+ public void handleMessage(SoapMessage message) throws Fault {
+
+ validateMessage(message);
+ }
+
+}
Added: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationOutInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationOutInterceptor.java?rev=803786&view=auto
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationOutInterceptor.java (added)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/SchemaValidationOutInterceptor.java Thu Aug 13 06:12:51 2009
@@ -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.
+ */
+package org.apache.servicemix.cxfbc.interceptors;
+
+
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.Phase;
+
+
+
+public class SchemaValidationOutInterceptor extends AbstractSchemaValidationInterceptor {
+
+ public SchemaValidationOutInterceptor(boolean useJBIWrapper, boolean useSOAPEnvelope) {
+ super(Phase.PRE_STREAM, useJBIWrapper, useSOAPEnvelope);
+ addBefore(JbiOutInterceptor.class.getName());
+ }
+ public void handleMessage(SoapMessage message) throws Fault {
+
+ validateMessage(message);
+ }
+
+}
Added: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcSchemaValidationTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcSchemaValidationTest.java?rev=803786&view=auto
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcSchemaValidationTest.java (added)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcSchemaValidationTest.java Thu Aug 13 06:12:51 2009
@@ -0,0 +1,142 @@
+/*
+ * 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.servicemix.cxfbc;
+
+
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.hello_world_soap_http_provider.Greeter;
+
+import org.apache.servicemix.jbi.container.SpringJBIContainer;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.tck.SpringTestSupport;
+import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+
+
+public class CxfBcSchemaValidationTest extends SpringTestSupport {
+
+ private static final Logger LOG = LogUtils.getL7dLogger(CxfBcSchemaValidationTest.class);
+
+ private static final java.net.URL WSDL_LOC;
+ static {
+ java.net.URL tmp = null;
+ try {
+ tmp = CxfBcSchemaValidationTest.class.getClassLoader().getResource(
+ "hello_world.wsdl"
+ );
+ } catch (final Exception e) {
+ e.printStackTrace();
+ }
+ WSDL_LOC = tmp;
+
+ }
+
+ public void setUp() throws Exception {
+ //override super setup
+ LOG.info("setUp is invoked");
+ }
+
+ public void setUpJBI(String beanFile) throws Exception {
+ if (context != null) {
+ context.refresh();
+ }
+ transformer = new SourceTransformer();
+ if (beanFile == null) {
+ context = createBeanFactory();
+ } else {
+ context = createBeanFactory(beanFile);
+ }
+
+ jbi = (SpringJBIContainer) context.getBean("jbi");
+ assertNotNull("JBI Container not found in spring!", jbi);
+ }
+
+ public void tearDown() throws Exception {
+ if (context != null) {
+ context.destroy();
+ context = null;
+ }
+ if (jbi != null) {
+ jbi.shutDown();
+ jbi.destroy();
+ jbi = null;
+ }
+ Thread.sleep(5000);
+ }
+
+ public void testSchemaValidationWithJBIWrapper() throws Exception {
+ setUpJBI("org/apache/servicemix/cxfbc/xbean-schema-validation.xml");
+ schemaValidationBase();
+ }
+
+ public void testSchemaValidationWithoutJBIWrapper() throws Exception {
+ setUpJBI("org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiwrapper.xml");
+ schemaValidationBase();
+ }
+
+ public void testSchemaValidationWithoutJBIandSOAPWrapper() throws Exception {
+ setUpJBI("org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiandsoapwrapper.xml");
+ schemaValidationBase();
+ }
+
+ public void schemaValidationBase() {
+ LOG.info("test schema validation");
+
+ final javax.xml.ws.Service svc = javax.xml.ws.Service.create(WSDL_LOC,
+ new javax.xml.namespace.QName(
+ "http://apache.org/hello_world_soap_http_provider",
+ "SOAPService"));
+ final Greeter greeter = svc.getPort(new javax.xml.namespace.QName(
+ "http://apache.org/hello_world_soap_http_provider",
+ "SoapPort"), Greeter.class);
+
+ String ret = greeter.greetMe("ffang");
+ assertEquals(ret, "Hello ffang");
+ try {
+ ret = greeter.greetMe("schemavalidation");
+ fail("should catch exception as schemavalidation failed");
+ } catch (Exception ex) {
+ //should catch exception as schemavalidation failed
+ assertTrue(ex.getMessage().
+ indexOf("is not facet-valid with respect to maxLength '30' for type 'MyStringType'.") > 0);
+ }
+ try {
+ ret = greeter.greetMe("should catch exception as schemavalidation failed");
+ fail("should catch exception as schemavalidation failed");
+ } catch (Exception ex) {
+ //should catch exception as schemavalidation failed
+ assertTrue(ex.getMessage().
+ indexOf("is not facet-valid with respect to maxLength '30' for type 'MyStringType'.") > 0);
+ }
+ }
+
+ @Override
+ protected AbstractXmlApplicationContext createBeanFactory() {
+ // load cxf se and bc from spring config file
+ return new ClassPathXmlApplicationContext(
+ "org/apache/servicemix/cxfbc/xbean-schema-validation.xml");
+ }
+
+ protected AbstractXmlApplicationContext createBeanFactory(String beanFile) {
+ //load cxf se and bc from specified spring config file
+ return new ClassPathXmlApplicationContext(
+ beanFile);
+ }
+
+}
Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/provider/GreeterImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/provider/GreeterImpl.java?rev=803786&r1=803785&r2=803786&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/provider/GreeterImpl.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/provider/GreeterImpl.java Thu Aug 13 06:12:51 2009
@@ -36,8 +36,11 @@
e.printStackTrace();
}
}
-
- return "Hello " + me;
+ if ("schemavalidation".equals(me)) {
+ return "intended to return a long string to break the schema validation";
+ } else {
+ return "Hello " + me;
+ }
}
public String sayHi() {
Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/hello_world.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/hello_world.wsdl?rev=803786&r1=803785&r2=803786&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/hello_world.wsdl (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/hello_world.wsdl Thu Aug 13 06:12:51 2009
@@ -55,7 +55,7 @@
<element name="greetMeResponse">
<complexType>
<sequence>
- <element name="responseType" type="string"/>
+ <element name="responseType" type="tns:MyStringType"/>
</sequence>
</complexType>
</element>
Added: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiandsoapwrapper.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiandsoapwrapper.xml?rev=803786&view=auto
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiandsoapwrapper.xml (added)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiandsoapwrapper.xml Thu Aug 13 06:12:51 2009
@@ -0,0 +1,70 @@
+<?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:sm="http://servicemix.apache.org/config/1.0"
+ xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
+ xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
+ xmlns:greeter="http://apache.org/hello_world_soap_http_provider">
+
+ <sm:container id="jbi" embedded="true">
+
+ <sm:endpoints>
+ <cxfse:endpoint useJBIWrapper="false" useSOAPEnvelope="false">
+ <cxfse:pojo>
+ <bean class="org.apache.servicemix.cxfbc.provider.GreeterImpl" />
+ </cxfse:pojo>
+ <cxfse:inInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfse:inInterceptors>
+ <cxfse:outInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfse:outInterceptors>
+ <cxfse:inFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfse:inFaultInterceptors>
+ <cxfse:outFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfse:outFaultInterceptors>
+ </cxfse:endpoint>
+ <cxfbc:consumer wsdl="hello_world.wsdl"
+ targetEndpoint="SoapPort"
+ targetService="greeter:SOAPService"
+ targetInterface="greeter:Greeter"
+ schemaValidationEnabled="true"
+ useJBIWrapper="false"
+ useSOAPEnvelope="false"
+ >
+ <cxfbc:inInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfbc:inInterceptors>
+ <cxfbc:outInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfbc:outInterceptors>
+ <cxfbc:inFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfbc:inFaultInterceptors>
+ <cxfbc:outFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfbc:outFaultInterceptors>
+ </cxfbc:consumer>
+ </sm:endpoints>
+
+ </sm:container>
+
+</beans>
Added: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiwrapper.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiwrapper.xml?rev=803786&view=auto
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiwrapper.xml (added)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation-withoutjbiwrapper.xml Thu Aug 13 06:12:51 2009
@@ -0,0 +1,69 @@
+<?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:sm="http://servicemix.apache.org/config/1.0"
+ xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
+ xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
+ xmlns:greeter="http://apache.org/hello_world_soap_http_provider">
+
+ <sm:container id="jbi" embedded="true">
+
+ <sm:endpoints>
+ <cxfse:endpoint useJBIWrapper="false">
+ <cxfse:pojo>
+ <bean class="org.apache.servicemix.cxfbc.provider.GreeterImpl" />
+ </cxfse:pojo>
+ <cxfse:inInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfse:inInterceptors>
+ <cxfse:outInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfse:outInterceptors>
+ <cxfse:inFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfse:inFaultInterceptors>
+ <cxfse:outFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfse:outFaultInterceptors>
+ </cxfse:endpoint>
+ <cxfbc:consumer wsdl="hello_world.wsdl"
+ targetEndpoint="SoapPort"
+ targetService="greeter:SOAPService"
+ targetInterface="greeter:Greeter"
+ schemaValidationEnabled="true"
+ useJBIWrapper="false"
+ >
+ <cxfbc:inInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfbc:inInterceptors>
+ <cxfbc:outInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfbc:outInterceptors>
+ <cxfbc:inFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfbc:inFaultInterceptors>
+ <cxfbc:outFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfbc:outFaultInterceptors>
+ </cxfbc:consumer>
+ </sm:endpoints>
+
+ </sm:container>
+
+</beans>
Added: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation.xml?rev=803786&view=auto
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation.xml (added)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean-schema-validation.xml Thu Aug 13 06:12:51 2009
@@ -0,0 +1,68 @@
+<?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:sm="http://servicemix.apache.org/config/1.0"
+ xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
+ xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
+ xmlns:greeter="http://apache.org/hello_world_soap_http_provider">
+
+ <sm:container id="jbi" embedded="true">
+
+ <sm:endpoints>
+ <cxfse:endpoint>
+ <cxfse:pojo>
+ <bean class="org.apache.servicemix.cxfbc.provider.GreeterImpl" />
+ </cxfse:pojo>
+ <cxfse:inInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfse:inInterceptors>
+ <cxfse:outInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfse:outInterceptors>
+ <cxfse:inFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfse:inFaultInterceptors>
+ <cxfse:outFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfse:outFaultInterceptors>
+ </cxfse:endpoint>
+ <cxfbc:consumer wsdl="hello_world.wsdl"
+ targetEndpoint="SoapPort"
+ targetService="greeter:SOAPService"
+ targetInterface="greeter:Greeter"
+ schemaValidationEnabled="true"
+ >
+ <cxfbc:inInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfbc:inInterceptors>
+ <cxfbc:outInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfbc:outInterceptors>
+ <cxfbc:inFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </cxfbc:inFaultInterceptors>
+ <cxfbc:outFaultInterceptors>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </cxfbc:outFaultInterceptors>
+ </cxfbc:consumer>
+ </sm:endpoints>
+
+ </sm:container>
+
+</beans>