Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 38584 invoked from network); 5 Oct 2006 20:20:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Oct 2006 20:20:13 -0000 Received: (qmail 48590 invoked by uid 500); 5 Oct 2006 20:20:13 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 48418 invoked by uid 500); 5 Oct 2006 20:20:12 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 48405 invoked by uid 99); 5 Oct 2006 20:20:12 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Oct 2006 13:20:12 -0700 X-ASF-Spam-Status: No, hits=-8.6 required=5.0 tests=ALL_TRUSTED,INFO_TLD,NO_REAL_NAME Received: from [140.211.166.113] ([140.211.166.113:65451] helo=eris.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 35/1A-04543-1F865254 for ; Thu, 05 Oct 2006 13:20:02 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id F3F7E1A9825; Thu, 5 Oct 2006 13:19:58 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r453355 [3/3] - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/phase/ api/src/main/java/org/apache/cxf/service/ api/src/main/java/org/apache/cxf/service/model/ api/src/main/java/org/apache/cxf/transport/ rt/bindings/soap/src/main... Date: Thu, 05 Oct 2006 20:19:56 -0000 To: cxf-commits@incubator.apache.org From: dandiep@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061005201958.F3F7E1A9825@eris.apache.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/PayloadProvider.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/PayloadProvider.java?view=auto&rev=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/PayloadProvider.java (added) +++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/PayloadProvider.java Thu Oct 5 13:19:52 2006 @@ -0,0 +1,32 @@ +/** + * 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.jaxws.provider; + +import javax.xml.transform.Source; +import javax.xml.ws.Provider; +import javax.xml.ws.WebServiceProvider; + +@WebServiceProvider +public class PayloadProvider implements Provider { + + public Source invoke(Source source) { + return source; + } + +} Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/PayloadProvider.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/PayloadProvider.java ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/PayloadProvider.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderTest.java?view=auto&rev=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderTest.java (added) +++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderTest.java Thu Oct 5 13:19:52 2006 @@ -0,0 +1,42 @@ +/** + * 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.jaxws.provider; + +import org.w3c.dom.Node; + +import org.apache.cxf.jaxws.AbstractJaxWsTest; +import org.apache.cxf.jaxws.EndpointImpl; +import org.apache.cxf.transport.local.LocalTransportFactory; + +public class ProviderTest extends AbstractJaxWsTest { + public void testInvocation() throws Exception { + EndpointImpl ep = new EndpointImpl(getBus(), new PayloadProvider(), null); + ep.publish("http://localhost:9000/Provider"); + + Node response = invoke("http://localhost:9000/Provider", + LocalTransportFactory.TRANSPORT_ID, + "/org/apache/cxf/jaxws/sayHi.xml"); + + assertNotNull(response); + assertNoFault(response); + + addNamespace("j", "http://service.jaxws.cxf.apache.org"); + assertValid("//s:Body/j:sayHi", response); + } +} Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderTest.java ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/provider/ProviderTest.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/sayHi.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/sayHi.xml?view=auto&rev=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/sayHi.xml (added) +++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/sayHi.xml Thu Oct 5 13:19:52 2006 @@ -0,0 +1,26 @@ + + + + + hi + + + + Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/sayHi.xml ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/sayHi.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/sayHi.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Hello.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Hello.java?view=auto&rev=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Hello.java (added) +++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Hello.java Thu Oct 5 13:19:52 2006 @@ -0,0 +1,31 @@ +/** + * 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.jaxws.service; + +import javax.jws.WebMethod; +import javax.jws.WebService; + +@WebService +public class Hello { + + @WebMethod + public String sayHi(String text) { + return text; + } +} Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Hello.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Hello.java ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Hello.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java (original) +++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ProviderServiceFactoryBeanTest.java Thu Oct 5 13:19:52 2006 @@ -22,24 +22,20 @@ import javax.xml.namespace.QName; -import junit.framework.TestCase; - import org.apache.cxf.Bus; -import org.apache.cxf.binding.BindingFactoryManager; -import org.apache.cxf.binding.BindingFactoryManagerImpl; -import org.apache.cxf.binding.soap.SoapBindingFactory; +import org.apache.cxf.binding.Binding; +import org.apache.cxf.binding.soap.SoapBinding; +import org.apache.cxf.binding.xml.XMLBinding; +import org.apache.cxf.endpoint.Endpoint; +import org.apache.cxf.endpoint.ServerImpl; +import org.apache.cxf.jaxws.AbstractJaxWsTest; import org.apache.cxf.service.Service; +import org.apache.cxf.service.factory.ServerFactoryBean; import org.apache.cxf.service.model.EndpointInfo; import org.apache.cxf.service.model.InterfaceInfo; -import org.apache.cxf.wsdl.WSDLManager; -import org.apache.cxf.wsdl11.WSDLManagerImpl; import org.apache.hello_world_soap_http.HWSoapMessageProvider; -import org.easymock.IMocksControl; - -import static org.easymock.EasyMock.expect; -import static org.easymock.classextension.EasyMock.createNiceControl; -public class ProviderServiceFactoryBeanTest extends TestCase { +public class ProviderServiceFactoryBeanTest extends AbstractJaxWsTest { public void testFromWSDL() throws Exception { URL resource = getClass().getResource("/wsdl/hello_world.wsdl"); assertNotNull(resource); @@ -52,7 +48,7 @@ // only the unit test does. bean.setWsdlURL(resource); - Bus bus = createBus(); + Bus bus = getBus(); bean.setBus(bus); bean.setServiceClass(HWSoapMessageProvider.class); @@ -64,13 +60,24 @@ InterfaceInfo intf = service.getServiceInfo().getInterface(); assertNotNull(intf); + + ServerFactoryBean svrFactory = new ServerFactoryBean(); + svrFactory.setBus(bus); + svrFactory.setServiceFactory(bean); + svrFactory.setStart(false); + + ServerImpl server = (ServerImpl) svrFactory.create(); + + Endpoint endpoint = server.getEndpoint(); + Binding binding = endpoint.getBinding(); + assertTrue(binding instanceof SoapBinding); } public void testXMLBindingFromCode() throws Exception { JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(SourcePayloadProvider.class); ProviderServiceFactoryBean bean = new ProviderServiceFactoryBean(implInfo); - Bus bus = createBus(); + Bus bus = getBus(); bean.setBus(bus); Service service = bean.create(); @@ -85,24 +92,15 @@ EndpointInfo ei = service.getServiceInfo().getEndpoint(new QName("SourcePayloadProviderPort")); assertNotNull(ei); - } - - Bus createBus() throws Exception { - IMocksControl control = createNiceControl(); - Bus bus = control.createMock(Bus.class); - - SoapBindingFactory bindingFactory = new SoapBindingFactory(); - BindingFactoryManager bfm = new BindingFactoryManagerImpl(); - bfm.registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory); - - expect(bus.getExtension(BindingFactoryManager.class)).andReturn(bfm).anyTimes(); - - WSDLManagerImpl wsdlMan = new WSDLManagerImpl(); - expect(bus.getExtension(WSDLManager.class)).andReturn(wsdlMan); - - control.replay(); - - return bus; + + ServerFactoryBean svrFactory = new ServerFactoryBean(); + svrFactory.setBus(bus); + svrFactory.setServiceFactory(bean); + + ServerImpl server = (ServerImpl) svrFactory.create(); + Endpoint endpoint = server.getEndpoint(); + Binding binding = endpoint.getBinding(); + assertTrue(binding instanceof XMLBinding); } } Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractBindingInfoFactoryBean.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractBindingInfoFactoryBean.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractBindingInfoFactoryBean.java (original) +++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractBindingInfoFactoryBean.java Thu Oct 5 13:19:52 2006 @@ -19,6 +19,7 @@ package org.apache.cxf.service.factory; import org.apache.cxf.service.model.BindingInfo; +import org.apache.cxf.service.model.ServiceInfo; /** * An AbstractBindingFactory builds a binding for a Service. @@ -34,5 +35,9 @@ public AbstractServiceFactoryBean getServiceFactory() { return serviceFactory; + } + + protected ServiceInfo getServiceInfo() { + return getServiceFactory().getService().getServiceInfo(); } } Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java (original) +++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/AbstractServiceConfiguration.java Thu Oct 5 13:19:52 2006 @@ -123,6 +123,10 @@ return null; } + public QName getEndpointName() { + return null; + } + public Class getResponseWrapper(Method selected) { return null; } Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java (original) +++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java Thu Oct 5 13:19:52 2006 @@ -51,7 +51,7 @@ @Override public QName getInputMessageName(OperationInfo op) { - return new QName(op.getName().getNamespaceURI(), op.getName() + "Request"); + return new QName(op.getName().getNamespaceURI(), op.getName().getLocalPart()); } @Override @@ -85,12 +85,17 @@ @Override public QName getOutputMessageName(OperationInfo op) { - return new QName(op.getName().getNamespaceURI(), op.getName() + "R"); + return new QName(op.getName().getNamespaceURI(), op.getName().getLocalPart() + "Response"); } @Override public QName getInterfaceName() { return new QName(getServiceNamespace(), getServiceName() + "PortType"); + } + + @Override + public QName getEndpointName() { + return new QName(getServiceNamespace(), getServiceName() + "Port"); } @Override Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/JaxWsMethodDispatcher.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/JaxWsMethodDispatcher.java ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/JaxWsMethodDispatcher.java ------------------------------------------------------------------------------ svn:keywords = Rev Date 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=453355&r1=453354&r2=453355 ============================================================================== --- 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 Thu Oct 5 13:19:52 2006 @@ -34,6 +34,9 @@ import org.apache.cxf.common.i18n.BundleUtils; import org.apache.cxf.common.i18n.Message; +import org.apache.cxf.endpoint.Endpoint; +import org.apache.cxf.endpoint.EndpointException; +import org.apache.cxf.endpoint.EndpointImpl; import org.apache.cxf.helpers.MethodComparator; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.service.Service; @@ -42,12 +45,14 @@ import org.apache.cxf.service.invoker.FactoryInvoker; import org.apache.cxf.service.invoker.Invoker; import org.apache.cxf.service.invoker.LocalFactory; +import org.apache.cxf.service.model.EndpointInfo; import org.apache.cxf.service.model.FaultInfo; import org.apache.cxf.service.model.InterfaceInfo; import org.apache.cxf.service.model.MessageInfo; import org.apache.cxf.service.model.MessagePartInfo; import org.apache.cxf.service.model.OperationInfo; import org.apache.cxf.service.model.ServiceInfo; +import org.apache.cxf.service.model.UnwrappedOperationInfo; import org.apache.cxf.wsdl11.WSDLServiceFactory; /** @@ -67,18 +72,15 @@ private List serviceConfigurations = new ArrayList(); - private List bindingFactories = - new ArrayList(); private QName serviceName; private Invoker invoker; private Executor executor; private List ignoredClasses = new ArrayList(); + private SimpleMethodDispatcher methodDispatcher = new SimpleMethodDispatcher(); public ReflectionServiceFactoryBean() { getServiceConfigurations().add(0, new DefaultServiceConfiguration()); - - bindingFactories.add(new SoapBindingInfoFactoryBean()); - + ignoredClasses.add("java.lang.Object"); ignoredClasses.add("java.lang.Throwable"); ignoredClasses.add("org.omg.CORBA_2_3.portable.ObjectImpl"); @@ -113,16 +115,31 @@ }); } + getService().put(MethodDispatcher.class.getName(), getMethodDispatcher()); + + createEndpoints(); + return getService(); } + + protected void createEndpoints() { + Service service = getService(); + + for (EndpointInfo ei : service.getServiceInfo().getEndpoints()) { + try { + Endpoint ep = createEndpoint(ei); - protected void initializeBindings() { - for (AbstractBindingInfoFactoryBean b : getBindingFactories()) { - b.setServiceFactory(this); - getService().getServiceInfo().addBinding(b.create()); + service.getEndpoints().put(ei.getName(), ep); + } catch (EndpointException e) { + throw new ServiceConstructionException(e); + } } } + protected Endpoint createEndpoint(EndpointInfo ei) throws EndpointException { + return new EndpointImpl(getBus(), getService(), ei); + } + protected void initializeServiceConfigurations() { for (AbstractServiceConfiguration c : serviceConfigurations) { c.setServiceFactory(this); @@ -141,8 +158,10 @@ initializeWSDLOperations(); } else { LOG.info("Creating Service " + getServiceQName() + " from class " + getServiceClass().getName()); - // If we can't find the wsdlLocation, then we should build a service model from the class. + // If we can't find the wsdlLocation, then we should build a service model ufrom the class. ServiceInfo serviceInfo = new ServiceInfo(); + ServiceImpl service = new ServiceImpl(serviceInfo); + serviceInfo.setName(getServiceQName()); createInterface(serviceInfo); @@ -151,10 +170,7 @@ getDataBinding().initialize(serviceInfo); } - ServiceImpl service = new ServiceImpl(serviceInfo); setService(service); - - initializeBindings(); } } @@ -229,11 +245,34 @@ } protected OperationInfo createOperation(ServiceInfo serviceInfo, InterfaceInfo intf, Method m) { - OperationInfo info = intf.addOperation(getOperationName(intf, m)); + OperationInfo op = intf.addOperation(getOperationName(intf, m)); - createMessageParts(intf, info, m); + if (isWrapped(m)) { + UnwrappedOperationInfo uOp = new UnwrappedOperationInfo(op); + op.setUnwrappedOperation(uOp); + + createMessageParts(intf, uOp, m); + + if (uOp.hasInput()) { + MessageInfo msg = new MessageInfo(op, op.getName()); + op.setInput(uOp.getInputName(), msg); + msg.addMessagePart(op.getName()); + } + + if (uOp.hasOutput()) { + QName name = new QName(op.getName().getNamespaceURI(), + op.getName().getLocalPart() + "Response"); + MessageInfo msg = new MessageInfo(op, name); + op.setOutput(uOp.getOutputName(), msg); + msg.addMessagePart(name); + } + } else { + createMessageParts(intf, op, m); + } + + methodDispatcher.bind(op, m); - return info; + return op; } protected void createMessageParts(InterfaceInfo intf, OperationInfo op, Method method) { @@ -284,9 +323,9 @@ return serviceName; } - protected QName getPortQName() { + protected QName getEndpointName() { for (AbstractServiceConfiguration c : serviceConfigurations) { - QName name = c.getInterfaceName(); + QName name = c.getEndpointName(); if (name != null) { return name; } @@ -333,6 +372,16 @@ } return true; } + + protected boolean isWrapped(final Method method) { +// for (AbstractServiceConfiguration c : serviceConfigurations) { +// Boolean b = c.isOperation(method); +// if (b != null) { +// return b.booleanValue(); +// } +// } + return true; + } protected boolean isMatchOperation(String methodNameInClass, String methodNameInWsdl) { // TODO: This seems wrong and not sure who put it here. Will revisit - DBD @@ -541,8 +590,10 @@ return null; } - - + protected SimpleMethodDispatcher getMethodDispatcher() { + return methodDispatcher; + } + public List getConfigurations() { return serviceConfigurations; } @@ -609,13 +660,5 @@ public void setIgnoredClasses(List ignoredClasses) { this.ignoredClasses = ignoredClasses; - } - - public List getBindingFactories() { - return bindingFactories; - } - - public void setBindingFactories(List bindingFactories) { - this.bindingFactories = bindingFactories; } } Added: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java?view=auto&rev=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java (added) +++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java Thu Oct 5 13:19:52 2006 @@ -0,0 +1,177 @@ +/** + * 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.service.factory; + +import java.io.IOException; + +import javax.xml.namespace.QName; + +import org.apache.cxf.Bus; +import org.apache.cxf.BusException; +import org.apache.cxf.endpoint.Endpoint; +import org.apache.cxf.endpoint.EndpointException; +import org.apache.cxf.endpoint.Server; +import org.apache.cxf.endpoint.ServerImpl; +import org.apache.cxf.service.Service; +import org.apache.cxf.service.model.BindingInfo; +import org.apache.cxf.service.model.EndpointInfo; +import org.apache.cxf.transport.ChainInitiationObserver; +import org.apache.cxf.transport.DestinationFactory; +import org.apache.cxf.transport.DestinationFactoryManager; +import org.apache.cxf.wsdl11.WSDLEndpointFactory; + +public class ServerFactoryBean { + private ReflectionServiceFactoryBean serviceFactory; + private Service service; + private DestinationFactory destinationFactory; + private Server server; + private Bus bus; + private String address; + private String transportId; // where should this come from??? + private AbstractBindingInfoFactoryBean bindingFactory = new SoapBindingInfoFactoryBean(); + private QName endpointName; + private boolean start = true; + + public Server create() { + try { + service = serviceFactory.getService(); + + if (endpointName == null) { + endpointName = serviceFactory.getEndpointName(); + } + + EndpointInfo ei = service.getServiceInfo().getEndpoint(endpointName); + + if (ei == null) { + ei = createEndpoint(); + } else if (address != null) { + ei.setAddress(address); + } + + Endpoint ep = serviceFactory.createEndpoint(ei); + service.getEndpoints().put(ep.getEndpointInfo().getName(), ep); + server = new ServerImpl(bus, ep, new ChainInitiationObserver(ep, bus)); + + if (start) { + server.start(); + } + } catch (EndpointException e) { + throw new ServiceConstructionException(e); + } catch (BusException e) { + throw new ServiceConstructionException(e); + } catch (IOException e) { + throw new ServiceConstructionException(e); + } + + return server; + } + + private EndpointInfo createEndpoint() throws BusException { + if (transportId == null) { + throw new NullPointerException("A transport id must be specified!"); + } + + DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class); + destinationFactory = dfm.getDestinationFactory(transportId); + + // Get the Service from the ServiceFactory if specified + bindingFactory.setServiceFactory(serviceFactory); + BindingInfo bindingInfo = bindingFactory.create(); + service.getServiceInfo().addBinding(bindingInfo); + + EndpointInfo ei = new EndpointInfo(service.getServiceInfo(), transportId); + ei.setName(endpointName); + ei.setAddress(address); + ei.setBinding(bindingInfo); + + if (destinationFactory instanceof WSDLEndpointFactory) { + WSDLEndpointFactory we = (WSDLEndpointFactory) destinationFactory; + + we.createPortExtensors(ei, service); + } else { + // ? + } + return ei; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public Bus getBus() { + return bus; + } + + public void setBus(Bus bus) { + this.bus = bus; + } + + public DestinationFactory getDestinationFactory() { + return destinationFactory; + } + + public void setDestinationFactory(DestinationFactory destinationFactory) { + this.destinationFactory = destinationFactory; + } + + public Server getServer() { + return server; + } + + public void setServer(Server server) { + this.server = server; + } + + public ReflectionServiceFactoryBean getServiceFactory() { + return serviceFactory; + } + + public void setServiceFactory(ReflectionServiceFactoryBean serviceFactory) { + this.serviceFactory = serviceFactory; + } + + public String getTransportId() { + return transportId; + } + + public void setTransportId(String transportId) { + this.transportId = transportId; + } + + public QName getEndpointName() { + return endpointName; + } + + public void setEndpointName(QName endpointName) { + this.endpointName = endpointName; + } + + public boolean isStart() { + return start; + } + + public void setStart(boolean start) { + this.start = start; + } + +} Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMethodDispatcher.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMethodDispatcher.java?view=auto&rev=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMethodDispatcher.java (added) +++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMethodDispatcher.java Thu Oct 5 13:19:52 2006 @@ -0,0 +1,97 @@ +/** + * 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.service.factory; + +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.cxf.endpoint.Endpoint; +import org.apache.cxf.interceptor.WrappedInInterceptor; +import org.apache.cxf.service.model.BindingInfo; +import org.apache.cxf.service.model.BindingOperationInfo; +import org.apache.cxf.service.model.OperationInfo; + +public class SimpleMethodDispatcher implements MethodDispatcher { + + private Map> infoMap = + new ConcurrentHashMap>(); + private Map opToMethod = + new ConcurrentHashMap(); + private Map methodToOp = + new ConcurrentHashMap(); + + public void bind(OperationInfo o, Method... methods) { + Method primary = methods[0]; + for (Method m : methods) { + methodToOp.put(m, o); + + Map biToBop = new HashMap(); + infoMap.put(m, biToBop); + } + + opToMethod.put(o, primary); + + if (o.isUnwrappedCapable()) { + opToMethod.put(o.getUnwrappedOperation(), primary); + } + } + + public BindingOperationInfo getBindingOperation(Method method, Endpoint endpoint) { + Map bops = infoMap.get(method); + if (bops == null) { + return null; + } + + BindingOperationInfo bop = bops.get(endpoint.getEndpointInfo().getBinding()); + if (bop == null) { + OperationInfo o = methodToOp.get(method); + if (o == null) { + return null; + } + + BindingInfo b = endpoint.getEndpointInfo().getBinding(); + for (BindingOperationInfo bop2 : b.getOperations()) { + if (bop2.getOperationInfo().equals(o)) { + bop2 = getRealOperation(o, bop2); + + bops.put(b, bop2); + return bop2; + } + } + } + return bop; + } + + private BindingOperationInfo getRealOperation(OperationInfo o, BindingOperationInfo bop) { + BindingOperationInfo unwrappedOp = bop.getUnwrappedOperation(); + if (unwrappedOp != null + && unwrappedOp.getOperationInfo().equals(o.getUnwrappedOperation()) + && unwrappedOp.getOperationInfo().getInput() + .getProperty(WrappedInInterceptor.WRAPPER_CLASS) != null) { + bop = unwrappedOp; + } + return bop; + } + + public Method getMethod(BindingOperationInfo op) { + return opToMethod.get(op.getOperationInfo()); + } +} Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMethodDispatcher.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMethodDispatcher.java ------------------------------------------------------------------------------ svn:executable = * Propchange: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMethodDispatcher.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SoapBindingInfoFactoryBean.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SoapBindingInfoFactoryBean.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SoapBindingInfoFactoryBean.java (original) +++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SoapBindingInfoFactoryBean.java Thu Oct 5 13:19:52 2006 @@ -35,7 +35,7 @@ @Override public BindingInfo create() { ServiceInfo si = getServiceInfo(); - SoapBindingInfo info = new SoapBindingInfo(si, null, soapVersion); + SoapBindingInfo info = new SoapBindingInfo(si, "http://schemas.xmlsoap.org/wsdl/soap/", soapVersion); info.setName(getBindingName()); info.setStyle(getStyle()); @@ -48,6 +48,7 @@ BindingOperationInfo bop = info.buildOperation(op.getName(), op.getInputName(), op.getOutputName()); + bop.addExtensor(sop); info.addOperation(bop); @@ -76,10 +77,6 @@ ServiceInfo si = getServiceInfo(); return new QName(si.getName().getNamespaceURI(), si.getName().getLocalPart() + "SoapBinding"); - } - - protected ServiceInfo getServiceInfo() { - return getServiceFactory().getService().getServiceInfo(); } public SoapVersion getSoapVersion() { Modified: incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java (original) +++ incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/ReflectionServiceFactoryTest.java Thu Oct 5 13:19:52 2006 @@ -19,29 +19,64 @@ package org.apache.cxf.service.factory; import java.util.List; +import java.util.Map; +import javax.wsdl.extensions.soap.SOAPAddress; +import javax.xml.bind.JAXBException; import javax.xml.namespace.QName; +import org.apache.cxf.Bus; +import org.apache.cxf.binding.BindingFactoryManager; +import org.apache.cxf.binding.soap.SoapBindingFactory; +import org.apache.cxf.binding.soap.SoapDestinationFactory; import org.apache.cxf.binding.soap.model.SoapBindingInfo; import org.apache.cxf.binding.soap.model.SoapOperationInfo; +import org.apache.cxf.endpoint.Endpoint; +import org.apache.cxf.endpoint.Server; import org.apache.cxf.jaxb.JAXBDataBinding; import org.apache.cxf.service.Service; import org.apache.cxf.service.model.BindingInfo; import org.apache.cxf.service.model.BindingOperationInfo; +import org.apache.cxf.service.model.EndpointInfo; import org.apache.cxf.service.model.InterfaceInfo; import org.apache.cxf.service.model.MessagePartInfo; import org.apache.cxf.service.model.OperationInfo; import org.apache.cxf.service.model.ServiceInfo; import org.apache.cxf.test.AbstractCXFTest; +import org.apache.cxf.transport.ConduitInitiatorManager; +import org.apache.cxf.transport.DestinationFactoryManager; +import org.apache.cxf.transport.local.LocalTransportFactory; public class ReflectionServiceFactoryTest extends AbstractCXFTest { - public void testReflectionBuilding() throws Exception { - ReflectionServiceFactoryBean sf = new ReflectionServiceFactoryBean(); - sf.setDataBinding(new JAXBDataBinding(HelloService.class)); - sf.setBus(getBus()); - sf.setServiceClass(HelloService.class); + private ReflectionServiceFactoryBean serviceFactory; + + public void setUp() throws Exception { + super.setUp(); - Service service = sf.create(); + Bus bus = getBus(); + + SoapBindingFactory bindingFactory = new SoapBindingFactory(); + + bus.getExtension(BindingFactoryManager.class) + .registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory); + + DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class); + SoapDestinationFactory soapDF = new SoapDestinationFactory(dfm); + dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF); + dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", soapDF); + + LocalTransportFactory localTransport = new LocalTransportFactory(); + dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport); + dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", localTransport); + + ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class); + extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, localTransport); + extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport); + extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport); + } + + public void testReflectionBuild() throws Exception { + Service service = createService(); ServiceInfo si = service.getServiceInfo(); InterfaceInfo intf = si.getInterface(); @@ -52,16 +87,64 @@ OperationInfo sayHelloOp = intf.getOperation(new QName(ns, "sayHello")); assertNotNull(sayHelloOp); + assertEquals("sayHello", sayHelloOp.getInput().getName().getLocalPart()); + List messageParts = sayHelloOp.getInput().getMessageParts(); + assertEquals(1, messageParts.size()); + + // test unwrapping + assertTrue(sayHelloOp.isUnwrappedCapable()); + + OperationInfo unwrappedOp = sayHelloOp.getUnwrappedOperation(); + assertEquals("sayHello", unwrappedOp.getInput().getName().getLocalPart()); + + messageParts = unwrappedOp.getInput().getMessageParts(); assertEquals(0, messageParts.size()); + // test output messageParts = sayHelloOp.getOutput().getMessageParts(); assertEquals(1, messageParts.size()); + assertEquals("sayHelloResponse", sayHelloOp.getOutput().getName().getLocalPart()); + + messageParts = unwrappedOp.getOutput().getMessageParts(); + assertEquals("sayHelloResponse", unwrappedOp.getOutput().getName().getLocalPart()); + assertEquals(1, messageParts.size()); MessagePartInfo mpi = messageParts.get(0); assertEquals("out", mpi.getName().getLocalPart()); assertEquals(String.class, mpi.getProperty(Class.class.getName())); + } + + private Service createService() throws JAXBException { + serviceFactory = new ReflectionServiceFactoryBean(); + serviceFactory.setDataBinding(new JAXBDataBinding(HelloService.class)); + serviceFactory.setBus(getBus()); + serviceFactory.setServiceClass(HelloService.class); + + Service service = serviceFactory.create(); + return service; + } + + public void testServerFactoryBean() throws Exception { + Service service = createService(); + + ServerFactoryBean svrBean = new ServerFactoryBean(); + svrBean.setAddress("http://localhost/Hello"); + svrBean.setTransportId("http://schemas.xmlsoap.org/soap/"); + svrBean.setServiceFactory(serviceFactory); + svrBean.setBus(getBus()); + + Server server = svrBean.create(); + assertNotNull(server); + Map eps = service.getEndpoints(); + assertEquals(1, eps.size()); + + Endpoint ep = eps.values().iterator().next(); + EndpointInfo endpointInfo = ep.getEndpointInfo(); + + SOAPAddress soapAddress = endpointInfo.getExtensor(SOAPAddress.class); + assertNotNull(soapAddress); - BindingInfo b = si.getBindings().iterator().next(); + BindingInfo b = service.getServiceInfo().getBindings().iterator().next(); assertTrue(b instanceof SoapBindingInfo); Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java (original) +++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java Thu Oct 5 13:19:52 2006 @@ -21,13 +21,20 @@ import java.io.IOException; import java.util.Collection; +import java.util.Iterator; +import java.util.List; import javax.annotation.PostConstruct; import javax.annotation.Resource; +import javax.wsdl.Port; +import javax.wsdl.extensions.http.HTTPAddress; import org.apache.cxf.Bus; import org.apache.cxf.configuration.Configurer; +import org.apache.cxf.service.Service; +import org.apache.cxf.service.model.BindingInfo; import org.apache.cxf.service.model.EndpointInfo; +import org.apache.cxf.service.model.ServiceInfo; import org.apache.cxf.transport.Conduit; import org.apache.cxf.transport.ConduitInitiator; import org.apache.cxf.transport.ConduitInitiatorManager; @@ -35,9 +42,11 @@ import org.apache.cxf.transport.DestinationFactory; import org.apache.cxf.transport.DestinationFactoryManager; import org.apache.cxf.ws.addressing.EndpointReferenceType; +import org.apache.cxf.wsdl11.WSDLEndpointFactory; +import org.xmlsoap.schemas.wsdl.http.AddressType; -public class HTTPTransportFactory implements ConduitInitiator, DestinationFactory { +public class HTTPTransportFactory implements ConduitInitiator, DestinationFactory, WSDLEndpointFactory { private Bus bus; private Collection activationNamespaces; @@ -99,5 +108,32 @@ configurer.configureBean(destination); } return destination; + } + + public EndpointInfo createEndpointInfo(ServiceInfo serviceInfo, BindingInfo b, Port port) { + List ees = port.getExtensibilityElements(); + for (Iterator itr = ees.iterator(); itr.hasNext();) { + Object extensor = itr.next(); + + if (extensor instanceof HTTPAddress) { + HTTPAddress httpAdd = (HTTPAddress)extensor; + + EndpointInfo info = new EndpointInfo(serviceInfo, "http://schemas.xmlsoap.org/wsdl/http/"); + info.setAddress(httpAdd.getLocationURI()); + return info; + } else if (extensor instanceof AddressType) { + AddressType httpAdd = (AddressType)extensor; + + EndpointInfo info = new EndpointInfo(serviceInfo, "http://schemas.xmlsoap.org/wsdl/http/"); + info.setAddress(httpAdd.getLocation()); + return info; + } + } + + return null; + } + + public void createPortExtensors(EndpointInfo ei, Service service) { + // TODO } } Modified: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml (original) +++ incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/bus-extensions.xml Thu Oct 5 13:19:52 2006 @@ -20,8 +20,8 @@ - http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/http + http://schemas.xmlsoap.org/soap/http http://schemas.xmlsoap.org/wsdl/http/ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/bindings/xformat Modified: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml (original) +++ incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml Thu Oct 5 13:19:52 2006 @@ -27,7 +27,7 @@ - http://schemas.xmlsoap.org/wsdl/soap/ + http://schemas.xmlsoap.org/soap/http http://schemas.xmlsoap.org/wsdl/soap/http http://schemas.xmlsoap.org/wsdl/http/ http://cxf.apache.org/transports/http/configuration Modified: incubator/cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java (original) +++ incubator/cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java Thu Oct 5 13:19:52 2006 @@ -65,6 +65,11 @@ final LocalConduit conduit = this; final Exchange exchange = message.getExchange(); + if (destination.getMessageObserver() == null) { + throw new IllegalStateException("Local destination does not have a MessageObserver on address " + + destination.getAddress().getAddress().getValue()); + } + final Runnable receiver = new Runnable() { public void run() { MessageImpl m = new MessageImpl(); @@ -72,6 +77,7 @@ m.setDestination(destination); m.put(IN_CONDUIT, conduit); m.put(IN_EXCHANGE, exchange); + destination.getMessageObserver().onMessage(m); } }; Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java (original) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java Thu Oct 5 13:19:52 2006 @@ -76,8 +76,9 @@ } catch (BusException ex) { // expected } - assertNotNull("conduit initiator not available", - cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/")); + // not sure that we need this - Dan Diephouse +// assertNotNull("conduit initiator not available", +// cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/")); assertNotNull("conduit initiator not available", cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http")); assertNotNull("conduit initiator not available", Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java (original) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java Thu Oct 5 13:19:52 2006 @@ -74,8 +74,8 @@ XMLService service = new XMLService(); assertNotNull(service); - String response1 = new String("Hello "); - String response2 = new String("Bonjour"); + String response1 = "Hello "; + String response2 = "Bonjour"; try { Greeter greeter = service.getPort(portName, Greeter.class); String username = System.getProperty("user.name"); Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java?view=diff&rev=453355&r1=453354&r2=453355 ============================================================================== --- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java (original) +++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java Thu Oct 5 13:19:52 2006 @@ -48,7 +48,7 @@ final String className; - private final boolean debug = false; + private final boolean debug = true; private boolean inProcess = DEFAULT_IN_PROCESS; private AbstractTestServerBase inProcessServer;