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 2008/12/16 12:28:07 UTC

svn commit: r727021 - in /servicemix/smx4/features/trunk/examples: ./ cxf-nmr-osgi/ cxf-nmr-osgi/src/ cxf-nmr-osgi/src/main/ cxf-nmr-osgi/src/main/java/ cxf-nmr-osgi/src/main/java/org/ cxf-nmr-osgi/src/main/java/org/apache/ cxf-nmr-osgi/src/main/java/o...

Author: ffang
Date: Tue Dec 16 03:28:04 2008
New Revision: 727021

URL: http://svn.apache.org/viewvc?rev=727021&view=rev
Log:
[SMX4-171]Develop test case to demonstrate and verify native deployment of CXF service using jbi/nmr transport

Added:
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/pom.xml   (with props)
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/cxf/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java   (with props)
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml   (with props)
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/
    servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/hello_world.wsdl   (with props)
Modified:
    servicemix/smx4/features/trunk/examples/itests/pom.xml
    servicemix/smx4/features/trunk/examples/itests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java
    servicemix/smx4/features/trunk/examples/pom.xml

Added: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/pom.xml?rev=727021&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/pom.xml (added)
+++ servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/pom.xml Tue Dec 16 03:28:04 2008
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <!--
+
+        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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.servicemix.examples</groupId>
+        <artifactId>examples</artifactId>
+        <version>4.0-m2-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.examples</groupId>
+    <artifactId>cxf-nmr-osgi</artifactId>
+    <packaging>bundle</packaging>
+    <version>${servicemix.version}</version>
+    <name>Apache ServiceMix Example :: CXF NMR transport OSGi</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+            <version>${geronimo.wsmetadata.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>${cxf.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-test-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world.wsdl</wsdl>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <Import-Package>
+                            javax.jws,
+                            javax.wsdl,
+                            javax.xml.bind,
+                            javax.xml.bind.annotation,
+                            javax.xml.namespace,
+                            javax.xml.ws,
+                            META-INF.cxf,
+                            META-INF.cxf.transport.nmr,
+                            org.apache.cxf.bus,
+                            org.apache.cxf.bus.spring,
+                            org.apache.cxf.bus.resource,
+                            org.apache.cxf.configuration.spring,
+                            org.apache.cxf.resource,
+                            org.springframework.beans.factory.config,
+                            org.apache.servicemix.nmr.api,
+                            org.apache.servicemix.cxf.transport.nmr,
+                            org.apache.servicemix.nmr.api.event,
+                            org.apache.servicemix.nmr.api.internal
+                        </Import-Package>
+                        <Export-Package>org.apache.servicemix.examples.cxf</Export-Package>
+                        <Require-Bundle>org.apache.cxf.cxf-bundle</Require-Bundle>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java?rev=727021&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java (added)
+++ servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java Tue Dec 16 03:28:04 2008
@@ -0,0 +1,35 @@
+/**
+ * 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.
+ */
+// START SNIPPET: service
+package org.apache.servicemix.examples.cxf;
+
+import javax.jws.WebService;
+
+//@WebService(endpointInterface = "org.apache.servicemix.examples.cxf.HelloWorld")
+@WebService(serviceName = "HelloWorldImplService",
+            portName = "HelloWorldImplPort",
+            endpointInterface = "org.apache.servicemix.examples.cxf.HelloWorld",
+            targetNamespace = "http://cxf.examples.servicemix.apache.org/")
+public class HelloWorldImpl implements HelloWorld {
+
+    public String sayHi(String text) {
+        return "Hello " + text;
+    }
+}
+// END SNIPPET: service

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml?rev=727021&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml (added)
+++ servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml Tue Dec 16 03:28:04 2008
@@ -0,0 +1,65 @@
+<?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.
+-->
+<!-- START SNIPPET: beans -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:jaxws="http://cxf.apache.org/jaxws"
+	xmlns:osgi="http://www.springframework.org/schema/osgi"
+	xsi:schemaLocation="
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+		http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+    <import resource="classpath:META-INF/cxf/cxf.xml" />
+    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+    <import resource="classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml" />
+
+	<jaxws:endpoint id="NMREndpoint"
+	    implementor="org.apache.servicemix.examples.cxf.HelloWorldImpl"
+	    wsdlLocation="wsdl/hello_world.wsdl"
+	    endpointName="e:HelloWorldImplPort"
+	    serviceName="s:HelloWorldImplService"
+	    xmlns:e="http://cxf.examples.servicemix.apache.org/"
+        xmlns:s="http://cxf.examples.servicemix.apache.org/">
+            <jaxws:features>
+                <bean class="org.apache.cxf.feature.LoggingFeature"/>
+            </jaxws:features>
+        </jaxws:endpoint>
+
+
+    <jaxws:client id="client" 
+     	serviceClass="org.apache.servicemix.examples.cxf.HelloWorld"    
+	    endpointName="e:HelloWorldImplPort"
+	    serviceName="s:HelloWorldImplService"
+	    xmlns:e="http://cxf.examples.servicemix.apache.org/"
+        xmlns:s="http://cxf.examples.servicemix.apache.org/"
+     	wsdlLocation="wsdl/hello_world.wsdl"
+     	>   
+        <jaxws:features>
+           <bean class="org.apache.cxf.feature.LoggingFeature"/>
+        </jaxws:features>
+    </jaxws:client>
+ 
+    <osgi:service id="testHelloWorld" ref="client"
+        interface="org.apache.servicemix.examples.cxf.HelloWorld"/>
+
+
+</beans>
+<!-- END SNIPPET: beans -->

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/META-INF/spring/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/hello_world.wsdl?rev=727021&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/hello_world.wsdl (added)
+++ servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/hello_world.wsdl Tue Dec 16 03:28:04 2008
@@ -0,0 +1,81 @@
+<?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.
+-->
+<wsdl:definitions name="HelloWorldImplService" 
+                  targetNamespace="http://cxf.examples.servicemix.apache.org/" 
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+                  xmlns:tns="http://cxf.examples.servicemix.apache.org/" 
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                  xmlns:jms="http://cxf.apache.org/transports/jms"
+                  xmlns:nmr="http://cxf.apache.org/transports/nmr">
+    <wsdl:types>
+        <xsd:schema attributeFormDefault="unqualified" 
+                    elementFormDefault="unqualified" 
+                    targetNamespace="http://cxf.examples.servicemix.apache.org/" 
+                    xmlns:tns="http://cxf.examples.servicemix.apache.org/" 
+                    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+            <xsd:element name="sayHi" type="tns:sayHi" />
+            <xsd:complexType name="sayHi">
+                <xsd:sequence>
+                    <xsd:element minOccurs="0" name="arg0" type="xsd:string" />
+                </xsd:sequence>
+            </xsd:complexType>
+            <xsd:element name="sayHiResponse" type="tns:sayHiResponse" />
+            <xsd:complexType name="sayHiResponse">
+                <xsd:sequence>
+                    <xsd:element minOccurs="0" name="return" type="xsd:string" />
+                </xsd:sequence>
+            </xsd:complexType>
+        </xsd:schema>
+    </wsdl:types>
+    <wsdl:message name="sayHiResponse">
+        <wsdl:part element="tns:sayHiResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="sayHi">
+        <wsdl:part element="tns:sayHi" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="HelloWorld">
+        <wsdl:operation name="sayHi">
+            <wsdl:input message="tns:sayHi" name="sayHi">
+            </wsdl:input>
+            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse">
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="HelloWorldImplServiceSoapBinding" type="tns:HelloWorld">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="sayHi">
+            <soap:operation soapAction="" style="document" />
+            <wsdl:input name="sayHi">
+                <soap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output name="sayHiResponse">
+                <soap:body use="literal" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="HelloWorldImplService">
+        <wsdl:port binding="tns:HelloWorldImplServiceSoapBinding" name="HelloWorldImplPort">
+            <nmr:address location="nmr:HelloWorld"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/hello_world.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/hello_world.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/features/trunk/examples/cxf-nmr-osgi/src/main/resources/wsdl/hello_world.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: servicemix/smx4/features/trunk/examples/itests/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/itests/pom.xml?rev=727021&r1=727020&r2=727021&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/itests/pom.xml (original)
+++ servicemix/smx4/features/trunk/examples/itests/pom.xml Tue Dec 16 03:28:04 2008
@@ -138,6 +138,12 @@
             </exclusions>
         </dependency>
         <dependency>
+            <groupId>org.apache.servicemix.jbi</groupId>
+            <artifactId>org.apache.servicemix.jbi.runtime</artifactId>
+            <version>${servicemix.nmr.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.servicemix.nmr</groupId>
             <artifactId>org.apache.servicemix.nmr.api</artifactId>
             <version>${servicemix.nmr.version}</version>
@@ -201,6 +207,11 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.servicemix.examples</groupId>
+            <artifactId>cxf-nmr-osgi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
 		    <groupId>org.apache.servicemix.examples</groupId>
 		    <artifactId>cxf-soap-handler-osgi</artifactId>
             <version>${project.version}</version>
@@ -347,6 +358,16 @@
             <artifactId>spring-tx</artifactId>
             <version>${spring.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-utils</artifactId>
+            <version>${servicemix-utils.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.specs</groupId>
+            <artifactId>org.apache.servicemix.specs.jbi-api-1.0</artifactId>
+            <version>${servicemix.specs.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

Modified: servicemix/smx4/features/trunk/examples/itests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/itests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java?rev=727021&r1=727020&r2=727021&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/itests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java (original)
+++ servicemix/smx4/features/trunk/examples/itests/src/test/java/org/apache/servicemix/examples/IntegrationTest.java Tue Dec 16 03:28:04 2008
@@ -20,12 +20,23 @@
 import java.io.File;
 import java.io.PrintWriter;
 import java.util.jar.Manifest;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Properties;
 import java.util.List;
 
+import javax.xml.transform.Source;
+
 import org.apache.cxf.Bus;
 import org.apache.servicemix.examples.cxf.HelloWorld;
+import org.apache.servicemix.jbi.jaxp.StringSource;
 import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest;
+import org.apache.servicemix.nmr.api.Channel;
+import org.apache.servicemix.nmr.api.Endpoint;
+import org.apache.servicemix.nmr.api.Exchange;
+import org.apache.servicemix.nmr.api.NMR;
+import org.apache.servicemix.nmr.api.Pattern;
+import org.apache.servicemix.nmr.api.Status;
 import org.springframework.osgi.test.platform.OsgiPlatform;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
@@ -70,8 +81,9 @@
             getBundle("org.apache.geronimo.specs", "geronimo-ws-metadata_2.0_spec"),
             getBundle("org.apache.geronimo.specs", "geronimo-j2ee-connector_1.5_spec"),
             getBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
-            
+                       
             //for activemq
+            
             getBundle("org.springframework", "spring-jms"),
             getBundle("org.springframework", "spring-tx"),
             getBundle("org.apache.geronimo.specs", "geronimo-j2ee-management_1.1_spec"),
@@ -82,7 +94,8 @@
             getBundle("org.apache.activemq", "activemq-ra"),
             getBundle("org.apache.activemq", "activemq-console"),
             getBundle("org.apache.activemq", "activemq-pool"),
-                        
+            
+            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jbi-api-1.0"),            
             getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.stax-api-1.0"),
             getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.saaj-api-1.3"),
             getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxb-api-2.1"),
@@ -99,6 +112,7 @@
             getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jetty-bundle"),
             getBundle("org.ops4j.pax.web", "pax-web-bundle"),
             getBundle("org.ops4j.pax.web-extender", "pax-web-ex-whiteboard"),
+            getBundle("org.apache.servicemix", "servicemix-utils"),
             getBundle("org.apache.cxf", "cxf-bundle"),
             getBundle("org.apache.servicemix.cxf", "org.apache.servicemix.cxf.transport.osgi"),
             getBundle("org.apache.servicemix.cxf", "org.apache.servicemix.cxf.transport.nmr"),
@@ -112,7 +126,8 @@
             getBundle("org.apache.servicemix.examples", "cxf-soap-handler-osgi"),
             getBundle("org.apache.servicemix.examples", "cxf-handler-cfg"),
             getBundle("org.apache.servicemix.examples", "cxf-ws-addressing"),
-		};
+            getBundle("org.apache.servicemix.examples", "cxf-nmr-osgi"),
+        };
 	}
 
     public void testJbiComponent() throws Exception {
@@ -152,12 +167,30 @@
 
         assertEquals("Hello Bonjour", helloWorld.sayHi("Bonjour"));
     }
+    
+    public void testNMROsgi() throws Exception {
+        Thread.sleep(5000);
+        waitOnContextCreation("cxf-nmr-osgi");
+        Thread.sleep(5000);
+        NMR nmr = getOsgiService(NMR.class);
+        assertNotNull(nmr);
+        
+        Channel client = nmr.createChannel();
+        Exchange e = client.createExchange(Pattern.InOut);
+        for (Endpoint ep : nmr.getEndpointRegistry().getServices()) {
+        	e.setTarget(nmr.getEndpointRegistry().lookup(nmr.getEndpointRegistry().getProperties(ep)));
+        	e.getIn().setBody(new StringSource("<?xml version=\"1.0\" encoding=\"UTF-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\"><arg0>Bonjour</arg0></ns2:sayHi></soap:Body></soap:Envelope>"));
+        	boolean res = client.sendSync(e);
+        	assertTrue(res);
+        }
+    
+    }
 
     protected Manifest getManifest() {
         Manifest mf = super.getManifest();
         String importP = mf.getMainAttributes().getValue(Constants.IMPORT_PACKAGE);
         mf.getMainAttributes().putValue(Constants.IMPORT_PACKAGE,
-            importP + ",META-INF.cxf");
+            importP + ",META-INF.cxf, org.apache.servicemix.jbi.jaxp");
         String exportP = mf.getMainAttributes().getValue(Constants.EXPORT_PACKAGE);
         mf.getMainAttributes().putValue(Constants.EXPORT_PACKAGE,
                                       exportP + ",org.apache.handlers, "
@@ -169,7 +202,8 @@
                                       + "org.apache.hello_world_soap_http,"
                                       + "org.apache.cxf,"
                                       + "org.apache.cxf.bus,"
-                                      + "org.apache.cxf.interceptor");
+                                      + "org.apache.cxf.interceptor"
+                                      );
         return mf;
     }
 

Modified: servicemix/smx4/features/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/pom.xml?rev=727021&r1=727020&r2=727021&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/pom.xml (original)
+++ servicemix/smx4/features/trunk/examples/pom.xml Tue Dec 16 03:28:04 2008
@@ -45,6 +45,7 @@
         <module>cxf-osgi</module>
         <module>cxf-http-osgi</module>
         <module>cxf-jms-osgi</module>
+        <module>cxf-nmr-osgi</module>
         <module>cxf-soap-handler-osgi</module>
         <module>cxf-handler-cfg</module>
         <module>cxf-ws-addressing</module>