企业应用集成(九)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

企业应用集成企业应用集成鲍亮baoliang@mailxidianeducn西安电子科技大学软件工程研究所baoliang@mail.xidian.edu.cn2010-6-301Message Construction西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/22AdAgendaIntroduction12CommandMessage3DocumentMessageEventMessage4Request-Reply5西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/33AdAgendaReturnAddress67CorrelationIdentifier8MessageSequenceMessageExpiration9FormatIndicator10西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/44AdAgendaIntroduction12CommandMessage3DocumentMessageEventMessage4Request-Reply5西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/55IdiIntroduction™Sliidbtiddi™Several issues raised by creating and sending a Message.ƒMessage intent•Messages are ultimately just bundles of data, but the gyjsender can have different intentions for what it expects the receiver to do with the message.ƒReturning a response•When an application sends a message, it often expects a response confirming that the message has been processed and providing the result. 西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/66IdiIntroduction™(ti)™(continue)ƒHuge amounts of data•Sometimes applications transfer a large data structure, one that may not fit in a single message. In this case, bkhdiblhkddbreak the data into more manageable chunks and send them as a Message Sequence. SlƒSlow messages•Generally, the sender does not know how long it will tkfthitithYtthtake for the receiver to receive the message. Yet, the message contents may be time‐sensitive. In this case, thesendercanuseMessageExpirationtospecifyan西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/77the sender can use Message Expiration to specify an expiration date. AdAgendaIntroduction12CommandMessage3DocumentMessageEventMessage4Request-Reply5西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/88Command Message™Hibdtik™How can messaging be used to invoke a procedure in another application?™Use a Command Message to reliably invoke aprocedureinanotherapplication.a procedure in another application.西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/99Command Message™ACdMiill™A Command Message is simply a regular message that happens to contain a command;ƒIn JMS, the command message could be any type of message; ƒIn .NET, a command message is a Message with a commandstoredinit.command stored in it.™Command Messages are usually sent over a PittPitChlPoint‐to Point Channel.西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/1010CdCommand Message™ElSOAPdWSDL™Example: SOAP and WSDLƒWith the SOAP protocol [SOAP1.1] and WSDL service description [WDSL1.1], when using RPC‐style SOAP messages, the request message is an example of this Command Message pattern.西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/1111CdCommand Message™ElSOAPdWSDL™Example: SOAP and WSDLSOAP‐ENV:Envelope                                                           lSOAPENVxmlns:SOAP‐ENV=                 SOAP‐ENV:encodingStyle=SOAPENV:encodingStyle=     SOAP‐ENV:Body                                          m:GetLastTradePrice xmlns:m=Some‐URI                      symbolDIS/symbol                              /GtLtTdPi/m:GetLastTradePrice                                                         /SOAP‐ENV:Body                                                           /SOAP‐ENV:Envelope西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/1212/SOAPENV:EnvelopeAdAgendaIntroduction12CommandMessage3DocumentMessageEventMessage4Request-Reply5西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/1313Document Message™HMibdttfdt™How can Messaging be used to transfer data between applications?™Use a Document Message to reliably transfer adatastructurebetweenapplications.a data structure between applications.西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/1414Document Message™UlikCdMthttllth™Unlike aCommand Message that tells the receiver to invoke certain behavior, a Document Messagejust passes data and lets the receiver decide how to do with the data. ƒIn JMS, the document message may be an ObjectMessagecontainingaSerializabledataObjectMessage containing a Serializable data object for the document, or it may be a TextMessagecontainingthedatainXMLform.TextMessage containing the data in XML form.ƒIn .NET, a document message is a Message with thedatastoredinitthe data stored in it. 西安电子科技大学软件工程研究所西安电子科技大学软件工程研究所://sei.xidian.edu.cn/1515Document Message™ElJdXML™Example: Java and XMLƒThe following example shows how a simple purchase order can be represented as XML and sent as a message using JMS.Session session 

1 / 65
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功