Author: ffang
Date: Wed Jun 6 23:43:48 2007
New Revision: 545084
URL: http://svn.apache.org/viewvc?view=rev&rev=545084
Log:
[CXF-707] get internal_provider_internal_consumer working
Added:
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml
(with props)
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/build.xml
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-unit/src/test/provider/HelloWorldProvider.java
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_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/JBITransportFactory.java
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/build.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/build.xml?view=diff&rev=545084&r1=545083&r2=545084
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/build.xml
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/build.xml
Wed Jun 6 23:43:48 2007
@@ -39,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"/>
Added:
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml?view=auto&rev=545084
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml
(added)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml
Wed Jun 6 23:43:48 2007
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--/**
+ * 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.
+ */-->
+<jbi version="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://java.sun.com/xml/ns/jbi"
xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+
+ <component type="service-engine"
component-class-loader-delegation="self-first">
+ <identification>
+ <name>CXFServiceEngine</name>
+ <description>This is a cxf service engine</description>
+ </identification>
+ <component-class-name
description="description">org.apache.cxf.jbi.se.CXFServiceEngine</component-class-name>
+ <component-class-path>
+
<path-element>cxf-integration-jbi-2.0-incubator-SNAPSHOT.jar</path-element>
+
<path-element>cxf-rt-bindings-jbi-2.0-incubator-SNAPSHOT.jar</path-element>
+
<path-element>cxf-rt-transports-jbi-2.0-incubator-SNAPSHOT.jar</path-element>
+ <path-element>cxf-manifest-incubator.jar</path-element>
+ <path-element>wsdl4j-1.6.1.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-2.0-incubator-SNAPSHOT.jar</path-element>
+
<path-element>cxf-rt-bindings-jbi-2.0-incubator-SNAPSHOT.jar</path-element>
+
<path-element>cxf-rt-transports-jbi-2.0-incubator-SNAPSHOT.jar</path-element>
+ <path-element>cxf-manifest-incubator.jar</path-element>
+ </bootstrap-class-path>
+ </component>
+</jbi>
Propchange:
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-engine/etc/jbi.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_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_internal_consumer/service-unit/src/test/provider/HelloWorldProvider.java?view=diff&rev=545084&r1=545083&r2=545084
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-unit/src/test/provider/HelloWorldProvider.java
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-unit/src/test/provider/HelloWorldProvider.java
Wed Jun 6 23:43:48 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_internal_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_internal_consumer/service-unit/wsdl/hello_world.wsdl?view=diff&rev=545084&r1=545083&r2=545084
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-unit/wsdl/hello_world.wsdl
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/integration/JBI/internal_provider_internal_consumer/service-unit/wsdl/hello_world.wsdl
Wed Jun 6 23:43:48 2007
@@ -25,7 +25,8 @@
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"
+ xmlns:jbiFormat="http://cxf.apache.org/bindings/jbi">
<wsdl:types>
<schema targetNamespace="http://apache.org/hello_world/types"
@@ -132,48 +133,7 @@
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
- <!--soap:binding style="document"
transport="http://apache.org/transport/jbi"/>
-
- <wsdl:operation name="sayHi">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="sayHiRequest">
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="sayHiResponse">
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
-
- <wsdl:operation name="greetMe">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="greetMeRequest">
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="greetMeResponse">
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
-
- <wsdl:operation name="greetMeOneWay">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="greetMeOneWayRequest">
- <soap:body use="literal"/>
- </wsdl:input>
- </wsdl:operation>
-
- <wsdl:operation name="pingMe">
- <soap:operation style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- <wsdl:fault name="pingMeFault">
- <soap:fault name="pingMeFault" use="literal"/>
- </wsdl:fault>
- </wsdl:operation-->
- <xformat:binding />
+ <jbiFormat:binding />
<wsdl:operation name="sayHi">
<wsdl:input name="sayHiRequest" />
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=545084&r1=545083&r2=545084
==============================================================================
---
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
Wed Jun 6 23:43:48 2007
@@ -110,9 +110,14 @@
LOG.info(new Message("SU.START.PROVIDER", LOG).toString());
ref = null;
try {
+
((JBITransportFactory)bus.getExtension(ConduitInitiatorManager.class).
+
getConduitInitiator(CXFServiceEngine.JBI_TRANSPORT_ID)).
+ setDeliveryChannel(ctx.getDeliveryChannel());
ref = ctx.activateEndpoint(getServiceName(),
getEndpointName());
} catch (JBIException e) {
LOG.severe(new Message("SU.FAIED.ACTIVE.ENDPOINT",
LOG).toString() + e);
+ } catch (BusException e) {
+ LOG.severe(new Message("SU.FAIED.ACTIVE.ENDPOINT",
LOG).toString() + e);
}
LOG.info("activated endpoint: " + ref.getEndpointName()
+ " service: " + ref.getServiceName());
@@ -131,6 +136,7 @@
// TODO Auto-generated catch block
e.printStackTrace();
}
+
new Thread(serviceConsumer).start();
}
}
Modified:
incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java?view=diff&rev=545084&r1=545083&r2=545084
==============================================================================
---
incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java
(original)
+++
incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBITransportFactory.java
Wed Jun 6 23:43:48 2007
@@ -52,7 +52,7 @@
private static final Logger LOG =
LogUtils.getL7dLogger(JBITransportFactory.class);
- private static final ThreadLocal<DeliveryChannel> DELIVERY_CHANNEL = new
ThreadLocal<DeliveryChannel>();
+ private static DeliveryChannel deliveryChannel;
private Bus bus;
private final Map<String, JBIDestination> destinationMap = new
HashMap<String, JBIDestination>();
@@ -101,13 +101,13 @@
public static DeliveryChannel getDeliveryChannel() {
- return DELIVERY_CHANNEL.get();
+ return deliveryChannel;
}
public static void setDeliveryChannel(DeliveryChannel newDeliverychannel) {
LOG.info(new org.apache.cxf.common.i18n.Message(
"CONFIG.DELIVERY.CHANNEL", LOG).toString() + newDeliverychannel);
- DELIVERY_CHANNEL.set(newDeliverychannel);
+ deliveryChannel = newDeliverychannel;
}
public Conduit getConduit(EndpointInfo targetInfo) throws IOException {