您好,欢迎访问三七文档
企业应用集成企业应用集成鲍亮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/55IdiIntroductionSliidbtiddiSeveral 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. SlSlow 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 MessageHibdtikHow 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 MessageACdMiillA 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 MessageElSOAPdWSDLExample: SOAP and WSDLWith 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 MessageElSOAPdWSDLExample: 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 MessageHMibdttfdtHow 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 MessageUlikCdMthttllthUnlike 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 MessageElJdXMLExample: Java and XMLThe following example shows how a simple purchase order can be represented as XML and sent as a message using JMS.Session session
本文标题:企业应用集成(九)
链接地址:https://www.777doc.com/doc-4476447 .html