Connect
Description
The Connect interface allows to estabilish QMan with a Qpid broker.
Two categories of parameters need to be sent in order to make a connect request :
- connection parameters : host, port, username, password and virtual host name;
- connection pool parameters : for each connected broker a dedicated connection pool is created too. Those parameters allows a requestor to configure that pool.
Request
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/adapter 05. </wsa:To> 06. <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07. http://amqp.apache.org/qpid/management/qman/Connect 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> </soap:Header> <soap:Body> 17. <qman:Connect xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18. <qman:host>sofia.gazzax.com</qman:host> 19. <qman:port>5672</qman:port> 20. <qman:username>a.gazzarini</qman:username> 21. <qman:password>p1ssw9rd</qman:password> 22. <qman:virtualHost>test</qman:virtualHost> 23. <qman:initialPoolCapacity>1</qman:initialPoolCapacity> 24. <qman:maxPoolCapacity>4</qman:maxPoolCapacity> 25. <qman:maxWaitTimeout>2000</qman:maxWaitTimeout> 26. </qman:Connect> </soap:Body> </soap:Envelope>
Line(s) |
Description |
---|---|
01 |
The SOAP <Envelope> is the root element in every SOAP message, and contains two child elements, <Header> and <Body>. |
02 |
The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider). |
03 - 05 |
Convey the target endpoint also known (in the request phase) as service provider. |
06 - 08 |
Indicate this is a Connect request. This is done using a wsa:Action that is part of WS-Addressing specification. |
09 - 11 |
Convey a unique identifier associated with the current message. This will be used for request / response messages correlation. |
12 - 15 |
Provide the address of the source endpoint also known (in the request phase) as service requestor. |
17 - 26 |
The connect request. Subsequent children specify connection parameters. |
18 |
The host name / IP address where the broker is running. |
19 |
The port number on which the broker is listening. |
20 |
Username used for estabilishing the connection. |
21 |
Password used for estabilishing the connection. |
22 |
The virtual host name. |
23 |
The initial size of broker dedicated connection pool. That means the number of connections that will be immediately created. |
24 |
The maximum allowed size of broker dedicated connection pool. |
25 |
The maximum wait timeout for retrieving connections from connection pool. A value of -1 means "Waits forever!" |
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/ConnectResponse 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/adapter 16. </wsa:Address> </wsa:From> </soap:Header> <soap:Body> 17. <qman:ConnectResponse xmlns:qman="http://amqp.apache.org/qpid/management/qman"/> </soapBody> </soap:Envelope>
Line(s) |
Description |
---|---|
01 - 03 |
Convey the recipient of the response message. Note that this time we are talking about the service requestor; The address matches the <wsa:From> previously found in the corresponding request |
04 - 06 |
Indicate this is a Connect response. This is done as usual using a wsa:Action that is part of WS-Addressing specification |
07 - 09 |
Convey a unique identifier associated with the current response message |
10 - 12 |
This element provides the identifier of the correlated (request) message |
13 |
The <wsa:From> element (part of WS-Addressing specs too) identifies the source endpoint, the originator of this response message |
14 - 16 |
This is the address of the source service endpoint. As said for lines 01-03 this time this is referred to service provider (the message originator) |
17 |
This is the connect response. Note that this is an empty element because this operation is void. |
Faults
UnableToConnectFault
This is the only fault that could be returned as conseguence of a connect request. That means QMan was unable to connect with the requested broker.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing"> http://www.w3.org/2005/08/addressing/role/anonymous </wsa:To> <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing"> http://amqp.apache.org/qpid/management/qman/ConnectResponse </wsa:Action> <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing"> uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 </wsa:MessageID> <wsa:RelatesTo RelationshipType="wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 </wsa:RelatesTo> <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:Address> http://localhost:8080/qman/services/adapter </wsa:Address> </wsa:From> </soap:Header> <soap:Body> 01. <soap:Fault> 02. <soap:Code xmlns:qman="http://amqp.apache.org/qpid/management/qman"> <soap:Value>qman:QMan</soap:Value> 03. </soap:Code> 04. <soap:Reason> <soap:Text>Unable to connect with the requested broker.</soap:Text> </soap:Reason> 05. <soap:Detail> 06. <qman:UnableToConnectFault xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 07. <wsrf-bf:Timestamp xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2"> 2009-02-17T10:37:08+01:00 </wsrf-bf:Timestamp> 08. <wsrf-bf:OriginatorReference xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2"> <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"/> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing"> http://romagazzarini:8080/qman/services/adapter </wsa:Address> 09. </wsrf-bf:OriginatorReference> 10. <qman:host>sofia.gazzax.com</qman:host> 11. <qman:port>5672</qman:port> 12. <qman:username>a.gazzarini</qman:username> 13. <qman:virtualHost>p1ssw9rd</qman:virtualHost> </qman:UnableToConnectFault> </soap:Detail> </soap:Fault> </soap:Body> </soap:Envelope>
Line(s) |
Description |
---|---|
01 |
This is a sub-element which is used on SOAP for reporting errors |
02 - 03 |
Indicate the module that is throwing the exception |
04 - 05 |
A human-readable text message which contains the reason of the failure. |
05 |
An additional detail element of the current failure. |
06 |
Custom fault element. Its name if UnableToConnectFault because we were unable to estabilish a connection. |
07 |
The timestamp of the connection failure. |
08 - 09 |
Reference data of the originator of this failure (QMan WS-DM Adapter) |
10 |
host name of qpid broker that was passed as input arguments. |
11 |
port number of qpid broker that was passed as input arguments. |
12 |
username that was passed as input arguments. |
13 |
password that was passed as input arguments. |
Quick links
N.A.