銆?/font>聽<wire />鍏冪礌錛岃繖浜涘厓绱犵殑鍚箟鍦ㄤ箣鍓嶇殑闅忕瑪涓?
宸茬粡璇磋繃銆侰omponent鍖呭惈Module鐨勪笟鍔¢昏緫錛學ire鎻忚堪Component涔嬮棿鐨凷ervice鐨勮繛鎺ワ紝Entry
Point瀹氫箟Module鎻愪緵鐨勩佸彲渚涘閮ㄨ闂殑public service錛孍xternal
Service琛ㄧずModule瀵瑰閮⊿ervice鐨勪緷璧栥?br />Component
Component
鏄疘mplementation鐨勯厤緗疄渚嬶紝瀹冨嵆鎻愪緵
Service涔熸秷璐筍ervice銆傚涓狢omponent鍙互浣跨敤騫墮厤緗悓涓涓狪mplementation錛屽彧瑕佹瘡涓狢omponent閮介噰鐢ㄤ笉鍚?
鐨勯厤緗侷mplementation閫氳繃component
type鏉ュ畾涔夊彲鐢盋omponent閰嶇疆鐨刟spect銆係CA鏀寔澶氱涓嶅悓鐨勫疄鐜版妧鏈紝濡侸ava銆丅EPL銆丆++銆係CA瀹氫箟浜嗕竴縐嶅彲鎵╁睍鏈哄埗鏉?
寮曞叆鏂扮被鍨嬬殑Implementation銆傜洰鍓嶇殑瑙勮寖涓嶆寚瀹氬繀欏昏SCA
runtime鏀寔鐨勫疄鐜版妧鏈紝渚涘簲鍟嗗彲浠ラ夋嫨浠栦滑璁や負閲嶈鐨勬妧鏈簣浠ユ敮鎸併傛垜浠潵鐪嬩竴涓婥omponent鐨剆chema錛?br /><component聽name="xs:NCName">*
聽聽聽 <implementation.implementation-type聽/>
聽聽聽 <properties>?
聽聽聽聽聽聽聽 <v:property-name>property-value</v:property-name>+
聽聽聽 </properties>
聽聽聽 <references>?
聽聽聽聽聽聽聽 <v:reference-name>wire-target-URI</v:reference-name>+
聽聽聽 </references>
</component>
<component />鐨刵ame灞炴ц〃紺鴻繖涓猚omponent鐨勫悕瀛楋紝瀹冨繀欏誨湪褰撳墠module涓槸鍞竴鐨勩傚彟澶栵紝褰撳墠module涓殑entry point鍜宔xternal servic涓嶅彲浠ュ拰component閲嶅悕銆?br /><component />蹇?
欏繪湁涓涓猧mplementation瀛愬厓绱狅紝瀹冩寚鍚慶omponent鐨勫叿浣撳疄鐜般俰mplementation鍏冪礌鐨勫悕瀛楃敱涓ら儴鍒嗙粍鎴愶細
"implementation"+浠h〃implementation-type鐨勯檺瀹氳瘝錛屼緥濡傦細implementation.java琛ㄧず鏄敱
Java鏉ュ疄鐜幫紝implementation.bepl琛ㄧず鏄敱BPEL鏉ュ疄鐜般?br /><implementation.java聽class="services.myvalue.MyValueServiceImpl"/>
<implementation.bpel聽process="鈥?/>
Component Type
Component
Type琛ㄧず涓涓狪mplementation鐨勫彲閰嶇疆鐨勪笢涓滐紝瀹冪敱Implementation鎻愪緵鐨凷ervice銆佸彲璁劇疆鐨勫叧鑱斿埌鍏朵粬
Service鐨凴eference鍜屽彲璁劇疆鐨勫睘鎬х粍鎴愩傚睘鎬у拰Reference灝嗗湪浣跨敤榪欎釜Implementation鐨凜omponent涓叿浣?
閰嶇疆銆?br />紜畾涓涓狢omponent Type闇瑕佷袱涓楠わ細
- 浠嶪mplementation鑷韓鑾峰緱淇℃伅錛堜緥濡傦細浠巆ode annotation鑾峰緱淇℃伅錛?/font>
- 浠嶴CA component type鏂囦歡鑾峰緱淇℃伅錛圶ML閰嶇疆鏂囦歡錛?/font>
榪欐槸鏃朵笅嫻佽鐨勫仛娉曪紝鏃㈠彲浠ヤ粠code annotation榪涜閰嶇疆錛屼篃鍙互浠嶺ML榪涜閰嶇疆錛屽鏋滀袱鑰呭悓鏃朵嬌鐢紝code annotation鐨勪紭鍏堢駭楂橈紝浣嗘槸涓よ呯殑閰嶇疆瑕佺粺涓銆?br />SCA component type鏂囦歡鐨勬墿灞曞悕涓?.componentType"錛屽叾涓氳繃componentType鍏冪礌鏉ヨ繘琛岄厤緗紝鎴戜滑鏉ョ湅鐪嬪畠鐨剆chema錛?br /><?xml聽version="1.0"聽encoding="ASCII"?>
<componentType聽xmlns="http://www.osoa.org/xmlns/sca/0.9"聽>
聽聽聽 <service聽name="xs:NCName">*
聽聽聽聽聽聽聽 <interface.interface-type/>
聽聽聽 </service>
聽聽聽 <reference聽name="xs:NCName"聽multiplicity="0..1聽or聽1..1聽or聽0..n聽or聽1..n"?>*
聽聽聽聽聽聽聽 <interface.interface-type/>
聽聽聽 </reference>
聽聽聽 <property聽name="xs:NCName"聽type="xs:QName"聽many="xs:boolean"? default="xs:string"?聽required="xs:boolean"?/>*
</componentType>
<service />琛ㄧず榪欎釜Component Type鎻愪緵鐨凷ervice錛屽彲浠ラ氳繃<interface.interface-type />璁劇疆鍏朵負remotable銆?/font><reference />琛ㄧず榪欎釜Component Type渚濊禆鐨勫叾浠朣ervice錛屼篃鍙互閫氳繃<interface.interface-type />璁劇疆鍏朵負remotable錛宮ultiplicity灞炴ц〃紺哄彲浠ュ叧鑱斿埌榪欎釜Reference鐨刉ire鐨勬暟閲忋?/font><property />琛ㄧず榪欎釜Component Type鍙厤緗殑灞炴с?br />璁╂垜浠潵鐪嬩竴涓緥瀛愶紝Java鏂囦歡MyValueServiceImpl鏄繖涓緥瀛愪腑鐨処mplementation錛屽叾SCA component type濡備笅錛?br /><?xml聽version="1.0"聽encoding="ASCII"?>
<componentType聽xmlns="http://www.osoa.org/xmlns/sca/0.9">
聽聽聽 <service聽name="MyValueService">
聽聽聽聽聽聽聽 <interface.java聽interface="services.myvalue.MyValueService"/>
聽聽聽 </service>
聽聽聽 <reference聽name="customerService">
聽聽聽聽聽聽聽 <interface.java聽interface="services.customer.CustomerService"/>
聽聽聽 </reference>
聽聽聽 <reference聽name="stockQuoteService">
聽聽聽聽聽聽聽 <interface.java聽interface="services.stockquote.StockQuoteService"/>
聽聽聽 </reference>
聽聽聽 <property聽name="currency"聽type="xsd:string"聽default="USD"/>
</componentType>
鐩稿簲鐨凧ava浠g爜濡備笅錛?br />
//聽MyValueService聽interface.
package聽services.myvalue;
public聽interface聽MyValueService聽{
聽聽聽聽public聽void聽calculate();
}
//聽MyValueServiceImpl聽class
package聽services.myvalue;
import聽services.customer.CustomerService;
import聽services.stockquote.StockQuoteService;
public聽class聽MyValueServiceImpl聽implements聽MyValueService聽{
聽聽聽聽//聽Code聽annotation.聽鍜孹ML鐨勫姛鑳界浉鍚岋紝涓よ呭彇涓涓嬌鐢ㄥ氨澶熶簡銆?/span>
聽聽聽聽@Property
聽聽聽聽private聽String聽currency聽=聽"USD";
聽聽聽聽@Reference
聽聽聽聽private聽CustomerService聽customerService;
聽聽聽聽@Reference
聽聽聽聽private聽StockQuoteService聽stockQuoteService;
聽聽聽聽public聽void聽calculate()聽{
聽聽聽聽聽聽聽聽//聽do聽your聽real聽business聽logic聽here.
聽聽聽聽}
}
Implementation
Implementation
鏄笟鍔¢昏緫鐨勫叿浣撳疄鐜幫紝榪欎簺涓氬姟閫昏緫浼氭彁渚涙垨娑堣垂Service銆係CA鏀寔澶氱瀹炵幇鎶鏈紝濡侸ava銆丅PEL鎴朇++銆傛垜浠凡緇忕煡閬擄紝
Service銆丷eference鍜孭roperty鏄疘mplementation涓叧浜庨厤緗殑涓滀笢錛屼粬浠粍鎴怌omponent
Type銆傚湪榪愯鏃訛紝Implementation
Instance鏄疘mplementation鐨勫疄渚嬪寲錛屽畠鎻愪緵鐨勪笟鍔¢昏緫鍜孖mplementation涓殑鐩稿悓錛屼絾Property鍜?
Reference鍒欏彇鍐充簬Component涓殑閰嶇疆銆備笅鍥炬弿榪頒簡Component
Type銆丆omponent銆両mplementation鍜孖mplementation Instance涔嬮棿鐨勫叧緋伙細


Interface
Interface
璐熻矗瀹氫箟涓涓垨澶氫釜business function銆傝繖浜沚usiness
function閫氳繃Service鎻愪緵緇欏閮紝澶栭儴閫氳繃Reference浣跨敤瀹冧滑銆係ervice鐢辮嚜宸卞疄鐜扮殑Interface瀹氫箟銆係CA鏀寔濡?
涓?縐岻nterface錛?br />- Java interfaces
- WSDL 1.1 portTypes
- WSDL 2.0 interfaces
鎴戜滑涓涓竴涓潵鐪嬶細
<interface.java聽interface="NCName"聽鈥β?/span>/>
鍏朵腑interface灞炴т負Java interface鐨勫叏鍚嶏紙鍖呮嫭package錛夈備緥濡傦細
<interface.java聽interface="services.stockquote.StockQuoteService" />
<interface.wsdl聽interface="xs:anyURI"聽鈥β?/span>/>
鍏朵腑interface灞炴т負portType/interface鐨刄RI錛屽叾鏍煎紡涓?lt;WSDL-namespace-URI>#wsdl.interface(<portType or Interface-name>)銆備緥濡傦細
<interface.wsdl聽interface="http://www.stockquote.org/StockQuoteService#wsdl.interface(StockQuote)"/>
濡傛灉浣跨敤Java interface錛孲ervice鏂規硶鐨勪紶鍏ュ弬鏁板拰榪斿洖鍊煎彲浠ヤ嬌鐢↗ava class鎴朠rimitive type銆傛渶濂戒嬌鐢⊿DO鐢熸垚鐨凧ava class錛屽洜涓哄畠浠拰XML涔嬮棿鍋氫簡鏁村悎銆傦紙SDO涔熸槸IBM鎺ㄥ嚭鐨勪竴涓猄OA緋誨垪鐨勬爣鍑嗐傦級
濡傛灉浣跨敤WSDL錛孲ervice鏂規硶鐨勪紶鍏ュ弬鏁板拰榪斿洖鍊煎垯浣跨敤XML schema鎻忚堪銆俋ML schema縐嶆弿榪扮殑鍙傛暟浠DO DataObject鐨勫艦寮忔毚闇茬粰寮鍙戣呫?br />
涓
涓狢omponent
Implementation鐨凷ervice鏄惁鏄痳emotable鐨勬槸鐢盨ervice鐨処nterface瀹氫箟鐨勩傚鏋滀嬌鐢↗ava錛屼負
Interface娣誨姞@Remotable
annotation鍙互鎶奡ervice澹版槑涓簉emotable銆俉SDL瀹氫箟鐨刬nterface姘歌繙鏄痳emotable鐨勩?br />
鍏稿瀷鐨剅emoteable interface鏄矖鍔涘害鐨勶紝鐢ㄤ簬鏉捐﹀悎鐨勪氦浜掋俁emotable Service Interface涓嶅厑璁稿嚱鏁伴噸杞姐傛棤璁烘槸鍦?Module涔嬪榪樻槸鍦∕odule鍐呯殑鍏朵粬Component涓嬌鐢?/font>remotable Service錛屾暟鎹氦鎹㈤兘閲囩敤by-value璇箟銆?br />Remotable
Serviced鐨処mplementation鍙兘浼氬湪Service璋冪敤榪囩▼涓垨璋冪敤涔嬪悗鏀瑰彉浼犲叆鍙傛暟錛屼篃鍙兘鍦ㄨ皟鐢ㄤ箣鍚庝慨鏀硅繑鍥炲箋傚鏋?
remotable Service琚玪ocally鎴杛emotely璋冪敤錛孲CA
container浼氫繚璇佷紶鍏ュ弬鏁板強榪斿洖鍊肩殑鏀瑰彉瀵筍ervice鐨勮皟鐢ㄨ呮槸涓嶅彲瑙佺殑錛堣繖灝辨槸by-value璇箟錛夈備笅闈㈡槸涓涓猺emotable
java interface鐨勪緥瀛愶細
package聽services.hello;
@Remotable
//聽@AllowsPassByReference
public聽interface聽HelloService聽{
聽聽聽聽public聽String聽sayHello(String聽message);
}
鐢盓xternal
Service鎻愪緵鐨凷ervice姘歌繙鏄痳emotable鐨勩傚彲浠ヤ嬌鐢ˊAllowsPassByReference
annotation鍏佽涓涓猺emotable
Service鍦ㄨ鍚屼竴Module涓殑鍏朵粬Component璋冪敤鏃朵嬌鐢╞y-reference璇箟錛岃繖鏍峰彲浠ユ彁楂樻ц兘銆?br />
鐢眑ocal Interface鎻愪緵鐨凷ervice鍙兘鍦ㄥ悓涓Module涓嬌鐢紝瀹冧滑涓嶈兘閫氳繃Entry
Point鍙戝竷鍒板閮ㄣ傚鏋滀笉澹版槑@Remotable錛孞ava interface榛樿涓簂ocal銆傚吀鍨嬬殑local
Interface鏄粏綺掑害鐨勶紝鐢ㄤ簬绱ц﹀悎鐨勪氦浜掋傚畠鍏佽鏂規硶閲嶈澆錛屽茍閲囩敤by-reference璇箟銆?br />
]]>