9 Replies Latest reply on May 11, 2015 9:18 AM by nbennett25

    sendDocument via SOAP

    nbennett25 Level 1

      Hello - I'm having some trouble sending a request via SOAP to sendDocument. Below is the xml I'm sending:

       

       

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

      <root>

           <apiKey>[my key]</apiKey>

           <documentCreationInfo>

                <recipients>

                     <email>[ recipient email address]</email>

                     <role>SIGNER</role>

                </recipients>

                <signatureType>ESIGN</signatureType>

                <signatureFlow>SENDER_SIGNATURE_NOT_REQUIRED</signatureFlow>

                <fileInfos>

                     <libraryDocumentName>[Name of file in ADC account]</libraryDocumentName>

                </fileInfos>

                <name>[Name of document sent to recipient]</name>

           </documentCreationInfo>

      </root>


      I'm getting the error Not enough message parts were received for the operation.

      Which is not very descriptive. There are no further fields required per API Methods — Document eSignature Software — Adobe Document Cloud

       

      What am I missing?

       

      thx

        • 1. Re: sendDocument via SOAP
          Rijul Raj Khurana Adobe Employee

          Hello nbennett25,

           

          As per the code shared, it seems that you have missed the library document key under File Info:

           

               <dto:fileInfos>

                 <dto:FileInfo>

                          

                            <dto:file>XXXXXXXXXX</dto:file>

           

                            <dto:fileName>TEST</dto:fileName>

           

                            <dto:libraryDocumentKey>Your Library doc key</dto:libraryDocumentKey>

           

                            <dto:libraryDocumentName>Template</dto:libraryDocumentName>

           

                            <dto:mimeType>application/pdf</dto:mimeType>

                          

                         </dto:FileInfo>

                      </dto:fileInfos>

           

          Let me know if that helps!

           

          -Rijul

          • 2. Re: sendDocument via SOAP
            SimonATS Adobe Employee

            Try nilling non required fields.

             

            for example senderinfo is not required but needs but needs to be there nilled.

            Also you need to ensure names spaces are provided.

            the following was created using SOAPUI,

            senddocument using library document name:

             

            <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.echosign" xmlns:dto="http://dto.api.echosign" xmlns:dto9="http://dto9.api.echosign" xmlns:dto2="http://dto20.api.echosign" xmlns:dto1="http://dto14.api.echosign" xmlns:dto11="http://dto18.api.echosign" xmlns:dto12="http://dto19.api.echosign">

               <soapenv:Header/>

               <soapenv:Body>

                  <api:sendDocument>

                     <api:apiKey>[integration/api key here]</api:apiKey>

                     <api:senderInfo xsi:nil="true"/>

                     <api:documentCreationInfo>

                        |<dto:fileInfos>

                           <dto:FileInfo>

                            <dto:libraryDocumentName>another test</dto:libraryDocumentName>

                             </dto:FileInfo>

                        </dto:fileInfos>

                        <dto:message>hello world</dto:message>

                        <dto:name>my agreement name</dto:name>

                          <dto:recipients>

                            <dto1:RecipientInfo>

                              <dto1:email>[email here]</dto1:email>

                              <dto1:role>SIGNER</dto1:role>

                            </dto1:RecipientInfo>

                        </dto:recipients>     

                     </api:documentCreationInfo>

                  </api:sendDocument>

               </soapenv:Body>

            </soapenv:Envelope>

            • 3. Re: sendDocument via SOAP
              nbennett25 Level 1

              Hi Rijul - thanks for the response. From the documentation, libraryDocumentKey isn't required if you're using libraryDocumentName. I did manage to figure out the structure - I was missing the FileInfo node parent to libraryDocumentName.

               

              The API request log in the admin is pretty helpful as well.

               

              I do have a new question though - I have the document being created, and have successfully used the MergeFields node to add values to fields in the document. But the document isn't actually being sent - it's added to the 'Waiting for me to Prefill' section of the admin, even though the document has correctly added the merge field values. Is there another step I need to trigger the actual sending of the document to the recipient?

               

              Any thoughts? Thanks!

              • 4. Re: sendDocument via SOAP
                SimonATS Adobe Employee

                Busy thread!

                 

                Check if the librry document has any fields assigned to the prefill role, that would do it.

                • 5. Re: sendDocument via SOAP
                  nbennett25 Level 1

                  Hi SimonATS - I did manage to create the document through the API without the senderInfo field - it's not required from the documentation.

                   

                  Per my note above, is the senderInfo required in order for the document to actually be sent out?

                   

                  Thanks

                  • 6. Re: sendDocument via SOAP
                    SimonATS Adobe Employee

                    Hi Nathan,

                     

                    Which version of the api are you using? I'm using v20 and need to set senderinfo in some way otherwise I get the same error as from your original post.

                    Senderinfo can be nilled in which case the sender will be the user who the api/integration key belongs to.

                     

                    see above for the prefill question.

                    • 7. Re: sendDocument via SOAP
                      nbennett25 Level 1

                      Thanks SimonATS - I'm using v20 - I added the senderInfo to the request, which also worked fine.

                       

                      How do I edit the document to see the prefill fields? (or do I just need to create a new one?)

                       

                      Thanks

                      • 8. Re: sendDocument via SOAP
                        SimonATS Adobe Employee

                        you need to login echosign (now called adobe Document Cloud eSign services) as the person who created the library document, and via the Manage tab edit the library document.

                        • 9. Re: sendDocument via SOAP
                          nbennett25 Level 1

                          Hi SimonATS - I created a new document in the dashboard and set the MergeFields to 'Participant 1,' and saw the document created and sent out. I had assumed since the MergeField data was coming from the sender (me) that it should be set to 'prefil.'

                           

                          Thanks for the help guys - I now have the documents being created, merging the data fields, and being sent out.