您的位置:首页 > 其它

SCA 之Tuscany 4 ——helloworld Webservice

2011-10-10 14:44 337 查看
   用《SOA核心技术及应用》里的话来说,Tuscany生成webservice就是顺手牵羊。

   和文章1的不同之处就只是在service进行ws的指定,如果不定义service时,默认就是sca绑定。

   

<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
targetNamespace="http://sample"
name="helloworld-contribution">

<component name="HelloworldComponent">
<implementation.java class="sample.HelloworldImpl"/>
<service name="Helloworld">
<binding.ws/>
</service>
</component>

</composite>
再需要一点:在pom中添加ws的支持

<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-base-runtime</artifactId>
<version>${tuscany.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
<version>${tuscany.version}</version>
<scope>test</scope>
</dependency>


这就是我们生成ws所需要的一切!

在浏览器内打开wsdl

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: