You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by da...@apache.org on 2007/04/10 01:05:55 UTC
svn commit: r526945 [2/2] - in /incubator/cxf/trunk:
api/src/main/java/org/apache/cxf/endpoint/
api/src/main/java/org/apache/cxf/message/
api/src/main/java/org/apache/cxf/service/
common/common/src/main/java/org/apache/cxf/configuration/spring/ parent/...
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/configured-endpoints.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/configured-endpoints.xml?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/configured-endpoints.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/configured-endpoints.xml Mon Apr 9 16:05:51 2007
@@ -1,90 +1,94 @@
<?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.
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:foo="http://cxf.apache.org/configuration/foo"
- xsi:schemaLocation="
-http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean name="{http://apache.org/hello_world_soap_http}SOAPService" abstract="true">
- <property name="inInterceptors">
- <list>
- <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
- <property name="name" value="service-in"/>
- </bean>
- </list>
- </property>
- <property name="inFaultInterceptors">
- <list>
- <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
- <property name="name" value="service-in-fault"/>
- </bean>
- </list>
- </property>
- <property name="outInterceptors">
- <list>
- <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
- <property name="name" value="service-out"/>
- </bean>
- </list>
- </property>
- <property name="outFaultInterceptors">
- <list>
- <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
- <property name="name" value="service-out-fault"/>
- </bean>
- </list>
- </property>
- </bean>
-
- <bean name="{http://apache.org/hello_world_soap_http}SoapPort" abstract="true">
- <property name="enableSchemaValidation" value="true"/>
- <property name="inInterceptors">
- <list>
- <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
- <property name="name" value="endpoint-in"/>
- </bean>
- </list>
- </property>
- <property name="inFaultInterceptors">
- <list>
- <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
- <property name="name" value="endpoint-in-fault"/>
- </bean>
- </list>
- </property>
- <property name="outInterceptors">
- <list>
- <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
- <property name="name" value="endpoint-out"/>
- </bean>
- </list>
- </property>
- <property name="outFaultInterceptors">
- <list>
- <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
- <property name="name" value="endpoint-out-fault"/>
- </bean>
- </list>
- </property>
- </bean>
-
-
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:foo="http://cxf.apache.org/configuration/foo"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:soap="http://cxf.apache.org/bindings/soap"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+http://cxf.apache.org/bindings/soap http://cxf.apache.org/schema/bindings/soap.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">
+
+ <bean name="{http://apache.org/hello_world_soap_http}SOAPService"
+ abstract="true">
+ <property name="inInterceptors">
+ <list>
+ <bean
+ class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
+ <property name="name" value="service-in" />
+ </bean>
+ </list>
+ </property>
+ <property name="inFaultInterceptors">
+ <list>
+ <bean
+ class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
+ <property name="name" value="service-in-fault" />
+ </bean>
+ </list>
+ </property>
+ <property name="outInterceptors">
+ <list>
+ <bean
+ class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
+ <property name="name" value="service-out" />
+ </bean>
+ </list>
+ </property>
+ <property name="outFaultInterceptors">
+ <list>
+ <bean
+ class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
+ <property name="name" value="service-out-fault" />
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <jaxws:endpoint id="{http://apache.org/hello_world_soap_http}SoapPort"
+ abstract="true">
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
+ <property name="name" value="endpoint-in" />
+ </bean>
+ </jaxws:inInterceptors>
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
+ <property name="name" value="endpoint-out" />
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inFaultInterceptors>
+ <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
+ <property name="name" value="endpoint-in-fault" />
+ </bean>
+ </jaxws:inFaultInterceptors>
+ <jaxws:outFaultInterceptors>
+ <bean class="org.apache.cxf.jaxws.ConfiguredEndpointTest$TestInterceptor">
+ <property name="name" value="endpoint-out-fault" />
+ </bean>
+ </jaxws:outFaultInterceptors>
+ <jaxws:properties>
+ <entry key="schema-validation-enabled" value="true" />
+ </jaxws:properties>
+ </jaxws:endpoint>
+
+
</beans>
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderService.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderService.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderService.java Mon Apr 9 16:05:51 2007
@@ -32,7 +32,7 @@
String echo2(String s1, @WebParam(mode = Mode.OUT)
Holder<String> outS2, String s2);
- String echo3(@WebParam(mode = Mode.INOUT, header = true)
+ String echo3(@WebParam(mode = Mode.INOUT, header = true, name = "header")
Holder<String> header, String s1);
}
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderServiceImpl.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderServiceImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderServiceImpl.java Mon Apr 9 16:05:51 2007
@@ -18,8 +18,6 @@
*/
package org.apache.cxf.jaxws.holder;
-import javax.jws.WebParam;
-import javax.jws.WebParam.Mode;
import javax.jws.WebService;
import javax.xml.ws.Holder;
@@ -27,14 +25,12 @@
@WebService(endpointInterface = "org.apache.cxf.jaxws.holder.HolderService")
public class HolderServiceImpl implements HolderService {
- public String echo(String s1, String s2, @WebParam(mode = Mode.OUT)
- Holder<String> outS2) {
+ public String echo(String s1, String s2, Holder<String> outS2) {
outS2.value = s2;
return s1;
}
- public String echo2(String s1, @WebParam(mode = Mode.OUT)
- Holder<String> outS2, String s2) {
+ public String echo2(String s1, Holder<String> outS2, String s2) {
outS2.value = s2;
return s1;
}
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/holder/HolderTest.java Mon Apr 9 16:05:51 2007
@@ -22,6 +22,9 @@
import org.w3c.dom.Node;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusException;
+import org.apache.cxf.bus.CXFBusFactory;
import org.apache.cxf.jaxws.AbstractJaxWsTest;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
@@ -34,6 +37,12 @@
public class HolderTest extends AbstractJaxWsTest {
private final String address = "http://localhost:9000/HolderService";
+ @Override
+ protected Bus createBus() throws BusException {
+ // TODO Auto-generated method stub
+ return new CXFBusFactory().createBus();
+ }
+
@Test
public void testClient() throws Exception {
EndpointInfo ei = new EndpointInfo(null, "http://schemas.xmlsoap.org/soap/http");
@@ -67,7 +76,7 @@
assertNotNull(response);
assertValid("//h:echoResponse/h:return[text()='one']", response);
- assertValid("//h:echoResponse/h:outS2[text()='two']", response);
+ assertValid("//h:echoResponse/h:return1[text()='two']", response);
assertNoFault(response);
response = invoke(address, LocalTransportFactory.TRANSPORT_ID, "echo2.xml");
@@ -75,7 +84,7 @@
assertNotNull(response);
assertNoFault(response);
assertValid("//h:echo2Response/h:return[text()='one']", response);
- assertValid("//h:echo2Response/h:outS2[text()='two']", response);
+ assertValid("//h:echo2Response/h:return1[text()='two']", response);
// test holder with in/out header
response = invoke(address, LocalTransportFactory.TRANSPORT_ID, "echo3.xml");
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderServiceFactoryTest.java Mon Apr 9 16:05:51 2007
@@ -31,6 +31,7 @@
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.endpoint.ServerImpl;
import org.apache.cxf.jaxws.AbstractJaxWsTest;
+import org.apache.cxf.jaxws.JAXWSMethodInvoker;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
@@ -81,7 +82,8 @@
JaxWsServiceFactoryBean bean = new JaxWsServiceFactoryBean();
bean.setServiceClass(DOMSourcePayloadProvider.class);
bean.setBus(getBus());
-
+ bean.setInvoker(new JAXWSMethodInvoker(new DOMSourcePayloadProvider()));
+
Service service = bean.create();
assertEquals("DOMSourcePayloadProviderService", service.getName().getLocalPart());
@@ -115,7 +117,8 @@
JaxWsServiceFactoryBean bean = new JaxWsServiceFactoryBean();
bean.setServiceClass(SOAPSourcePayloadProvider.class);
bean.setBus(getBus());
-
+ bean.setInvoker(new JAXWSMethodInvoker(new SOAPSourcePayloadProvider()));
+
Service service = bean.create();
assertEquals("SOAPSourcePayloadProviderService", service.getName().getLocalPart());
@@ -156,7 +159,8 @@
JaxWsServiceFactoryBean bean = new JaxWsServiceFactoryBean();
bean.setServiceClass(SAAJProvider.class);
bean.setBus(getBus());
-
+ bean.setInvoker(new JAXWSMethodInvoker(new SAAJProvider()));
+
Service service = bean.create();
assertEquals("SAAJProviderService", service.getName().getLocalPart());
@@ -194,6 +198,7 @@
JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
svrFactory.setServiceClass(StreamSourcePayloadProvider.class);
svrFactory.setBus(getBus());
+ svrFactory.setServiceBean(new StreamSourcePayloadProvider());
String address = "http://localhost:9000/test";
svrFactory.setAddress(address);
@@ -211,6 +216,7 @@
JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
svrFactory.setServiceClass(SourceMessageProvider.class);
svrFactory.setBus(getBus());
+ svrFactory.setServiceBean(new SourceMessageProvider());
String address = "http://localhost:9000/test";
svrFactory.setAddress(address);
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java Mon Apr 9 16:05:51 2007
@@ -24,9 +24,11 @@
import junit.framework.Assert;
+import org.apache.cxf.binding.BindingConfiguration;
+import org.apache.cxf.binding.soap.Soap12;
+import org.apache.cxf.binding.soap.SoapBindingConfiguration;
import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
-import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.interceptor.Interceptor;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
@@ -90,8 +92,7 @@
ep = (EndpointImpl) ctx.getBean("epWithInterceptors");
assertNotNull(ep);
- Endpoint cxfEP = ep.getServer().getEndpoint();
- List<Interceptor> inInterceptors = cxfEP.getInInterceptors();
+ List<Interceptor> inInterceptors = ep.getInInterceptors();
boolean saaj = false;
boolean logging = false;
for (Interceptor<?> i : inInterceptors) {
@@ -106,7 +107,7 @@
saaj = false;
logging = false;
- for (Interceptor<?> i : cxfEP.getOutInterceptors()) {
+ for (Interceptor<?> i : ep.getOutInterceptors()) {
if (i instanceof SAAJOutInterceptor) {
saaj = true;
} else if (i instanceof LoggingOutInterceptor) {
@@ -125,6 +126,11 @@
bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBinding");
assertNotNull(bean);
+
+ BindingConfiguration bc = bean.getBindingConfig();
+ assertTrue(bc instanceof SoapBindingConfiguration);
+ SoapBindingConfiguration sbc = (SoapBindingConfiguration) bc;
+ assertTrue(sbc.getVersion() instanceof Soap12);
}
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml Mon Apr 9 16:05:51 2007
@@ -85,5 +85,5 @@
<bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
</jaxws:outInterceptors>
</jaxws:endpoint>
-
+
</beans>
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/servers.xml Mon Apr 9 16:05:51 2007
@@ -69,7 +69,7 @@
serviceClass="org.apache.cxf.jaxws.service.Hello"
address="http://localhost:8080/test">
<jaxws:binding>
- <soap:soapBinding mtomEnabled="true"/>
+ <soap:soapBinding mtomEnabled="true" version="1.2"/>
</jaxws:binding>
</jaxws:server>
</beans>
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java Mon Apr 9 16:05:51 2007
@@ -36,6 +36,8 @@
import org.apache.cxf.Bus;
import org.apache.cxf.binding.BindingFactoryManager;
+import org.apache.cxf.service.model.MessageInfo;
+import org.apache.cxf.service.model.OperationInfo;
import org.apache.cxf.service.model.ServiceInfo;
import org.apache.cxf.transport.DestinationFactoryManager;
import org.apache.cxf.wsdl11.WSDLLocatorImpl;
@@ -58,9 +60,16 @@
JaxWsServiceConfiguration jwsc = (JaxWsServiceConfiguration) bean.getServiceConfigurations().get(0);
jwsc.setServiceFactory(bean);
- QName partName = jwsc.getInPartName(si.getInterface().getOperation(opName), sayHelloMethod, 0);
+ OperationInfo op = si.getInterface().getOperation(opName);
+ op.setInput("input", new MessageInfo(op, new QName("input")));
+ op.setOutput("output", new MessageInfo(op, new QName("output")));
+
+ QName partName = jwsc.getInPartName(op, sayHelloMethod, 0);
assertEquals("get wrong in partName for first param", new QName("http://cxf.com/", "arg0"), partName);
- partName = jwsc.getInPartName(si.getInterface().getOperation(opName), sayHelloMethod, 1);
+
+ op.getInput().addMessagePart(new QName("arg0"));
+
+ partName = jwsc.getInPartName(op, sayHelloMethod, 1);
assertEquals("get wrong in partName for first param", new QName("http://cxf.com/", "arg1"), partName);
}
@@ -69,7 +78,15 @@
Method sayHiMethod = Hello.class.getMethod("sayHi", new Class[]{});
ServiceInfo si = getMockedServiceModel("/wsdl/default_partname_test.wsdl");
JaxWsServiceConfiguration jwsc = new JaxWsServiceConfiguration();
- QName partName = jwsc.getOutPartName(si.getInterface().getOperation(opName), sayHiMethod, -1);
+ JaxWsServiceFactoryBean bean = new JaxWsServiceFactoryBean();
+ bean.setServiceClass(Hello.class);
+ jwsc.setServiceFactory(bean);
+
+ // clear the output
+ OperationInfo op = si.getInterface().getOperation(opName);
+ op.setOutput("output", new MessageInfo(op, new QName("output")));
+
+ QName partName = jwsc.getOutPartName(op, sayHiMethod, -1);
assertEquals("get wrong return partName", new QName("http://cxf.com/", "return"), partName);
}
Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java Mon Apr 9 16:05:51 2007
@@ -28,6 +28,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusException;
import org.apache.cxf.BusFactory;
+import org.apache.cxf.binding.BindingConfiguration;
import org.apache.cxf.binding.BindingFactoryManager;
import org.apache.cxf.binding.soap.model.SoapBindingInfo;
import org.apache.cxf.common.i18n.Message;
@@ -59,8 +60,8 @@
private QName endpointName;
private Map<String, Object> properties;
private List<AbstractWSFeature> features;
- private Object bindingConfig;
-
+ private BindingConfiguration bindingConfig;
+
protected Endpoint createEndpoint() throws BusException, EndpointException {
Service service = serviceFactory.getService();
@@ -208,10 +209,16 @@
protected BindingInfo createBindingInfo() {
BindingFactoryManager mgr = bus.getExtension(BindingFactoryManager.class);
String binding = bindingId;
+
+ if (binding == null && bindingConfig != null) {
+ binding = bindingConfig.getBindingId();
+ }
+
if (binding == null) {
// default to soap binding
binding = "http://schemas.xmlsoap.org/soap/";
}
+
try {
return mgr.getBindingFactory(binding).createBindingInfo(serviceFactory.getService(),
binding, bindingConfig);
@@ -263,10 +270,10 @@
return bindingId;
}
- public void setBindingConfig(Object obj) {
+ public void setBindingConfig(BindingConfiguration obj) {
bindingConfig = obj;
}
- public Object getBindingConfig() {
+ public BindingConfiguration getBindingConfig() {
return bindingConfig;
}
@@ -320,6 +327,14 @@
public void setFeatures(List<AbstractWSFeature> features) {
this.features = features;
+ }
+
+ public String getWsdlURL() {
+ return getServiceFactory().getWsdlURL();
+ }
+
+ public void setWsdlURL(String wsdlURL) {
+ getServiceFactory().setWsdlURL(wsdlURL);
}
}
Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Mon Apr 9 16:05:51 2007
@@ -88,6 +88,7 @@
public static final String MODE_OUT = "messagepart.mode.out";
public static final String MODE_INOUT = "messagepart.mode.inout";
public static final String HOLDER = "messagepart.isholder";
+ public static final String HEADER = "messagepart.isheader";
private static final Logger LOG = Logger.getLogger(ReflectionServiceFactoryBean.class.getName());
private static final ResourceBundle BUNDLE = BundleUtils.getBundle(ReflectionServiceFactoryBean.class);
@@ -441,6 +442,7 @@
//TODO - RPC vs DOC (type vs element)
if (isHeader(method, j)) {
part.setElementQName(q);
+ part.setProperty(HEADER, Boolean.TRUE);
}
part.setIndex(j);
}
@@ -472,6 +474,7 @@
}
if (isHeader(method, j)) {
part.setElementQName(q2);
+ part.setProperty(HEADER, Boolean.TRUE);
}
}
}
Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedEndpoint.java Mon Apr 9 16:05:51 2007
@@ -60,10 +60,6 @@
return wrappedEndpoint.getBinding();
}
- public boolean getEnableSchemaValidation() {
- return wrappedEndpoint.getEnableSchemaValidation();
- }
-
public Executor getExecutor() {
return wrappedEndpoint.getExecutor();
}
@@ -74,10 +70,6 @@
public MessageObserver getOutFaultObserver() {
return wrappedEndpoint.getOutFaultObserver();
- }
-
- public void setEnableSchemaValidation(boolean arg0) {
- wrappedEndpoint.setEnableSchemaValidation(arg0);
}
public void setExecutor(Executor arg0) {
Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/WrappedService.java Mon Apr 9 16:05:51 2007
@@ -87,16 +87,8 @@
// remaining APIs all wrapped
- public boolean getEnableSchemaValidationForAllPort() {
- return wrappedService.getEnableSchemaValidationForAllPort();
- }
-
public Executor getExecutor() {
return wrappedService.getExecutor();
- }
-
- public void setEnableSchemaValidationForAllPort(boolean arg0) {
- wrappedService.setEnableSchemaValidationForAllPort(arg0);
}
public void setExecutor(Executor arg0) {
Modified: incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/RoundTripTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/RoundTripTest.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/RoundTripTest.java (original)
+++ incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/RoundTripTest.java Mon Apr 9 16:05:51 2007
@@ -41,7 +41,7 @@
@Before
public void setUpService() throws Exception {
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
- factory.setServiceClass(EchoImpl.class);
+ factory.setServiceBean(new EchoImpl());
factory.setAddress("local://Echo");
factory.setTransportId(LocalTransportFactory.TRANSPORT_ID);
Server server = factory.create();
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java Mon Apr 9 16:05:51 2007
@@ -47,7 +47,7 @@
@Test
public void testMtomRequest() throws Exception {
JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
- sf.setServiceClass(EchoService.class);
+ sf.setServiceBean(new EchoService());
sf.setBus(getBus());
String address = "http://localhost:9036/EchoService";
sf.setAddress(address);
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml Mon Apr 9 16:05:51 2007
@@ -20,18 +20,25 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:soap="http://cxf.apache.org/bindings/soap"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+http://cxf.apache.org/bindings/soap http://cxf.apache.org/schema/bindings/soap.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">
- <bean id="{http://apache.org/schema_validation}SchemaValidationService" abstract="true">
- <property name="enableSchemaValidationForAllPort">
- <value>false</value>
- </property>
- </bean>
+ <jaxws:endpoint id="{http://apache.org/schema_validation}SoapPort" abstract="true">
+ <jaxws:properties>
+ <entry key="schema-validation-enabled" value="true" />
+ </jaxws:properties>
+ </jaxws:endpoint>
- <bean id="{http://apache.org/schema_validation}SoapPort" abstract="true">
- <property name="enableSchemaValidation">
- <value>true</value>
- </property>
+ <bean id="{http://apache.org/schema_validation}SchemaValidationService" abstract="true">
+ <property name="properties">
+ <map>
+ <entry key="schema-validation-enabled" value="true" />
+ </map>
+ </property>
</bean>
</beans>
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java Mon Apr 9 16:05:51 2007
@@ -24,6 +24,8 @@
import com.meterware.httpunit.WebRequest;
import com.meterware.httpunit.WebResponse;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusException;
import org.apache.cxf.helpers.DOMUtils;
import org.junit.Test;
@@ -32,6 +34,14 @@
protected String getConfiguration() {
return "/org/apache/cxf/systest/servlet/web-spring.xml";
}
+
+ @Override
+ protected Bus createBus() throws BusException {
+ // don't set up the bus, let the servlet do it
+ return null;
+ }
+
+
@Test
public void testInvokingSpringBeans() throws Exception {
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml Mon Apr 9 16:05:51 2007
@@ -47,7 +47,6 @@
<jaxws:endpoint id="endpoint2"
implementor="org.apache.hello_world_soap_http.GreeterImpl"
address="http://localhost/services/Greeter2"
- wsdlLocation="/wsdl/world1.wsdl"
/>
</beans>
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/databinding-schema-validation.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/databinding-schema-validation.xml?view=diff&rev=526945&r1=526944&r2=526945
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/databinding-schema-validation.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/databinding-schema-validation.xml Mon Apr 9 16:05:51 2007
@@ -24,11 +24,19 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="{http://apache.org/type_test/doc}SOAPService" abstract="true">
- <property name="enableSchemaValidationForAllPort" value="true"/>
+ <property name="properties">
+ <map>
+ <entry key="schema-validation-enabled" value="true" />
+ </map>
+ </property>
</bean>
- <bean id="{http://apache.org/type_test/xml}XMLService" abstract="true">
- <property name="enableSchemaValidationForAllPort" value="true"/>
+ <bean id="{http://apache.org/type_test/xml}XMLService" abstract="true">
+ <property name="properties">
+ <map>
+ <entry key="schema-validation-enabled" value="true" />
+ </map>
+ </property>
</bean>
</beans>