sca中的interface.wsdl和binding.ws

1、interface.wsdl的用法:

interface.wsdl元素有如下属性:

interface - portType|interface 如下格式的URI地址 

<WSDL-namespace-URI>#wsdl.interface(<portType或Interface-name>)

对于WSDL 1.1,interface属性指向WSDL中的某个portType。

对于WSDL 2.0 ,interface属性指向WSDL里的某个interface

 

2、interface.java元素有如下属性:

interface -Java interface的全限定名(qualified name)

该文件的根目录是由Interface所在的contribution定义的

 

example:

 

<!--service promote interface.wsdl-->
	<service name="AccountInfo" promote="AccountInfoComponent">
	
	<interface.wsdl
			interface="http://accountinfo#wsdl.interface(AccountInfoPortType)"
			/>
		<binding.ws uri="http://localhost:8080/AccountInfo"/>
	</service>
	<!--
		<service name="AccountInfo" promote="AccountInfoComponent">
		<interface.java
		interface="com.kingsun.sca.demo.service.AccountInfo"/>
		<binding.ws
		wsdlElement="http://accountinfo#wsdl.endpoint(AccountInfo/AccountInfoSoapBinding)"/>
		</service>
	-->
	
	<!--accountInfoImplWithInterface-->
	<component name="AccountInfoComponent1">
		<implementation.java
			class="com.kingsun.sca.demo.service.impl.AccountInfoImplWithInterface"/>
	</component>
	
	<!--accountInofImplWithPojo-->
	<component name="AccountInfoComponent">
		<implementation.java
			class="com.kingsun.sca.demo.service.impl.AccountInfoImplWithPOJO"/>
	</component>
	
	<!--ws consumer	in the same sca domain -->
	<!--<component name="AccountInfoConsumerComponent">
		in the same sca	domain
		<reference name="accountInfo" target="AccountInfoComponent"/>
		<implementation.java class="com.kingsun.sca.demo.service.impl.AccountInfoConsumerImpl"/>
	</component>
--></composite>
 

 

3、binding.ws中的wsdlElement的用法:

The wsdlElement attribute indicates that a WSDL document exists

which should be used and it points to the element within that WSDL

to use. The value of the wsdlElement attribute can have one of the

following four forms: 

1)Service:

<WSDL-namespace-URI>#wsdl.service(<service-name>) In this case, all

the endpoints in the WSDL Service that have equivalent PortTypes

with the SCA service or reference must be available to the SCA

service or reference. 

2)Port 

(WSDL 1.1):

<WSDL-namespace-URI>#wsdl.port(<service-name>/<port-name>) In this

case, the identified port in the WSDL 1.1 Service must have an

equivalent PortType with the SCA service or reference. 

3)Endpoint (WSDL 2.0):

<WSDL-namespace-URI>#wsdl.endpoint(<service-name>/<endpoint-name>)

In this case, the identified endpoint in the WSDL 2.0 Service must

have an equivalent PortType with the SCA service or reference.

4)Binding:

<WSDL-namespace-URI>#wsdl.binding(<binding-name>) In this

case, the identified WSDL binding must have an equivalent PortType

with the SCA service or reference. In this case the endpoint address

URI for the SCA service or reference must be provided via the URI

attribute on the binding.

 

example:

 

<?xml version="1.0" encoding="utf-8" ?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
	targetNamespace="http://accountinfoconsumer" xmlns:ns="http://accountinfoconsumer"
	name="AccountInfoConsumer">
	<!--ws consumer	in different sca domain -->
	<component name="AccountInfoConsumerComponent">
		<!--in different sca domain-->
		<reference name="accountInfo">
		<interface.wsdl interface=""></interface.wsdl>
			<interface.java interface="com.kingsun.sca.demo.service.AccountInfo"  />
			<binding.ws uri="http://localhost:8080/AccountInfo"
				wsdlElement="http://accountinfo#wsdl.port(AccountInfo/AccountInfoSOAP11port)" />
		</reference>
		<implementation.java
			class="com.kingsun.sca.demo.service.impl.AccountInfoConsumerImpl" />
	</component>
</composite>
 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值