You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/12/23 12:41:04 UTC
cxf git commit: [CXF-7193] Removing rt-bindings-object
Repository: cxf
Updated Branches:
refs/heads/master 4dd4e1cf0 -> fb11380da
[CXF-7193] Removing rt-bindings-object
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/fb11380d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/fb11380d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/fb11380d
Branch: refs/heads/master
Commit: fb11380da6e5c157ffd311c2925eb533d134c8cb
Parents: 4dd4e1c
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Fri Dec 23 12:40:44 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Fri Dec 23 12:40:44 2016 +0000
----------------------------------------------------------------------
rt/bindings/object/pom.xml | 103 -----------
.../cxf/binding/object/LocalServerListener.java | 138 --------------
.../cxf/binding/object/Messages.properties | 22 ---
.../cxf/binding/object/ObjectBinding.java | 51 ------
.../object/ObjectBindingConfiguration.java | 50 ------
.../binding/object/ObjectBindingFactory.java | 117 ------------
.../object/ObjectDispatchInInterceptor.java | 69 -------
.../object/ObjectDispatchOutInterceptor.java | 53 ------
.../cxf/binding/object/blueprint/Activator.java | 50 ------
.../blueprint/ObjectBindingBPHandler.java | 56 ------
.../binding/object/spring/NamespaceHandler.java | 30 ----
.../resources/META-INF/cxf/bus-extensions.txt | 1 -
.../src/main/resources/META-INF/spring.handlers | 21 ---
.../src/main/resources/META-INF/spring.schemas | 21 ---
.../schemas/bindings/blueprint/object.xsd | 41 -----
.../main/resources/schemas/bindings/object.xsd | 40 -----
.../org/apache/cxf/binding/object/Echo.java | 26 ---
.../org/apache/cxf/binding/object/EchoImpl.java | 30 ----
.../object/LocalServerRegistrationTest.java | 115 ------------
.../cxf/binding/object/ObjectBindingTest.java | 180 -------------------
.../blueprint/ObjectBindingBPHandlerTest.java | 36 ----
rt/bindings/pom.xml | 1 -
22 files changed, 1251 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/pom.xml
----------------------------------------------------------------------
diff --git a/rt/bindings/object/pom.xml b/rt/bindings/object/pom.xml
deleted file mode 100644
index 9631d9f..0000000
--- a/rt/bindings/object/pom.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>cxf-rt-bindings-object</artifactId>
- <packaging>bundle</packaging>
- <name>Apache CXF Runtime Object Binding</name>
- <description>Apache CXF Runtime Object Binding</description>
- <url>http://cxf.apache.org</url>
- <parent>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-parent</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <relativePath>../../../parent/pom.xml</relativePath>
- </parent>
- <properties>
- <cxf.osgi.import>
- org.springframework*;resolution:=optional;version="${cxf.osgi.spring.version}",
- org.apache.aries*;version="${cxf.aries.version.range}";resolution:=optional
- </cxf.osgi.import>
- <cxf.bundle.activator>org.apache.cxf.binding.object.blueprint.Activator</cxf.bundle.activator>
- <!-- keep in sync with services exported in activator -->
- <cxf.export.service>
- org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/blueprint/binding/object"
- </cxf.export.service>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.aries.blueprint</groupId>
- <artifactId>org.apache.aries.blueprint.core</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-testutils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-simple</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-local</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http-jetty</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/LocalServerListener.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/LocalServerListener.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/LocalServerListener.java
deleted file mode 100644
index 45d8db5..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/LocalServerListener.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.binding.object;
-
-import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusException;
-import org.apache.cxf.binding.Binding;
-import org.apache.cxf.binding.BindingFactory;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.endpoint.ServerLifeCycleListener;
-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.Destination;
-import org.apache.cxf.transport.DestinationFactory;
-import org.apache.cxf.transport.DestinationFactoryManager;
-import org.apache.cxf.transport.local.LocalTransportFactory;
-
-public class LocalServerListener implements ServerLifeCycleListener {
- private static final Logger LOG = LogUtils.getL7dLogger(LocalServerListener.class);
-
- private DestinationFactory destinationFactory;
- private BindingFactory bindingFactory;
- private ObjectBindingConfiguration configuration = new ObjectBindingConfiguration();
- private Bus bus;
-
- public LocalServerListener(Bus bus,
- BindingFactory bindingFactory) {
- super();
- this.bindingFactory = bindingFactory;
- this.bus = bus;
- }
-
- public void startServer(Server server) {
- Endpoint endpoint = server.getEndpoint();
- Service service = endpoint.getService();
-
- // synthesize a new binding
- BindingInfo bi = bindingFactory.createBindingInfo(service,
- ObjectBindingFactory.BINDING_ID,
- configuration);
-
- Binding binding = bindingFactory.createBinding(bi);
-
- String uri = "local://" + server.toString();
- EndpointInfo ei = new EndpointInfo();
- ei.setAddress(uri);
-
- try {
- // Register a new Destination locally for the Server
- Destination destination = getDestinationFactory().getDestination(ei, bus);
-
- destination.setMessageObserver(new OverrideBindingObserver(endpoint, binding, bus));
- } catch (IOException e1) {
- LOG.log(Level.WARNING, "Could not create local destination.", e1);
- }
- }
-
- public void stopServer(Server server) {
- String uri = "local://" + server.toString();
- EndpointInfo ei = new EndpointInfo();
- ei.setAddress(uri);
-
- try {
- Destination destination = getDestinationFactory().getDestination(ei, bus);
-
- destination.shutdown();
- } catch (IOException e) {
- LOG.log(Level.WARNING, "Could not shutdown local destination.", e);
- }
-
- }
-
- public DestinationFactory getDestinationFactory() {
- if (destinationFactory == null) {
- retrieveDF();
- }
- return destinationFactory;
- }
-
- private synchronized void retrieveDF() {
- if (destinationFactory == null) {
- DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
- try {
- destinationFactory = dfm.getDestinationFactory(LocalTransportFactory.TRANSPORT_ID);
- } catch (BusException e) {
- throw new RuntimeException(e);
- }
- }
- }
-
- public ObjectBindingConfiguration getConfiguration() {
- return configuration;
- }
-
- public void setConfiguration(ObjectBindingConfiguration configuration) {
- this.configuration = configuration;
- }
-
- public static class OverrideBindingObserver extends ChainInitiationObserver {
-
- private Binding binding;
-
- public OverrideBindingObserver(Endpoint endpoint, Binding binding, Bus bus) {
- super(endpoint, bus);
- this.binding = binding;
- }
-
- @Override
- protected Binding getBinding() {
- return binding;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/Messages.properties
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/Messages.properties b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/Messages.properties
deleted file mode 100644
index 895b5fe..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/Messages.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-#
-# 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.
-#
-#
-NO_BINDING: No binding QName was specified.
-NO_OPERATION: No operation QName was specified.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBinding.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBinding.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBinding.java
deleted file mode 100644
index d6c17c2..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBinding.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.binding.object;
-
-import org.apache.cxf.binding.Binding;
-import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.model.BindingInfo;
-
-public class ObjectBinding extends AbstractBasicInterceptorProvider implements Binding {
-
- public static final String OPERATION = "objectBinding.operationName";
- public static final String BINDING = "objectBinding.bindingName";
-
- private BindingInfo bindingInfo;
-
- public ObjectBinding(BindingInfo bindingInfo) {
- super();
- this.bindingInfo = bindingInfo;
- }
-
- public BindingInfo getBindingInfo() {
- return bindingInfo;
- }
-
- public Message createMessage() {
- return new MessageImpl();
- }
-
- public Message createMessage(Message m) {
- return m;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBindingConfiguration.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBindingConfiguration.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBindingConfiguration.java
deleted file mode 100644
index 9cfacea..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBindingConfiguration.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.binding.object;
-
-import java.util.Set;
-
-import org.apache.cxf.binding.BindingConfiguration;
-
-public class ObjectBindingConfiguration extends BindingConfiguration {
- private boolean nonLogicalPhasesEnabled = true;
- private Set<String> skipPhases;
-
- @Override
- public String getBindingId() {
- return ObjectBindingFactory.BINDING_ID;
- }
-
- public Set<String> getSkipPhases() {
- return skipPhases;
- }
-
- public void setSkipPhases(Set<String> skipPhases) {
- this.skipPhases = skipPhases;
- }
-
- public boolean isNonLogicalPhasesEnabled() {
- return nonLogicalPhasesEnabled;
- }
-
- public void setNonLogicalPhasesEnabled(boolean nonLogicalPhasesEnabled) {
- this.nonLogicalPhasesEnabled = nonLogicalPhasesEnabled;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBindingFactory.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBindingFactory.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBindingFactory.java
deleted file mode 100644
index d6c915d..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectBindingFactory.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.binding.object;
-
-import java.util.Arrays;
-
-import java.util.Collection;
-
-import javax.annotation.PostConstruct;
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.binding.AbstractBindingFactory;
-import org.apache.cxf.binding.Binding;
-import org.apache.cxf.common.injection.NoJSR250Annotations;
-import org.apache.cxf.endpoint.ServerLifeCycleManager;
-import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.OperationInfo;
-import org.apache.cxf.service.model.ServiceInfo;
-
-@NoJSR250Annotations(unlessNull = { "bus" })
-public class ObjectBindingFactory extends AbstractBindingFactory {
- public static final String BINDING_ID = "http://cxf.apache.org/binding/object";
- public static final String RUN_NON_LOGICAL = "objectBinding.stopAfterLogical";
-
- public static final Collection<String> DEFAULT_NAMESPACES = Arrays.asList(BINDING_ID);
-
- private boolean autoRegisterLocalEndpoint;
- private boolean initialized = true;
- private LocalServerListener listener;
-
- public ObjectBindingFactory() {
-
- }
- public ObjectBindingFactory(Bus b) {
- super(b, DEFAULT_NAMESPACES);
- initialize();
- }
-
- @PostConstruct
- public final void initialize() {
- if (autoRegisterLocalEndpoint) {
- Bus bus = getBus();
- ServerLifeCycleManager manager = bus.getExtension(ServerLifeCycleManager.class);
- if (manager != null) {
- listener = new LocalServerListener(bus, this);
- manager.registerListener(listener);
- }
- } else if (listener != null) {
- Bus bus = getBus();
- ServerLifeCycleManager manager = bus.getExtension(ServerLifeCycleManager.class);
- if (manager != null) {
- manager.unRegisterListener(listener);
- listener = null;
- }
- }
- initialized = true;
- }
-
- public Binding createBinding(BindingInfo bi) {
- ObjectBinding binding = new ObjectBinding(bi);
- binding.getOutInterceptors().add(new ObjectDispatchOutInterceptor());
- binding.getInInterceptors().add(new ObjectDispatchInInterceptor());
-
- return binding;
- }
-
- public BindingInfo createBindingInfo(ServiceInfo si, String bindingid, Object config) {
- BindingInfo info = super.createBindingInfo(si, bindingid, config);
-
- if (config instanceof ObjectBindingConfiguration) {
- ObjectBindingConfiguration c = (ObjectBindingConfiguration) config;
-
- info.setProperty(RUN_NON_LOGICAL, c.isNonLogicalPhasesEnabled());
- }
-
- info.setName(new QName(si.getName().getNamespaceURI(),
- si.getName().getLocalPart() + "ObjectBinding"));
-
- for (OperationInfo o : si.getInterface().getOperations()) {
- BindingOperationInfo bop = info.buildOperation(o.getName(), o.getInputName(), o.getOutputName());
- info.addOperation(bop);
- }
- return info;
- }
-
- public boolean isAutoRegisterLocalEndpoint() {
- return autoRegisterLocalEndpoint;
- }
-
- public void setAutoRegisterLocalEndpoint(boolean autoRegisterLocalEndpoint) {
- this.autoRegisterLocalEndpoint = autoRegisterLocalEndpoint;
-
- if (initialized && listener == null) {
- // register the lifecycle listener
- initialize();
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java
deleted file mode 100644
index 3c347ea..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchInInterceptor.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.binding.object;
-
-import java.util.ResourceBundle;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.common.i18n.BundleUtils;
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.BindingOperationInfo;
-
-public class ObjectDispatchInInterceptor extends AbstractPhaseInterceptor<Message> {
- private static final ResourceBundle BUNDLE = BundleUtils.getBundle(ObjectDispatchInInterceptor.class);
-
- public ObjectDispatchInInterceptor() {
- super(Phase.READ);
- }
-
- public void handleMessage(Message message) throws Fault {
- if (Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE))) {
- return;
- }
-
- QName opName = (QName) message.get(ObjectBinding.OPERATION);
- QName bindingName = (QName) message.get(ObjectBinding.BINDING);
-
- if (opName == null) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("NO_OPERATION", BUNDLE));
- }
-
- Endpoint ep = message.getExchange().getEndpoint();
-
- BindingInfo binding = null;
-
- if (bindingName == null) {
- binding = ep.getEndpointInfo().getBinding();
- } else {
- binding = ep.getEndpointInfo().getService().getBinding(bindingName);
- }
-
- BindingOperationInfo bop = binding.getOperation(opName);
-
- message.getExchange().put(BindingOperationInfo.class, bop);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchOutInterceptor.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchOutInterceptor.java
deleted file mode 100644
index c0f7fcb..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/ObjectDispatchOutInterceptor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.binding.object;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.transport.local.LocalConduit;
-import org.apache.cxf.transport.local.LocalTransportFactory;
-
-public class ObjectDispatchOutInterceptor extends AbstractPhaseInterceptor<Message> {
- private Set<String> includes = new HashSet<String>();
-
- public ObjectDispatchOutInterceptor() {
- super(Phase.SETUP);
- includes.add(ObjectBinding.OPERATION);
- includes.add(ObjectBinding.BINDING);
- }
-
- public void handleMessage(Message message) throws Fault {
- Exchange ex = message.getExchange();
- message.put(LocalConduit.DIRECT_DISPATCH, Boolean.TRUE);
- message.put(LocalTransportFactory.MESSAGE_INCLUDE_PROPERTIES,
- includes);
- BindingOperationInfo bop = ex.getBindingOperationInfo();
-
- message.put(ObjectBinding.OPERATION, bop.getName());
- message.put(ObjectBinding.BINDING, bop.getBinding().getName());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/Activator.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/Activator.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/Activator.java
deleted file mode 100644
index 6b6e834..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/Activator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.binding.object.blueprint;
-
-import org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory;
-import org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- @Override
- public void start(BundleContext context) throws Exception {
- try {
- BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {
-
- @Override
- public Object createNamespaceHandler() {
- return new ObjectBindingBPHandler();
- }
- };
- NamespaceHandlerRegisterer.register(context, factory,
- "http://cxf.apache.org/blueprint/binding/object");
- } catch (NoClassDefFoundError error) {
- // No Blueprint is available
- }
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java
deleted file mode 100644
index 2864c2a..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.binding.object.blueprint;
-
-import java.net.URL;
-import java.util.Set;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import org.apache.aries.blueprint.NamespaceHandler;
-import org.apache.aries.blueprint.ParserContext;
-import org.apache.cxf.binding.object.ObjectBindingConfiguration;
-import org.apache.cxf.configuration.blueprint.SimpleBPBeanDefinitionParser;
-import org.osgi.service.blueprint.reflect.ComponentMetadata;
-import org.osgi.service.blueprint.reflect.Metadata;
-
-public class ObjectBindingBPHandler implements NamespaceHandler {
-
- public URL getSchemaLocation(String s) {
- if ("http://cxf.apache.org/blueprint/binding/object".equals(s)) {
- return getClass().getClassLoader().getResource("schemas/bindings/blueprint/object.xsd");
- }
- // no imported XSDs, so we don't have to delegate to cxf-core namespace handler
- return null;
- }
-
- @SuppressWarnings("rawtypes")
- public Set<Class> getManagedClasses() {
- return null;
- }
-
- public Metadata parse(Element element, ParserContext context) {
- return new SimpleBPBeanDefinitionParser(ObjectBindingConfiguration.class).parse(element, context);
- }
-
- public ComponentMetadata decorate(Node node, ComponentMetadata componentMetadata, ParserContext context) {
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/spring/NamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/spring/NamespaceHandler.java b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/spring/NamespaceHandler.java
deleted file mode 100644
index ee7bc2f..0000000
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/spring/NamespaceHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.binding.object.spring;
-
-import org.apache.cxf.binding.object.ObjectBindingConfiguration;
-import org.apache.cxf.configuration.spring.SimpleBeanDefinitionParser;
-import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
-
-public class NamespaceHandler extends NamespaceHandlerSupport {
- public void init() {
- registerBeanDefinitionParser("objectBinding",
- new SimpleBeanDefinitionParser(ObjectBindingConfiguration.class));
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/resources/META-INF/cxf/bus-extensions.txt
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/resources/META-INF/cxf/bus-extensions.txt b/rt/bindings/object/src/main/resources/META-INF/cxf/bus-extensions.txt
deleted file mode 100644
index c93088f..0000000
--- a/rt/bindings/object/src/main/resources/META-INF/cxf/bus-extensions.txt
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.cxf.binding.object.ObjectBindingFactory::true
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/resources/META-INF/spring.handlers
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/resources/META-INF/spring.handlers b/rt/bindings/object/src/main/resources/META-INF/spring.handlers
deleted file mode 100644
index d0e2898..0000000
--- a/rt/bindings/object/src/main/resources/META-INF/spring.handlers
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-#
-# 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.
-#
-#
-http\://cxf.apache.org/bindings/object=org.apache.cxf.binding.object.spring.NamespaceHandler
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/resources/META-INF/spring.schemas
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/resources/META-INF/spring.schemas b/rt/bindings/object/src/main/resources/META-INF/spring.schemas
deleted file mode 100644
index 852eb26..0000000
--- a/rt/bindings/object/src/main/resources/META-INF/spring.schemas
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-#
-# 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.
-#
-#
-http\://cxf.apache.org/schemas/bindings/object.xsd=schemas/bindings/object.xsd
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/resources/schemas/bindings/blueprint/object.xsd
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/resources/schemas/bindings/blueprint/object.xsd b/rt/bindings/object/src/main/resources/schemas/bindings/blueprint/object.xsd
deleted file mode 100644
index d075f03..0000000
--- a/rt/bindings/object/src/main/resources/schemas/bindings/blueprint/object.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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.
- -->
-
-<xsd:schema xmlns="http://cxf.apache.org/blueprint/binding/object"
- targetNamespace="http://cxf.apache.org/blueprint/binding/object"
- xmlns:tns="http://cxf.apache.org/blueprint/binding/object"
- xmlns:beans="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified">
-
-<xsd:import namespace="http://www.osgi.org/xmlns/blueprint/v1.0.0" schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"/>
-
- <xsd:element name="objectBinding">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="beans:Tcomponent">
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
-
-
-</xsd:schema>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/main/resources/schemas/bindings/object.xsd
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/resources/schemas/bindings/object.xsd b/rt/bindings/object/src/main/resources/schemas/bindings/object.xsd
deleted file mode 100644
index d582ae1..0000000
--- a/rt/bindings/object/src/main/resources/schemas/bindings/object.xsd
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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.
--->
-<xsd:schema
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:beans="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"
- targetNamespace="http://cxf.apache.org/bindings/object"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified" >
-
- <xsd:import namespace="http://www.springframework.org/schema/beans" />
-
- <xsd:element name="objectBinding">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="beans:identifiedType">
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
-
-</xsd:schema>
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/Echo.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/Echo.java b/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/Echo.java
deleted file mode 100644
index 687ca63..0000000
--- a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/Echo.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.binding.object;
-
-import javax.jws.WebService;
-
-@WebService
-public interface Echo {
- String echo(String text);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/EchoImpl.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/EchoImpl.java b/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/EchoImpl.java
deleted file mode 100644
index cca6438..0000000
--- a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/EchoImpl.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.binding.object;
-
-import javax.jws.WebService;
-
-@WebService(endpointInterface = "org.apache.cxf.binding.object.Echo")
-public class EchoImpl implements Echo {
-
- public String echo(String text) {
- return text;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java b/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
deleted file mode 100644
index 5024d9a..0000000
--- a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.binding.object;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.cxf.BusException;
-import org.apache.cxf.binding.BindingFactoryManager;
-import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.frontend.ServerFactoryBean;
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.message.ExchangeImpl;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-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.ServiceInfo;
-import org.apache.cxf.test.AbstractCXFTest;
-import org.apache.cxf.testutil.common.TestUtil;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.transport.ConduitInitiator;
-import org.apache.cxf.transport.ConduitInitiatorManager;
-import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.transport.local.LocalTransportFactory;
-import org.junit.Test;
-
-public class LocalServerRegistrationTest extends AbstractCXFTest {
- private Message response;
-
-
-
- @Test
- public void testServer() throws Exception {
- // Enable the auto registration of a default local endpoint when we use other transports
- BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class);
- ObjectBindingFactory obj = (ObjectBindingFactory)
- bfm.getBindingFactory(ObjectBindingFactory.BINDING_ID);
- obj.setAutoRegisterLocalEndpoint(true);
-
- // Create an HTTP endpoint
- ServerFactoryBean sfb = new ServerFactoryBean();
- sfb.setServiceClass(EchoImpl.class);
-
- sfb.setAddress("http://localhost:"
- + TestUtil.getPortNumber(LocalServerRegistrationTest.class)
- + "/echo");
- Server server = sfb.create();
-
- List<Object> content = new ArrayList<Object>();
- content.add("Hello");
-
- ServiceInfo serviceInfo = server.getEndpoint().getEndpointInfo().getService();
- BindingInfo bi = serviceInfo.getBindings().iterator().next();
- BindingOperationInfo bop = bi.getOperations().iterator().next();
-
- assertNotNull(bop.getOperationInfo());
-
- MessageImpl m = new MessageImpl();
- m.setContent(List.class, content);
- ExchangeImpl ex = new ExchangeImpl();
- ex.setInMessage(m);
- ex.put(BindingOperationInfo.class, bop);
-
- Conduit c = getLocalConduit("local://" + server);
- ex.setConduit(c);
-
- new ObjectDispatchOutInterceptor().handleMessage(m);
-
-
-
- c.setMessageObserver(new MessageObserver() {
- public void onMessage(Message message) {
- response = message;
- }
- });
- c.prepare(m);
- c.close(m);
-
- Thread.sleep(1000);
- assertNotNull(response);
-
- List<?> content2 = CastUtils.cast((List<?>)response.getContent(List.class));
- assertNotNull(content2);
- assertEquals(1, content2.size());
-
- }
-
- private Conduit getLocalConduit(String string) throws BusException, IOException {
- ConduitInitiatorManager cim = getBus().getExtension(ConduitInitiatorManager.class);
-
- ConduitInitiator ci = cim.getConduitInitiator(LocalTransportFactory.TRANSPORT_ID);
- EndpointInfo ei = new EndpointInfo();
- ei.setAddress(string);
- return ci.getConduit(ei, bus);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java b/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java
deleted file mode 100644
index d27930a..0000000
--- a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ObjectBindingTest.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.binding.object;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.cxf.BusException;
-import org.apache.cxf.endpoint.Client;
-import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.frontend.ClientFactoryBean;
-import org.apache.cxf.frontend.ServerFactoryBean;
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.message.ExchangeImpl;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-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.ServiceInfo;
-import org.apache.cxf.test.AbstractCXFTest;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.transport.ConduitInitiator;
-import org.apache.cxf.transport.ConduitInitiatorManager;
-import org.apache.cxf.transport.Destination;
-import org.apache.cxf.transport.DestinationFactory;
-import org.apache.cxf.transport.DestinationFactoryManager;
-import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.transport.local.LocalConduit;
-import org.apache.cxf.transport.local.LocalTransportFactory;
-import org.junit.Test;
-
-public class ObjectBindingTest extends AbstractCXFTest {
- private Message response;
-
- @Test
- public void testServer() throws Exception {
- ServerFactoryBean sfb = new ServerFactoryBean();
- sfb.setBindingId(ObjectBindingFactory.BINDING_ID);
- sfb.setServiceClass(EchoImpl.class);
- sfb.setAddress("local://Echo");
- Server server = sfb.create();
-
- List<Object> content = new ArrayList<Object>();
- content.add("Hello");
-
- ServiceInfo serviceInfo = server.getEndpoint().getEndpointInfo().getService();
- BindingInfo bi = serviceInfo.getBindings().iterator().next();
- BindingOperationInfo bop = bi.getOperations().iterator().next();
-
- assertNotNull(bop.getOperationInfo());
-
-
- MessageImpl m = new MessageImpl();
- m.setContent(List.class, content);
- ExchangeImpl ex = new ExchangeImpl();
- ex.setInMessage(m);
- ex.put(BindingOperationInfo.class, bop);
-
- Conduit c = getLocalConduit("local://Echo");
- ex.setConduit(c);
-
- new ObjectDispatchOutInterceptor().handleMessage(m);
-
-
- ex.setConduit(c);
-
- c.setMessageObserver(new MessageObserver() {
- public void onMessage(Message message) {
- response = message;
- }
- });
- c.prepare(m);
- c.close(m);
-
- Thread.sleep(1000);
- assertNotNull(response);
-
- List<?> content2 = CastUtils.cast((List<?>)response.getContent(List.class));
- assertNotNull(content2);
- assertEquals(1, content2.size());
-
- }
-
- @Test
- public void testClient() throws Exception {
- ClientFactoryBean cfb = new ClientFactoryBean();
- cfb.setBindingId(ObjectBindingFactory.BINDING_ID);
- cfb.setServiceClass(EchoImpl.class);
- cfb.setAddress("local://Echo");
- Client client = cfb.create();
-
- final List<Object> content = new ArrayList<Object>();
- content.add("Hello");
-
- final Destination d = getLocalDestination("local://Echo");
-
- d.setMessageObserver(new MessageObserver() {
-
- public void onMessage(Message inMsg) {
- // formulate the response message
- MessageImpl outMsg = new MessageImpl();
- outMsg.setContent(List.class, content);
- outMsg.put(LocalConduit.DIRECT_DISPATCH, Boolean.TRUE);
-
- inMsg.getExchange().setInMessage(outMsg);
- try {
- Conduit backChannel = d.getBackChannel(inMsg);
- backChannel.prepare(outMsg);
- backChannel.close(outMsg);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- });
-
- Object[] res = client.invoke("echo", content.toArray());
- assertNotNull(res);
- assertEquals(1, res.length);
- assertEquals("Hello", res[0]);
-
- }
-
- @Test
- public void testClientServer() throws Exception {
- ClientFactoryBean cfb = new ClientFactoryBean();
- cfb.setBindingId(ObjectBindingFactory.BINDING_ID);
- cfb.setServiceClass(EchoImpl.class);
- cfb.setAddress("local://Echo");
- Client client = cfb.create();
-
- ServerFactoryBean sfb = new ServerFactoryBean();
- sfb.setBindingId(ObjectBindingFactory.BINDING_ID);
- sfb.setServiceClass(EchoImpl.class);
- sfb.setAddress("local://Echo");
- sfb.create();
-
- Object[] res = client.invoke("echo", new Object[] {"Hello"});
- assertNotNull(res);
- assertEquals(1, res.length);
- assertEquals("Hello", res[0]);
- }
-
- private Destination getLocalDestination(String string) throws BusException, IOException {
- DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
-
- DestinationFactory df = dfm.getDestinationFactory(LocalTransportFactory.TRANSPORT_ID);
- EndpointInfo ei = new EndpointInfo();
- ei.setAddress(string);
-
- return df.getDestination(ei, getBus());
- }
-
- private Conduit getLocalConduit(String string) throws BusException, IOException {
- ConduitInitiatorManager cim = getBus().getExtension(ConduitInitiatorManager.class);
-
- ConduitInitiator ci = cim.getConduitInitiator(LocalTransportFactory.TRANSPORT_ID);
- EndpointInfo ei = new EndpointInfo();
- ei.setAddress(string);
- return ci.getConduit(ei, getBus());
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandlerTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandlerTest.java b/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandlerTest.java
deleted file mode 100644
index ea3febf..0000000
--- a/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandlerTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.binding.object.blueprint;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- *
- */
-public class ObjectBindingBPHandlerTest extends Assert {
- @Test
- public void testGetSchemaLocation() {
- ObjectBindingBPHandler handler = new ObjectBindingBPHandler();
-
- assertNotNull(handler.getSchemaLocation("http://cxf.apache.org/blueprint/binding/object"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/fb11380d/rt/bindings/pom.xml
----------------------------------------------------------------------
diff --git a/rt/bindings/pom.xml b/rt/bindings/pom.xml
index 93cf86f..ccb7896 100644
--- a/rt/bindings/pom.xml
+++ b/rt/bindings/pom.xml
@@ -32,7 +32,6 @@
<modules>
<module>soap</module>
<module>xml</module>
- <module>object</module>
<module>coloc</module>
<module>corba</module>
</modules>