微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

SCA 之Tuscany 4 ——helloworld Webservice

   用《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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐