Uploading File Using CAF

Hi all,
I am trying to upload the file using CAF. I imported file input and dragged the fileitem to binding view then assigned file input value to fileitem then created flowservice to accept the file and,assigned the refresh action to the upload button action. But now how to bind the fileitem value to the flowservice input?

http://techcommunity.softwareag.com/pwiki?p_p_auth=FWFY5eT6&p_p_id=36&p_p_lifecycle=0&p_r_p_185834411_nodeId=11809&p_r_p_185834411_title=How+to+UploadDownload+a+File+from+MWS+To+IS

I tried already followed above link but i am getting error while binding the input. getService().getParameters().setInput(getFielItem().get()); but in the setInput method i am getting error, tried lot to remove that error but no use. can any one help me.

When you say you assigned the refresh action to the button upload action, did you actually do the Java code that the sample you linked to says you should? Are you calling an action which does a little bit of Java, one of the lines of which refreshes the web service?

thanks for the reply.

I have created action name called Upload() then added the below thing.

public String upload() {

             getFlowservicename().getParameters().getInput().setUploadfile(getFileItem().get());
                   getFlowservicename().refresh();
	    resolveDataBinding(UPLOAD_PROPERTY_BINDINGS, this, "upload.this", true, false);
		return OUTCOME_OK;
	}
	

but binding between from FileItem to Flowservice input is not happening. so how to bind the value.
In the above binding setUploadfile() method showing error like not defined type object.

Maybe just post a screenshot of your Designer, showing as much detail as possible? Just in case there’s something quick to spot?

Hey,

this is a sample solution, maybe it will help you.

Best regards

Ismael
ISM_FRMK.zip (8.14 KB)
fileUpload_sample.zip (26.3 KB)

1 Like