docusign / docusign-soap-sdk

Wraps the DocuSign eSignature SOAP API in 5 different languages: Java, C#, PHP, Ruby, Salesforce (Apex)
http://docusign.com/devcenter
MIT License
89 stars 122 forks source link

CustomFields with template sending request does not work #48

Closed hashimawan closed 3 years ago

hashimawan commented 10 years ago

I tried following code for sending a template request along with the custom fields but no luck and getting following error

ERROR:

string(11) "soap:Client" string(209) "Validation error: The element 'CustomField' in namespace 'http://www.docusign.net/API/3.0' has incomplete content. List of possible elements expected: 'Required' in namespace 'http://www.docusign.net/API/3.0'."

CODE 1 that I tried:

$envinfo = new EnvelopeInformation(); $envinfo->Subject = $frm["subject"]; $envinfo->EmailBlurb = $frm["emailblurb"]; $envinfo->AccountId = $this->getAccountID();

$customField = new CustomField(); $customField->Name = "TestName"; $customField->Value = "TestValue"; $customField->Show = "true"; $customField->Requried = "false"; $customField->CustomFieldType = CustomFieldType::Text;

$customFieldsArr[] = $customField; $envinfo->CustomFields = $customFieldsArr;

CODE 2 that I tried:

$envinfo = new EnvelopeInformation(); $envinfo->Subject = $frm["subject"]; $envinfo->EmailBlurb = $frm["emailblurb"]; $envinfo->AccountId = $this->getAccountID();

$customField[] = new CustomField();

$cf1 = new CustomField();

$cf1->Name = "TestName"; $cf1->Value = "TestValue"; $cf1->Show = "true"; $cf1->Requried = "false"; $cf1->CustomFieldType = CustomFieldType::Text;

array_push($customField, $cf1);

// eliminate 0th element array_shift($customField);

$envinfo->CustomFields = $customField;

I also tried assigning customfield array in the following way but did work: $envinfo->CustomFields->CustomField[] = $customField;

I've been mashing my head in searching the solution all the day without luck!

LarryKlugerDS commented 3 years ago

This software is deprecated. Developers who wish to develop with SOAP should generate their own stubs using the wsdl. Thank you.