You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2011/12/22 04:06:01 UTC
svn commit: r1222013 [2/2] - in
/servicemix/components/trunk/engines/servicemix-cxf-se: ./
src/main/java/org/apache/servicemix/cxf/
src/main/java/org/apache/servicemix/cxf/binding/
src/main/java/org/apache/servicemix/cxf/binding/jbi/ src/main/java/org/...
Added: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBIDispatcherUtil.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBIDispatcherUtil.java?rev=1222013&view=auto
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBIDispatcherUtil.java (added)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBIDispatcherUtil.java Thu Dec 22 03:06:00 2011
@@ -0,0 +1,168 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.servicemix.cxf.transport.jbi;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.jbi.messaging.DeliveryChannel;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.transport.ConduitInitiator;
+
+public final class JBIDispatcherUtil {
+ private static final Logger LOG = LogUtils.getL7dLogger(JBIDispatcherUtil.class);
+ private static JBIDispatcherUtil dispatchUtil;
+ private final DeliveryChannel channel;
+ private ConduitInitiator conduitInitiator;
+ private int activeEndpoints;
+ private boolean running;
+
+ private JBIDispatcherUtil(ConduitInitiator ci,
+ DeliveryChannel dc) {
+ this.conduitInitiator = ci;
+ this.channel = dc;
+ }
+
+ public static synchronized JBIDispatcherUtil getInstance(ConduitInitiator ci,
+ DeliveryChannel dc) {
+ if (dispatchUtil == null) {
+ dispatchUtil = new JBIDispatcherUtil(ci, dc);
+ }
+ return dispatchUtil;
+
+ }
+
+
+ public static void clean() {
+ dispatchUtil = null;
+ }
+
+ public void activateDispatch() {
+ activeEndpoints++;
+ if (!running && channel != null) {
+ new Thread(new JBIDispatcher()).start();
+ }
+ }
+
+ public void startDispatch() {
+
+ }
+
+ public void deactivateDispatch() {
+ activeEndpoints--;
+ }
+
+ protected Logger getLogger() {
+ return LOG;
+ }
+
+ private class JBIDispatcher implements Runnable {
+
+ public final void run() {
+
+ try {
+ synchronized (channel) {
+ running = true;
+ }
+ getLogger().fine(new org.apache.cxf.common.i18n.Message(
+ "RECEIVE.THREAD.START", getLogger()).toString());
+ do {
+ MessageExchange exchange = null;
+ synchronized (channel) {
+ try {
+ exchange = channel.accept();
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+
+ if (exchange != null
+ && exchange.getStatus() == ExchangeStatus.ACTIVE) {
+
+ try {
+ getLogger().fine(new org.apache.cxf.common.i18n.Message(
+ "DISPATCH.TO.SU", getLogger()).toString());
+ dispatch(exchange);
+
+ } finally {
+ //
+ }
+ }
+ } while(activeEndpoints > 0);
+ synchronized (channel) {
+ running = false;
+ }
+ } catch (Exception ex) {
+ getLogger().log(Level.SEVERE, new org.apache.cxf.common.i18n.Message(
+ "ERROR.DISPATCH.THREAD", getLogger()).toString(), ex);
+ }
+ getLogger().fine(new org.apache.cxf.common.i18n.Message(
+ "JBI.SERVER.TRANSPORT.MESSAGE.PROCESS.THREAD.EXIT", getLogger()).toString());
+ }
+ }
+
+ public void dispatch(MessageExchange exchange) throws IOException {
+
+ QName opName = exchange.getOperation();
+ getLogger().fine("dispatch method: " + opName);
+
+ NormalizedMessage nm = exchange.getMessage("in");
+
+ try {
+
+ MessageImpl inMessage = new MessageImpl();
+ Set normalizedMessageProps = nm.getPropertyNames();
+ for (Object name : normalizedMessageProps) {
+ inMessage.put((String)name, nm.getProperty((String)name));
+
+ }
+
+ inMessage.put(MessageExchange.class, exchange);
+
+
+ final InputStream in = JBIMessageHelper.convertMessageToInputStream(nm.getContent());
+ inMessage.setContent(InputStream.class, in);
+
+ //dispatch to correct destination in case of multiple endpoint
+ inMessage.setDestination(((JBITransportFactory)conduitInitiator).
+ getDestination(exchange.getService().toString()
+ + exchange.getInterfaceName().toString()));
+ ((JBITransportFactory)conduitInitiator).
+ getDestination(exchange.getService().toString()
+ + exchange.getInterfaceName().toString()).
+ getMessageObserver().onMessage(inMessage);
+
+ } catch (Exception ex) {
+ getLogger().log(Level.SEVERE, new org.apache.cxf.common.i18n.Message(
+ "ERROR.PREPARE.MESSAGE", getLogger()).toString(), ex);
+ throw new IOException(ex.getMessage());
+ }
+
+ }
+}
Added: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBIMessageHelper.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBIMessageHelper.java?rev=1222013&view=auto
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBIMessageHelper.java (added)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBIMessageHelper.java Thu Dec 22 03:06:00 2011
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.servicemix.cxf.transport.jbi;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.transform.Source;
+
+import org.apache.cxf.io.CachedOutputStream;
+import org.apache.cxf.staxutils.StaxUtils;
+
+public final class JBIMessageHelper {
+
+ private JBIMessageHelper() {
+ // complete
+ }
+
+ public static InputStream convertMessageToInputStream(Source src) throws IOException {
+
+ CachedOutputStream cos = new CachedOutputStream();
+ try {
+ StaxUtils.copy(src, cos);
+ return cos.getInputStream();
+ } catch (XMLStreamException e) {
+ IOException ioe = new IOException(e.getMessage());
+ ioe.initCause(e);
+ throw ioe;
+ } finally {
+ try {
+ cos.close();
+ } catch (Exception ex) {
+ //ignore
+ }
+ }
+ }
+}
Added: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBITransportFactory.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBITransportFactory.java?rev=1222013&view=auto
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBITransportFactory.java (added)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxf/transport/jbi/JBITransportFactory.java Thu Dec 22 03:06:00 2011
@@ -0,0 +1,169 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.servicemix.cxf.transport.jbi;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.jbi.JBIException;
+import javax.jbi.messaging.DeliveryChannel;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.AbstractTransportFactory;
+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.ws.addressing.EndpointReferenceType;
+
+public class JBITransportFactory extends AbstractTransportFactory implements ConduitInitiator,
+ DestinationFactory {
+
+ public static final String TRANSPORT_ID = "http://cxf.apache.org/transports/jbi";
+ public static final List<String> DEFAULT_NAMESPACES
+ = Arrays.asList(TRANSPORT_ID,
+ "http://cxf.apache.org/transports/jbi/configuration");
+
+ private static final Logger LOG = LogUtils.getL7dLogger(JBITransportFactory.class);
+
+
+ private DeliveryChannel deliveryChannel;
+ private Bus bus;
+ private final Map<String, JBIDestination> destinationMap = new HashMap<String, JBIDestination>();
+
+
+ private Collection<String> activationNamespaces = DEFAULT_NAMESPACES;
+
+ public JBITransportFactory() {
+ super(DEFAULT_NAMESPACES);
+ }
+
+ @Resource(name = "cxf")
+ public void setBus(Bus b) {
+ bus = b;
+ }
+
+ public Bus getBus() {
+ return bus;
+ }
+
+ public Set<String> getUriPrefixes() {
+ return Collections.singleton("jbi");
+ }
+
+
+ public void setActivationNamespaces(Collection<String> ans) {
+ activationNamespaces = ans;
+ }
+
+
+ @PostConstruct
+ void registerWithBindingManager() {
+ if (null == bus) {
+ return;
+ }
+ ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
+ if (null != cim && null != activationNamespaces) {
+ for (String ns : activationNamespaces) {
+ cim.registerConduitInitiator(ns, this);
+ }
+ }
+ DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
+ if (null != dfm && null != activationNamespaces) {
+ for (String ns : activationNamespaces) {
+ dfm.registerDestinationFactory(ns, this);
+ }
+ }
+ }
+
+
+
+
+ public DeliveryChannel getDeliveryChannel() {
+ return deliveryChannel;
+ }
+
+ public void setDeliveryChannel(DeliveryChannel newDeliverychannel) {
+ LOG.fine(new org.apache.cxf.common.i18n.Message(
+ "CONFIG.DELIVERY.CHANNEL", LOG).toString() + newDeliverychannel);
+ deliveryChannel = newDeliverychannel;
+ }
+
+ public Conduit getConduit(EndpointInfo targetInfo) throws IOException {
+ return getConduit(targetInfo, null);
+ }
+
+ public Conduit getConduit(EndpointInfo endpointInfo, EndpointReferenceType target) throws IOException {
+ Conduit conduit = new JBIConduit(target, getDeliveryChannel());
+ Configurer configurer = bus.getExtension(Configurer.class);
+ if (null != configurer) {
+ configurer.configureBean(conduit);
+ }
+ return conduit;
+ }
+
+ public Destination getDestination(EndpointInfo ei) throws IOException {
+ JBIDestination destination = new JBIDestination(ei,
+ JBIDispatcherUtil.getInstance(this, getDeliveryChannel()),
+ getDeliveryChannel());
+ Configurer configurer = bus.getExtension(Configurer.class);
+ if (null != configurer) {
+ configurer.configureBean(destination);
+ }
+ try {
+ putDestination(ei.getService().getName().toString()
+ + ei.getInterface().getName().toString(), destination);
+ } catch (JBIException e) {
+ throw new IOException(e.getMessage());
+ }
+ return destination;
+ }
+
+ public void putDestination(String epName, JBIDestination destination) throws JBIException {
+ if (destinationMap.containsKey(epName)) {
+ throw new JBIException("JBIDestination for Endpoint "
+ + epName + " has already been created");
+ } else {
+ destinationMap.put(epName, destination);
+ }
+ }
+
+ public JBIDestination getDestination(String epName) {
+ return destinationMap.get(epName);
+ }
+
+ public void removeDestination(String epName) {
+ destinationMap.remove(epName);
+ }
+
+}
Modified: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeComponent.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeComponent.java?rev=1222013&r1=1222012&r2=1222013&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeComponent.java (original)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeComponent.java Thu Dec 22 03:06:00 2011
@@ -82,7 +82,7 @@ public class CxfSeComponent extends Defa
CXF_CONFIG[0] = configuration.getBusCfg();
}
if (bus == null) {
- bus = new SpringBusFactory().createBus();
+ bus = new SpringBusFactory().createBus(CXF_CONFIG);
bus.getProperties().put(org.apache.cxf.interceptor.OneWayProcessorInterceptor.USE_ORIGINAL_THREAD, "true");
}
super.doInit();
Modified: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java?rev=1222013&r1=1222012&r2=1222013&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java (original)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java Thu Dec 22 03:06:00 2011
@@ -66,9 +66,9 @@ import org.apache.cxf.message.Message;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.apache.cxf.service.model.EndpointInfo;
import org.apache.cxf.transport.ConduitInitiatorManager;
-import org.apache.cxf.transport.jbi.JBIDestination;
-import org.apache.cxf.transport.jbi.JBIDispatcherUtil;
-import org.apache.cxf.transport.jbi.JBITransportFactory;
+import org.apache.servicemix.cxf.transport.jbi.JBIDestination;
+import org.apache.servicemix.cxf.transport.jbi.JBIDispatcherUtil;
+import org.apache.servicemix.cxf.transport.jbi.JBITransportFactory;
import org.apache.cxf.wsdl11.ServiceWSDLBuilder;
import org.apache.cxf.xmlbeans.XmlBeansDataBinding;
import org.apache.servicemix.common.endpoints.ProviderEndpoint;
@@ -274,7 +274,7 @@ public class CxfSeEndpoint extends Provi
sf.getServiceFactory().setPopulateFromClass(true);
sf.setStart(false);
if (isUseJBIWrapper()) {
- sf.setBindingId(org.apache.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);
+ sf.setBindingId(org.apache.servicemix.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);
}
if (getPojoService() != null) {
sf.setServiceName(getPojoService());
@@ -325,7 +325,7 @@ public class CxfSeEndpoint extends Provi
}
endpoint = new EndpointImpl(getBus(), getPojo(), new JaxWsServerFactoryBean(serviceFactory));
if (isUseJBIWrapper()) {
- endpoint.setBindingUri(org.apache.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);
+ endpoint.setBindingUri(org.apache.servicemix.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);
}
if (isUseXmlBeans()) {
if (getDataBinding() != null && getDataBinding() instanceof XmlBeansDataBinding) {
Modified: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeProxyFactoryBean.java?rev=1222013&r1=1222012&r2=1222013&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeProxyFactoryBean.java (original)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/java/org/apache/servicemix/cxfse/CxfSeProxyFactoryBean.java Thu Dec 22 03:06:00 2011
@@ -43,7 +43,7 @@ import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.transport.ConduitInitiatorManager;
-import org.apache.cxf.transport.jbi.JBITransportFactory;
+import org.apache.servicemix.cxf.transport.jbi.JBITransportFactory;
import org.apache.servicemix.cxfse.interceptors.AttachmentInInterceptor;
import org.apache.servicemix.id.IdGenerator;
import org.apache.servicemix.jbi.api.ClientFactory;
@@ -118,11 +118,11 @@ public class CxfSeProxyFactoryBean imple
cf.setServiceClass(type);
cf.setAddress("jbi://" + new IdGenerator().generateSanitizedId());
if (isUseJBIWrapper()) {
- cf.setBindingId(org.apache.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);
+ cf.setBindingId(org.apache.servicemix.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);
}
ComponentContext internalContext = getInternalContext();
- Bus bus = new SpringBusFactory().createBus();
+ Bus bus = new SpringBusFactory().createBus(CXF_CONFIG);
JBITransportFactory jbiTransportFactory = (JBITransportFactory) bus
.getExtension(ConduitInitiatorManager.class)
.getConduitInitiator(JBITransportFactory.TRANSPORT_ID);
Added: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/META-INF/cxf/binding/jbi/cxf-binding-jbi.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/META-INF/cxf/binding/jbi/cxf-binding-jbi.xml?rev=1222013&view=auto
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/META-INF/cxf/binding/jbi/cxf-binding-jbi.xml (added)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/META-INF/cxf/binding/jbi/cxf-binding-jbi.xml Thu Dec 22 03:06:00 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="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">
+
+ <bean class="org.apache.servicemix.cxf.binding.jbi.JBIBindingFactory"
+ id="org.apache.servicemix.cxf.binding.jbi.JBIBindingFactory"
+ lazy-init="true">
+ <constructor-arg ref="cxf"/>
+ </bean>
+
+</beans>
Added: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/META-INF/cxf/transport/jbi/cxf-transport-jbi.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/META-INF/cxf/transport/jbi/cxf-transport-jbi.xml?rev=1222013&view=auto
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/META-INF/cxf/transport/jbi/cxf-transport-jbi.xml (added)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/META-INF/cxf/transport/jbi/cxf-transport-jbi.xml Thu Dec 22 03:06:00 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:foo="http://cxf.apache.org/configuration/foo"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean class="org.apache.servicemix.cxf.transport.jbi.JBITransportFactory"
+ id="org.apache.servicemix.cxf.transport.jbi.JBITransportFactory"
+ lazy-init="true">
+ <property name="bus" ref="cxf"/>
+ </bean>
+</beans>
Added: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/org/apache/servicemix/cxf/binding/jbi/interceptor/Messages.properties
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/org/apache/servicemix/cxf/binding/jbi/interceptor/Messages.properties?rev=1222013&view=auto
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/org/apache/servicemix/cxf/binding/jbi/interceptor/Messages.properties (added)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/org/apache/servicemix/cxf/binding/jbi/interceptor/Messages.properties Thu Dec 22 03:06:00 2011
@@ -0,0 +1,61 @@
+#
+# 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.
+#
+NOT.IMPLEMENTED=not yet implemented
+INVOKE.SERVICE=invoking service\t
+CREATE.MESSAGE.EXCHANGE=create message exchange svc:\t
+EXCHANGE.ENDPOINT=exchange endpoint:\t
+NO.MESSAGE=no message yet
+UNABLE.RETRIEVE.MESSAGE=unable to retrieve message
+CONTEXT.MUST.BE=context must be of type JBIOutputStreamMessageContext
+RECEIVED.MESSAGE=received message:\t
+ACTIVE.JBI.SERVER.TRANSPORT=activating JBI server transport
+BUILDING.DOCUMENT=building document from bytes
+CREATE.NORMALIZED.MESSAGE=creating NormalizedMessage
+POST.DISPATCH=postDispatch sending out message to NWR
+ERROR.SEND.MESSAGE=error sending Out message
+DISPATCH.MESSAGE.ON.CALLBACK=dispatching message on callback:\t
+ERROR.PREPARE.MESSAGE=error preparing message
+RECEIVE.THREAD.START=JBIServerTransport message receiving thread started
+DISPATCH.TO.SU=dispatching to CXF service unit
+NO.SU.FOUND=no CXFServiceUnit found
+ERROR.DISPATCH.THREAD=error running dispatch thread
+JBI.SERVER.TRANSPORT.MESSAGE.PROCESS.THREAD.EXIT=JBIServerTransport message processing thread exiting
+CONFIG.DELIVERY.CHANNEL=configuring DeliveryChannel:\t
+CONFIG.SU.MANAGER=configuring ServiceUnitManager:\t
+JBI.TRANSPORT.FACTORY.NOT.INITIALIZED=JBITransportFactory is not properly initialized
+SU.MANAGER=CXFServiceUnitManager:\t
+DELIVERY.CHANNEL=DeliveryChannel:\t
+JBI.TRANSPORT.FACTORY.NOT.FULLY.INITIALIZED=JBITransport factory not fully initialized
+CREATE.SERVER.TRANSPORT=creating JBI server transport
+CREATE.CLIENT.TRANSPORT=creating JBI client transport
+UNKNOWN_OPERATION=unknown operation {0}
+NO_OPERATION_ELEMENT=no operation element
+NO_JBI_MESSAGE_ELEMENT=no jbi message element
+NOT_ENOUGH_PARTS=not enough parts
+NO_JBI_PART_ELEMENT=no jbi part element
+EXPECTED_ELEMENT_IN_PART=expected element in part
+TOO_MANY_PARTS=too many parts
+ILLEGAL_JBIFAULT_FORMAT=illegal jbi fault format
+STAX_READ_EXC=stax read exception
+XML_WRITE_EXC=xml write exception
+STAX_WRITE_EXC=stax write exception
+NOT_EQUAL_ARG_NUM=The number of arguments is not equal
+NEED_JBIBINDING=BindingInfo should be a JbiBindingInfo
+NO_EXCEPTION=No exception on this message
+NO_XML_STREAM_WRITER=No XMLStreamWriter on this message
\ No newline at end of file
Added: servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/org/apache/servicemix/cxf/transport/jbi/Messages.properties
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/org/apache/servicemix/cxf/transport/jbi/Messages.properties?rev=1222013&view=auto
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/org/apache/servicemix/cxf/transport/jbi/Messages.properties (added)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/main/resources/org/apache/servicemix/cxf/transport/jbi/Messages.properties Thu Dec 22 03:06:00 2011
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+NOT.IMPLEMENTED=not yet implemented
+INVOKE.SERVICE=invoking service\t
+CREATE.MESSAGE.EXCHANGE=create message exchange svc:\t
+EXCHANGE.ENDPOINT=exchange endpoint:\t
+NO.MESSAGE=no message yet
+UNABLE.RETRIEVE.MESSAGE=unable to retrieve message
+CONTEXT.MUST.BE=context must be of type JBIOutputStreamMessageContext
+RECEIVED.MESSAGE=received message:\t
+ACTIVE.JBI.SERVER.TRANSPORT=activating JBI server transport
+BUILDING.DOCUMENT=building document from bytes
+CREATE.NORMALIZED.MESSAGE=creating NormalizedMessage
+POST.DISPATCH=postDispatch sending out message to NWR
+ERROR.SEND.MESSAGE=error sending Out message
+DISPATCH.MESSAGE.ON.CALLBACK=dispatching message on callback:\t
+ERROR.PREPARE.MESSAGE=error preparing message
+RECEIVE.THREAD.START=JBIServerTransport message receiving thread started
+DISPATCH.TO.SU=dispatching to CXF service unit
+NO.SU.FOUND=no CXFServiceUnit found
+ERROR.DISPATCH.THREAD=error running dispatch thread
+JBI.SERVER.TRANSPORT.MESSAGE.PROCESS.THREAD.EXIT=JBIServerTransport message processing thread exiting
+CONFIG.DELIVERY.CHANNEL=configuring DeliveryChannel:\t
+CONFIG.SU.MANAGER=configuring ServiceUnitManager:\t
+JBI.TRANSPORT.FACTORY.NOT.INITIALIZED=JBITransportFactory is not properly initialized
+SU.MANAGER=CXFServiceUnitManager:\t
+DELIVERY.CHANNEL=DeliveryChannel:\t
+JBI.TRANSPORT.FACTORY.NOT.FULLY.INITIALIZED=JBITransport factory not fully initialized
+CREATE.SERVER.TRANSPORT=creating JBI server transport
+CREATE.CLIENT.TRANSPORT=creating JBI client transport
Modified: servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java?rev=1222013&r1=1222012&r2=1222013&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java (original)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java Thu Dec 22 03:06:00 2011
@@ -29,7 +29,7 @@ import junit.framework.TestCase;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.transport.ConduitInitiatorManager;
-import org.apache.cxf.transport.jbi.JBITransportFactory;
+import org.apache.servicemix.cxf.transport.jbi.JBITransportFactory;
import org.apache.servicemix.client.DefaultServiceMixClient;
import org.apache.servicemix.jbi.container.JBIContainer;
import org.apache.servicemix.jbi.jaxp.SourceTransformer;
Modified: servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java?rev=1222013&r1=1222012&r2=1222013&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java (original)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java Thu Dec 22 03:06:00 2011
@@ -31,4 +31,4 @@ public class GreetMeResponse {
public void setMsg(String msg) {
this.msg = msg;
}
-}
\ No newline at end of file
+}
Modified: servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java?rev=1222013&r1=1222012&r2=1222013&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java (original)
+++ servicemix/components/trunk/engines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java Thu Dec 22 03:06:00 2011
@@ -31,4 +31,4 @@ public class SayHiResponse {
public void setMsg(String msg) {
this.msg = msg;
}
-}
\ No newline at end of file
+}