cindy

create package failed when connect to SaaS

0 votes

Hi,

I got the 500 (internal error) when create package from SOA to CA sandbox. same payload works in our on-prem version 11.25. any idea?

here is my payload

{
    "name" : "Signing-SC4",
    "settings" : {
        "ceremony" : {
            "declineReasons" : [],
            "optOutReasons" : [],
            "handOver" : {
                "href" : "http://www.google.com",
                "text" : "Return",
                "title" : "http://www.google.com"
            },
            "documentToolbarOptions" : {
                "downloadButton" : false
            }
        }
    },
    "language" : "fr",
    "roles" : [{
            "index" : 0,
            "signers" : [{
                    "company" : "",
                    "id" : "Primary01",
                    "knowledgeBasedAuthentication" : null,
                    "auth" : {
                        "scheme" : "SMS",
                        "challenges" : [{
                                "question" : "+14162770000"
                            }
                        ]
                    },
                    "delivery" : {
                        "email" : false
                    },
                    "lastName" : "Smith",
                    "email" : "[email protected]",
                    "firstName" : "John",
                    "title" : ""
                }
            ],
            "name" : "Primary01",
            "id" : "Primary01",
            "emailMessage" : {
                "content" : ""
            },
            "reassign" : false,
            "locked" : false
        }
    ],
    "due" : "2021-07-25T04:00:00Z",
    "documents" : [{
            "index" : 0,
            "name" : "6249_1_Signer",
            "approvals" : [],
            "id" : "6249_1_Signer",
            "extractionTypes" : [],
            "extract" : true,
            "data" : {}
        }
    ],
    "autocomplete" : true,
    "data" : {
        "sdk" : "Java v11.25"
    }
}


Reply to: create package failed when connect to SaaS

0 votes

and I got this error message, when i put proxy to listen the request sent and response receveived

HTTP/1.1 400 Bad Request
Date: Thu, 20 May 2021 13:39:28 GMT
Content-Length: 460
Content-Type: text/html;charset=utf-8
Connection: close
Server: SimpleHTTP/0.6 Python/3.6.4


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <title>Error response</title>
    </head>
    <body>
        <h1>Error response</h1>
        <p>Error code: 400</p>
        <p>Message: Bad Request.</p>
        <p>Error code explanation: 400 - Bad request syntax or unsupported method.</p>
    </body>
</html>


Reply to:

0 votes

Hi Cindy,

 

The JSON payload looks good to me. From the payload, seems you are using text tags or document extraction, could you share the PDF (without sensitive information) to [email protected] so that I can have a closer look at it?

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: create package failed when connect to SaaS

0 votes

Hi Duo,

 

the document is attached.

actually this payload is generated from SDK call, if SOA calling our application, and our application calling SDK, SDK will send REST payload to eSignlive.

that's why I don't understand why it's failing. I tried the other REST API to SaaS, they are working expect create package, update document etc, I assume something related to document or the payload related to document.

Also, last time you mentioned that in SaaS log, it remove all the Authentication information, so seems can't track from the log perspective. 

thanks,

Cindy

 


Attachments

Reply to: create package failed when connect to SaaS

0 votes

Hi Duo,

I tried same payload with same document from Postman, and it works. the different from Postman (working one) vs SOA test (not working) as below:

In Postman, seems it takes document 1st before the payload, but in SOA test, it takes payload before the document. do you think it does make sense?

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

postman:

POST /api/packages HTTP/1.1
x-bluecoat-via: a5f93999e2503856
content-type: multipart/form-data; boundary=--------------------------257275169839758403632680
cache-control: no-cache
connection: Keep-Alive
host: toconad7021tc6.ad.cibc.com:9080
content-length: 466927
accept: application/json
postman-token: a7fcc810-3944-4b32-8b9b-93633f81f2dd
user-agent: PostmanRuntime/7.26.8
authorization: Basic NldVazZVb05CTlFNOklydVFoZTVld1RvQQ==
accept-encoding: gzip, deflate, br


----------------------------257275169839758403632680
Content-Disposition: form-data; name="file"; filename="6249A_French_single.pdf"
Content-Type: application/pdf

----------------------------257275169839758403632680
Content-Disposition: form-data; name="payload"

{"name":"Signing-SC4","settings":{"ceremony":{"declineReasons":[],"optOutReasons":[],"handOver":{"href":"http://www.google.com","text":"Return","title":"http://www.google.com"},"documentToolbarOptions":{"downloadButton":false}}},"language":"fr","roles":[{"index":0,"signers":[{"company":"","id":"Primary01","knowledgeBasedAuthentication":null,"auth":{"scheme":"SMS","challenges":[{"question":"+14162770000"}]},"delivery":{"email":false},"lastName":"Smith","email":"[email protected]","firstName":"John","title":""}],"name":"Primary01","id":"Primary01","emailMessage":{"content":""},"reassign":false,"locked":false}],"due":"2021-07-25T04:00:00Z","documents":[{"index":0,"name":"6249_1_Signer","approvals":[],"id":"6249_1_Signer","extractionTypes":[],"extract":true,"data":{}}],"autocomplete":true,"data":{"sdk":"Java v11.25"}}
----------------------------257275169839758403632680--

========================================================================================================================================
SOA test:

POST /api/packages HTTP/1.1
content-type: multipart/form-data;    boundary="----=_Part_16_1859971249.1621533284285"; charset=UTF-8
host: toconad7021tc6.ad.cibc.com:9080
content-length: 466892
authorization: Basic NldVazZVb05CTlFNOklydVFoZTVld1RvQQ==


------=_Part_16_1859971249.1621533284285
Content-Disposition: form-data; name="payload"

{"name":"Signing-SC4","settings":{"ceremony":{"declineReasons":[],"optOutReasons":[],"handOver":{"href":"http://www.google.com","text":"Return","title":"http://www.google.com"},"documentToolbarOptions":{"downloadButton":false}}},"language":"fr","roles":[{"index":0,"signers":[{"company":"","id":"Primary01","knowledgeBasedAuthentication":null,"auth":{"scheme":"SMS","challenges":[{"question":"+14162770000"}]},"delivery":{"email":false},"lastName":"Smith","email":"[email protected]","firstName":"John","title":""}],"name":"Primary01","id":"Primary01","emailMessage":{"content":""},"reassign":false,"locked":false}],"due":"2021-07-25T04:00:00Z","documents":[{"index":0,"name":"6249_1_Signer","approvals":[],"id":"6249_1_Signer","extractionTypes":[],"extract":true,"data":{}}],"autocomplete":true,"data":{"sdk":"Java v11.25"}}
------=_Part_16_1859971249.1621533284285
Content-Type: application/pdf
Content-Disposition: form-data; name="file"; 
    filename=6249A_French_single.pdf
 

 


Reply to:

0 votes

Hi Cindy,

 

Whether "payload" or "file" first shouldn't make any difference. From another perspective, if the request structure has problem, OneSpan Sign system should return 400 error instead of the general 500 error.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: create package failed when connect to SaaS

0 votes

I see. then I have really no clue why Postman is working but not from SOA, even I use the same Proxy pass through to SaaS. 


Reply to:

0 votes

If the 500 error is consistent, please fill in a support ticket and ask for checking in OneSpan Sign logs. (Last time it won't work was because the error message was regarded to authentication header, but this time it should be related to internal logic)

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: create package failed when connect to SaaS

0 votes

I see. thanks.


Reply to: create package failed when connect to SaaS

0 votes

Hi Duo,

 

one more question, do you know for Saas (https://sandbox.e-signlive.ca), which port is not 2 way SSL? 


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off