You also need to create the URL to the
meeting room. You can do this with a call to
sco-info
and
another to
sco-shortcuts
:
https://example.com/api/xml?action=sco-info&sco-id=2006258750
https://example.com/api/xml?action=sco-shortcuts
Extract the
url-path
from the
sco-info
response.
Then, extract the
domain-name
from the
sco-shortcuts
response
and concatenate the two values:
<?xml version="1.0" encoding="utf-8" ?>
<results>
<status code="ok" />
<shortcuts>
<sco tree-id="4930295" sco-id="2006258748" type="my-courses">
<domain-name>http://example.com</domain-name>
</sco>
..
You can also use a single call to
report-my-meetings
if
the user is logged in and the meeting is in the user’s
my-meetings
folder:
https://example.com/api/xml?action=report-my-meetings
In this case, extract both the
domain-name
and
url-path
from
the
report-my-meetings
response.
The
scoUrl
Java method constructs the URL by
calling
sco-info
to retrieve the
url-path
and
then
sco-shortcuts
to retrieve the
domain-name
.
In this case, two calls are used so that you do not need to make
the assumption that the meeting is in the current user’s
my-meetings
folder:
public String scoUrl(String scoId) throws XMLApiException {
try {
Element e = request("sco-info", "sco-id=" + scoId);
if(!(codePath.valueOf(e).equalsIgnoreCase("ok")))
return "";
XPath xpath = XPath.newInstance("//url-path/text()");
String path = ((Text) xpath.selectSingleNode(e)).getText();
e = request("sco-shortcuts", null);
xpath = XPath.newInstance("//domain-name/text()");
String url = ((Text) xpath.selectSingleNode(e)).getText();
return url + "/" + path.substring(1) + "?session=" + breezesession;
} catch (JDOMException jde) {
throw new XMLApiException(PARSE_ERROR, jde);
}
}