Skip to main content
Version: 2.2.1

newDocument2

This method allows creating a document. To use it, it is necessary to follow the standard documented below:

Java class
Requestweb/wwwroot/ws/java/document/NewDocument2RequestType.java
Returnweb/wwwroot/ws/java/document/NewDocument2ResponseType.java

Request:

ID #RequiredDescription
CategoryIdXCategory ID #.
DocumentIDDocument ID #.
TitleDocument title.
SummaryDocument summary.
DateDocument date. Date format must be Y-M-D (Year-Month-Day).
AttributesDocument attributes:
ID: Attribute ID #;
Value: Attribute value array:
Item: Attribute value
Note: For attributes with a numeric value, the decimal place separator must be "." (dot).
For date attributes, the value must have the “Y-M-D” (Year-Month-Day) format.
ResponsibleUserIDID of the user responsible for the document.
RevisionMembersRevision participants:
MemberType: Participant type:
▪ 1 - User;
▪ 2 - Department;
▪ 3 - Position;
▪ 4 - Department/Position;
▪ 5 - Team.
MemberID: Participant ID #. E.g.: User ID for user control.
STEP: Step. E.g.:1,2,3,4
▪ 1 - Draft;
▪ 2 - Review;
▪ 3 - Approval;
▪ 4 - Release.

Sequence: Sequence. E.g.:2,2,2,2
Deadline: Deadline in days. E.g.: 5
TemplateIDTemplate ID #.
▪ 1 - For the default template of the category.
FilesFiles array:
Name: String; File name.
Content: Stream; Electronic file binary².
Container: Container structure item ID #.
KeywordsKeyword array:
KeywordID : String; Keyword ID #.
LanguageIDDocument language:
1 - English (USA)
2 - Portuguese (Brazil)
3 - Spanish
4 - Portuguese (Portugal)
5 - German
6 - French (France)
7 - Romanian *
8 - Chinese *
9 - Italian
10 - Slovak *
11 - English (United Kingdom)
12 - Turkish *
13 - French (Canada)
14 - Russian *
15 - Polish *
16 - Catalan
17 - Danish
18 - Finnish
19 - Japanese *
RevisionIDRevision ID #
info
  • ¹ - The title will be mandatory if there are no masks for titles in the document category.
  • ² - Content of the electronic file converted to Base64. If you are testing the usage through the web service data source, we suggest converting a small text through a website of your choosing.

* Languages checked with an asterisk are only available on databases with UTF-8 encoding.

Request structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:document">
<soapenv:Header/>
<soapenv:Body>
<urn:newDocument2>
<!--You may enter the following 13 items in any order-->
<urn:CategoryID>?</urn:CategoryID>
<urn:DocumentID>?</urn:DocumentID>
<urn:Title>?</urn:Title>
<urn:Summary>?</urn:Summary>
<urn:Date>?</urn:Date>
<urn:Attributes>
<!--0 to 1000 repetitions:-->
<urn:item>
<!--You may enter the following 2 items in any order-->
<urn:ID>?</urn:ID>
<urn:Values>
<!--0 to 1000 repetitions:-->
<urn:item>
<urn:Value>?</urn:Value>
</urn:item>
</urn:Values>
</urn:item>
</urn:Attributes>
<urn:ResponsibleUserID>?</urn:ResponsibleUserID>
<urn:RevisionMembers>
<!--0 to 1000 repetitions:-->
<urn:item>
<!--You may enter the following 5 items in any order-->
<urn:MemberType>?</urn:MemberType>
<urn:MemberID>?</urn:MemberID>
<urn:Step>?</urn:Step>
<urn:Sequence>?</urn:Sequence>
<urn:Deadline>?</urn:Deadline>
</urn:item>
</urn:RevisionMembers>
<urn:TemplateID>?</urn:TemplateID>
<urn:Files>
<!--0 to 1000 repetitions:-->
<urn:item>
<!--You may enter the following 3 items in any order-->
<urn:Name>?</urn:Name>
<urn:Content>cid:1120385475645</urn:Content>
<urn:Container>?</urn:Container>
</urn:item>
</urn:Files>
<urn:Keywords>
<!--0 to 1000 repetitions:-->
<urn:item>
<urn:KeywordID>?</urn:KeywordID>
</urn:item>
</urn:Keywords>
<urn:LanguageID>?</urn:LanguageID>
<urn:RevisionID>?</urn:RevisionID>
</urn:newDocument2>
</soapenv:Body>
</soapenv:Envelope>

Return:

ID #Description
StatusSUCCESS: SUCCESS
FAILURE: FAILURE
CodeDisplayed code:
▪ 0 - No error (record created successfully);
▪ -1 - Missing required data;
▪ -2 - Inexistent category;
▪ 3 - Inactive category;
▪ 4 - The user does not have permission to add in the category;
▪ 5 - Inexistent user;
▪ 6 - The category does not allow changing the responsible user;
▪ 7 - The required attribute has not been filled out;
▪ 8 - Inexistent attribute;
▪ 9 - Problems with the attribute values;
▪ 10 - Invalid date;
▪ 11 - Date later than the current date;
▪ 12 - Invalid template;
▪ 13 - The category does not allow multiple files;
▪ 14 - Invalid extension;
▪ 15 - Blocked extension;
▪ 16 - Problems with the file;
▪ 17 - Inexistent keyword;
▪ 18 - ID # already exists;
▪ 19 - The category does not allow adding released documents;
▪ 20 - Problems when instantiating the workflow;
▪ 21 - Inexistent language;
▪ 23 - Error when searching for category data;
▪ 24 - To save the revision ID #, the revision process needs to be ISO9000 based;
▪ 25 - The system does not allow changing the ID # of revisions being issued in this category;
▪ 26 - Revision must contain a whole numeric value;
▪ 27 - Revision must contain letters only;
▪ 28 - The category does not allow entering or editing the ID #;
▪ 29 - The category does not allow entering or editing the title;
▪ 30 - It is not possible to enter participants as the category is configured as fixed route;
▪ 99 - Return unexpected by the system.
DetailMessage detailing the error or success in the execution of the method.
RecordIDSUCCESS: Document ID # created.
FAILURE: Empty.