Adding files externally problem

135 views
Skip to first unread message

Daniel Jao

unread,
Jun 28, 2011, 3:40:37 AM6/28/11
to openmeet...@googlegroups.com
Hi Sebastian,

Im trying to use your new SOAP APIs, namely the addFolderByExternalUserIdAndType and importFile.

This is my scenario, we have an application that would connect to the OpenMeeting, but before that, we want to upload all the user resources so he does not need to upload it 1 by 1 in openmeeting.

So base on the API, i think i needed to call the addFolderByExternalUserIdAndType, and importFile (multiple times depending on the number of files).

My Issue is the ff:

1.  I tried calling addFolderByExternalUserIdAndType, here's a snippet of my code:

$params = array(
                        'SID' => $session_id,
                        'externalUserId' => $user_id,
                        'parentFileExplorerItemId'=>0,
                        'filename'=>$folderName,
                        'room_id' => $roomId,
                        'isOwner ' => true,
                        'externalType'=>$user_type,
                        'externalFilesid' => 1                  
                );
$resp = $file_client->addFolderByExternalUserIdAndType($params);

The response is a blank object, i tried looking at the fileexploreritem table, but it didnt add anything.

2.  I tried adding a file using the importFile, with the code snippet below:

$params = array(
                        'SID' => $session_id,
                        'externalUserId' => $user_id,
                        'externalType'=>$user_type,
                        'externalFileId' => 1,  //fix this one
                        'room_id' => $roomId,
                        'isOwner ' => true,
                        'parentFolderId' => -2,
                        'path'=>'http://TEST SERVER/media/assets/knowledgebase/22/1308832914_3_uploadfile_03.jpg',
                        'fileSystemName'=>'1308832914_3_uploadfile_03.jpg',
                       
                );
               
$resp = $file_client->importFile($params);

But the result i got was

Fatal error:  Uncaught SoapFault exception: [soapenv:Server] For input string: "1308832914_3_uploadfile_03.jpg" in D:\openmeetingTest.php:119
Stack trace:
#0 [internal function]: SoapClient->__call('importFile', Array)
3.  Do i need to add a user in the system first?

Please let me know if im doing something wrong.


Thanks,
Daniel

seba....@gmail.com

unread,
Jun 28, 2011, 3:50:09 AM6/28/11
to openmeet...@googlegroups.com
you should either create an account first with the new *add* method,
so that the user with this externalUserId does really exist or you use
the other SOAP call that has no externalUserId. (or you just make sure
that this particular externalUserId does already exist by using it one
time. But I think in your case you should use the addUserxyz method
first)

Sebastian

2011/6/28 Daniel Jao <dani...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/openmeetings-user/-/l2AYZ3ihvk0J.
> To post to this group, send email to openmeet...@googlegroups.com.
> To unsubscribe from this group, send email to
> openmeetings-u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/openmeetings-user?hl=en.
>

--
Sebastian Wagner
http://www.webbase-design.de
http://openmeetings.googlecode.com
http://www.wagner-sebastian.com
seba....@gmail.com

seba....@gmail.com

unread,
Jun 28, 2011, 3:51:33 AM6/28/11
to openmeet...@googlegroups.com
addNewUserWithExternalType

2011/6/28 seba....@gmail.com <seba....@gmail.com>:

Daniel Jao

unread,
Jun 28, 2011, 4:51:23 AM6/28/11
to openmeet...@googlegroups.com
hi seba,

i tried calling the addNewUserWithExternalType, heres a snippet of the code:

addNewUserWithExternalType($sessionId, 'Test user name', 'testpass', 'jao', 'daniel', 'danie...@yahoo.com', '', '', '', '', '', '', '', '', '', 3, "Testing Server");

function addNewUserWithExternalType($sessionId, $username, $userpass, $lastname, $firstname, $email, $additionalname, $street, $zip, $fax, $states_id, $town, $language_id, $baseURL, $jNameTimeZone, $externalUserId, $externalUserType){
$user_client = new SoapClient(OPEN_MEETING_USER_URL);

$params = array(
                                'SID' => $session_id,
                                'username' => $username,
                                'userpass' => $userpass,
                                'lastname' => $lastname,
                                'firstname' => $firstname,
                                'email' => $email,
                                'additionalname' => $additionalname,
                                'street' =>$street,
                                'zip' => $zip,
                                'fax' => $fax,
                                'states_id' => $states_id,
                                'town' => $town,
                                'language_id' => $language_id,
                                'jNameTimeZone' => $jNameTimeZone,
                                'externalUserId' => $externalUserId,
                                'externalUserType' => $externalUserType
                                );

                               
$resp = $user_client->addNewUserWithExternalType($params);
print_r($resp);
}

im getting this:

stdClass Object
(
[return] => -26
)

What seems to be the problem here?

seba....@gmail.com

unread,
Jun 28, 2011, 5:44:46 AM6/28/11
to openmeet...@googlegroups.com
the SOAP Calls that are manipulating the Users need an Admin Account
for the manipulation,
that only a User with Web-Service User-Level. Die you use an Admin
Account when you did
authentificate via SOAP?

Sebastian

2011/6/28 Daniel Jao <dani...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/openmeetings-user/-/fpnZXrKa2MwJ.

Daniel Jao

unread,
Jun 28, 2011, 6:01:32 AM6/28/11
to openmeet...@googlegroups.com
hi seba,

i was able to make the addNewUserWithExternalType work, so next is how to add a folder and a file?

1.  How can i add folder? -> addFolderByExternalUserIdAndType ? -> i tried this an im getting

my parameters in my case are:

Array
(
[SID] => d3fe708a00797c170a18045fa5ebafc1
[externalUserId] => 1
[parentFileExplorerItemId] => 0
[filename] => Test folder
[room_id] => 43
[isOwner ] => 1
[externalType] => Test Server
[externalFilesid] => 0
)

stdClass Object
(
[return] =>

)

2.  How can i add file? -> importFileByInternalUserId, -> i tried this an im getting this error:
Fatal error:  Uncaught SoapFault exception: [soapenv:Server] For input string: "1308832914_3_uploadfile_03.jpg" 

Let me know where i am doing wrong,

thanks,
daniel

seba....@gmail.com

unread,
Jun 28, 2011, 6:03:53 AM6/28/11
to openmeet...@googlegroups.com
please check the actual list of params, I have changed some yesterday.

The error number 2) means that you call the function with the wrong params.

The error 1) does not say so much, you need to check the
red5.log/console output and maybe also it was just successful.

Sebastian

2011/6/28 Daniel Jao <dani...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/openmeetings-user/-/ABDpMvc2UK0J.

Daniel Jao

unread,
Jun 28, 2011, 6:10:38 AM6/28/11
to openmeet...@googlegroups.com
hi seba,

for #2, im passing this parameters: which i checked is correct base on the doc now:


$params = array(
                        'SID' => $session_id,
                        'internalUserId' => $internalUserId,

                        'externalType'=>$user_type,
                        'externalFileId' => 1,
                        'room_id' => $roomId,
                        'isOwner ' => true,
                        'parentFolderId' => -2,
                        'path'=>'http://tempserver/media/assets/knowledgebase/22/1308832914_3_uploadfile_03.jpg',

                        'fileSystemName'=>'1308832914_3_uploadfile_03.jpg',
                       
                );               
                   
but im getting that error, are my params correct?

seba....@gmail.com

unread,
Jun 28, 2011, 6:18:46 AM6/28/11
to openmeet...@googlegroups.com
at least you are using the params in the wrong order:
http://code.google.com/p/openmeetings/source/browse/trunk/singlewebapp/src/fileservice/org/openmeetings/axis/services/FileService.java#73

http://code.google.com/p/openmeetings/wiki/SoapMethods#importFile

Sebastian

2011/6/28 Daniel Jao <dani...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/openmeetings-user/-/mSiQY1kGVucJ.

Daniel Jao

unread,
Jun 28, 2011, 6:31:24 AM6/28/11
to openmeet...@googlegroups.com
i tried changing my code to follow the correctformat:

Array
(
[SID] => 9b7e2662b4eedb3796520216b42be573
[externalUserId] => 7
[externalFileId] => 1
[externalType] => Testing Server
[room_id] => 54
[isOwner ] => 1
[path] => http://testserver/media/assets/knowledgebase/22/1308832914_3_uploadfile_03.jpg
[parentFolderId] => -2
[fileSystemName] => 1308832914_3_uploadfile_03.jpg
)
but im having the same error, any insights?

seba....@gmail.com

unread,
Jun 28, 2011, 7:29:36 AM6/28/11
to openmeet...@googlegroups.com
What is the output error?
If it remains the same, I am quite sure its still sth with the list of params.
Otherwise you would find some exception in the log, but I guess it
never reaches that point, the Gateway does not even accept your
params.

Sebastian

2011/6/28 Daniel Jao <dani...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/openmeetings-user/-/bXLdTns6-40J.

Daniel Jao

unread,
Jun 28, 2011, 8:49:08 AM6/28/11
to openmeet...@googlegroups.com
Hi Sebastian,

here's an update.

1.  I was able to make the addNewUserWithExternalType work.  so im good with this.

2.  for the addFolderByUserId -> its slightly working, i said this because given the correct parameters, im able to retrieve a fileexploreritem_id, but when i checked the db, i saw some issue:

Please verify if im correct:

when i check the row record, the room_id that i passed when i called the api call, is being used as the filename column in fileexploreritem, i would say this is wrong, and the room_id column in the same table is being set to 0, im 100% sure that the way i call the api is correct: here's the param i use:

userId is the openmeeting user id, i hard coded it for now
Array
(
[SID] => 049c86afc17f9e785db934265c9a5adf
[userId] => 8
[parentFileExplorerItemId] => 0
[filename] => Test Folder
[room_id] => 63
[isOwner ] => 1
[externalFilesid] => 0
[externalType] => Testing
)
3.  For the addFolderByUserId, its not working because i keep on getting
Fatal error:  Uncaught SoapFault exception: [soapenv:Server] For input string: "1308832914_3_uploadfile_03.jpg" 

let me know what you think.

Do you have any php script that you used to test this one, maybe i can play with that one as well if you have.

seba....@gmail.com

unread,
Jun 28, 2011, 9:31:57 AM6/28/11
to openmeet...@googlegroups.com
Hi Daniel,

I think for 2. / 3. you are mixing things up,
the API Method in 2. should be called
*addFolderByExternalUserIdAndType* and it has different params then
*addFolderByUserId*

plese review it, I have removed one argument yesterday, there was a
duplicated param externalUserType in the previous approch from me:
http://code.google.com/p/openmeetings/source/browse/trunk/singlewebapp/src/fileservice/org/openmeetings/axis/services/FileService.java#244

http://code.google.com/p/openmeetings/wiki/SoapMethods#addFolderByExternalUserIdAndType

So make sure you are using the latest code with that API.

For the 3. Issue you have the same problem like initially => Your
params just do not meet the method's signature.


Sebastian


2011/6/28 Daniel Jao <dani...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/openmeetings-user/-/_2fyzI0FKMoJ.

Daniel Jao

unread,
Jun 28, 2011, 9:57:14 AM6/28/11
to openmeet...@googlegroups.com
hi sebastian,

sorry for the mistype.

i meant for #2 is addFolderByUserId,

im using the ff params:

Array
(
[SID] => 103b1812e3a98369306a16eb63c51a61

[userId] => 8
[parentFileExplorerItemId] => 0
[filename] => Test Folder
    [room_id] => 65

[isOwner ] => 1
[externalFilesid] => 0
[externalType] => Testing
)


and for #3 is importFileByInternalUserId

im using the ff params:

Array
(
[SID] => 103b1812e3a98369306a16eb63c51a61
[internalUserId] => 8
[externalType] => Testing Server
[externalFileId] => 1
[room_id] => 65
[isOwner ] => 1
[parentFolderId] => -2
[path] => http://devserver/media/assets/folder/29/1308894254_3_uploadfile_table.xls
[fileSystemName] => 1308894254_3_uploadfile_table.xls
)
im sure im using the correct params and its in the proper order

thanks,
daniel

seba....@gmail.com

unread,
Jun 28, 2011, 9:59:27 AM6/28/11
to openmeet...@googlegroups.com
Hi Daniel,

it is that simple:
If the error value is *fail for input string xyz* the Gateway has
rejected your params, so there is sth wrong with it.

Sebastian

2011/6/28 Daniel Jao <dani...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/openmeetings-user/-/0qhwuaCWUjIJ.

Daniel Jao

unread,
Jun 28, 2011, 10:07:52 AM6/28/11
to openmeet...@googlegroups.com
hi sebastian,

my question is when i use the addFolderByUserId, why is it that the room_id is the one being use as the filename in the fileexploreritem table? is this correct?  as i said, i used this parameters:

Array
(
[SID] => 103b1812e3a98369306a16eb63c51a61

[userId] => 8
[parentFileExplorerItemId] => 0
[filename] => Test Folder
[room_id] => 65

[isOwner ] => 1
[externalFilesid] => 0
[externalType] => Testing
)

im attaching a screenshot of the db, please confirm if my question is valid.

For the 

If the error value is *fail for input string xyz* the Gateway has
rejected your params, so there is sth wrong with it.

What would you say is wrong with the ff params:
Array
(
[SID] => 103b1812e3a98369306a16eb63c51a
61
[internalUserId] => 8
[externalType] => Testing Server
[externalFileId] => 1
[room_id] => 65
[isOwner ] => 1
[parentFolderId] => -2
[path] =>
http://devserver/media/assets/folder/29/1308894254_3_uploadfile_table.xls
[fileSystemName] => 1308894254_3_uploadfile_table.xls
)

Specifically the fileSystemName? base on the doc, i needed to set the filename with extension, which i did.

I really appreciate your help sebastian.
thanks,
daniel

om.png

seba....@gmail.com

unread,
Jun 28, 2011, 10:20:16 AM6/28/11
to openmeet...@googlegroups.com
can you please make a "select filename from fileexploreritem" ^^

the param *filename* is written *fileName*

I don't know for the other params but I am 100% sure that you just
mixed up some values.

Which of the functions are you using now in the end?
*importFileByInternalUserId* or *importFile* ?

Sebastian

2011/6/28 Daniel Jao <dani...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/openmeetings-user/-/3TEhOJSc8lEJ.

Daniel Jao

unread,
Jun 28, 2011, 10:37:26 AM6/28/11
to openmeet...@googlegroups.com
hi sebastiam,

heres the result:

mysql> select filename from fileexploreritem;
+---------------------+
| filename            |
+---------------------+
| Testing             |
| 51                  |
| 52                  |
| 53                  |
| 54                  |
| acadmiacs table.png |
| 61                  |
| 62                  |
| 63                  |
| 64                  |
| 65                  |
+---------------------+
11 rows in set (0.00 sec)

for #2 (adding of folder), im using addFolderByUserId

as i said, i have the sample params as this one:

Array
(
[SID] => 103b1812e3a98369306a16eb63c51a61
[userId] => 8
[parentFileExplorerItemId] => 0
[filename] => Test Folder
[room_id] => 65
[isOwner ] => 1
[externalFilesid] => 0
[externalType] => Testing
)



while for adding of file, im using importFileByInternalUserId.

id like to figure out adding of folder first so i can move on to adding of files.

thanks,
daniel

seba....@gmail.com

unread,
Jun 28, 2011, 10:48:25 AM6/28/11
to openmeet...@googlegroups.com
as I said before the param is not called *filename* its called *fileName*
review:
http://code.google.com/p/openmeetings/source/browse/trunk/singlewebapp/src/fileservice/org/openmeetings/axis/services/FileService.java#310

public Long addFolderByUserId(String SID, Long userId,
                       Long parentFileExplorerItemId, String fileName, Long room_id, Boolean isOwner,
                       Long externalFilesid, String externalType)


Sebastian

2011/6/28 Daniel Jao <dani...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/openmeetings-user/-/HGKl0H7V26QJ.

Daniel Jao

unread,
Jun 28, 2011, 11:48:34 AM6/28/11
to openmeet...@googlegroups.com
hi sebastian,

i was able to make the addFolderByUserId work, but i have some questions for you:

1.  Im seeing it in public drive, i want it to be seen in the my home drive, what parameters should i pass?  currently im using this parameters

array(
                        'SID' => $sessionId,
                        'userId' => $openmeetingUserId,
                        'parentFileExplorerItemId'=>0,
                        'fileName'=>$folderName,

                        'room_id' => $roomId,
                        'isOwner ' => true,
                        'externalFilesid' => 0,  //fix this one
                        'externalType'=>$user_type
                       
                );

2.  Is this a per room, meaning if the same user goes in to another room, would it still show the old folders?

thanks,
daniel

seba....@gmail.com

unread,
Jun 28, 2011, 11:54:13 AM6/28/11
to openmeet...@googlegroups.com
The params to specifiy to make it go into the private folder are ...
http://code.google.com/p/openmeetings/wiki/SoapMethods#importFile

..
Quote:

Description: Import file from external source to upload a file to a room-drive you specify:

  • externalUserId, user if of openmeetings user for which we upload the file
  • room_id = openmeetings room id
  • isOwner = 0
  • parentFolderId = 0

to upload a file to a private-drive you specify:

  • externalUserId, user if of openmeetings user for which we upload the file
  • room_id = openmeetings room id
  • isOwner = 1
  • parentFolderId = -2
    For Boolean Values 0 and false or 1 and true have the same meaning.

    *Is this a per room, meaning if the same user goes in to another room, would it still show the old folders?*
    =>The files in the private folder are bound to the user, so they stay the same in all conference rooms and are only visible to the user.
    Files in the public folder are bound to the conference room, they are accessible by everybody, but if you change the conference room, you have a new public drive.

    Sebastian


    2011/6/28 Daniel Jao <dani...@gmail.com>
    hi sebastian,


    thanks,
    daniel

    --
    You received this message because you are subscribed to the Google Groups "OpenMeetings User" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/openmeetings-user/-/ULsEbQuAJ0kJ.

    To post to this group, send email to openmeet...@googlegroups.com.
    To unsubscribe from this group, send email to openmeetings-u...@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/openmeetings-user?hl=en.

    Daniel Jao

    unread,
    Jun 28, 2011, 12:04:16 PM6/28/11
    to openmeet...@googlegroups.com
    hmm.. so if  i want my files to be use bounded, then i think i dont need to call the addFolderByUserId anymore, let me focus then on importFileByInternalUserId.

    question:


    array(
                            'SID' => $session_id,
                            'internalUserId' => $internalUserId,
                            'externalType'=>$user_type,
                            'externalFileId' => $fileId,  //fix this one

                            'room_id' => $roomId,
                            'isOwner ' => true,
                            'parentFolderId' => -2,
                            'path'=>'http:/temp/media/assets/folder/29/1308894254_3_uploadfile__table.xls',
                            'fileSystemName'=>'1308894254_3_uploadfile__table.xls'
                           
                    );       

    1.  What should be the path? should it point to the file itself?
    2.  Any restriction on the fileSystemName?

    seba....@gmail.com

    unread,
    Jun 28, 2011, 12:08:39 PM6/28/11
    to openmeet...@googlegroups.com
    public FileImportError[] importFileByInternalUserId(
    String SID,                                        'SID' => $session_id,
    Long internalUserId,                           'internalUserId' => $internalUserId,
    Long externalFileId,                            MISSING
    String externalType,                           'externalType'=>$user_type,
    Long room_id,                                   'room_id' => $roomId,
    boolean isOwner,                               'isOwner ' => true,
    String path,                                       'parentFolderId' => -2,
    Long parentFolderId,                          'path'=>'http:/temp/media/assets/folder/29/1308894254_3_uploadfile__table.xls',
    String fileSystemName                       'fileSystemName'=>'1308894254_3_uploadfile__table.xls'

    )


    See the things in red that are wrong.


    Sebastian


    2011/6/28 Daniel Jao <dani...@gmail.com>
    >
    > --
    > You received this message because you are subscribed to the Google Groups "OpenMeetings User" group.
    > To view this discussion on the web visit https://groups.google.com/d/msg/openmeetings-user/-/1wbIXKWvd_YJ.

    seba....@gmail.com

    unread,
    Jun 28, 2011, 12:10:05 PM6/28/11
    to openmeet...@googlegroups.com
    okay maybe I did oversee your filesId but the params are still in the wrong order.

    Sebastian

    Daniel Jao

    unread,
    Jun 28, 2011, 12:15:14 PM6/28/11
    to openmeet...@googlegroups.com
    ok, sorry,  i already fixed the ordering but having still the same error:

      String SID, Long internalUserId, Long externalFileId,
                                            String externalType, Long room_id, boolean isOwner, String path,
                                            Long parentFolderId, String fileSystemName
                                           
      Array
    (
        [SID] => 42402a128cbac7b737d79aa4446688aa
        [internalUserId] => 14
        [externalFileId] => 1
        [externalType] => 12345
        [room_id] => 98
        [isOwner ] => 1
        [path] => http://server/media/assets/folder/29/1308894254_3_uploadfile_table.xls
        [parentFolderId] => -2
        [fileSystemName] => 1308894254_3_uploadfile_table.xls
    )

    do you see any issue here?

    seba....@gmail.com

    unread,
    Jun 28, 2011, 12:19:42 PM6/28/11
    to openmeet...@googlegroups.com
    Actually those values look fine to me.
    However as long as the method returns something is wrong with your
    string there is still any issue somewhere in your code.

    Sebastian

    2011/6/28 Daniel Jao <dani...@gmail.com>
    >

    > --
    > You received this message because you are subscribed to the Google Groups "OpenMeetings User" group.

    > To view this discussion on the web visit https://groups.google.com/d/msg/openmeetings-user/-/QSc3L1WY5_MJ.

    Daniel Jao

    unread,
    Jun 28, 2011, 12:28:41 PM6/28/11
    to openmeet...@googlegroups.com
    this is really weird, what i do is just create this parameters

    Array
    (
    [SID] => 0e4348655ca6e5e7d5f7128889a2de0e

    [internalUserId] => 14
    [externalFileId] => 1
    [externalType] => 12345
        [room_id] => 107
    [isOwner ] => 1
    [path] => http://www.uscis.gov/files/form/i-9.pdf
    [parentFolderId] => -2
    [fileSystemName] => i-9.pdf

    )

    then call the importFileByInternalUserId soap call, i made sure the sid is logged in. :(

    seba....@gmail.com

    unread,
    Jun 28, 2011, 12:39:37 PM6/28/11
    to openmeet...@googlegroups.com
    what is the error it does return?

    Sebastian

    2011/6/28 Daniel Jao <dani...@gmail.com>:

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/xxh3ILExJzcJ.

    seba....@gmail.com

    unread,
    Jun 28, 2011, 12:40:54 PM6/28/11
    to openmeet...@googlegroups.com
    there is a blank behind *isOwner * is that normal or just a formatting issue?

    Sebastian

    2011/6/28 seba....@gmail.com <seba....@gmail.com>:

    Daniel Jao

    unread,
    Jun 28, 2011, 12:52:23 PM6/28/11
    to openmeet...@googlegroups.com
    that was it, you're the man sebastian, apologies for that one, let me play with this one.

    thanks,
    daniel

    Daniel Jao

    unread,
    Jun 29, 2011, 2:55:02 AM6/29/11
    to openmeet...@googlegroups.com
    hi sebastian,

    is there a way to create a private folder in the my drive?

    seba....@gmail.com

    unread,
    Jun 29, 2011, 3:55:55 AM6/29/11
    to openmeet...@googlegroups.com
    What you mean is creating a simple folder in the private drive. A
    folder is a folder no matter if its in the private drive or public
    drive.

    I think its the same like uploading a file to the private drive,
    isOwner => 1/true + parentFileExplorerItemId = -2 and externalUserId
    (or userId depending on if you're using
    addFolderByExternalUserIdAndType or addFolderByUserId) set to an valid
    user object (either external or internal Id).

    Sebastian


    2011/6/29 Daniel Jao <dani...@gmail.com>:


    > hi sebastian,
    >
    > is there a way to create a private folder in the my drive?
    >

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/9CFWiSohIWcJ.

    Daniel Jao

    unread,
    Jun 29, 2011, 4:35:24 AM6/29/11
    to openmeet...@googlegroups.com
    how do i know if the importFile was succesful or not? do i need to check for any values?

    seba....@gmail.com

    unread,
    Jun 29, 2011, 4:41:44 AM6/29/11
    to openmeet...@googlegroups.com
    You get back an array of objects => FileImportError[]

    FileImportError:
    http://code.google.com/p/openmeetings/source/browse/trunk/singlewebapp/src/fileservice/org/openmeetings/axis/services/FileImportError.java

    Each FileImportError has an attribute exitValue
    If all objects of the return array have the exitValue == 0 then the
    import was okay.

    Otherwise you can find the error message in the attributes error/process/command


    Sebastian

    2011/6/29 Daniel Jao <dani...@gmail.com>:


    > how do i know if the importFile was succesful or not? do i need to check for
    > any values?
    >

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/Wm15HzPpSAoJ.

    Daniel Jao

    unread,
    Jun 29, 2011, 5:10:49 AM6/29/11
    to openmeet...@googlegroups.com
    ok.. i thought of that.. jsut wanted to confirm, thanks!

    Daniel Jao

    unread,
    Jun 30, 2011, 4:05:49 AM6/30/11
    to openmeet...@googlegroups.com
    hi sebastian, im making headway to what i want to do, thanks to you.

    but i have a few more inquiries, i tried doing what you said, passing parentFileExplorerItemId as -2 cause i want to add a private folder (so it can contain files and make it more organized)

    i used the api call:
    addFolderByExternalUserIdAndType
    Array
    (
    [SID] => 3884344c1bfc6d5f42e001846b92d025
    [externalUserId] => 50
    [parentFileExplorerItemId] => -2
    [fileName] => Test folder 1
    [room_id] => 191

    [isOwner ] => 1
    [externalFilesid] => 0
        [externalType] => 1309420927
    )

    Results:

    stdClass Object
    (
    [return] =>
    )
    but it didnt work.

    let me know if im doing something wrong.

    i appreciate all your help.

    thanks,
    daniel

    seba....@gmail.com

    unread,
    Jun 30, 2011, 4:26:08 AM6/30/11
    to openmeet...@googlegroups.com
    isOwner has the blank again ...

    2011/6/30 Daniel Jao <dani...@gmail.com>:

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/yENy0jpCSf4J.

    Daniel Jao

    unread,
    Jun 30, 2011, 6:07:38 AM6/30/11
    to openmeet...@googlegroups.com
    you're right sebastian.

    after fixing the code, it worked, it created the folder in the DB but im not seeing it after i log in, but when i checked the db, the owner_id column in fileexploreritem_id is not being populated

    im passing this params to

    addFolderByUserId


    Array
    (
    [SID] => 9b1ba54842880c72bdf3b704536fb381
    [userId] => 29
    [parentFileExplorerItemId] => -2
    [fileName] => Test Folder 1
    [room_id] => 194

    [isOwner] => 1
    [externalFilesid] => 0
        [externalType] => 1309428179
    )
    please confirm if this behavior is correct.

    seba....@gmail.com

    unread,
    Jun 30, 2011, 6:12:26 AM6/30/11
    to openmeet...@googlegroups.com
    Params look okay,

    I cannot verify before tonigh on my local installation.


    Sebastian

    2011/6/30 Daniel Jao <dani...@gmail.com>:

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/IkcrUAZfhfoJ.

    seba....@gmail.com

    unread,
    Jun 30, 2011, 6:15:19 AM6/30/11
    to openmeet...@googlegroups.com
    Oh,

    if that folder goes into the private section try with:

    parentFileExplorerItemId == 0 instead of -2


    Sebastian

    2011/6/30 seba....@gmail.com <seba....@gmail.com>:

    Daniel Jao

    unread,
    Jun 30, 2011, 8:38:16 AM6/30/11
    to openmeet...@googlegroups.com
    hi seba, i tried with 0 and -2 for the addFolderByUserId but i didnt see it in my "Home Drive",

    im reading the code, i think line 266 might have a problem, correct me if im wrong.

    http://code.google.com/p/openmeetings/source/browse/trunk/singlewebapp/src/fileservice/org/openmeetings/axis/services/FileService.java#310

    base on the snippet:

     if (parentFileExplorerItemId == 0 && isOwner) {
                        // users_id (OwnerID) => only set if its directly root in
                        // Owner Directory,
                        // other Folders and Files maybe are also in a Home
                        // directory
                        // but just because their parent is
                        return FileExplorerItemDaoImpl.getInstance().add(fileName,
                                "", parentFileExplorerItemId, users_id, room_id,
                                userId, true, // isFolder
                                false, // isImage
                                false, // isPresentation
                                "", // WML Path
                                false, // isStoredWML file
                                false, // isXmlFile
                                externalFilesid, externalType);

    users_id should be set if i want it to be in the root of the owner directory, but looking at the code, users_id is being retrieve using the SID that was passed in the function, the problem im seeing here is that if this was called by the api, how would the SID related it to the openmeeting user id?  base on the DB, the owner_id im getting is 0,

    let me know what you think. 

    thanks,
    daniel

    seba....@gmail.com

    unread,
    Jun 30, 2011, 8:46:51 AM6/30/11
    to openmeet...@googlegroups.com
    Hi Daniel,

    yes that seems right, the first occourence of user-ID should be called
    *userId* not user_id.
    I have commited a fix to the SVN.

    Sebastian

    2011/6/30 Daniel Jao <dani...@gmail.com>:

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/oTwX1RM17kgJ.

    seba....@gmail.com

    unread,
    Jun 30, 2011, 3:50:11 PM6/30/11
    to openmeet...@googlegroups.com
    Daniel,

    I have changed the API again, to bring importFile and addFolder on the
    same level:

    addFolderByUserId
    addFolderByExternalUserIdAndType

    parentFileExplorerItemId == -2 && isOwner
    => make the folder goto the private section

    the param fileName is renamed to "folderName"


    Sebastian

    2011/6/30 seba....@gmail.com <seba....@gmail.com>:

    Daniel Jao

    unread,
    Jul 1, 2011, 2:22:06 AM7/1/11
    to openmeet...@googlegroups.com
    hi sebastian,

    i tried applying the new code.  it was able to add the folder and the files. but when you login, you wont see those files.

    i went straight to the db and change the parent_fileexploreritem_id to 0 instead of -2 and it appeared now.

    so i think you might needto change this one

     if (parentFileExplorerItemId == -2 && isOwner) {

                        // users_id (OwnerID) => only set if its directly root in
                        // Owner Directory,
                        // other Folders and Files maybe are also in a Home
                        // directory
                        // but just because their parent is
                        return FileExplorerItemDaoImpl.getInstance().add(folderName,
                                "", parentFileExplorerItemId, userId, room_id,

                                userId, true, // isFolder
                                false, // isImage
                                false, // isPresentation
                                "", // WML Path
                                false, // isStoredWML file
                                false, // isXmlFile
                                externalFilesid, externalType);


    TO (we need to pass 0 instead of -2)

     if (parentFileExplorerItemId == -2 && isOwner) {

                        // users_id (OwnerID) => only set if its directly root in
                        // Owner Directory,
                        // other Folders and Files maybe are also in a Home
                        // directory
                        // but just because their parent is
                        return FileExplorerItemDaoImpl.getInstance().add(folderName,
                                "", 0, userId, room_id,

                                userId, true, // isFolder
                                false, // isImage
                                false, // isPresentation
                                "", // WML Path
                                false, // isStoredWML file
                                false, // isXmlFile
                                externalFilesid, externalType);


    let me know

    Daniel Jao

    unread,
    Jul 1, 2011, 3:04:59 AM7/1/11
    to openmeet...@googlegroups.com
    another feedback, when i changed the fileName to folderName, i keep on getting  Uncaught SoapFault exception: [soapenv:Server] For input string: "true"

    but when i return it to fileName, its working on my side, can you please confirm as well if its really causing problems, although i think it should not

    seba....@gmail.com

    unread,
    Jul 1, 2011, 3:19:01 AM7/1/11
    to openmeet...@googlegroups.com
    Hallo Daniel,

    yes thats right -2 should be translated to 0 before storing it. I have
    commited a patch for that.
    But the param name is folderName now.

    Sebastian

    2011/7/1 Daniel Jao <dani...@gmail.com>:

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/kgd4cDvalC4J.

    Daniel Jao

    unread,
    Jul 4, 2011, 11:28:36 PM7/4/11
    to openmeet...@googlegroups.com
    Hi Sebastian,

    Just want to confirm this one.

    I tried using the new code, for the addFolderByExternalUserIdAndType which uses the folderName.

    But im having this issue:

    Array
    (
    [SID] => 820e5e70684223a6746e7c8265bd98d3
    [externalUserId] => 1
    [parentFileExplorerItemId] => -2
    [folderName] => Test folder name
    [room_id] => 1
    [isOwner] => 1
    [externalFilesid] => 1309834980
    [externalType] => http://ourserver.com:5080/openmeetings/
    )
    Exception caught: For input string: "true"
    , which i didnt encountered when the param name is fileName.

    Can you please confirm on your side if its working on your side or not.  I believe that it should be working but im not sure why this is not.  Not sure also if the parameter Boolean has effect cause when i check the other methods, you are using the small letter boolean.

    let me know.

    Daniel Jao

    unread,
    Jul 5, 2011, 12:16:29 AM7/5/11
    to openmeet...@googlegroups.com
    please let me know if you your testing worked, cause i tried changing the code ang changing the folderName to fileName worked.  please let me know your findings.

    thanks,
    daniel

    seba....@gmail.com

    unread,
    Jul 5, 2011, 4:28:57 AM7/5/11
    to openmeet...@googlegroups.com
    Hi Daniel,

    if you are using the latest sources I am quite sure that the param
    name is folderName not fileName.

    The param *externalType* can be any random string, just make sure that
    its always the same random string, for example "moodle". No need to
    put any URL in that.

    you might try isOwner = true instead of 1.

    Sebastian


    2011/7/5 Daniel Jao <dani...@gmail.com>:

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/HmrzKU30lkMJ.

    Daniel Jao

    unread,
    Jul 5, 2011, 4:40:19 AM7/5/11
    to openmeet...@googlegroups.com
    hi sebastian,

    yep i know that the new code is using the folderName but the weird thing is when i change my call from fileName to folderName, it didnt work anymore.

    Actually for the boolean, im really using true, its just the way php handles it, but that should not be a problem because im able to call the importFile using the same parameter for the boolean. 

    The externalType im using is correct, just changed it here in the forum for security wise, but im using a standard externalType for all my call, as i ve said, i was able  to make the code work using the fileName, im deploying from source code so im able to change the param from fileName to folderName.

    let me know if you think of something

    Daniel Jao

    unread,
    Jul 5, 2011, 4:49:33 AM7/5/11
    to openmeet...@googlegroups.com
    please let me know after after you have test the code.. i know this is really word, a simple param name change should not affect this at all but its really not working on my side

    Daniel Jao

    unread,
    Jul 5, 2011, 4:50:56 AM7/5/11
    to openmeet...@googlegroups.com
    do you think the the parameter isOwner Boolean and boolean has any difference?

    seba....@gmail.com

    unread,
    Jul 5, 2011, 4:53:49 AM7/5/11
    to openmeet...@googlegroups.com
    no

    I have tested those function several times.

    Sebastian

    2011/7/5 Daniel Jao <dani...@gmail.com>:


    > do you think the the parameter isOwner Boolean and boolean has any
    > difference?
    >

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/Hiz7NwU-UP0J.

    Daniel Jao

    unread,
    Jul 5, 2011, 5:53:32 AM7/5/11
    to openmeet...@googlegroups.com
    i was able to make it work, i jsut use the addFolderByUserId instead since i was keeping track of the openmeeting user id as well on my application, thanks!

    seba....@gmail.com

    unread,
    Jul 5, 2011, 6:01:33 AM7/5/11
    to openmeet...@googlegroups.com
    Okay,

    have a look at http://code.google.com/p/openmeetings/source/detail?r=3955

    I've just added some more File-Operation SOAP/REST Calls. For example:

    moveFile:
    http://code.google.com/p/openmeetings/source/browse/trunk/singlewebapp/src/fileservice/org/openmeetings/axis/services/FileService.java?spec=svn3955&r=3955#592

    updateFileOrFolderName:
    http://code.google.com/p/openmeetings/source/browse/trunk/singlewebapp/src/fileservice/org/openmeetings/axis/services/FileService.java?spec=svn3955&r=3955#569

    Sebastian

    2011/7/5 Daniel Jao <dani...@gmail.com>:


    > i was able to make it work, i jsut use the addFolderByUserId instead since i
    > was keeping track of the openmeeting user id as well on my application,
    > thanks!
    >

    > --
    > You received this message because you are subscribed to the Google Groups
    > "OpenMeetings User" group.
    > To view this discussion on the web visit

    > https://groups.google.com/d/msg/openmeetings-user/-/BC3eOpGb8SAJ.

    Reply all
    Reply to author
    Forward
    0 new messages