Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9220249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:18:14+00:00 2026-06-18T03:18:14+00:00

I have a little problem with the MuleSoft CMIS connector. I have an application

  • 0

I have a little problem with the MuleSoft CMIS connector. I have an application that uploads and downloads files from Alfresco. I connect to Alfresco through AtomPub and use CMIS for all actions towards the Alfresco.

The problem is this:
I used to get the object from the repository and it worked fine. In my flow I added one component that takes the object from the flow, which is of type DocumentImpl, get InputStream, cast it to an Object and return it. The browser starts the download of the file but it has no idea what the file is because it has no extension attached to it.

And finally the question: How do I attach the extension to the file being downloaded?

EDIT some code added

@Override
public Object onCall(MuleEventContext eventContext) throws Exception {

    MuleMessage mes = eventContext.getMessage();
    System.out.println("Message is :" +mes);

    DocumentImpl doc = mes.getPayload(DocumentImpl.class);

    HttpResponse res = new HttpResponse();
    InputStream a = doc.getContentStream().getStream();
    String m = doc.getContentStreamMimeType();
    String n = doc.getContentStreamFileName();

    res.setBody(mes);


    return a;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:18:15+00:00Added an answer on June 18, 2026 at 3:18 am

    Ok i solved the problem. Basically the best way to do this is to change the flow to this:

        <set-payload value ="#[payload.getContentStream()]" />
    
        <set-variable value="#[payload.getMimeType()]" variableName="mime" doc:name="Variable" />
        <set-variable value="#[payload.getFileName()]" variableName="name" doc:name="Variable" />
    
        <!-- Set Content-Type to stored mimetype -->        
        <set-property value="#[flowVars['mime']]" propertyName="Content-Type" />
        <set-property propertyName="File-Name" value="#[flowVars['name']]"/>
        <set-property value="attachment; filename=#[flowVars['name']]" propertyName="Content-Disposition" />
    

    this should be in the Mule Flow after

    This takes mime type and file name from the payload and returns it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little Problem with the app that I'm developing. In the App
i have little problem in using my application application having msaccess database if i
I have little problem with my iphone application. I have such classes and interfaces:
I have little problem in my iPhone application code but can not identify. please
I have a little problem. I have a window that the main content is
I have a little problem. I want to pass two variables from PHP to
I have a little problem with following code, it throws a error saying that
I have a little problem. I use a direct link to connect to my
I have a little problem, with Android application: I need to take a picture,
i have a little problem here. I am working on a little application wich

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.