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 2007/10/11 08:49:04 UTC

svn commit: r583701 - in /incubator/servicemix/trunk/deployables: bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/ bindingcomponen...

Author: ffang
Date: Wed Oct 10 23:49:03 2007
New Revision: 583701

URL: http://svn.apache.org/viewvc?rev=583701&view=rev
Log:
[SM-1086] cxf bc provider and test shows how it works
[SM-1088] add locationURI for cxf bc provider
using LogUtils.getL7dLogger to create log which enable flexible pluggable log system

Added:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java   (with props)
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java   (with props)
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java   (with props)
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider.xml   (with props)
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/xbean.xml   (with props)
Modified:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiAddressingInterceptor.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcComponentTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/GreeterImpl.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/InMessageRecorder.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/MessageLossSimulator.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/OutMessageRecorder.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBCSecurityTest.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java Wed Oct 10 23:49:03 2007
@@ -16,13 +16,58 @@
  */
 package org.apache.servicemix.cxfbc;
 
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.logging.Logger;
 
+import javax.jbi.management.DeploymentException;
 import javax.jbi.messaging.MessageExchange;
-
+import javax.jbi.messaging.NormalizedMessage;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import com.ibm.wsdl.Constants;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.binding.AbstractBindingFactory;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor;
+import org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.endpoint.EndpointImpl;
 import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.interceptor.StaxOutInterceptor;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.phase.PhaseChainCache;
+import org.apache.cxf.phase.PhaseInterceptorChain;
+import org.apache.cxf.phase.PhaseManager;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.Conduit;
+import org.apache.cxf.transport.ConduitInitiator;
+import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.cxf.transport.jbi.JBIMessageHelper;
+import org.apache.cxf.wsdl11.WSDLServiceFactory;
 import org.apache.servicemix.common.endpoints.ProviderEndpoint;
+import org.apache.servicemix.cxfbc.interceptors.JbiOutWsdl1Interceptor;
+import org.apache.servicemix.soap.util.DomUtil;
+import org.springframework.core.io.Resource;
+
+
 
 /**
  * 
@@ -32,6 +77,9 @@
 public class CxfBcProvider extends ProviderEndpoint implements
         CxfBcEndpointWithInterceptor {
 
+    private static final Logger LOG = LogUtils.getL7dLogger(org.apache.servicemix.cxfbc.CxfBcProvider.class);
+    
+    
     List<Interceptor> in = new CopyOnWriteArrayList<Interceptor>();
 
     List<Interceptor> out = new CopyOnWriteArrayList<Interceptor>();
@@ -39,11 +87,81 @@
     List<Interceptor> outFault = new CopyOnWriteArrayList<Interceptor>();
 
     List<Interceptor> inFault = new CopyOnWriteArrayList<Interceptor>();
+    
+    private Resource wsdl;
+    
+    private String busCfg;
+    
+    private Bus bus;
+    
+    private URI locationURI;
+    
+    private EndpointInfo ei;
+    
+    private Endpoint ep;
 
+    private Conduit conduit;
+    
     public void processExchange(MessageExchange exchange) {
-
+        
     }
 
+    public void process(MessageExchange exchange) throws Exception {
+        NormalizedMessage nm = exchange.getMessage("in");
+               
+        CxfBcProviderMessageObserver obs = new CxfBcProviderMessageObserver(exchange, this);
+        conduit.setMessageObserver(obs);
+        SoapMessage message = new SoapMessage(new MessageImpl());
+        message.put(MessageExchange.class, exchange);
+        Exchange cxfExchange = new ExchangeImpl();
+        message.setExchange(cxfExchange);
+               
+        BindingOperationInfo boi = ei.getBinding().getOperation(exchange.getOperation());
+        cxfExchange.put(BindingOperationInfo.class, boi);
+        cxfExchange.put(Endpoint.class, ep);
+        PhaseChainCache outboundChainCache = new PhaseChainCache();
+        PhaseManager pm = getBus().getExtension(PhaseManager.class);
+        List<Interceptor> outList = new ArrayList<Interceptor>();
+        outList.add(new JbiOutWsdl1Interceptor());
+        outList.add(new SoapPreProtocolOutInterceptor());
+        outList.add(new SoapOutInterceptor(getBus()));
+        PhaseInterceptorChain outChain = outboundChainCache.get(pm.getOutPhases(), outList);
+        outChain.add(getOutInterceptors());
+        outChain.add(getOutFaultInterceptors());
+        message.setInterceptorChain(outChain);
+        InputStream is = JBIMessageHelper.convertMessageToInputStream(nm.getContent());
+        
+        StreamSource source = new StreamSource(is);
+        message.setContent(Source.class, source);
+        
+        message.setContent(InputStream.class, is);
+        
+        conduit.prepare(message);
+        OutputStream os = message.getContent(OutputStream.class);
+        XMLStreamWriter writer = message.getContent(XMLStreamWriter.class);
+        
+
+        String encoding = getEncoding(message);
+        
+        try {
+            writer = StaxOutInterceptor.getXMLOutputFactory(message).createXMLStreamWriter(os, encoding);
+        } catch (XMLStreamException e) {
+            //
+        }
+        message.setContent(XMLStreamWriter.class, writer);
+        outChain.doIntercept(message);
+        XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
+        if (xtw != null) {
+            xtw.writeEndDocument();
+            xtw.close();
+        }
+
+        os.flush();
+        is.close();
+        os.close();
+
+    }
+    
     public List<Interceptor> getOutFaultInterceptors() {
         return outFault;
     }
@@ -74,6 +192,120 @@
 
     public void setOutFaultInterceptors(List<Interceptor> interceptors) {
         outFault = interceptors;
+    }
+
+    public void setWsdl(Resource wsdl) {
+        this.wsdl = wsdl;
+    }
+
+    public Resource getWsdl() {
+        return wsdl;
+    }
+    
+    @Override
+    public void validate() throws DeploymentException {
+        try {
+            if (definition == null) {
+                if (wsdl == null) {
+                    throw new DeploymentException("wsdl property must be set");
+                }
+                description = DomUtil.parse(wsdl.getInputStream());
+                WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+                WSDLReader reader = wsdlFactory.newWSDLReader();
+                reader.setFeature(Constants.FEATURE_VERBOSE, false);
+                definition = reader.readWSDL(wsdl.getURL().toString(),
+                        description);
+                WSDLServiceFactory factory = new WSDLServiceFactory(getBus(),
+                        definition, service);
+                Service cxfService = factory.create();
+                
+                ei = cxfService.getServiceInfos().iterator().next()
+                        .getEndpoints().iterator().next();
+
+                if (endpoint == null) {
+                    endpoint = ei.getName().getLocalPart();
+                }
+                ei.getBinding().setProperty(
+                        AbstractBindingFactory.DATABINDING_DISABLED, Boolean.TRUE);
+                if (locationURI == null) {
+                    // if not specify target address, get it from the wsdl
+                    locationURI = new URI(ei.getAddress());
+                    LOG.fine("address is " + locationURI.toString());
+                }
+                ep = new EndpointImpl(getBus(), cxfService, ei);
+                
+                //init transport
+                ei.setAddress(locationURI.toString());
+                ConduitInitiatorManager conduitMgr = getBus().getExtension(ConduitInitiatorManager.class);
+                ConduitInitiator conduitInit = conduitMgr.getConduitInitiator("http://schemas.xmlsoap.org/soap/http");
+                conduit = conduitInit.getConduit(ei);
+
+                
+
+                super.validate();
+            }
+        } catch (DeploymentException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new DeploymentException(e);
+        }
+    }
+
+    @Override
+    public void start() throws Exception {
+        super.start();
+        
+    }
+    
+    protected Bus getBus() {
+        if (getBusCfg() != null) {
+            if (bus == null) {
+                SpringBusFactory bf = new SpringBusFactory();
+                bus = bf.createBus(getBusCfg());
+            }
+            return bus;
+        } else {
+            return ((CxfBcComponent) getServiceUnit().getComponent()).getBus();
+        }
+    }
+    
+    public void setBusCfg(String busCfg) {
+        this.busCfg = busCfg;
+    }
+
+    public String getBusCfg() {
+        return busCfg;
+    }
+
+    public void setLocationURI(URI locationURI) {
+        this.locationURI = locationURI;
+    }
+
+    public URI getLocationURI() {
+        return locationURI;
+    }
+    
+    private String getEncoding(Message message) {
+        Exchange ex = message.getExchange();
+        String encoding = (String)message.get(Message.ENCODING);
+        if (encoding == null && ex.getInMessage() != null) {
+            encoding = (String) ex.getInMessage().get(Message.ENCODING);
+            message.put(Message.ENCODING, encoding);
+        }
+        
+        if (encoding == null) {
+            encoding = "UTF-8";
+            message.put(Message.ENCODING, encoding);
+        }
+        return encoding;
+    }
+    
+    Endpoint getCxfEndpoint() {
+        return this.ep;
+    }
+    
+    EndpointInfo getEndpointInfo() {
+        return this.ei;
     }
 
 }

Added: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java?rev=583701&view=auto
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java (added)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java Wed Oct 10 23:49:03 2007
@@ -0,0 +1,155 @@
+/*
+ * 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.cxfbc;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOptionalOut;
+import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.PhaseChainCache;
+import org.apache.cxf.phase.PhaseInterceptorChain;
+import org.apache.cxf.phase.PhaseManager;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.transport.MessageObserver;
+import org.apache.servicemix.JbiConstants;
+import org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor;
+
+public class CxfBcProviderMessageObserver implements MessageObserver {
+    ByteArrayOutputStream response = new ByteArrayOutputStream();
+
+    boolean written;
+
+    String contentType;
+
+    private MessageExchange messageExchange;
+
+    private CxfBcProvider providerEndpoint;
+    
+    public CxfBcProviderMessageObserver(MessageExchange exchange, CxfBcProvider providerEndpoint) {
+        this.messageExchange = exchange;
+        this.providerEndpoint = providerEndpoint;
+    }
+
+    public ByteArrayOutputStream getResponseStream() throws Exception {
+        synchronized (this) {
+            if (!written) {
+                wait(1000000000);
+            }
+        }
+        return response;
+    }
+
+    public String getResponseContentType() {
+        return contentType;
+    }
+
+    public void onMessage(Message message) {
+        try {
+            contentType = (String) message.get(Message.CONTENT_TYPE);
+            SoapMessage soapMessage = new SoapMessage(message);
+            
+            //create XmlStreamReader
+            XMLStreamReader xmlStreamReader = createXMLStreamReaderFromMessage(soapMessage);
+            soapMessage.setContent(XMLStreamReader.class, xmlStreamReader);
+            soapMessage.put(org.apache.cxf.message.Message.REQUESTOR_ROLE, true);
+            Exchange cxfExchange = new ExchangeImpl();
+            soapMessage.setExchange(cxfExchange);
+                   
+            BindingOperationInfo boi = providerEndpoint.getEndpointInfo().getBinding().getOperation(messageExchange.getOperation());
+            cxfExchange.put(BindingOperationInfo.class, boi);
+            cxfExchange.put(Endpoint.class, providerEndpoint.getCxfEndpoint());
+            //create Interceptor chain
+            
+            PhaseChainCache inboundChainCache = new PhaseChainCache();
+            PhaseManager pm = providerEndpoint.getBus().getExtension(PhaseManager.class);
+            List<Interceptor> inList = new ArrayList<Interceptor>();
+            inList.add(new JbiInWsdl1Interceptor());
+            
+            PhaseInterceptorChain inChain = inboundChainCache.get(pm.getInPhases(), inList);
+            inChain.add(providerEndpoint.getOutInterceptors());
+            inChain.add(providerEndpoint.getOutFaultInterceptors());
+            soapMessage.setInterceptorChain(inChain);
+            inChain.doIntercept(soapMessage);
+            
+            if (messageExchange instanceof InOut) {
+                NormalizedMessage msg = messageExchange.createMessage();
+                msg.setContent(soapMessage.getContent(Source.class));
+                messageExchange.setMessage(msg, "out");
+            } else if (messageExchange instanceof InOptionalOut) {
+                if (soapMessage.getContent(Source.class) != null) {
+                    NormalizedMessage msg = messageExchange.createMessage();
+                    msg.setContent(soapMessage.getContent(Source.class));
+                    messageExchange.setMessage(msg, "out");
+                } else {
+                    messageExchange.setStatus(ExchangeStatus.DONE);
+                }
+            } else {
+                messageExchange.setStatus(ExchangeStatus.DONE);
+
+            }
+            boolean txSync = messageExchange.getStatus() == ExchangeStatus.ACTIVE
+                    && messageExchange.isTransacted()
+                    && Boolean.TRUE.equals(messageExchange
+                            .getProperty(JbiConstants.SEND_SYNC));
+            if (txSync) {
+                providerEndpoint.getContext().getDeliveryChannel().sendSync(messageExchange);
+            } else {
+                providerEndpoint.getContext().getDeliveryChannel().send(messageExchange);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            synchronized (this) {
+                written = true;
+                notifyAll();
+            }
+        }
+    }
+    
+    private XMLStreamReader createXMLStreamReaderFromMessage(Message message) {
+        XMLStreamReader xmlReader = null;
+        try {
+            StreamSource bodySource = new StreamSource(message.getContent(InputStream.class));
+            xmlReader = StaxUtils.createXMLStreamReader(bodySource);
+            xmlReader.nextTag();
+            xmlReader.nextTag();
+            xmlReader.nextTag();
+        }  catch (XMLStreamException e) {
+            e.printStackTrace();
+        }
+        return xmlReader;
+    }
+}
\ No newline at end of file

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProviderMessageObserver.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiAddressingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiAddressingInterceptor.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiAddressingInterceptor.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiAddressingInterceptor.java Wed Oct 10 23:49:03 2007
@@ -34,8 +34,7 @@
 public class JbiAddressingInterceptor extends AbstractPhaseInterceptor<Message> {
     
     
-    //private static final Logger LOG = Logger.getLogger(JbiAddressingInInterceptor.class.getName());
-        
+            
     public JbiAddressingInterceptor() {
         super(Phase.INVOKE);
         getBefore().add(CxfBcConsumer.JbiInvokerInterceptor.class.getName());

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcComponentTest.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcComponentTest.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcComponentTest.java Wed Oct 10 23:49:03 2007
@@ -27,6 +27,7 @@
 
 import junit.framework.TestCase;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
@@ -45,8 +46,7 @@
 
 public class CxfBcComponentTest extends TestCase {
 
-    static final Logger LOG = Logger.getLogger(CxfBcComponentTest.class
-            .getName());
+    static final Logger LOG = LogUtils.getL7dLogger(CxfBcComponentTest.class);
 
     private final QName serviceName = new QName("uri:HelloWorld",
             "HelloService");

Added: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java?rev=583701&view=auto
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java (added)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java Wed Oct 10 23:49:03 2007
@@ -0,0 +1,108 @@
+/*
+ * 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.cxfbc;
+
+import java.io.File;
+import java.net.URL;
+import java.util.logging.Logger;
+
+import javax.jbi.messaging.InOut;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.calculator.CalculatorImpl;
+import org.apache.cxf.calculator.CalculatorPortType;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
+import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.servicemix.client.DefaultServiceMixClient;
+import org.apache.servicemix.cxfse.CxfSeComponent;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.tck.SpringTestSupport;
+import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+
+public class CxfBcProviderTest extends SpringTestSupport {
+
+    private static final Logger LOG = LogUtils.getL7dLogger(org.apache.servicemix.cxfbc.CxfBcProviderTest.class);
+    
+    private DefaultServiceMixClient client;
+    private InOut io;
+    
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        client = new DefaultServiceMixClient(jbi);
+        io = client.createInOutExchange();
+        io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPService"));
+        io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter"));
+        io.setOperation(new QName("http://apache.org/hello_world_soap_http", "greetMe"));
+    }
+    
+    
+    public void testProvider() throws Exception {
+        LOG.info("test provider");
+        CxfSeComponent component = new CxfSeComponent();
+        jbi.activateComponent(component, "CxfSeComponent");
+        //Deploy proxy SU
+        component.getServiceUnitManager().deploy("proxy", getServiceUnitPath("provider"));
+        component.getServiceUnitManager().init("proxy", getServiceUnitPath("provider"));
+        component.getServiceUnitManager().start("proxy");
+        
+        //start external service
+        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
+        factory.setServiceClass(CalculatorPortType.class);
+        factory.setServiceBean(new CalculatorImpl());
+        String address = "http://localhost:9001/providertest";
+        factory.setAddress(address);
+        Server server = factory.create();
+        Endpoint endpoint = server.getEndpoint();
+        endpoint.getInInterceptors().add(new LoggingInInterceptor());
+        endpoint.getOutInterceptors().add(new LoggingOutInterceptor());
+        ServiceInfo service = endpoint.getEndpointInfo().getService();
+        assertNotNull(service);
+        
+        //send message to proxy
+        io.getInMessage().setContent(new StringSource(
+                "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
+              + "<part> "
+              + "<greetMe xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
+              + "ffang"
+              + "</requestType></greetMe>"
+              + "</part> "
+              + "</message>"));
+        client.sendSync(io);
+        assertTrue(new SourceTransformer().contentToString(
+                io.getOutMessage()).indexOf("Hello ffang 3") > 0);
+    }
+    
+    @Override
+    protected AbstractXmlApplicationContext createBeanFactory() {
+        return new ClassPathXmlApplicationContext("org/apache/servicemix/cxfbc/provider.xml");
+    }
+
+    protected String getServiceUnitPath(String name) {
+        URL url = getClass().getClassLoader().getResource("org/apache/servicemix/cxfbc/" + name + "/xbean.xml");
+        File path = new File(url.getFile());
+        path = path.getParentFile();
+        return path.getAbsolutePath();
+    }
+}

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java?rev=583701&view=auto
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java (added)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java Wed Oct 10 23:49:03 2007
@@ -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.
+ */
+package org.apache.servicemix.cxfbc;
+
+import javax.jbi.component.ComponentContext;
+import javax.jws.WebService;
+
+import org.apache.cxf.calculator.CalculatorPortType;
+
+@WebService(serviceName = "SOAPService", 
+        portName = "SoapPort", 
+        endpointInterface = "org.apache.hello_world_soap_http.Greeter", 
+        targetNamespace = "http://apache.org/hello_world_soap_http")
+
+public class GreeterImplForProvider {
+    private ComponentContext context;
+    private CalculatorPortType calculator;
+    public String greetMe(String me) {
+        int ret = 0;
+        try {
+            
+            ret = getCalculator().add(1, 2);
+                        
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "Hello " + me  + " " + ret;
+    }
+    
+    public ComponentContext getContext() {
+        return context;
+    }
+
+    public void setContext(ComponentContext context) {
+        this.context = context;
+    }
+
+    public void setCalculator(CalculatorPortType calculator) {
+        this.calculator = calculator;
+    }
+
+    public CalculatorPortType getCalculator() {
+        return calculator;
+    }
+
+
+}

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/GreeterImplForProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java Wed Oct 10 23:49:03 2007
@@ -24,6 +24,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.ClientImpl;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.greeter_control.BasicGreeterService;
@@ -37,8 +38,7 @@
 
 public class CxfBCPolicyTest extends SpringTestSupport {
 
-    private static final Logger LOG = Logger.getLogger(CxfBCPolicyTest.class
-            .getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(CxfBCPolicyTest.class);
 
     public void testUsingAddressing() throws Exception {
         SpringBusFactory bf = new SpringBusFactory();

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/CxfBcRMSequenceTest.java Wed Oct 10 23:49:03 2007
@@ -34,6 +34,7 @@
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.ClientImpl;
 import org.apache.cxf.frontend.ClientProxy;
@@ -64,7 +65,7 @@
 import org.springframework.core.io.ClassPathResource;
 
 public class CxfBcRMSequenceTest extends SpringTestSupport {
-    private static final Logger LOG = Logger.getLogger(CxfBcRMSequenceTest.class.getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(CxfBcRMSequenceTest.class);
     private static final String GREETMEONEWAY_ACTION = null;
     private static final String GREETME_ACTION = null;
     private static final String GREETME_RESPONSE_ACTION = null;

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/GreeterImpl.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/GreeterImpl.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/GreeterImpl.java Wed Oct 10 23:49:03 2007
@@ -23,6 +23,7 @@
 import javax.xml.ws.AsyncHandler;
 import javax.xml.ws.Response;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.greeter_control.PingMeFault;
 import org.apache.cxf.greeter_control.types.FaultDetail;
 import org.apache.cxf.greeter_control.types.GreetMeResponse;
@@ -35,7 +36,7 @@
         endpointInterface = "org.apache.cxf.greeter_control.Greeter",
         targetNamespace = "http://cxf.apache.org/greeter_control")
 public class GreeterImpl {
-    private static final Logger LOG = Logger.getLogger(GreeterImpl.class.getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(GreeterImpl.class);
     private long delay;
     private String lastOnewayArg;
     private boolean throwAlways;

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/InMessageRecorder.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/InMessageRecorder.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/InMessageRecorder.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/InMessageRecorder.java Wed Oct 10 23:49:03 2007
@@ -24,6 +24,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Message;
@@ -32,7 +33,7 @@
 
 public class InMessageRecorder extends AbstractPhaseInterceptor<Message> {
 
-    private static final Logger LOG = Logger.getLogger(InMessageRecorder.class.getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(InMessageRecorder.class);
     private List<byte[]> inbound;
 
     public InMessageRecorder() {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/MessageLossSimulator.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/MessageLossSimulator.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/MessageLossSimulator.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/MessageLossSimulator.java Wed Oct 10 23:49:03 2007
@@ -23,6 +23,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.InterceptorChain;
 import org.apache.cxf.interceptor.MessageSenderInterceptor;
@@ -37,7 +38,7 @@
 
 public class MessageLossSimulator extends AbstractPhaseInterceptor<Message> {
 
-    private static final Logger LOG = Logger.getLogger(MessageLossSimulator.class.getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(MessageLossSimulator.class);
     private int appMessageCount; 
     
     public MessageLossSimulator() {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/OutMessageRecorder.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/OutMessageRecorder.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/OutMessageRecorder.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/rm/OutMessageRecorder.java Wed Oct 10 23:49:03 2007
@@ -23,6 +23,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.StaxOutInterceptor;
 import org.apache.cxf.io.CachedOutputStream;
@@ -36,7 +37,7 @@
 
 public class OutMessageRecorder extends AbstractPhaseInterceptor {
     
-    private static final Logger LOG = Logger.getLogger(OutMessageRecorder.class.getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(OutMessageRecorder.class);
     private List<byte[]> outbound;
 
     public OutMessageRecorder() {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBCSecurityTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBCSecurityTest.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBCSecurityTest.java (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBCSecurityTest.java Wed Oct 10 23:49:03 2007
@@ -21,6 +21,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.hello_world_soap_http.Greeter;
@@ -30,8 +31,7 @@
 
 public class CxfBCSecurityTest extends SpringTestSupport {
 
-    private static final Logger LOG = Logger.getLogger(CxfBCSecurityTest.class
-            .getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(CxfBCSecurityTest.class);
     
     private static final java.net.URL WSDL_LOC;
     static {

Added: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider.xml?rev=583701&view=auto
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider.xml (added)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider.xml Wed Oct 10 23:49:03 2007
@@ -0,0 +1,53 @@
+<?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:sm="http://servicemix.apache.org/config/1.0"
+       xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
+       xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
+       xmlns:test="urn:test"
+       xmlns:calculator="http://apache.org/cxf/calculator">
+  
+  <sm:container id="jbi" embedded="true">
+    
+    <sm:endpoints>
+      
+      <cxfbc:provider wsdl="/wsdl/calculator.wsdl"
+                      locationURI="http://localhost:9001/providertest"
+                      endpoint="CalculatorPort"
+                      service="calculator:CalculatorService"
+                      interfaceName="calculator:CalculatorPortType"
+                      >
+        <cxfbc:inInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfbc:inInterceptors>
+        <cxfbc:outInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfbc:outInterceptors>
+        <cxfbc:inFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfbc:inFaultInterceptors>
+        <cxfbc:outFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfbc:outFaultInterceptors>
+      </cxfbc:provider>
+    </sm:endpoints>
+    
+  </sm:container>
+  
+</beans>

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/xbean.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/xbean.xml?rev=583701&view=auto
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/xbean.xml (added)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/xbean.xml Wed Oct 10 23:49:03 2007
@@ -0,0 +1,52 @@
+<?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:sm="http://servicemix.apache.org/config/1.0"
+       xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
+       xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
+       xmlns:test="urn:test"
+       xmlns:calculator="http://apache.org/cxf/calculator">
+  
+    
+      <cxfse:endpoint>
+        <cxfse:pojo>
+          <bean class="org.apache.servicemix.cxfbc.GreeterImplForProvider">
+              <property name="calculator">
+                  <cxfse:proxy service="calculator:CalculatorService" context="#context" type="org.apache.cxf.calculator.CalculatorPortType" />
+              </property>
+          </bean>
+              
+        </cxfse:pojo>
+        <cxfse:inInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfse:inInterceptors>
+        <cxfse:outInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfse:outInterceptors>
+        <cxfse:inFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfse:inFaultInterceptors>
+        <cxfse:outFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfse:outFaultInterceptors>
+      </cxfse:endpoint>
+      
+    
+  
+</beans>

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/xbean.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/xbean.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/provider/xbean.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java Wed Oct 10 23:49:03 2007
@@ -26,6 +26,7 @@
 
 import junit.framework.TestCase;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
@@ -34,7 +35,7 @@
 
 public class CxfSeClientProxyTest extends TestCase {
 
-    private static final Logger LOG = Logger.getLogger(CxfSeClientProxyTest.class.getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(CxfSeClientProxyTest.class);
     private DefaultServiceMixClient client;
     private InOut io;
     private JBIContainer container;
@@ -64,7 +65,6 @@
         container.start();
         
         // Deploy SU
-//      Deploy SU
         component.getServiceUnitManager().deploy("target", getServiceUnitPath("target"));
         component.getServiceUnitManager().init("target", getServiceUnitPath("target"));
         component.getServiceUnitManager().start("target");

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java?rev=583701&r1=583700&r2=583701&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeContextInjectionTest.java Wed Oct 10 23:49:03 2007
@@ -21,6 +21,7 @@
 import javax.jbi.messaging.InOut;
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
@@ -30,7 +31,7 @@
 
 public class CxfSeContextInjectionTest extends SpringTestSupport {
 
-    private static final Logger LOG = Logger.getLogger(CxfSeContextInjectionTest.class.getName());
+    private static final Logger LOG = LogUtils.getL7dLogger(CxfSeContextInjectionTest.class);
     private DefaultServiceMixClient client;
     private InOut io;