GenericSoapPortClient issues with datahandler, files get with 0 bytes to UCM Inputstream
Hi
look I have this code snippet
DataHandler dataHandler = new DataHandler(new AdjDocsRegSolLinexpInputStreamDataSource(adjuntarDocumentosRegSolLinexpBean.getContenido())); | |
where contenido is the input stream
the thing is that when the file cheks in to UCM it gets with 0 bytes, therefore the file is empty
what am I doing wrong?
this is the complete code
File helloWorld = new File(); |
DataHandler dataHandler = new DataHandler(new AdjDocsRegSolLinexpInputStreamDataSource(adjuntarDocumentosRegSolLinexpBean.getContenido())); |
// DataHandler dataHandler = new DataHandler(new AdjDocsRegSolLinexpInputStreamDataSource()); | |
helloWorld.setHref(adjuntarDocumentosRegSolLinexpBean.getHref()); | |
helloWorld.setName(adjuntarDocumentosRegSolLinexpBean.getPrimaryFileName()); | |
helloWorld.setContents (dataHandler); | |
files.add(helloWorld); |
/************/
public class AdjDocsRegSolLinexpInputStreamDataSource implements DataSource {
public AdjDocsRegSolLinexpInputStreamDataSource() {
super();
}
private InputStream inputStream;
public AdjDocsRegSolLinexpInputStreamDataSource(InputStream inputStream) {
this.inputStream = inputStream;