1.Overview
Web Services are a common solution for ESB middleware, which enables different applications running on different machines to exchange data or integrations without the help of additional, specialized third-party software or hardware. applications that are implemented according to the WEB Service specification can exchange data with each other, regardless of the language, platform, or internal protocol they are using.
Aeaiesb provides a very convenient way to create a service, this document is mainly for the reader to explain how to use the ESB to create a simple Web service interface.
2.Sample Example
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/0F/wKioL1RJ_pnguw51AABVkwwVOww983.jpg "title=" 11.png "alt=" Wkiol1rj_pnguw51aabvkwwvoww983.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/0E/wKiom1RJ_ozDjRMQAADTIb1mc7Q161.jpg "title=" 22.png "alt=" Wkiom1rj_ozdjrmqaadtib1mc7q161.jpg "/>
Service Design Right click "Add Action ", the action name fill "SayHello", enter the parameter name to words, in the operation name right click "Binding Process " , select Quick Start folder. Ctrl + S saves the service configuration.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/0E/wKiom1RJ_sGCRlmRAACBGSSw3z4154.jpg "title=" 33.png "alt=" Wkiom1rj_sgcrlmraacbgssw3z4154.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/0E/wKiom1RJ_uXQflsqAAChUmejdnY997.jpg "title=" 44.png "alt=" Wkiom1rj_uxqflsqaachumejdny997.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/0E/wKiom1RJ_wvT5fF_AABA8vA6JWo798.jpg "title=" 55.png "alt=" Wkiom1rj_wvt5ff_aaba8va6jwo798.jpg "/>
Package Com.aeai.demo.messageflows.helloworldsayhello;
importCom.agileai.esb.component.invoker.InvokerService;
importcom.agileai.esb.core.AdapteException;
import Com.agileai.esb.core.AttributeMap;
importCom.aeai.demo.services.helloworld.SayHello;
importcom.aeai.demo.services.helloworld.SayHelloResponse;
Public class JavaInvoker3 extends invokerservice{
Public SayHello Getrequest () {
AttributeMap sourcereq = (attributemap)this. Getmessageflow (). Getrequest ();
return (SayHello) Sourcereq.get ("Soapreqobject");
}
Public Sayhelloresponse GetResponse () {
AttributeMap sourcersp = (attributemap)this. Getmessageflow (). GetResponse ();
return (sayhelloresponse) Sourcersp.get ("Soaprspobject");
}
Public void Invoke () throws adapteexception{
String words =getrequest (). Getwords ();
GetResponse (). Setreturn ("Say:" + words);
}
}
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/0F/wKioL1RJ_97yU_qOAAC0rRgIDwo792.jpg "title=" 66.png "alt=" Wkiol1rj_97yu_qoaac0rrgidwo792.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/0F/wKioL1RKAAeh__O_AAB-SYfqNa0458.jpg "title=" 00.png "alt=" Wkiol1rkaaeh__o_aab-syfqna0458.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/0F/wKioL1RKADDzmJtyAAHt9WmNXbw336.jpg "title=" 88.png "alt=" Wkiol1rkaddzmjtyaaht9wmnxbw336.jpg "/>
Execution The Web service selects the SayHello action in project , resolves the contents of the SOAP envelope, and the parameter words Fill in "Hello!" ", click Execute 650) this.width=650;" Src= "http://s3.51cto.com/wyfs02/M01/4D/0E/ Wkiom1rkaasqwokoaaad9dez4pu424.jpg "title=" Anniu.png "alt=" wkiom1rkaasqwokoaaad9dez4pu424.jpg "/>" button, right back the Web service return value.
Aeai esb-ESB-based Web services development documentation Download
This article is from the "Digital unobstructed portal Integration Platform" blog, please be sure to keep this source http://aeaiportal.blog.51cto.com/9300497/1567590
Aeai esb-ESB-based Web services development