It's all about the answers!

Ask a question

getClientLibrary(IFilesystemRestService2.class) returns null

Kevin Eifinger (1211710) | asked Jun 27 '14, 6:21 a.m.
I'm trying to write a client side plugin, which delivers change sets to a stream without having to create a workspace.
For this I'm trying to use the  the following Class to create changesets directly on a stream:
IFilesystemRestService2 restService = (IFilesystemRestService2) repo .getClientLibrary(IFilesystemRestService2.class);

This is used by the web UI. I analyzed the calls my browser makes to find any parameters and services.
However the above method returns null. I suspect this is because the class is located in an *internal* package.

Does anybody have any experiences on that?


Accepted answer

permanent link
sam detweiler (12.5k6195201) | answered Jun 27 '14, 8:11 a.m.
I assume its because there is no client side function to do this.

the web UI always sends a web request to the server, and code runs on the server.
far as I know, there is no function to 'create' scm content via the web ui, only view.
the service is provided (in V5) in
which not part of the client api

the apis are package like this
client - client side only
common - used in both
service - server side only

on the client you will find the .client and .common jars
on the server you will find .common and .service jars

I created a service, and I had to package it the same way
Kevin Eifinger selected this answer as the correct answer

Your answer

Register or to post your answer.