cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r545363 - in /incubator/cxf/trunk: distribution/src/main/assembly/ distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-engine/ distribution/src/main/release/samples/integration/JBI/internal_prov...
Date Fri, 08 Jun 2007 01:41:58 GMT
Author: ffang
Date: Thu Jun  7 18:41:57 2007
New Revision: 545363

URL: http://svn.apache.org/viewvc?view=rev&rev=545363
Log:
[CXF-708] get internal_provider_external_consumer working

Removed:
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml
Modified:
    incubator/cxf/trunk/distribution/src/main/assembly/jbi.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-engine/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/src/test/provider/HelloWorldProvider.java
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/wsdl/hello_world.wsdl
    incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java
    incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java
    incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
    incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIMessageHelper.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java

Modified: incubator/cxf/trunk/distribution/src/main/assembly/jbi.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/assembly/jbi.xml?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/assembly/jbi.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/assembly/jbi.xml Thu Jun  7 18:41:57 2007
@@ -28,11 +28,15 @@
     <component-class-name description="description">org.apache.cxf.jbi.se.CXFServiceEngine</component-class-name>

     <component-class-path> 
       <path-element>cxf-integration-jbi-@CXF_VERSION@.jar</path-element> 
+      <path-element>cxf-rt-bindings-jbi-@CXF_VERSION@.jar</path-element>
+      <path-element>cxf-rt-transports-jbi-@CXF_VERSION@.jar</path-element>
       <path-element>cxf-manifest-incubator.jar</path-element>
     </component-class-path> 
     <bootstrap-class-name>org.apache.cxf.jbi.se.CXFBootstrap</bootstrap-class-name>

     <bootstrap-class-path> 
       <path-element>cxf-integration-jbi-@CXF_VERSION@.jar</path-element> 
+      <path-element>cxf-rt-bindings-jbi-@CXF_VERSION@.jar</path-element>
+      <path-element>cxf-rt-transports-jbi-@CXF_VERSION@.jar</path-element>
       <path-element>cxf-manifest-incubator.jar</path-element>
     </bootstrap-class-path> 
   </component> 

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-engine/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-engine/build.xml?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-engine/build.xml
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-engine/build.xml
Thu Jun  7 18:41:57 2007
@@ -7,10 +7,8 @@
   "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
@@ -18,6 +16,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
+
 <project name="jbi-demo-service-engine" default="build">
 
   <property name="build.dir" location="./build"/>
@@ -25,7 +24,7 @@
   <property name="build.lib.dir" location="${build.dir}/lib"/>
   <property name="src.dir" location="./src"/>
 
-  <property environment="env"/>  
+  <property environment="env"/> 
   <path id="build.classpath">
     <fileset dir="${env.CXF_HOME}/modules">
       <include name="cxf-manifest-incubator.jar"/>
@@ -40,7 +39,21 @@
 
     <jar destfile="${build.lib.dir}/cxf-service-engine.jar">
       <fileset dir="${env.CXF_HOME}/lib">
-	<include name="*.jar"/>
+	<include name="cxf-2.0-incubator-SNAPSHOT.jar"/>
+        <include name="cxf-manifest-incubator.jar"/>
+        <include name="jaxb*.jar"/>
+        <include name="neethi-2.0.jar"/>
+        <include name="jaxws-api-2.0.jar"/>
+        <include name="geronimo-annotation_1.0_spec-1.1.jar"/>
+        <include name="xml-resolver-1.2.jar"/>
+        <include name="saaj*.jar"/>
+        <include name="geronimo-ws-metadata_2.0_spec-1.1.jar"/>
+        <include name="XmlSchema-1.2.jar"/>
+        <include name="wstx-asl-3.2.1.jar"/>
+        <include name="wsdl4j-1.6.1.jar"/>
+      </fileset>
+      <fileset dir="${env.CXF_HOME}/modules/integration">
+        <include name="*.jar"/>
       </fileset>
       <metainf dir="./etc">
 	<include name="jbi.xml"/>

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/src/test/provider/HelloWorldProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/src/test/provider/HelloWorldProvider.java?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/src/test/provider/HelloWorldProvider.java
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/src/test/provider/HelloWorldProvider.java
Thu Jun  7 18:41:57 2007
@@ -29,7 +29,7 @@
 @javax.jws.WebService(portName = "SoapPort", serviceName = "HelloWorldService",
                       targetNamespace = "http://apache.org/hello_world",
                       endpointInterface = "org.apache.hello_world.Greeter",
-                      wsdlLocation = "/META-INF/hello_world.wsdl")
+                      wsdlLocation = "./META-INF/hello_world.wsdl")
 
                   
 public class HelloWorldProvider implements Greeter {

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/wsdl/hello_world.wsdl?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/wsdl/hello_world.wsdl
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_external_consumer/service-unit/wsdl/hello_world.wsdl
Thu Jun  7 18:41:57 2007
@@ -25,7 +25,7 @@
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:xformat="http://cxf.apache.org/bindings/xformat"
-    xmlns:jbi="http://apache.org/transport/jbi">
+    xmlns:jbi="http://cxf.apache.org/transports/jbi">
 
     <wsdl:types>
         <schema targetNamespace="http://apache.org/hello_world/types" 

Modified: incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java
(original)
+++ incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java
Thu Jun  7 18:41:57 2007
@@ -239,7 +239,7 @@
                 LOG.severe(new Message("SU.COULDNOT.GET.ANNOTATION", LOG).toString());
             }
         } catch (Exception ex) {
-            ex.printStackTrace();
+            //ex.printStackTrace();
         } 
         return doc;
     } 

Modified: incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java
(original)
+++ incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java
Thu Jun  7 18:41:57 2007
@@ -20,6 +20,7 @@
 package org.apache.cxf.transport.jbi;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -170,8 +171,8 @@
 
     public void dispatch(MessageExchange exchange) throws IOException {
         QName opName = exchange.getOperation(); 
-        getLogger().fine("dispatch method: " + opName);
-        
+        getLogger().info("dispatch method: " + opName);
+                
         NormalizedMessage nm = exchange.getMessage("in");
         try {
             //get the message to be interceptor
@@ -181,7 +182,10 @@
             
             XMLStreamReader reader = StaxUtils.createXMLStreamReader(nm.getContent());
             inMessage.setContent(XMLStreamReader.class, reader);
+            final InputStream in = JBIMessageHelper.convertMessageToInputStream(nm.getContent());
+            //get the message to be interceptor
             
+            inMessage.setContent(InputStream.class, in);
                                            
             //dispatch to correct destination in case of multiple endpoint
             inMessage.setDestination(this);

Modified: incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
(original)
+++ incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
Thu Jun  7 18:41:57 2007
@@ -99,6 +99,7 @@
                     NormalizedMessage msg = xchng.createMessage();
                     msg.setContent(new DOMSource(doc));
                     xchng.setMessage(msg, "out");
+                    
                 }
                 LOG.fine(new org.apache.cxf.common.i18n.Message(
                     "POST.DISPATCH", LOG).toString());

Modified: incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIMessageHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIMessageHelper.java?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIMessageHelper.java
(original)
+++ incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIMessageHelper.java
Thu Jun  7 18:41:57 2007
@@ -23,8 +23,6 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.logging.Logger;
-
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
@@ -32,12 +30,10 @@
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.common.logging.LogUtils;
+
 
 public final class JBIMessageHelper {
 
-    private static final Logger LOG = LogUtils.getL7dLogger(JBIMessageHelper.class);
 
     private static final TransformerFactory TRANSFORMER_FACTORY = TransformerFactory.newInstance();
 
@@ -53,8 +49,7 @@
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         StreamResult result = new StreamResult(baos);
         transformer.transform(src, result);
-        LOG.info(new Message("RECEIVED.MESSAGE", LOG) + new String(baos.toByteArray()));
-
+        
         return new ByteArrayInputStream(baos.toByteArray());
     }
 }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java?view=diff&rev=545363&r1=545362&r2=545363
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java
Thu Jun  7 18:41:57 2007
@@ -87,9 +87,7 @@
                                                     "endpoint");
         
         container.activateComponent(new ActivationSpec("component", component));
-        /*component.getContext().activateEndpoint(new QName("http://apache.org/hello_world/jbi",

-            "HelloWorldService"), 
-            "endpoint");*/
+        
         DeliveryChannel channel = component.getChannel();
         JBITransportFactory jbiTransportFactory = 
             (JBITransportFactory)bus.getExtension(ConduitInitiatorManager.class).
@@ -105,10 +103,12 @@
         EndpointImpl e = (EndpointImpl)Endpoint.publish(address, implementor);
         e.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
         e.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
-                   
+        
         port.greetMeOneWay("test");
         String rep = port.greetMe("ffang");
         assertEquals(rep, "Hello ffang");
+        rep = port.sayHi();
+        assertEquals(rep, "Bonjour");
         try {
             port.pingMe();
             fail();



Mime
View raw message