Create Workspace using IWOV services
I have tried creating new workspace using IWOV services.I am able to set all the new workspace properties by using CreateWorkSpacesInput but I am not getting any response by CreateWorkSpacesOutput. Hence, workspace is not created.
Please help !
Comments
-
Hi,
I dont have the sample app.I set the parameters by myslef.
Could you please give me the sample app !!!
Thanks !
0 -
Hi,
I dont have access to WorkSite\Web\Samples folder.Could you tell me the complete path.
Please share the sample code for creating workspace of whatever version you have.
Thanks!
0 -
Thanks for the help !
Now WorkSpace is successfully created refering the sample code but each time it showing the WorkSpace Profile Error.
I am setting Profile and Output Profile parameter to imProfileName as AttributeID and WorkSpace name as value.I guess these parameters are the source of error.
Please help how to remove this error!
0 -
Hi,
Can you post your code? I'm not sure what the problem is
Here's the creation code from the sample:
CreateWorkspacesInput input = new CreateWorkspacesInput();
input.DestinationDatabase = txtCreateWorkspaceDb.Text;
input.Workspaces = workspaces;
input.OutputProfile = outPutProfile;
input.OutputMask = ServicesClientUtility.GetWorkspaceOutputMask(true, true, true, true, true);
CreateWorkspacesOutput output = connection.IWOVServices.CreateWorkspaces(input);
txtCreateWkspcOutput.Text = ServicesClientUtility.GetWorkspaceOperationOutputString(output.Workspaces, output.Errors);
0 -
That code is same.I am asking for parameter values.I paasssed the following but getting error.Please tell me the parameter values to be passed:
IWOVService WSWSvcs = new IWOVServices();
// Attempt to authenticate
WSWSvcs.PreAuthenticate =
true;
WSWSvcs.AllowAutoRedirect =
true;
WSWSvcs.Credentials = System.Net.
CredentialCache.DefaultCredentials;
ProfileItem[] profile = ServiceClientUtility.ConvertProfile("imProfileName,Hieee");
imProfileAttributeID[] outPutProfile = ServiceClientUtility.ConvertProfileMask("imProfileName,Hieee");
ObjectSecurity security = ServiceClientUtility.ConvertSecurity("Group, DOMAIN USERS, imRightReadWrite", "imPrivate", false);
CustomProperty[] customProperties = ServiceClientUtility.ConvertCustomProps("imFolderCustom1,custom1\nimFolderCustom2,custom2\nimFolderCustom3,custom3");
AdditionalProperty[] additionalProperties = ServiceClientUtility.ConvertAdditionalProps("");
Notification notification = new Notification();
notification.Subject =
"";
notification.Message =
"Created from Web Service 2";
notification.Recipients =
ServiceClientUtility.ConvertRecipients("User,imgtservice");
NewWorkspace[] workspaces = new NewWorkspace[1];
workspaces[0] =
new NewWorkspace();
workspaces[0].Name =
"Hieee";
workspaces[0].Description =
"Created from Web Service Description 1";
workspaces[0].Category =
"Programs";
workspaces[0].Notification = notification;
workspaces[0].Profile = profile;
workspaces[0].Security = security;
workspaces[0].CustomProperties = customProperties;
workspaces[0].AdditionalProperties = additionalProperties;
CreateWorkspacesInput input = new CreateWorkspacesInput();
input.DestinationDatabase ="CaseManagement";
input.Workspaces = workspaces;
input.OutputProfile = outPutProfile;
input.OutputMask = GetWorkspaceOutputMask(
true, true, true, true, true);
CreateWorkspacesOutput output =WSWSvcs.CreateWorkspaces(input);
TextBox1.Text = GetWorkspaceOperationOutputString(output.Workspaces, output.Errors);
0 -
I'm guessing it's the problem, the outputmask is a bitmask, not a array of profile fields.
from the documentation:To set the value of the OutputMask in the input message, select the properties you want the Web service to return in the output message and add the enumerated values. For example, to include Profile (1), Security (2), DocumentContent (4), and History (8), set the value (1 + 2 + 4 + 8) = 15.
[Flags]
public enum OutputMask
{
Profile = 1,
Security = 2,
DocumentContent = 4,
History = 8,
CustomProperties = 16,
AdditionalProperties = 32,
SubFolders = 64,
FolderContent = 128
}
Hope this helps
0 -
No, its not a problem of OutputMask.It is the problem of setting the value of profile and outputProfile parameters:
ProfileItem
[] profile = ServiceClientUtility.ConvertProfile("imProfileName,Hieee");
imProfileAttributeID[] outPutProfile = ServiceClientUtility.ConvertProfileMask("imProfileName,Hieee");
Please confirm the values passed.
0 -
I tried this, but then also it is giving the same WorkSpace profile error.
Please suggest any other solution !
0 -
Below method creates workspace and returns workspaceOutput.
public CreateWorkspacesOutput CreateWorkspace(string accessSecurity, string wName, string wDatabase, string wCustom6, string wCustom8, string wCustom10, string wCustom11, string wCustom29, string wCustom30, string wTempID, Connection conn)
{
ProfileItem[] profile = ServicesClientUtility.ConvertProfile("imProfileCustom29," + wCustom29 + "\nimProfileCustom30," + wCustom30 + "\nimProfileCustom10," + wCustom10 + "\nimProfileCustom6," + wCustom6 + "\nimProfileCustom11," + wCustom11 + "\nimProfileCustom8," + wCustom8);
iManage.WorkSite.Web.ServicesProxy.IWOVService.imProfileAttributeID[] outPutProfile = ServicesClientUtility.ConvertProfileMask("imProfileCustom29," + wCustom29 + "\nimProfileCustom30," + wCustom30 + "\nimProfileCustom10," + wCustom10 + "\nimProfileCustom6," + wCustom6 + "\nimProfileCustom11," + wCustom11 + "\nimProfileCustom8," + wCustom8);
//CustomProperty[] customProperties = ServicesClientUtility.ConvertCustomProps("imFolderCustom1," + wCustom1);
ObjectSecurity security = ServicesClientUtility.ConvertSecurity(accessSecurity, "imPrivate", true);
NewWorkspace[] workspaces = new NewWorkspace[1];
workspaces[0] = new NewWorkspace();
workspaces[0].Name = wName + " (" + wCustom6 + ")";
workspaces[0].Description = wCustom6;
workspaces[0].TemplateID = wTempID;
workspaces[0].Profile = profile;
workspaces[0].Security = security;
workspaces[0].SubType = "Work";
CreateWorkspacesInput input = new CreateWorkspacesInput();
input.DestinationDatabase = wDatabase;
input.Workspaces = workspaces;
input.OutputProfile = outPutProfile;
input.OutputMask = ServicesClientUtility.GetWorkspaceOutputMask(true, true, false, false, true);
CreateWorkspacesOutput output = conn.IWOVServices.CreateWorkspaces(input);
return output;
}0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 105 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.