- 浏览: 458887 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (272)
- java基础 (59)
- struts (8)
- spring (8)
- 数据库 (8)
- java 网络编程 (29)
- hibernate (3)
- JavaScript (10)
- 日志管理 (2)
- jsp (4)
- servlet (7)
- xml (4)
- ajax (2)
- web service (4)
- 算法与数据结构 (13)
- java 反射机制 (11)
- java 泛型 (3)
- java I/O (8)
- java 线程 (12)
- JavaEE (6)
- java解惑 (33)
- 工具 (5)
- MyEclipse编程实践 (1)
- OSGI (2)
- 设计模式 (9)
- 正则表达式 (0)
- EJB (3)
- Ubuntu linux (6)
- Android (1)
- web前端 (2)
- 找工作 (1)
- SCA (1)
- maven (1)
- 缓存 (1)
- json (1)
- javamail (1)
- 工作笔记 (2)
最新评论
-
霜花似雪:
博主可以分享一下源码吗?
使用maven构建web项目实例 -
王庆波-行:
很好的demo!
memcache使用实例 -
surpassno:
大写的牛逼
java可视化显示内存使用情况 -
zhulin0504:
怎么访问NetEcho.html页面呀???
applet与servlet的网络通信 -
springdata:
java多线程实例demo源代码下载:http://www.z ...
java多线程例子
SCA即服务组件架构。比较著名的实现是apache 下的开源项目tuscany。本文从搭建tuscany sca环境到实现两个简单示例说起。
附件中提供了tuscany插件的下载,将其解压后的plugins和features文件夹下的内容分别复制到eclipse下对应的文件夹下,即完成了插件的安装。
除了插件的安装,项目中还要导入相应的tuscany sca jar包(在附件中也有,将zip文件解压,找到目录下的lib子目录即可),当然如果使用maven就可以把项目对jar包的依赖通过pom文件进行配置,这里为了简单起见,先建立一个普通的java项目。
整个项目的目录结构如下图所示:
其中,HelloWorld是一个远程接口,而HelloWorldImpl是实现该接口的一个实现类
Launcher 是用于启动服务的一个测试类。
helloworld.composite是配置实现的一个组件配置文件
执行Launcher类,控制台会打印出以下信息
2012-2-18 20:09:10 org.apache.tuscany.sca.node.impl.NodeImpl <init>
信息: Creating node: helloworld.composite
2012-2-18 20:09:13 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
信息: Loading contribution: file:/D:/Eclipse%20J2EE%20workspace/ws/bin/
2012-2-18 20:09:16 org.apache.tuscany.sca.node.impl.NodeImpl start
信息: Starting node: helloworld.composite
2012-2-18 20:09:19 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
信息: Added Servlet mapping: http://PC-20090611SAHL:8080/HelloWorld
Server started...
代表服务已经发布,如果此时在浏览器中输出服务的访问地址http://localhost:8080/HelloWorld?wsdl
就会看到以下关于服务的描述文件:
第二种实现方式,是使用spring方式,整个项目结构如下
主要不同之处在于添加了spring的配置文件,以及.composite文件的一些修改
beans.xml文件如下:还可能有sca:reference,sca:property标签,这里简化了
组件的配置文件如下:
其他的一样,执行Launcher启动服务的结果如下:
2012-2-18 20:19:02 org.apache.tuscany.sca.node.impl.NodeImpl <init>
信息: Creating node: helloworld.composite
2012-2-18 20:19:03 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
信息: Loading contribution: file:/D:/Eclipse%20J2EE%20workspace/scaTest/bin/
2012-2-18 20:19:05 org.apache.tuscany.sca.node.impl.NodeImpl start
信息: Starting node: helloworld.composite
- Loading XML bean definitions from URL [file:/D:/Eclipse%20J2EE%20workspace/scaTest/bin/resources/spring/beans.xml]
2012-2-18 20:19:07 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
信息: Added Servlet mapping: http://PC-20090611SAHL:8080/services/HelloWorldService
- Refreshing org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@10b23cf: display name [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@10b23cf]; startup date [Sat Feb 18 20:19:07 CST 2012]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@12b9f14
- Bean factory for application context [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@10b23cf]: org.springframework.beans.factory.xml.XmlBeanFactory@d8e902
- Pre-instantiating singletons in org.springframework.beans.factory.xml.XmlBeanFactory@d8e902: defining beans [HelloWorldServiceBean]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@12b9f14
Server started...
以上只是发布服务,并没有调用发布的服务,以下是一个使用spring实现的服务发布和调用的例子。
使用了maven管理项目,但由于对SCA的一些依赖包还不够熟悉,因此建了一个用户库,将下载下来的tuscany、 sca所需要的jar包加到用户库中,该项目的构建环境下添入新建的sca用户库,即可以再程序中使用sca相关的类。对于spring的依赖在maven的pom文件中配置好了,添加如下依赖即可:
项目路径如下:
客户端测试代码,用于调用发布的服务
服务器端发布服务:
其中服务器端的组件配置文件和spring配置文件与上一个例子相同,而客户端的sping配置文件盒组件配置文件为consumerbeans.xml,组件配置文件为consumer.composite.
先执行服务器端,发布服务的应用程序,即LaunchSpring
2012-2-21 17:13:51 org.apache.tuscany.sca.node.impl.NodeImpl <init>
信息: Creating node: hellospring.composite
2012-2-21 17:13:52 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
信息: Loading contribution: file:/F:/Eclipse%20Workspace/example1/target/classes/
2012-2-21 17:13:53 org.apache.tuscany.sca.node.impl.NodeImpl start
信息: Starting node: hellospring.composite
- Loading XML bean definitions from URL [file:/F:/Eclipse%20Workspace/example1/target/classes/beans.xml]
2012-2-21 17:13:53 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
信息: Added Servlet mapping: http://zjm-HP:8080/HelloSpringService
- Refreshing org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@1c958af: display name [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@1c958af]; startup date [Tue Feb 21 17:13:53 CST 2012]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@992fa5
- Bean factory for application context [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@1c958af]: org.springframework.beans.factory.xml.XmlBeanFactory@10718b7
Spring parent context - containsBean called for name: loadTimeWeaver
- Pre-instantiating singletons in org.springframework.beans.factory.xml.XmlBeanFactory@10718b7: defining beans [helloSpringBean]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@992fa5
server started...
再执行客户端的代码,即UseServiceClient,调用已经发布的服务
2012-2-21 17:15:25 org.apache.tuscany.sca.node.impl.NodeImpl <init>
信息: Creating node: comsumer.composite
2012-2-21 17:15:26 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
信息: Loading contribution: file:/F:/Eclipse%20Workspace/example1/target/classes/
2012-2-21 17:15:27 org.apache.tuscany.sca.node.impl.NodeImpl start
信息: Starting node: comsumer.composite
- Loading XML bean definitions from URL [file:/F:/Eclipse%20Workspace/example1/target/classes/consumerbeans.xml]
- Refreshing org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@bd93cd: display name [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@bd93cd]; startup date [Tue Feb 21 17:15:27 CST 2012]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@24bfaa
- Bean factory for application context [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@bd93cd]: org.springframework.beans.factory.xml.XmlBeanFactory@a34783
Spring parent context - containsBean called for name: loadTimeWeaver
- Pre-instantiating singletons in org.springframework.beans.factory.xml.XmlBeanFactory@a34783: defining beans [helloSpringConsumer,springBeanFactoryHolder]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@24bfaa
Spring parent context - getBean called for name: HelloSpringService
client start...
Hello sohu
程序源代码见附件
附件中提供了tuscany插件的下载,将其解压后的plugins和features文件夹下的内容分别复制到eclipse下对应的文件夹下,即完成了插件的安装。
除了插件的安装,项目中还要导入相应的tuscany sca jar包(在附件中也有,将zip文件解压,找到目录下的lib子目录即可),当然如果使用maven就可以把项目对jar包的依赖通过pom文件进行配置,这里为了简单起见,先建立一个普通的java项目。
整个项目的目录结构如下图所示:
其中,HelloWorld是一个远程接口,而HelloWorldImpl是实现该接口的一个实现类
package helloworld; import org.osoa.sca.annotations.Remotable; @Remotable public interface HelloWorld { public void sayHello(String name); }
Launcher 是用于启动服务的一个测试类。
package launch; import org.apache.tuscany.sca.host.embedded.SCADomain; public class Launcher { public static void main(String[] args) throws InterruptedException { SCADomain.newInstance("helloworld.composite"); System.out.println("Server started..."); while(true){ Thread.sleep(1000000); } } }
helloworld.composite是配置实现的一个组件配置文件
<?xml version="1.0" encoding="UTF-8"?> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" xmlns:c="http://helloworld" targetNamespace="http://helloworld" name="helloworld"> <component name="HelloWorldComponent"> <implementation.java //以java方式实现 class="helloworld.HelloWorldImpl"/> <service name="HelloWorld"> <interface.java interface="helloworld.HelloWorld" /> //接口是java类 <binding.ws uri="http://localhost:8080/HelloWorld"/> //以web service方式发布服务 </service> </component> </composite>
执行Launcher类,控制台会打印出以下信息
2012-2-18 20:09:10 org.apache.tuscany.sca.node.impl.NodeImpl <init>
信息: Creating node: helloworld.composite
2012-2-18 20:09:13 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
信息: Loading contribution: file:/D:/Eclipse%20J2EE%20workspace/ws/bin/
2012-2-18 20:09:16 org.apache.tuscany.sca.node.impl.NodeImpl start
信息: Starting node: helloworld.composite
2012-2-18 20:09:19 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
信息: Added Servlet mapping: http://PC-20090611SAHL:8080/HelloWorld
Server started...
代表服务已经发布,如果此时在浏览器中输出服务的访问地址http://localhost:8080/HelloWorld?wsdl
就会看到以下关于服务的描述文件:
<?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions name="HelloWorldService" targetNamespace="http://helloworld/" xmlns:tns="http://helloworld/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/"> - <wsdl:types> - <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://helloworld/" xmlns:tns="http://helloworld/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="sayHelloResponse"> <xs:complexType /> </xs:element> - <xs:element name="sayHello"> - <xs:complexType> - <xs:sequence> <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> - <wsdl:message name="sayHelloResponse"> <wsdl:part name="sayHelloResponse" element="tns:sayHelloResponse" /> </wsdl:message> - <wsdl:message name="sayHello"> <wsdl:part name="sayHello" element="tns:sayHello" /> </wsdl:message> - <wsdl:portType name="HelloWorld"> - <wsdl:operation name="sayHello"> <wsdl:input message="tns:sayHello" /> <wsdl:output message="tns:sayHelloResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="HelloWorldBinding" type="tns:HelloWorld"> <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="sayHello"> <SOAP:operation /> - <wsdl:input> <SOAP:body use="literal" /> </wsdl:input> - <wsdl:output> <SOAP:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="HelloWorldService"> - <wsdl:port name="HelloWorldPort" binding="tns:HelloWorldBinding"> <SOAP:address location="http://localhost:8080/HelloWorld" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
第二种实现方式,是使用spring方式,整个项目结构如下
主要不同之处在于添加了spring的配置文件,以及.composite文件的一些修改
beans.xml文件如下:还可能有sca:reference,sca:property标签,这里简化了
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sca="http://www.springframework.org/schema/sca" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> <sca:service name="HelloWorld" type="helloworld.HelloWorld" target="HelloWorldServiceBean" /> <bean id="HelloWorldServiceBean" class="helloworld.HelloWorldImpl" > </bean> </beans>
组件的配置文件如下:
<?xml version="1.0" encoding="UTF-8"?> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" xmlns:c="http://helloworld" targetNamespace="http://helloworld" name="helloworld"> <service name="HelloWorld" promote="HelloWorldComponent"> <interface.java interface="helloworld.HelloWorld" /> <binding.ws uri="http://localhost:8080/services/HelloWorldService" /> </service> <component name="HelloWorldComponent"> <implementation.spring location="resources/spring/beans.xml" /> </component> </composite>
其他的一样,执行Launcher启动服务的结果如下:
2012-2-18 20:19:02 org.apache.tuscany.sca.node.impl.NodeImpl <init>
信息: Creating node: helloworld.composite
2012-2-18 20:19:03 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
信息: Loading contribution: file:/D:/Eclipse%20J2EE%20workspace/scaTest/bin/
2012-2-18 20:19:05 org.apache.tuscany.sca.node.impl.NodeImpl start
信息: Starting node: helloworld.composite
- Loading XML bean definitions from URL [file:/D:/Eclipse%20J2EE%20workspace/scaTest/bin/resources/spring/beans.xml]
2012-2-18 20:19:07 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
信息: Added Servlet mapping: http://PC-20090611SAHL:8080/services/HelloWorldService
- Refreshing org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@10b23cf: display name [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@10b23cf]; startup date [Sat Feb 18 20:19:07 CST 2012]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@12b9f14
- Bean factory for application context [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@10b23cf]: org.springframework.beans.factory.xml.XmlBeanFactory@d8e902
- Pre-instantiating singletons in org.springframework.beans.factory.xml.XmlBeanFactory@d8e902: defining beans [HelloWorldServiceBean]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@12b9f14
Server started...
以上只是发布服务,并没有调用发布的服务,以下是一个使用spring实现的服务发布和调用的例子。
使用了maven管理项目,但由于对SCA的一些依赖包还不够熟悉,因此建了一个用户库,将下载下来的tuscany、 sca所需要的jar包加到用户库中,该项目的构建环境下添入新建的sca用户库,即可以再程序中使用sca相关的类。对于spring的依赖在maven的pom文件中配置好了,添加如下依赖即可:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency>
项目路径如下:
客户端测试代码,用于调用发布的服务
package useService; import org.apache.tuscany.sca.host.embedded.SCADomain; import com.sohu.mywork.HelloSpringConsumer; import spring.SpringApplicationContextHolder; public class UseServiceClient { public static void main(String[] args) { SCADomain.newInstance("comsumer.composite"); System.out.println("client start..."); HelloSpringConsumer consumer = (HelloSpringConsumer) SpringApplicationContextHolder.context.getBean("helloSpringConsumer"); System.out.println(consumer.execute("sohu")); } }
服务器端发布服务:
package launch; import org.apache.tuscany.sca.host.embedded.SCADomain; public class LauncherSpring { public static void main(String[] args) { SCADomain.newInstance("hellospring.composite"); System.out.println("server started..."); try { Thread.sleep(1000000); } catch (InterruptedException e) { e.printStackTrace(); } } }
其中服务器端的组件配置文件和spring配置文件与上一个例子相同,而客户端的sping配置文件盒组件配置文件为consumerbeans.xml,组件配置文件为consumer.composite.
<?xml version="1.0" encoding="UTF-8"?> <composite name="consumerComposite" targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0" xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:nsl="http://www.osoa.org/xmlns/sca/1.0" > <component name="HelloSpring"> <implementation.spring location="consumerbeans.xml"/> <reference name = "HelloSpringService"> <!-- mapping beans.xml sca:reference --> <binding.ws uri="http://localhost:8080/HelloSpringService" /> </reference> </component> </composite>
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sca="http://www.springframework.org/schema/sca" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> <sca:reference name="HelloSpringService" type="com.sohu.mywork.Hello"/> <bean id="helloSpringConsumer" class="com.sohu.mywork.HelloSpringConsumer" > <property name="service"> <ref bean="HelloSpringService"/> </property> </bean> <bean id="springBeanFactoryHolder" class="spring.SpringApplicationContextHolder" > </bean> </beans>
先执行服务器端,发布服务的应用程序,即LaunchSpring
2012-2-21 17:13:51 org.apache.tuscany.sca.node.impl.NodeImpl <init>
信息: Creating node: hellospring.composite
2012-2-21 17:13:52 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
信息: Loading contribution: file:/F:/Eclipse%20Workspace/example1/target/classes/
2012-2-21 17:13:53 org.apache.tuscany.sca.node.impl.NodeImpl start
信息: Starting node: hellospring.composite
- Loading XML bean definitions from URL [file:/F:/Eclipse%20Workspace/example1/target/classes/beans.xml]
2012-2-21 17:13:53 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
信息: Added Servlet mapping: http://zjm-HP:8080/HelloSpringService
- Refreshing org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@1c958af: display name [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@1c958af]; startup date [Tue Feb 21 17:13:53 CST 2012]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@992fa5
- Bean factory for application context [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@1c958af]: org.springframework.beans.factory.xml.XmlBeanFactory@10718b7
Spring parent context - containsBean called for name: loadTimeWeaver
- Pre-instantiating singletons in org.springframework.beans.factory.xml.XmlBeanFactory@10718b7: defining beans [helloSpringBean]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@992fa5
server started...
再执行客户端的代码,即UseServiceClient,调用已经发布的服务
2012-2-21 17:15:25 org.apache.tuscany.sca.node.impl.NodeImpl <init>
信息: Creating node: comsumer.composite
2012-2-21 17:15:26 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
信息: Loading contribution: file:/F:/Eclipse%20Workspace/example1/target/classes/
2012-2-21 17:15:27 org.apache.tuscany.sca.node.impl.NodeImpl start
信息: Starting node: comsumer.composite
- Loading XML bean definitions from URL [file:/F:/Eclipse%20Workspace/example1/target/classes/consumerbeans.xml]
- Refreshing org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@bd93cd: display name [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@bd93cd]; startup date [Tue Feb 21 17:15:27 CST 2012]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@24bfaa
- Bean factory for application context [org.apache.tuscany.sca.implementation.spring.runtime.context.SCAGenericApplicationContext@bd93cd]: org.springframework.beans.factory.xml.XmlBeanFactory@a34783
Spring parent context - containsBean called for name: loadTimeWeaver
- Pre-instantiating singletons in org.springframework.beans.factory.xml.XmlBeanFactory@a34783: defining beans [helloSpringConsumer,springBeanFactoryHolder]; parent: org.apache.tuscany.sca.implementation.spring.runtime.context.SCAParentApplicationContext@24bfaa
Spring parent context - getBean called for name: HelloSpringService
client start...
Hello sohu
程序源代码见附件
- SCA_插件.rar (72.5 KB)
- 下载次数: 304
- example1.rar (18.8 KB)
- 下载次数: 152
评论
3 楼
wang3065
2012-10-30
运行 LauncherSpring 的结果:
运行 UseServiceClient 的时候报错了:
信息: Starting node: hellospring.composite server started...
运行 UseServiceClient 的时候报错了:
严重: Reference not found for component reference: Component = HelloSpring Reference = HelloSpringService 2012-10-30 15:06:23 org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl 警告: No implementation for component: Component = HelloSpring 2012-10-30 15:06:23 org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl 严重: Reference not found for component reference: Component = HelloSpring Reference = HelloSpringService Exception in thread "main" org.osoa.sca.ServiceRuntimeException: Reference not found for component reference: Component = HelloSpring Reference = HelloSpringService at org.apache.tuscany.sca.node.impl.NodeImpl.analyzeProblems(NodeImpl.java:653) at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:574) at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:167) at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:175) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:97) at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182) at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63) at useService.UseServiceClient.main(UseServiceClient.java:14)
2 楼
wang3065
2012-10-30
运行 LauncherSpring 的结果:
1 楼
wang3065
2012-10-30
你好,我运行example1的时候报一个错,求解
相关推荐
Apache Tuscany SCA 的入门资料,属于Step by step类型的.
apache-tuscany-sca-1.6.2 包括源码实例
apache-tuscany-sca-1.6.zip
Tuscany SCA in Action
SOA之SCA导航-Apache Tuscany篇,Apache Tuscany入门指南。
Tuscany SCA与Spring、Hibernate整合实例-简洁方法。为了控制大小,把项目lib中的jar都删了...
Apache Tuscany SCA 用户指南
#资源达人分享计划#
使用tuscany配置和发布简单的webservcie接口例子
How does ServiceMix compare to Tuscany or SCA
Tuscany SCA in Action – PDF Books
详细介绍使用Eclipse STP和Apache Tuscany sca for java开发SOA应用的问档及使用实例(不是示例).
基于SCA规范Tuscany的SOA的实现