Apache Qpid : MetadataExchange
This page last changed on Feb 19, 2009 by agazzarini.
Metadata Exchange (WS-MetadataExchange)DescriptionQMan WS-Resources are basically web services. Web Services use metadata to describe what other endpoints need to know in order to interact with them. Request01. <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 02. <soap:Header> 03. <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing"> 04. http://localhost:8080/qman/services/QManWsResource 05. </wsa:To> 06. <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07. http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata 08. </wsa:Action> 09. <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing"> 10. uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 11. </wsa:MessageID> 12. <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing"> 13. <wsa:Address> 14. http://www.w3.org/2005/08/addressing/role/anonymous 15. </wsa:Address> 16. </wsa:From> 17. <qman-wsa:ResourceId xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing" wsa:IsReferenceParameter="true"> 18. a3759467-bede-476d-8dde-169f1a652191 19. </qman-wsa:ResourceId> </soap:Header> 20. <soap:Body> 21. <wsx:GetMetadata xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> 22. <wsx:Dialect> 23. http://schemas.xmlsoap.org/wsdl/ 24. </wsx:Dialect> </wsx:GetMetadata> </soap:Body> </soap:Envelope>
ResponseMetadataExchange supports two dialects and therefore there could be two different responses depending on the requested dialect. WSDL DialectThe following illustrates an example response of a GetMetadata request with WSDL dialect. <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> 01. <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02. http://www.w3.org/2005/08/addressing/role/anonymous 03. </wsa:To> 04. <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05. http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadataResponse 06. </wsa:Action> 07. <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08. uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. </wsa:MessageID> 10. <wsa:RelatesTo RelationshipType="wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11. uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. </wsa:RelatesTo> 13. <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. <wsa:Address> 15. http://localhost:8080/qman/services/QManWsResource 16. </wsa:Address> 17. <wsa:ReferenceParameters> 18. <qman-wsa:ResourceId wsa:IsReferenceParameter="true" xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 19. a3759467-bede-476d-8dde-169f1a652191 20. </qman-wsa:ResourceId> </wsa:ReferenceParameters> </wsa:From> </soap:Header> <soap:Body> 21. <wsx:Metadata xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> 22. <wsx:MetadataSection> 23. <wsdl:definitions> ... 24. </wsdl:definitions> </wsx:MetadataSection> </wsx:Metadata> </soapBody> </soap:Envelope>
RMD DialectThe following illustrates an example response of a GetMetadata request with RMD dialect. <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> 01. <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02. http://www.w3.org/2005/08/addressing/role/anonymous 03. </wsa:To> 04. <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05. http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadataResponse 06. </wsa:Action> 07. <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08. uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. </wsa:MessageID> 10. <wsa:RelatesTo RelationshipType="wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11. uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. </wsa:RelatesTo> 13. <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. <wsa:Address> 15. http://localhost:8080/qman/services/QManWsResource 16. </wsa:Address> 17. <wsa:ReferenceParameters> 18. <qman-wsa:ResourceId wsa:IsReferenceParameter="true" xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 19. a3759467-bede-476d-8dde-169f1a652191 20. </qman-wsa:ResourceId> </wsa:ReferenceParameters> </wsa:From> </soap:Header> <soap:Body> 21. <wsx:Metadata xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> 22. <wsx:MetadataSection> 24. <wsrmd:MetadataDescriptor interface="qman:QManWsResourcePortType" name="QManWsResourceMetadata" wsdlLocation="http://docs.oasis-open.org/wsrf/rmd-1 QManWsResource.wsdl" xmlns:qman="http://amqp.apache.org/qpid/management/qman" xmlns:wsrmd="http://docs.oasis-open.org/wsrf/rmd-1"> 25. <wsrmd:Property 26. xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 27. modifiability="read-write" 28. mutability="mutable" 29. name="qman:operatingSystem" 30. <wsrmd:ValidValues> <qman:operatingSystem>Linux</<qman:operatingSystem> <qman:operatingSystem>Tru64</<qman:operatingSystem> <qman:operatingSystem>HP-UX</<qman:operatingSystem> <qman:operatingSystem>Windows XP</<qman:operatingSystem> 31. </wsrmd:ValidValues> 32. <wsrmd:StaticValues> ... ... 33. </wsrmd:StaticValues> 34. <wsrmd:InitialValues> ... ... 35. </wsrmd:InitialValues> </wsrmd:Property> ... </wsrmd:MetadataDescriptor> </wsx:MetadataSection> </wsx:Metadata> </soapBody> </soap:Envelope>
FaultsThe only exception that could be thrown in a metadata exchange scenario is when the requestor indicates an unknown dialect. Quick linksWS-MetadataExchange |
![]() |
Document generated by Confluence on May 26, 2010 10:33 |