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>