Set an image for ConcourseSuite Community Edition

Sign In or Register

ConcourseSuite Community Edition

Core Team
PostgreSQL Java
PUBLIC PROFILE

Assignment

Priority: Scheduled
Assigned To: Matt Rajkowski

Ticket # 35

This ticket is open
Severity: Normal
Category: Blocker (prevents feature)
Entered by: Jol Blazey 2/6/2008, 6:59 PM
Last modified: Matt Rajkowski 2/7/2008, 12:10 AM

Description

ProcessDocument.do / .java will not upload a file.
This issue is in version 5.0.3 Enterprise Edition. I can't add a ticket there so I am adding it here.
ProcessDocument.do / .java will not upload a file.

We have used this url to upload files in 4.1 and 5.0 community and it works (there are issues with folderID).

This is some test code. We know it works with other versions as stated:

URL servlet = new URL("http://.....host.com.au:8080/Concourse503/ProcessDocument.do");
URLConnection conn = servlet.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);

conn.setRequestProperty("Content-type",
"multipart/form-data; boundary=" + boundary);

DataOutputStream out = new DataOutputStream(conn.getOutputStream());
writeTo(out, "--" + boundary + "\r\n");
writeParam("id", "1", out); // 5f4dcc3b5aa765d61d8327deb882cf99
writeParam("code", "5f4dcc3b5aa765d61d8327deb882cf99", out); // unset
writeParam("systemId", "4", out);
writeParam("type", "ticket", out);
writeParam("subject", "Testing msword", out);
writeParam("tid", "1", out); // 50 =110 503=1
writeParam("enteredBy", "1", out);
writeParam("folderId", "317", out); // 50 = 317 503=1 or 4

writeFile("/home/jol/Documents/dddbook.pdf", out, "application/pdf", "dddbook.pdf");


out.flush();
out.close();

Solution

The ProcessDocument service first appeared as a demo capability in a previous version. When 4.1 was released, the ProcessPacket API was configured for 3 types of authentication: System, Client, and User; however the previously unused ProcessDocument did not get updated.

When 5.0 was released, the authentication for ProcessDocument was *tightened up* to use Client authentication.

In addition to the client's code, also post the client's id that you define in the Admin section:

writeParam("code", "TEST", out, boundary);
writeParam("clientId", "8", out, boundary);

It would be nice to add USER authentication in. In a later release SYSTEM authentication can be added back because the [sites] table will be introduced for customizations.

File Attachments

There are no file attachments

Ticket Activity

Date Event
Jol Blazey 2/6/2008, 6:59 PM [ Ticket Opened ]
Jol Blazey 2/6/2008, 6:59 PM [ Ticket is unassigned ]
Jol Blazey 2/6/2008, 6:59 PM [ Severity set to Normal ]
Jol Blazey 2/6/2008, 9:40 PM when I say we use this "url" to upload documents, I mean (ProcessDocument.do) not the rest of the url.
Matt Rajkowski 2/7/2008, 12:10 AM [ Assigned to Rajkowski, Matt ]
Matt Rajkowski 2/7/2008, 12:10 AM [ Priority changed from unassigned to Scheduled ]
Matt Rajkowski 2/7/2008, 12:10 AM When I was working with James late one night, I mentioned this would be changed in 5.0.
Distribution List
Michael D., Jol B.