Oracle WebCenter Content (MOSC)

MOSC Banner

GenericSoapPortClient issues with datahandler, files get with 0 bytes to UCM Inputstream

edited Jun 14, 2016 5:16AM in Oracle WebCenter Content (MOSC) 1 commentAnswered

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;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center