Question
Hitachi
JP
Last activity: 29 May 2022 11:31 EDT
Error receiving response data separated by --binary option in jboss in WinDirector's GetResource API
The following error occurred when trying to receive response data separated by --binary option.(WinDirector's GetResource API)
[error]
com.pega.pegarules.pub.services.InboundMappingException: Caught throwable while accessing message body: Failed to link javax/mail/MultipartDataSource
Please help me.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 29 May 2022 11:31 EDT
Toyota System
JP
I think because of content type is multipart/form-data so you can't inbound content to Text property. When response is multipart/form-data, pega default set it into pyResponseAttachmentPage pega
Please test download file by add the java method below after using connect rest in activity or add activity in Post load processing in case use Data Page connect rest
final ClipboardPage attachPage = tools.findPage("pyResponseAttachmentPage");
if (attachPage != null){
fileName = attachPage.getProperty("pyAttachNames(1)").toString();
ClipboardProperty attachVals = attachPage.getProperty("pyAttachValues(1)");
byte[] byteArray=Base64Util.decodeToByteArray(attachVals.toString());
try{
String sErrorMessage = tools.sendFile( byteArray, fileName, false, null, true );
}catch (Exception e) {
oLog.error("Error file: " + e.getMessage());
}
}
Toyota System
JP
If can please capture the Connect-REST on Post Respone. In case response is binary data, you don't need setting any thing in message data.
-
Hiroaki Sato
Hitachi
JP
Toyota System
JP
Please try set empty マップ先 and マップ先キー。The response will auto set to pyResponseAttachmentPage
-
Hiroaki Sato
Updated: 10 Feb 2022 5:03 EST
Toyota System
JP
What is type of content type on response?
Can you change class in Logging level settings to DEBUG and share Pega log file when run Connect REST ?
Please check value in property pyResponseAttachmentPage.pyAttachValues(1) or pyResponseAttachmentPage.pyAttachNames(1)
com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector
-
FUJIOKA SHINYA Hiroaki Sato
Updated: 14 Feb 2022 20:25 EST
Hitachi
JP
@LANH(ラン) Content type of the file is multipart/form-data. We check pyResponseAttachmentPage.pyAttachValues(1) and pyResponseAttachmentPage.pyAttachNames(1), but there is no response when I press the plus button. We are facing the following error and think it is a problem before the page you advised.
[error]
com.pega.pegarules.pub.services.InboundMappingException: Caught throwable while accessing message body: Failed to link javax/mail/MultipartDataSource
Accepted Solution
Updated: 29 May 2022 11:31 EDT
Toyota System
JP
I think because of content type is multipart/form-data so you can't inbound content to Text property. When response is multipart/form-data, pega default set it into pyResponseAttachmentPage pega
Please test download file by add the java method below after using connect rest in activity or add activity in Post load processing in case use Data Page connect rest
final ClipboardPage attachPage = tools.findPage("pyResponseAttachmentPage");
if (attachPage != null){
fileName = attachPage.getProperty("pyAttachNames(1)").toString();
ClipboardProperty attachVals = attachPage.getProperty("pyAttachValues(1)");
byte[] byteArray=Base64Util.decodeToByteArray(attachVals.toString());
try{
String sErrorMessage = tools.sendFile( byteArray, fileName, false, null, true );
}catch (Exception e) {
oLog.error("Error file: " + e.getMessage());
}
}
-
Hiroaki Sato