login
The login service
request is an http request message sent to the UMS in accordance
with the Simple Messaging API or the XML Messaging API.
The login service request must conform to the following criteria:
Required field/attribute values |
Optional field/attribute values |
service=login |
transacted=false (by default) |
|
user=guest (by default) |
|
password=guest (by default) |
Notes:
A
successful login service request result in the creation of a
UMS client session.
If the transacted field/attribute is present and its value is set to true, a transacted client session is created and a new transaction is started. A transaction is completed after a successful commit or rollback service request. A new transaction is started whenever a transaction is completed.
If the transacted field/attribute is set to false or is not present, a non-transacted client session is created.
Service response message: login_reply
1. Simple Messaging API Example:
The following is a login service request for a non-transacted session.
POST
/ums/simple?service=login&user=guest&password=guest HTTP/1.1
Content-Type: text/plain;charset=UTF-8
User-Agent:
Java/1.6.0_07
Host: localhost:8888
Accept: text/html,
image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 0
The following is a
login service request for a transacted session.
POST /ums/simple?service=login&transacted=true
HTTP/1.1
Content-Type: text/plain;charset=UTF-8
User-Agent:
Java/1.6.0_07
Host: localhost:8888
Accept: text/html,
image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 0
2. XML Messaging API Example:
The following is a login service request for a non-transacted session.
POST /ums/xml HTTP/1.1
Accept: text/xml, text/html, image/gif,
image/jpeg, *; q=.2, */*; q=.2
Content-Type: text/xml;
charset=utf-8
Content-Length: 315
SOAPAction: ""
Cache-Control: no-cache
Pragma: no-cache
User-Agent:
Java/1.6.0_07
Host: localhost:8888
Connection: keep-alive
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<ums:MessageHeader
xmlns:ums="https://mq.dev.java.net/ums" ums:id="1.0"
ums:version="1.0">
<ums:Service
ums:service="login"/>
</ums:MessageHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body/>
</SOAP-ENV:Envelope>
Back
to UMS protocol page.