Author: bimargulies
Date: Sun Oct 18 01:47:18 2009
New Revision: 826337
URL: http://svn.apache.org/viewvc?rev=826337&view=rev
Log:
CXF-1355 (mostly) additional tests. Also a tiny bit of extraneous code cleanup.
Added:
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/beanpostprocessor/CustomizedfBeanPostProcessorTest.java
(with props)
Modified:
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/NullInvoker.java
cxf/trunk/systests/jaxws/src/test/resources/org/apache/cxf/systest/jaxws/beanpostprocessor/customized-context.xml
Modified:
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=826337&r1=826336&r2=826337&view=diff
==============================================================================
---
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Sun Oct 18 01:47:18 2009
@@ -118,8 +118,6 @@
public static final String HEADER = "messagepart.isheader";
public static final String OUT_OF_BAND_HEADER =
"messagepart.is_out_of_band_header";
- private boolean mtomEnabled = true;
-
public SoapBindingFactory() {
}
@@ -859,12 +857,4 @@
d.setMessageObserver(mo);
}
-
- public void setMtomEnabled(boolean mtomEnabled) {
- this.mtomEnabled = mtomEnabled;
- }
-
- public boolean isMtomEnabled() {
- return mtomEnabled;
- }
}
Modified:
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/NullInvoker.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/NullInvoker.java?rev=826337&r1=826336&r2=826337&view=diff
==============================================================================
---
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/NullInvoker.java
(original)
+++
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/NullInvoker.java
Sun Oct 18 01:47:18 2009
@@ -24,7 +24,6 @@
public class NullInvoker implements Invoker {
public Object invoke(Exchange exchange, Object o) {
- // TODO Auto-generated method stub
return null;
}
Added:
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/beanpostprocessor/CustomizedfBeanPostProcessorTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/beanpostprocessor/CustomizedfBeanPostProcessorTest.java?rev=826337&view=auto
==============================================================================
---
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/beanpostprocessor/CustomizedfBeanPostProcessorTest.java
(added)
+++
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/beanpostprocessor/CustomizedfBeanPostProcessorTest.java
Sun Oct 18 01:47:18 2009
@@ -0,0 +1,63 @@
+/**
+ * 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.cxf.systest.jaxws.beanpostprocessor;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.jaxws.JaxWsClientFactoryBean;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.test.AbstractCXFSpringTest;
+
+import org.junit.Test;
+
+/**
+ * The majority of this test happens when the context is loaded.
+ */
+public class CustomizedfBeanPostProcessorTest extends AbstractCXFSpringTest {
+
+ @Test
+ public void verifyServices() throws Exception {
+ JaxWsClientFactoryBean cf = new JaxWsClientFactoryBean();
+ cf.setAddress("local://services/Alger");
+ cf.setServiceClass(IWebServiceRUs.class);
+ cf.setBindingId("http://apache.org/cxf/binding/http");
+ Client client = cf.create();
+ String response = (String)client.invoke("consultTheOracle")[0];
+ assertEquals("All your bases belong to us.", response);
+ Service service = WebServiceRUs.getService();
+ assertEquals(AegisDatabinding.class,
service.getDataBinding().getClass());
+ Map<QName, Endpoint> endpoints = service.getEndpoints();
+ Endpoint ep = endpoints.values().iterator().next();
+ assertEquals("http://apache.org/cxf/binding/http",
+ ep.getBinding().getBindingInfo().getBindingId());
+ }
+
+ @Override
+ protected String[] getConfigLocations() {
+ return new String[]
{"/org/apache/cxf/systest/jaxws/beanpostprocessor/customized-context.xml" };
+ }
+
+
+}
Propchange:
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/beanpostprocessor/CustomizedfBeanPostProcessorTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
cxf/trunk/systests/jaxws/src/test/resources/org/apache/cxf/systest/jaxws/beanpostprocessor/customized-context.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/resources/org/apache/cxf/systest/jaxws/beanpostprocessor/customized-context.xml?rev=826337&r1=826336&r2=826337&view=diff
==============================================================================
---
cxf/trunk/systests/jaxws/src/test/resources/org/apache/cxf/systest/jaxws/beanpostprocessor/customized-context.xml
(original)
+++
cxf/trunk/systests/jaxws/src/test/resources/org/apache/cxf/systest/jaxws/beanpostprocessor/customized-context.xml
Sun Oct 18 01:47:18 2009
@@ -9,14 +9,21 @@
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-local.xml" />
+ <import
resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml"/>
<!-- This test is not run with a servlet container. It tests non-servlet
publication. -->
<bean id="servicebean"
class="org.apache.cxf.systest.jaxws.beanpostprocessor.WebServiceRUs"/>
<bean id="dataBinding"
class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope='prototype'/>
+<bean id='serverFactory' class='org.apache.cxf.jaxws.JaxWsServerFactoryBean'
+ scope='prototype'>
+ <property name="bindingId" value="http://apache.org/cxf/binding/http"/>
+</bean>
+
<bean id="postprocess"
class="org.apache.cxf.jaxws.spring.JaxWsWebServicePublisherBeanPostProcessor">
<property name='urlPrefix' value='local://services/' />
<property name='prototypeDataBindingBeanName' value="dataBinding"/>
+ <property name="prototypeServerFactoryBeanName" value="serverFactory"/>
</bean>
</beans>
\ No newline at end of file