Hi,
when reading the documentation/FAQ, I can see there are three options when uploading files.
- Small Documents: The Web Service API has an Attachment class that consists of meta-data about the document and a byte array holding the contents. As such, the entire contents must be read into memory when uploading or downloading documents. The attachment object is created and passed in as a parameter to the method.
- Large Documents (MTOM client): A client that supports MTOM must use the *Context() methods to first store the meta-data of the operation on the server. Then the ContentService is used to stream the contents to/from the Livelink server. See the example in the Client Guide.
- Large Documents (HTTP client): A client that does not support MTOM must use the HTTP interface for streaming documents. As in the MTOM client, the client must use the *Context() methods to first store the meta-data of the operation on the server. Then the HTTP servlet (Java) or HTTP Handler (.NET) is used to stream the contents to/from the Livelink server. See the example in the Client Guide.
What is the actual range of small/large?
For instance, when I am uploading documents via webservices of 1MB, all goes fine, but when I try to upload a document/file of around 5MB, I get the following exception:
javax.xml.ws.WebServiceException: java.io.IOException: Error writing to server
at com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:258)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:151)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:88)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.client.Stub.process(Stub.java:248)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:134)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:244)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117)
at $Proxy40.uploadContent(Unknown Source)
at com.opentext.livelink.module.MultiUploadApplet$FileUploadTask.run(MultiUploadApplet.java:346)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Error writing to server
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:438)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:450)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:981)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
at com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:221)
... 14 more
I assume this has something to do with file size ?
Thanks and regards,
Coen Damen (Logica)