|
Page Created :
qpid :
OperationInvocation
OperationInvocation has been created by Andrea Gazzarini (Feb 27, 2009). Content:Operation invocation on a WS-ResourceDescriptionThis interface allows a requestor to invoke an operation on a WS-Resource.
Generally speaking, an operation is mainly defined by its signature. That includes :
For QMan resources, consider these important points about operation signatures :
Return TypeReturn type is a simple "Value Object" that encapsulates the (optional) the output parameters map. Note that for example void methods won't contain that map. <!-- Invocation Result --> <xsd:complexType name="result"> <xsd:sequence> <xsd:element name="outputParameters" type="qman:map"/> </xsd:sequence> </xsd:complexType> <!-- Output parameter map --> <xsd:complexType name="map"> <xsd:sequence> <xsd:element name="entry" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <!-- Entry key is always a string. --> <xsd:element name="key" type="xsd:string"/> <!-- While entry value could be any arbitrary object. --> <xsd:element name="value" type="xsd:anyType"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> RequestFor this example we suppose the WS-Resource has the following operation : 01. <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://amqp.apache.org/qpid/management/qman/echoWithSimpleTypes 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:ResourceId xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18. 781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. </qman:ResourceId> </soap:Header> <soap:Body xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 20. <qman:echoWithSimpleTypesRequest> 21. <qman:p1>1373</qman:p1> 22. <qman:p2>true</qman:p2> 23. <qman:p3>12763.44</qman:p3> 24. <qman:p4>2727.233</qman:p4> 25. <qman:p5>28292</qman:p5> 26. <qman:p6>227</qman:p6> 27. <qman:p7>expectedStringResult</qman:p7> 28. <qman:p8>http://qpid.apache.org/</qman:p8> 29. <qman:p9>1235061886761</qman:p9> 30. <qman:p9 xsi:type="xsd:long"> 1235061886761 </qman:p9> 31. </qman:echoWithSimpleTypesRequest> </soap:Body> </soap:Envelope>
Response<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://amqp.apache.org/qpid/management/qman/echoWithSimpleTypesResponse 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> <qman:ResourceId xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18. 781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. </qman:ResourceId> 20. </wsa:ReferenceParameters> </wsa:From> </soap:Header> <soap:Body> 21. <qman:echoWithSimpleTypesResponse xmlns:qman="http://amqp.apache.org/qpid/management/qman"> <qman:echoWithSimpleTypesResponse> 22. <outputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 23. <qman:p1>1373</qman:p1> 24. <qman:p2>true</qman:p2> 25. <qman:p3>12763.44</qman:p3> 26. <qman:p4>2727.233</qman:p4> 27. <qman:p5>28292</qman:p5> 28. <qman:p6>227</qman:p6> 29. <qman:p7>expectedStringResult</qman:p7> 30. <qman:p8>http://qpid.apache.org/</qman:p8> 31. <qman:p9>1235061886761</qman:p9> 32. <qman:p9 xsi:type="xsd:long"> 33. 1235061886761 34. </qman:p9> 35. </outputParameters> 36. <qman:echoWithSimpleTypesResponse> 37. </qman:echoWithSimpleTypesResponse> </soapBody> </soap:Envelope>
Faults
Quick links |
Unsubscribe or edit your notifications preferences
