docusign / docusign-esign-csharp-client

The Official Docusign C# Client Library used to interact with the eSignature REST API. Send, sign, and approve documents using this client.
https://developers.docusign.com/docs/esign-rest-api/sdks/csharp/
MIT License
128 stars 159 forks source link

Docusign API. Getting Unspecifed Error in response with error code 1 #287

Open vinayakshetty opened 4 years ago

vinayakshetty commented 4 years ago

Below is my request xml

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Body>
        <CreateEnvelopeFromTemplatesAndForms xmlns="http://www.docusign.net/API/3.0">
            <CompositeTemplates>
                <!-- Optional -->
                <CompositeTemplate>
                    <!-- Optional -->
                    <ServerTemplates>
                        <!-- Optional -->
                        <ServerTemplate>
                            <Sequence>1</Sequence>
                            <TemplateID>68473bcc-c2a5-4b8b-bb87-95ec5ec92820</TemplateID>
                        </ServerTemplate>
                    </ServerTemplates>
                    <!-- Optional -->
                    <InlineTemplates>
                        <!-- Optional -->
                        <InlineTemplate>
                            <Sequence>1</Sequence>
                            <!-- Optional -->
                            <Envelope>
                                <AccountId>cdaf1cfd-0c7c-47f6-ba85-c53932e69593</AccountId>
                                <!-- Optional -->
                                <Recipients>
                                    <!-- Optional -->
                                    <Recipient>
                                        <ID>1</ID>
                                        <UserName>Vinayak</UserName>
                                        <Email>vshetty@e-emphasys.com</Email>
                                        <Type>Signer</Type>
                                        <AccessCode>true</AccessCode>
                                    </Recipient>
                                    <Recipient>
                                        <ID>2</ID>
                                        <UserName>Vinayak</UserName>
                                        <Email>vinayak.shetty12@gmail.com</Email>
                                        <Type>CarbonCopy</Type>
                                        <AccessCode>true</AccessCode>
                                    </Recipient>
                                </Recipients>
                                <Subject>Template Test</Subject>
                                <EmailBlurb>Test</EmailBlurb>
                            </Envelope>
                        </InlineTemplate>
                    </InlineTemplates>
            <Document>
                        <ID>1</ID>
            <Name>RC0002555.pdf</Name>
            <PDFBytes>****base64****</PDFBytes>
            <FileExtension>pdf</FileExtension>
                    </Document>
                </CompositeTemplate>
            </CompositeTemplates>
            <ActivateEnvelope>true</ActivateEnvelope>
        </CreateEnvelopeFromTemplatesAndForms>
    </Body>
</Envelope>

Response Received
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <soap:Header>
        <wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>
        <wsa:MessageID>urn:uuid:3e314a2f-98e0-48e1-a128-9a5724e2a853</wsa:MessageID>
        <wsa:RelatesTo>urn:uuid:2292060d-be4e-46fb-8942-bd8832045de0</wsa:RelatesTo>
        <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
        <wsse:Security>
            <wsu:Timestamp wsu:Id="Timestamp-1531b551-aab6-4349-bd1e-71bf0888ed42">
                <wsu:Created>2020-08-26T17:19:41Z</wsu:Created>
                <wsu:Expires>2020-08-26T17:24:41Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>Unspecified_Error</faultstring>
            <faultactor>https://demo.docusign.net/api/3.0/dsapi.asmx</faultactor>
            <detail>
                <ErrorCode xmlns="missing in Web.Config">1</ErrorCode>
                <ErrorReason xmlns="missing in Web.Config">An Error Occurred.</ErrorReason>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>
LarryKlugerDS commented 4 years ago

What are you trying to accomplish? Are you trying to provide a signer and cc to the template, plus replace the document that's in the template? Or do you want the document to be in addition to the document in the template? Or do you want to transform a PDF Form document into a DocuSign envelope that includes the fields from the PDF? (Or something else?)

How many documents are in the template?

Issues that I notice:

(You're using the SOAP API. Is this a new application or are you updating an existing SOAP application?

Did you know that our focus is the eSignature REST API? If you want (now or in the future) to use any of our more modern features, they are only supported in the REST API.)

Thanks, Larry