dousign api soap composite templates - docusignapi

See Updated XML. It has changed the output but still not quite right. Now it uploads doc1 and applies template correctly and inserts templates 2 & 3 in the correct location, however doc2 & doc3 are not there. Just the document that was used to create the template.
<compositeTemplates>
<compositeTemplate>
<compositeTemplateId>1</compositeTemplateId>
<serverTemplates>
<serverTemplate>
<sequence>1</sequence>
<templateId>6A68F081-643D-4DAC-8660-3CC0D59166D5</templateId>
</serverTemplate>
</serverTemplates>
<document>
<documentId>1</documentId>
<name>doc1</name>
</document>
</compositeTemplate>
<compositeTemplate>
<compositeTemplateId>2</compositeTemplateId>
<serverTemplates>
<serverTemplate>
<sequence>1</sequence>
<templateId>F2807DA5-89E0-445A-BE32-98951C7AD9F0</templateId>
<compositeTemplateId>2</compositeTemplateId>
</serverTemplate>
</serverTemplates>
<document>
<documentId>2</documentId>
<name>doc2</name>
</document>
</compositeTemplate>
<compositeTemplate>
<compositeTemplateId>3</compositeTemplateId>
<serverTemplates>
<serverTemplate>
<sequence>1</sequence>
<templateId>B9377A6C-BC24-4175-B749-81629E977C26</templateId>
<compositeTemplateId>3</compositeTemplateId>
</serverTemplate>
</serverTemplates>
<document>
<documentId>3</documentId>
<name>doc3</name>
</document>
</compositeTemplate>
</compositeTemplates>
also changed Content-Dispositon
"Content-Disposition: file; filename=\"" + fileName + "\";documentId=1; compositeTemplateId=1\r\n\r\n";
"Content-Disposition: file; filename=\"" + fileName + "\";documentId=2; compositeTemplateId=2\r\n\r\n";
"Content-Disposition: file; filename=\"" + fileName + "\";documentId=3; compositeTemplateId=3\r\n\r\n";

This is REST using XML for payload rather than JSON. In the DocuSign REST API, using compositeTemplates with multi-part form contribution of documents gets a little tricky when applying server templates to those documents. The server template's tabs are assigned to documentId=1. Therefore, you must do the same. To properly map the document contributed by each composite to the correct document contributed per multi-part form, you must use compositeTemplateId.
For each element, add . Make the first one "1", second "2", third "3". Then, for each form where you attach the documents, add the "compositeTemplateId=n" (where n= 1, 2, or 3) to that form's Content-Disposition.
e.g.:
--BOUNDARY
Content-Disposition: file; documentid=1; name="Option2"; filename="Option2.pdf"; compositeTemplateId=2
Content-Type: application/pdf

Related

Recipient type for the original signer is not changed from signer to CarbonCopy

I have goan through the answer for below question
Docusign call back from Docusign Connect not happening on change signer_
My question is - In the callback ( using legacy data format ) I dont see reciepient's type changed to "CarbonCopy" for original signer who has delegated to another signer rather I see the "delegated to" having "Signer" as type in the callback.
Is this something related to Connect configuration? I didn't found relevant setting actually.
This works for my demo account though, but not for customer's DocuSign account.
I have handled this "CarbonCopy" tag in the integration so this is needed information for me.
Is there any setting at account level that controls the recipient type for the original signer is changed from signer to CarbonCopy?
Edit-
In Below sample, mainsigner#yyy.com has delegated to delegatedto#yyy.com , So I would expect a new RecipientStatus node for mainsigner#yyy.com with Type as "CarbonCopy"
<?xml version="1.0" encoding="utf-8"?>
<DocuSignEnvelopeInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
<EnvelopeStatus>
<RecipientStatuses>
<RecipientStatus>
<Type>CarbonCopy</Type>
<Email>abc#xxx.com</Email>
<UserName>ABC</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2021-10-28T11:51:53.177</Sent>
<DeclineReason/>
<Status>Completed</Status>
<RecipientIPAddress/>
<CustomFields>
<CustomField>NonSignerCarbonCopy</CustomField>
<CustomField/>
<CustomField/>
</CustomFields>
<AccountStatus>Active</AccountStatus>
<RecipientId>d4bee1ca-8af2-4d45-83b9-xxxxxxxxx</RecipientId>
</RecipientStatus>
<RecipientStatus>
<Type>Signer</Type>
<Email>delegatedto#yyy.com</Email>
<UserName>delegatedto</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2021-11-04T07:44:41.59</Sent>
<Delivered>2021-11-04T07:55:46.007</Delivered>
<Signed>2021-11-04T07:56:03.007</Signed>
<DeclineReason/>
<Status>Completed</Status>
<RecipientIPAddress>ipaddress</RecipientIPAddress>
<CustomFields>
<CustomField>S||mainsigner#yyy.com</CustomField>
<CustomField/>
<CustomField/>
</CustomFields>
<TabStatuses>
<TabStatus>
<TabType>SignHere</TabType>
<Status>Signed</Status>
<XPosition>187</XPosition>
<YPosition>508</YPosition>
<TabLabel>Sign Here</TabLabel>
<TabName>SignHere</TabName>
<TabValue/>
<DocumentID>336845219</DocumentID>
<PageNumber>2</PageNumber>
</TabStatus>
<TabStatus>
<TabType>DateSigned</TabType>
<Status>Signed</Status>
<XPosition>195</XPosition>
<YPosition>816</YPosition>
<TabLabel>Date Signed</TabLabel>
<TabName>DateSigned</TabName>
<TabValue>11/4/2021 | 7:56 AM PDT</TabValue>
<DocumentID>336845219</DocumentID>
<PageNumber>2</PageNumber>
</TabStatus>
</TabStatuses>
<RecipientAttachment>
<Attachment>
<Data>somedaata</Data>
<Label>DSXForm</Label>
</Attachment>
</RecipientAttachment>
<AccountStatus>Closed</AccountStatus>
<EsignAgreementInformation>
<AccountEsignId>GUID</AccountEsignId>
<UserEsignId>GUID</UserEsignId>
<AgreementDate>2021-11-04T07:55:46.007</AgreementDate>
</EsignAgreementInformation>
<FormData>
<xfdf>
<fields>
<field name="DateSigned">
<value>11/4/2021 | 7:56 AM PDT</value>
</field>
</fields>
</xfdf>
</FormData>
<RecipientId>98525aa9-ae3e-4d1c-aa48-xxxxxxxxxx</RecipientId>
</RecipientStatus>
</RecipientStatuses>
<TimeGenerated>2021-11-04T07:56:23.8331339</TimeGenerated>
<EnvelopeID>ee738247-57a4-49d7-8914-xxxxxxxx</EnvelopeID>
<Subject>C345</Subject>
<UserName>Admin</UserName>
<Email>Admin#yyy.com</Email>
<Status>Completed</Status>
<Created>2021-10-28T11:51:51.707</Created>
<Sent>2021-11-04T07:44:41.637</Sent>
<Delivered>2021-11-04T07:55:46.273</Delivered>
<Signed>2021-11-04T07:56:03.007</Signed>
<Completed>2021-11-04T07:56:03.007</Completed>
<ACStatus>Original</ACStatus>
<ACStatusDate>2021-10-28T11:51:51.707</ACStatusDate>
<ACHolder>Admin</ACHolder>
<ACHolderEmail>Admin#yyy.com</ACHolderEmail>
<ACHolderLocation>DocuSign</ACHolderLocation>
<SigningLocation>Online</SigningLocation>
<SenderIPAddress>ipaddress </SenderIPAddress>
<EnvelopePDFHash/>
<CustomFields/>
<AutoNavigation>true</AutoNavigation>
<EnvelopeIdStamping>true</EnvelopeIdStamping>
<AuthoritativeCopy>false</AuthoritativeCopy>
<DocumentStatuses>
<DocumentStatus>
<ID>888888888</ID>
<Name>C3459</Name>
<TemplateName/>
<Sequence>1</Sequence>
</DocumentStatus>
</DocumentStatuses>
</EnvelopeStatus>
<DocumentPDFs>
<DocumentPDF>
<Name>CertificateOfCompletion_GUID.pdf</Name>
<PDFBytes>Bn8iUlJSRa7MTExKzHx1DNb//bFeKyLoldo39X9/S
.........
and here are the subscribed events
Envelope Sent
Envelope Signed/Completed
Envelope Declined
Envelope Voided
Recipient Signed/Completed
Recipient Declined

Routing Order / Signing Group information in the connect response?

I´m trying to understand the response the connect API (using the webhook status updates) sends. The documentation says, the answer only provides XML elements of EvenvelopeStatus type (plus document PDFs, if requested). This does not include current routing order information or signing group information, right?
Does anyone know, if this is true and if there is a workaround, how to get the current routing order within the connect message without parsing the recipients status?
If one of the recipients is a signing group, will the name and email field remain empty until one of the group members has viewed / signed the document? Then I would expect the name / email field to be filled with the actual signer.
Thank you for your help!
I found the answers to my questions by debugging the interface. It is like expected: names of signing groups are reported in the name tag and replaced by the actual signers name after signing has been completed. Routing status has to be "calculated" by interpreting the recipients status - no overall routing info like in the envelope:get service call.
Current routing situation can be determined from the notification message. See the status attributes for the envelope's recipients.
You need to infer the current routing status by looking at the status values for the recipients. Here is an example notification. You can see that one of the recipients is in completed status and the other is in sent status.
Remember that multiple recipients can be in sent status at the same time if the envelope is using parallel routing.
<?xml version="1.0" encoding="utf-8"?>
<DocuSignEnvelopeInformation
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.net/API/3.0">
<EnvelopeStatus>
<RecipientStatuses>
<RecipientStatus>
<Type>Signer</Type>
<Email>Sam.Spade#example.com</Email>
<UserName>Sam Spade</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2019-05-07T10:43:40.073</Sent>
<Delivered>2019-05-07T10:44:06.023</Delivered>
<Signed>2019-05-07T10:44:12.323</Signed>
<DeclineReason xsi:nil="true"/>
<Status>Completed</Status>
<RecipientIPAddress>141.226.10.195</RecipientIPAddress>
<CustomFields/>
<TabStatuses>
<TabStatus>
<TabType>SignHere</TabType>
<Status>Signed</Status>
<XPosition>341</XPosition>
<YPosition>697</YPosition>
<TabLabel>Sign Here</TabLabel>
<TabName>SignHere</TabName>
<DocumentID>1</DocumentID>
<PageNumber>1</PageNumber>
</TabStatus>
<TabStatus>
<TabType>SignHere</TabType>
<Status>Signed</Status>
<XPosition>416</XPosition>
<YPosition>412</YPosition>
<TabLabel>Sign Here</TabLabel>
<TabName>SignHere</TabName>
<DocumentID>2</DocumentID>
<PageNumber>1</PageNumber>
</TabStatus>
<TabStatus>
<TabType>SignHere</TabType>
<Status>Signed</Status>
<XPosition>416</XPosition>
<YPosition>316</YPosition>
<TabLabel>Sign Here</TabLabel>
<TabName>SignHere</TabName>
<DocumentID>3</DocumentID>
<PageNumber>1</PageNumber>
</TabStatus>
</TabStatuses>
<AccountStatus>Active</AccountStatus>
<RecipientId>64d1f093-d51e-4d38-914e-3255f46c0e18</RecipientId>
</RecipientStatus>
<RecipientStatus>
<Type>Signer</Type>
<Email>Susan.smith#example.com</Email>
<UserName>Susan Smith</UserName>
<RoutingOrder>2</RoutingOrder>
<Sent>2019-05-07T10:44:13.76</Sent>
<DeclineReason xsi:nil="true"/>
<Status>Sent</Status>
<RecipientIPAddress/>
<CustomFields/>
<AccountStatus>Active</AccountStatus>
<RecipientId>ad82fdb5-dfe9-479e-a4ca-0032a51b076a</RecipientId>
</RecipientStatus>
</RecipientStatuses>
<TimeGenerated>2019-05-07T10:47:56.4026603</TimeGenerated>
<EnvelopeID>a65c99da-39aa-488f-909a-1b3964634758</EnvelopeID>
<Subject>Please sign this document set</Subject>
<UserName>Sam Spade</UserName>
<Email>Sam.Spade#example.com</Email>
<Status>Sent</Status>
<Created>2019-05-07T10:43:27.943</Created>
<Sent>2019-05-07T10:44:13.79</Sent>
<ACStatus>Original</ACStatus>
<ACStatusDate>2019-05-07T10:43:27.943</ACStatusDate>
<ACHolder>Sam Spade</ACHolder>
<ACHolderEmail>Sam.Spade#example.com</ACHolderEmail>
<ACHolderLocation>DocuSign</ACHolderLocation>
<SigningLocation>Online</SigningLocation>
<SenderIPAddress>141.226.10.195 </SenderIPAddress>
<EnvelopePDFHash/>
<CustomFields>
<CustomField>
<Name>Order ID</Name>
<Show>True</Show>
<Required>False</Required>
<Value/>
</CustomField>
<CustomField>
<Name>Sales order</Name>
<Show>True</Show>
<Required>False</Required>
<Value>16</Value>
</CustomField>
<CustomField>
<Name>AccountId</Name>
<Show>false</Show>
<Required>false</Required>
<Value>3964103</Value>
<CustomFieldType>Text</CustomFieldType>
</CustomField>
<CustomField>
<Name>AccountName</Name>
<Show>false</Show>
<Required>false</Required>
<Value>World Wide Corp</Value>
<CustomFieldType>Text</CustomFieldType>
</CustomField>
<CustomField>
<Name>AccountSite</Name>
<Show>false</Show>
<Required>false</Required>
<Value>demo</Value>
<CustomFieldType>Text</CustomFieldType>
</CustomField>
</CustomFields>
<AutoNavigation>true</AutoNavigation>
<EnvelopeIdStamping>true</EnvelopeIdStamping>
<AuthoritativeCopy>false</AuthoritativeCopy>
<DocumentStatuses>
<DocumentStatus>
<ID>1</ID>
<Name>Order acknowledgement</Name>
<TemplateName/>
<Sequence>1</Sequence>
</DocumentStatus>
<DocumentStatus>
<ID>2</ID>
<Name>Battle Plan</Name>
<TemplateName/>
<Sequence>2</Sequence>
</DocumentStatus>
<DocumentStatus>
<ID>3</ID>
<Name>Lorem Ipsum</Name>
<TemplateName/>
<Sequence>3</Sequence>
</DocumentStatus>
</DocumentStatuses>
</EnvelopeStatus>
</DocuSignEnvelopeInformation>

DocuSign Connect Local Testing

I am doing some local testing for DocuSign Connect.
I have a dynamic IP address so I am unable to set the URL under DocuSign Connect to publish messages to my local server.
I am thinking of simulating a POST request from DocuSign Connect and I'm wondering if anyone has a sample POST request that I can tap on?
I've edited the GUIDs, IPs and signer/sender information, but here's an example of a Envelope - Delivered message with the following configuration:
<?xml version="1.0" encoding="utf-8"?>
<DocuSignEnvelopeInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
<EnvelopeStatus>
<RecipientStatuses>
<RecipientStatus>
<Type>Signer</Type>
<Email>testemail+12354#test.com</Email>
<UserName>Signer Name</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2016-06-20T15:41:01.78</Sent>
<Delivered>2016-06-20T15:41:26.133</Delivered><DeclineReason xsi:nil="true"/>
<Status>Delivered</Status>
<RecipientIPAddress>123.123.12.22</RecipientIPAddress><CustomFields/>
<TabStatuses>
<TabStatus>
<TabType>SignHere</TabType>
<Status>Active</Status>
<XPosition>412</XPosition>
<YPosition>207</YPosition>
<TabLabel>Signature 1</TabLabel>
<TabName>Sign Here</TabName><TabValue/>
<DocumentID>1</DocumentID>
<PageNumber>1</PageNumber><OriginalValue/></TabStatus>
<TabStatus>
<TabType>DateSigned</TabType>
<Status>NA</Status>
<XPosition>859</XPosition>
<YPosition>364</YPosition>
<TabLabel>Date Signed</TabLabel>
<TabName>Date Signed</TabName><TabValue/>
<DocumentID>1</DocumentID>
<PageNumber>1</PageNumber><OriginalValue/></TabStatus>
</TabStatuses>
<AccountStatus>Active</AccountStatus>
<EsignAgreementInformation>
<AccountEsignId>xxxxxxxx-b74b-4c31-b8f7-fe33af69a315</AccountEsignId>
<UserEsignId>xxxxxxxx-7672-436b-bcf9-a45c9b53247c</UserEsignId>
<AgreementDate>2016-06-20T15:41:26.133</AgreementDate>
</EsignAgreementInformation>
<RecipientId>xxxxxxxx-36be-49b5-8c63-c256b1f261ab</RecipientId>
</RecipientStatus>
</RecipientStatuses>
<TimeGenerated>2016-06-20T15:41:46.2761003</TimeGenerated>
<EnvelopeID>xxxxxxxx-f2ac-489d-babd-d7554ca1b2de</EnvelopeID>
<Subject>Please DocuSign this document: SamplePDF.pdf</Subject>
<UserName>Test Sender</UserName>
<Email>senderemail#test.com</Email>
<Status>Delivered</Status>
<Created>2016-06-20T15:40:33.64</Created>
<Sent>2016-06-20T15:41:01.827</Sent>
<Delivered>2016-06-20T15:41:26.18</Delivered>
<ACStatus>Original</ACStatus>
<ACStatusDate>2016-06-20T15:40:33.64</ACStatusDate>
<ACHolder>Test Sender</ACHolder>
<ACHolderEmail>senderemail#test.com</ACHolderEmail>
<ACHolderLocation>DocuSign</ACHolderLocation>
<SigningLocation>Online</SigningLocation>
<SenderIPAddress>12.163.90.22
</SenderIPAddress><EnvelopePDFHash/>
<CustomFields>
<CustomField>
<Name>Storage?</Name>
<Show>True</Show>
<Required>False</Required><Value/></CustomField>
<CustomField>
<Name>AccountId</Name>
<Show>false</Show>
<Required>false</Required>
<Value>123456</Value>
<CustomFieldType>Text</CustomFieldType>
</CustomField>
<CustomField>
<Name>AccountName</Name>
<Show>false</Show>
<Required>false</Required>
<Value>DocuSign Demo</Value>
<CustomFieldType>Text</CustomFieldType>
</CustomField>
<CustomField>
<Name>AccountSite</Name>
<Show>false</Show>
<Required>false</Required>
<Value>demo</Value>
<CustomFieldType>Text</CustomFieldType>
</CustomField>
</CustomFields>
<AutoNavigation>true</AutoNavigation>
<EnvelopeIdStamping>true</EnvelopeIdStamping>
<AuthoritativeCopy>false</AuthoritativeCopy>
<DocumentStatuses>
<DocumentStatus>
<ID>1</ID>
<Name>SamplePDF.pdf</Name><TemplateName/>
<Sequence>1</Sequence>
</DocumentStatus>
</DocumentStatuses>
</EnvelopeStatus>
<TimeZone>AUS Eastern Standard Time</TimeZone>
<TimeZoneOffset>10</TimeZoneOffset>
</DocuSignEnvelopeInformation>
If Include Documents and Include CoC are ticked each document in the envelope (including CoC) will come through in a separate byte stream:
<DocumentPDFs>
<DocumentPDF>
<Name>SamplePDF.pdf</Name>
<PDFBytes>
{bytestream}
</PDFBytes>
<DocumentID>1</DocumentID>
<DocumentType>CONTENT</DocumentType>
</DocumentPDF>
<DocumentPDF>
<Name>CertificateOfCompletion_{envelopeI}.pdf</Name>
<PDFBytes>
{bytestream}
</PDFBytes>
<DocumentType>SUMMARY</DocumentType>
</DocumentPDF>
</DocumentPDFs>

DocuSign NO_DOCUMENT_RECEIVED

I am following the Docusign guide to upload PDF for signing. I get the error message NO_DOCUMENT_RECEIVED. Can you guide me on what could be causing this ? I am using JDK 8/Win 7/64bit and IDE is Netbeans 7.0.0.1
TIA !
Ruben.
Here is a trace log:
Info: ***** IN SIGN DOCUMENT *****
Info: ***** IN DOCUSIGN AUTHENTICATION *****
Info: STEP 1: Sending Login request...
Info: ***** BASEURL:https://demo.docusign.net/restapi/v2/accounts/1323921 *****
Info: ***** accountID:1323921 *****
Info: ***** IN CREATE ENVELOPE *****
Info: -- Login response --
<?xml version="1.0" encoding="UTF-8"?><loginInformation xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<loginAccounts>
<loginAccount>
<accountId>1323921</accountId>
<baseUrl>https://demo.docusign.net/restapi/v2/accounts/1323921</baseUrl>
<email>MYEMAIL#ABC.COM</email>
<isDefault>true</isDefault>
<name>COMPANY</name>
<siteDescription/>
<userId>23fffd08-d461-4a12-b3e4-8a6528dd2a69</userId>
<userName>Ruben</userName>
</loginAccount>
</loginAccounts>
</loginInformation>
Info: ***** IN SEND CONTRACT *****
Info: SIZE IN BYTES : 513625
Info: ***** request body start *****
Info:
--BOUNDARY
Content-Type: application/xml
Content-Disposition: form-data
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<emailSubject>API Call for adding signature request to document and sending</emailSubject>
<status>sent</status>
<documents>
<document>
<documentBase64></documentBase64> //inserting length of packet (513625) throws invaild size message here
<documentId>1</documentId>
<name>ERS.pdf</name>
</document>
</documents>
<recipients>
<signers>
<signer>
<recipientId>1</recipientId>
<name>Ruben</name>
<email>MYEMAIL#ABC.COM</email>
<tabs>
<signHereTabs>
<signHere>
<xPosition>175</xPosition>
<yPosition>122</yPosition>
<documentId>1</documentId>
<pageNumber>12</pageNumber>
</signHere>
</signHereTabs>
</tabs>
</signer>
</signers>
</recipients>
</envelopeDefinition>
--BOUNDARY
Content-Type: application/pdf
Content-Disposition: file; filename="ERS.pdf"; documentid="1"
Info: [B#50ce7292
Info:
--BOUNDARY--
Info: ***** request body end *****
Info: API call failed, status returned was: 400
Info: Error description:
<?xml version="1.0" encoding="UTF-8"?><errorDetails xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<errorCode>NO_DOCUMENT_RECEIVED</errorCode>
<message>The document element did not contain the encoded document, or there is a problem with the encoding. Bytes for document corresponding to documentId 1 not found in request. 'documentId=<x>' possibly missing from Content-Disposition header.</message>
</errorDetails>
Rewrite the default initializeRequest for handling mutipart uploads so just before upload change the multipart value to true in all other cases such as login set it to false.
private static HttpURLConnection initializeRequest(String url, String method,
String body, String httpAuthHeader, Boolean multipart) {
HttpURLConnection conn = null;
try {
conn = (HttpURLConnection) new URL(url).openConnection();
conn.setRequestMethod(method);
conn.setRequestProperty("X-DocuSign-Authentication", httpAuthHeader);
conn.setRequestProperty("Accept", "application/xml");
conn.setDoOutput(true);
if (multipart) {
conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=BOUNDARY");
} else {
conn.setRequestProperty("Content-Type", "application/xml");
if (method.equalsIgnoreCase("POST") || method.equalsIgnoreCase("PUT") || method.equalsIgnoreCase("DELETE")) {
conn.setRequestProperty("Content-Length", Integer.toString(body.length()));
DataOutputStream dos = new DataOutputStream(conn.getOutputStream());
dos.writeBytes(body);
dos.flush();
dos.close();
}
}
return conn;
} catch (Exception e) {
throw new RuntimeException(e);
}
}

OC 2.0 Fedex shipping method not working

We tried to Fedex shipping method in our opencart website.
It Display the "Error" text.
ERRORERRORcrs691The PurposeOfShipmentType is null, empty or invalid.
The PurposeOfShipmentType is null, empty or invalid.crs1000
Use this xml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://fedex.com/ws/rate/v13">
<SOAP-ENV:Body>
<RateRequest>
<WebAuthenticationDetail>
<UserCredential>
<Key>XXXXX</Key>
<Password>XXXXX</Password>
</UserCredential>
</WebAuthenticationDetail>
<ClientDetail>
<AccountNumber>XXXXX</AccountNumber>
<MeterNumber>XXXXX</MeterNumber>
</ClientDetail>
<TransactionDetail>
<CustomerTransactionId>MY-RATE-REQUEST</CustomerTransactionId>
</TransactionDetail>
<Version>
<ServiceId>crs</ServiceId>
<Major>13</Major>
<Intermediate>0</Intermediate>
<Minor>0</Minor>
</Version>
<ReturnTransitAndCommit>true</ReturnTransitAndCommit>
<RequestedShipment>
<ShipTimestamp>2012-10-09T14:28:07.9489435+05:30</ShipTimestamp>
<DropoffType>REGULAR_PICKUP</DropoffType>
<PackagingType>YOUR_PACKAGING</PackagingType>
<Shipper>
<Address>
<StreetLines>Sardarnagar Main Road, Rajkot</StreetLines>
<City>Rajkot</City>
<StateOrProvinceCode>GJ</StateOrProvinceCode>
<PostalCode>360001</PostalCode>
<CountryCode>IN</CountryCode>
</Address>
</Shipper>
<Recipient>
<Address>
<StreetLines>Radhekrishna App. Main Road , Rajkot</StreetLines>
<City>Bhuj</City>
<StateOrProvinceCode>GJ</StateOrProvinceCode>
<PostalCode>370001</PostalCode>
<CountryCode>IN</CountryCode>
</Address>
</Recipient>
<ShippingChargesPayment>
<PaymentType>SENDER</PaymentType>
<Payor>
<ResponsibleParty>
<AccountNumber>XXXXX</AccountNumber>
</ResponsibleParty>
</Payor>
</ShippingChargesPayment>
<CustomsClearanceDetail>
<DutiesPayment>
<PaymentType>RECIPIENT</PaymentType>
</DutiesPayment>
<DocumentContent>NON_DOCUMENTS</DocumentContent>
<CustomsValue>
<Currency>INR</Currency>
<Amount>299.000000</Amount>
</CustomsValue>
<CommercialInvoice>
<Purpose>NOT_SOLD</Purpose>
</CommercialInvoice>
</CustomsClearanceDetail>
<RateRequestTypes>ACCOUNT</RateRequestTypes>
<RateRequestTypes>LIST</RateRequestTypes>
<PackageCount>1</PackageCount>
<RequestedPackageLineItems>
<SequenceNumber>1</SequenceNumber>
<GroupPackageCount>1</GroupPackageCount>
<Weight>
<Units>KG</Units>
<Value>1</Value>
</Weight>
</RequestedPackageLineItems>
</RequestedShipment>
</RateRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Resources