cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello SCP Document Service experts,

we want to use the SCP Document Service from HANA XSJS (XS Classic, XSC). For that I've implemented a Proxy Bridge in Java to be able to call the Document Service via HTTPS and OAuth / Basic authentication. Using this Proxy I can already create a new document and read it from HANA XS.

But before uploading a document I want to check if for this business object already a document exists. Based on the example I've found in the document CMIS Browser Binding Proposal - Oasis I've added the following

<form id="queryForm" action="" method="GET">
<input name="cmisaction" type="hidden" value="query" />
<table>
<tr><td>Query:</td><td><input name="statement" type="text" size="100" maxlength="1000" 
value="SELECT * FROM cmis:document 
WHERE cmis:name = '00b83148-5d86-aebe-84e0-332ef729a0c3'"></td></tr>
<tr><td>Max Items:</td><td><input name="maxItems" type="text" size="4" maxlength="8" value="100"></td></tr>
<tr><td>Skip Count:</td><td><input name="skipCount" type="text" size="4" maxlength="8" value="0"></td></tr>
<tr><td></td><td><input type="submit" value="Go" /></td></tr>
</table>
</form>

to the sample that is provided in the Documenation Accessing the Document Service from an HTML5 Application. Unfortunately the result that I've got returned isn't filtered by the cmis:name that I'm looking for. All objects in the folder are returned.

Hope someone can guide me in the right direction.

Best regards
Gregor

View Entire Topic
gregorw
SAP Mentor
SAP Mentor

For the moment I found a workaround using the Atom endpoint. I send a POST with the following payload:

<?xml version='1.0' encoding='utf-8'?>
<cmis:query xmlns='http://www.w3.org/2005/Atom' xmlns:cmis='http://docs.oasis-open.org/ns/cmis/core/200908/'>
	<cmis:statement>SELECT cmis:contentStreamMimeType, cmis:name FROM cmis:document WHERE cmis:name = '00b83148-5d86-aebe-84e0-332ef729a0c3'</cmis:statement>
	<cmis:searchAllVersions>false</cmis:searchAllVersions>
	<cmis:includeAllowableActions>false</cmis:includeAllowableActions>
</cmis:query>
korayyersel
Participant

Hi Gregor,

We are trying to do the same thing and have the same problem. Why did you give up with your first try and used the Atom version? Didn't POST work for you? We are getting following error while trying to use a form with POST:

{ "exception": "notSupported", "message": "Unknown operation" }

It seems like cmisaction=query is not supported. Do you have any tips for us?

Thanks and Regards,

Koray

sreehari_vpillai
Active Contributor
0 Likes

@Koray Yersel - I am also facing the same issue . COuld you resolve it ?

Sreehari