-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetDocumentByQualification not working #9
Comments
Hi, |
Thank you for the reply. It has little to do with "LinkRelations.SELF.Rel" or "LinkRelations.EDIT.Rel", the problem is that "feed.Entries[0].Links" is empty. The following is the feed.ToString() (i reverted back to your original code): 2018-09-17 13:22:41,884 [1] DEBUG Emc.Documentum.Rest.DataModel.Repository - { |
Hi, |
Joli,
Thank you so much for getting back to me.
If you view the the json result from the feed, the "links" component is outside, i.e., parallel to the "entries", therefore "feed.Entries[0].Links" length is 0; however, feed.links contains the "self" link in your email.
I changed the getsingleton line to the following,
return Client.GetSingleton<T>(feed.Links, LinkRelations.SELF.Rel, options);
My debugger was able to proceed to the "Get" function, the GetSingleton proceeds with the "followingUri" as the following:
https://***:8888/rest/repositories/***?inline=False&links=True&page=1&include-total=False&dql=select%20r_object_id%20from%20dm_sysobject%20where%20r_object_id='09031d4580be05cc'
The debugger moves to the "Get" function, the uribuilder then create the following uri, notice the criteria "links=True" is appended to the end and this cause the 400 error:
https://***:8888/rest/repositories/***?inline=False&links=True&page=1&include-total=False&dql=select%20r_object_id%20from%20dm_sysobject%20where%20r_object_id='09031d4580be05cc'&links=True
The 400 error:
<error xmlns="http://identifiers.emc.com/vocab/documentum" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><status>400</status><code>E_INPUT_ILLEGAL_ARGUMENTS</code><message>There are illegal arguments provided.</message><details>Invalid boolean value [True,True"]</details></error>
I pasted the uri in chrome and removed "links=true", the result is the same as the the "feed", no other "Document" properties are returned.
I tried the function with other object type such as folder, results were the same.
On Tuesday, September 18, 2018, 2:06:42 AM EDT, Joli Liu <notifications@github.com> wrote:
Hi,
Based on your above comment, the feed.Entries[0].Links should be :
"links": [
{
"rel": "self",
"href": "https://***:8888/rest/repositories/***?inline=True&links=True&page=1&include-total=False&dql=select%20r_object_id%20from%20dm_sysobject%20where%20r_object_id='09031d4580be05cc'"
}
]
.....
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
First of all I want to say a big thank you for sharing your code.
I added the RestClient to my vs project (with content server and Rest version 7.1), the GetDocumentByQualification or GetObjectByQualification do not work. After adding some debug lines, i found out that the "links" in "feed" is empty, would appreciate if this can be fixed or provide the right way to use it.
I defined the option as the following:
FeedGetOptions DEFAULT_OPTIONS { get { return new FeedGetOptions { Inline = true, Links = true }; } }
And called the GetDocumentByQulification as the following:
RestRepository.GetDocumentByQualification("custom_document where i_latest_flag=1 and i_chronicle_id='" + ChronicleId + "'", DEFAULT_OPTIONS);
In the RepositoryExec.GetObjectByQualification function:
Feed feed = ExecuteDQL(dql, new FeedGetOptions { Inline = true });
The "entries[0]" in the "feed" does not contain any links:
2018-09-12 17:28:51,853 [1] DEBUG Emc.Documentum.Rest.DataModel.Repository -
{
"id": "https://xxx:8899/rest/repositories/myrep",
"title": "DQL query results",
"updated": "2018-09-12T17:28:51.811-04:00",
"total": 0,
"items-per-page": 0,
"page": 0,
"author": [
{
"name": "EMC Documentum"
}
],
"entries": [
{
"id": "https://xxx:8899/rest/repositories/myrep?inline=True&links=True&page=1&include-total=False&dql=select%20r_object_id%20from%20custom_document%20where%20i_latest_flag=1%20and%20i_chronicle_id='09031d4580be05cc'&index=0",
"title": "09031d4580be05cc",
"updated": "2018-09-12T17:28:51.811-04:00",
"author": [],
"content": {
"name": "query-result",
"properties": {
"r_object_id": "09031d4580be05cc"
}
},
"score": 0.0
}
],
"links": [
{
"rel": "self",
"href": "https://xxx:8899/rest/repositories/myrep?inline=True&links=True&page=1&include-total=False&dql=select%20r_object_id%20from%20custom_document%20where%20i_latest_flag=1%20and%20i_chronicle_id='09031d4580be05cc'"
}
]
}
The text was updated successfully, but these errors were encountered: