Question
Archiva srl
IT
Last activity: 21 May 2018 15:49 EDT
Create a service rest multipart
Hi guys,
How to configure a rest service for processing a multipart/form-data request with pega wizard?
Does anyone have experience with this or know of resources they can point me to? Searches within PDN have not returned much information.
Thanks
Marino.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
In "Activity_step3" I see the type being set as "TheMIMEType" which is placeholder text from the example.
In this case, you would want to use "text/plain" as the MIME type for that part.
As I do not know the structure expected by the endpoint, I cannot offer too much help on how your multipart needs to be structured, but a single text part may not be an appropriate request. The server may give you errors because you are sending fake data.
I cannot see step #4 in your screenshots, but commenting out any of the steps that build the multipart or create the request attachments page will cause you to either have an empty Multipart or not send a Multipart at all, so errors would definitely be expected in Pega or on the service side.
Pegasystems Inc.
IN
Hi,
Are you receiving the response as attachments ?
Archiva srl
IT
hi,
I must to create a connector rest with the wizard to call a service rest, which has the task of updating the data
or attach a pdf on solr platform
The service that I have to call is multipart.what are the steps to be performed? In the wizard i dont't see a flag for setting a Content-Type: multipart/form-data
Thanks,
Marino.
-
Rakesh kumar
Pegasystems Inc.
US
Hi Marino,
Check out this post, which describes the process:
https://community.pega.com/support/support-articles/cannot-send-file-rest-service
- Jeff
Archiva srl
IT
hi houlj,
I created the service as indicated in the link but the system returned an error, if i comment step 3-4 on activity the system returned another error.
Please see zip attached
thanks a lot,
Marino.
Accepted Solution
Pegasystems Inc.
US
In "Activity_step3" I see the type being set as "TheMIMEType" which is placeholder text from the example.
In this case, you would want to use "text/plain" as the MIME type for that part.
As I do not know the structure expected by the endpoint, I cannot offer too much help on how your multipart needs to be structured, but a single text part may not be an appropriate request. The server may give you errors because you are sending fake data.
I cannot see step #4 in your screenshots, but commenting out any of the steps that build the multipart or create the request attachments page will cause you to either have an empty Multipart or not send a Multipart at all, so errors would definitely be expected in Pega or on the service side.
Capgemini Americas
US
Hi,
I also have similar requirement where needs to send case attachment along with meta data to the service. Using the REST connector and pyRequestAttachmentPage of Data-ServiceMessage class but it is giving me http 400 in response.
I need help in this regard.