Question
commonwealth Bank of Australia (CBA)
AU
Last activity: 22 Feb 2024 19:35 EST
Send File Attachment in Connect-Rest using "multipart/form-data" in Pega 7.3.1
Is multipart-formdata is supported in Pega7.3.1?
We have a requirement to send the document in Connect-REST as an attachment in request. Pega version is Pega7.3.1.
As per the help guide (https://customer-coml-dev731.cmp.dev.cba/prhelp/procomhelpmain.htm#rule-/rule-connect-/AttachmentsSOAPdotNetHttp.htm?Highlight=pyRequestAttachmentPage) and multiple PDN forums, implemented as below. But it is not working.
pyRequestAttachmentPage is populated in prior to calling the Connect-REST and below are mappings.
Tried pyAttachTypes(1) = application/pdf, application/json and multipart/form-Data. But same error is received. Also, request is not having the Attachment details.
Error: As per the request from the Log file, there is no attachment in the Request body. Service provider system is not receiving the attachment.
------------------HTTP REQUEST CONTENTS------------------
Request Headers: {Authorization=Bearer eyJh, Content-Type=multipart/form-data; boundary=jeKANG1-9Ks5mMY_4WKNIQUgpBS4RZikIvU}
Request Message Data: 613834 bytes to be sent
<?xml version="1.0"?>
<pagedata>
<pxObjClass></pxObjClass>
<document>ABCD==</document>
Is multipart-formdata is supported in Pega7.3.1?
We have a requirement to send the document in Connect-REST as an attachment in request. Pega version is Pega7.3.1.
As per the help guide (https://customer-coml-dev731.cmp.dev.cba/prhelp/procomhelpmain.htm#rule-/rule-connect-/AttachmentsSOAPdotNetHttp.htm?Highlight=pyRequestAttachmentPage) and multiple PDN forums, implemented as below. But it is not working.
pyRequestAttachmentPage is populated in prior to calling the Connect-REST and below are mappings.
Tried pyAttachTypes(1) = application/pdf, application/json and multipart/form-Data. But same error is received. Also, request is not having the Attachment details.
Error: As per the request from the Log file, there is no attachment in the Request body. Service provider system is not receiving the attachment.
------------------HTTP REQUEST CONTENTS------------------
Request Headers: {Authorization=Bearer eyJh, Content-Type=multipart/form-data; boundary=jeKANG1-9Ks5mMY_4WKNIQUgpBS4RZikIvU}
Request Message Data: 613834 bytes to be sent
<?xml version="1.0"?>
<pagedata>
<pxObjClass></pxObjClass>
<document>ABCD==</document>
<documentGuid>AD12345</documentGuid>
</pagedata>
------------------END HTTP REQUEST CONTENTS------------------
------------------HTTP RESPONSE CONTENTS------------------
Response Headers:
Connection: keep-alive
Content-Length: 675
Content-Type: application/json
vary: Origin
x-request-id: a95e32d7-9c54-45d9-8114-ff8db3ae9a0c#1012176
Response Message Data: 675 bytes received
{"entities":[],"entityConfidences":[],"modelMetadata":"....","pageFailures":[{"message":"unable to process file: unable to process file: no file content on input","pageIndex":"-1","type":"General"}],"pages":{}}
----------------END HTTP RESPONSE CONTENTS------