RequestRecipientToken returns Unspecified_Error - objective-c

I am trying to request for a token from my client app implemented in Objective-C.
I first call CreateEnvelopeFromTemplate to get an envelopeID.(It works file)
I then, pass this envelopeID to RequestRecipientToken. Unfortunately, RequestRecipientToken returns Unspecified_Error to me. I cross-checked the SOAP request of RequestRecipientToken as well as the headers didn't find anything wrong.
I've copied the SOAP request and response along with the headers for both the methods.
**CreateEnvelopeFromTemplate Request**
{
"Content-Length" = 2725;
"Content-Type" = "application/soap+xml; charset=utf-8";
Host = "demo.docusign.net";
SOAPAction = "http://www.docusign.net/API/3.0/CreateEnvelopeFromTemplates";
"User-Agent" = wsdl2objc;
"X-DocuSign-Authentication" = "<DocuSignCredentials><Username>dubeynikhileshs#gmail.com</Username><Password>myPassword</Password><IntegratorKey>XORI-84155a30-597a-4821-918a-40551d71dcff</IntegratorKey></DocuSignCredentials>";
}
2013-08-03 21:24:06.619 DocuSignFramework-ObjC[2809:c07] OutputBody:
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:APIService="http://www.docusign.net/API/3.0" xsl:version="1.0">
<soap:Body>
<APIService:CreateEnvelopeFromTemplates>
<APIService:TemplateReferences>
<APIService:TemplateReference>
<APIService:TemplateLocation>Server</APIService:TemplateLocation>
<APIService:Template>5AB61121-DBEF-4403-BD2C-77B6E2E427F0</APIService:Template>
<APIService:RoleAssignments>
<APIService:RoleAssignment>
<APIService:RoleName>Signer</APIService:RoleName>
<APIService:RecipientID>1</APIService:RecipientID>
</APIService:RoleAssignment>
</APIService:RoleAssignments>
<APIService:FieldData>
<APIService:DataValues>
<APIService:DataValue>
<APIService:TabLabel>Full Name 1</APIService:TabLabel>
<APIService:Value>John Smith</APIService:Value>
</APIService:DataValue>
<APIService:DataValue>
<APIService:TabLabel>Company 3</APIService:TabLabel>
<APIService:Value>MyCompany</APIService:Value>
</APIService:DataValue>
</APIService:DataValues>
</APIService:FieldData>
</APIService:TemplateReference>
</APIService:TemplateReferences>
<APIService:Recipients>
<APIService:Recipient>
<APIService:ID>1</APIService:ID>
<APIService:UserName>John Smith</APIService:UserName>
<APIService:Email>johnSmith#mail.com</APIService:Email>
<APIService:Type>Signer</APIService:Type>
<APIService:CaptiveInfo>
<APIService:ClientUserId>1</APIService:ClientUserId>
</APIService:CaptiveInfo>
<APIService:RoutingOrder>1</APIService:RoutingOrder>
<APIService:RoleName>Signer</APIService:RoleName>
</APIService:Recipient>
</APIService:Recipients>
<APIService:EnvelopeInformation>
<APIService:AccountId>e3900d9b-1075-4d95-9d77-aecaddc38467</APIService:AccountId>
<APIService:EmailBlurb>This is my new eSignature service,it allows me to get your signoff without having to fax, scan, retype, refile and wait forever</APIService:EmailBlurb>
<APIService:Subject>Please Sign this NDA: John Smith</APIService:Subject>
</APIService:EnvelopeInformation>
<APIService:ActivateEnvelope>true</APIService:ActivateEnvelope>
</APIService:CreateEnvelopeFromTemplates>
</soap:Body>
</soap:Envelope>
2013-08-03 21:24:12.108 DocuSignFramework-ObjC[2809:c07] ResponseStatus: 200
2013-08-03 21:24:12.108 DocuSignFramework-ObjC[2809:c07] ResponseHeaders:
{
"Cache-Control" = "private, max-age=0";
"Content-Length" = 4108;
"Content-Type" = "application/soap+xml; charset=utf-8";
Date = "Sat, 03 Aug 2013 15:57:31 GMT";
"Strict-Transport-Security" = "max-age=7776000; includeSubDomains";
}
2013-08-03 21:24:12.109 DocuSignFramework-ObjC[2809:c07] ResponseBody:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/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"><env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"><wsa:Action>http://www.docusign.net/API/3.0/CreateEnvelopeFromTemplatesResponse</wsa:Action><wsa:MessageID>urn:uuid:0689b7a8-2206-44a2-a465-1cd448367289</wsa:MessageID><wsa:RelatesTo>urn:uuid:aba49813-2326-4f82-8b2b-9ff361c2ddbc</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp wsu:Id="Timestamp-3a57d1aa-53f7-489b-b442-85494b711036"><wsu:Created>2013-08-03T15:57:32Z</wsu:Created><wsu:Expires>2013-08-03T16:02:32Z</wsu:Expires></wsu:Timestamp></wsse:Security></env:Header><soap:Body><CreateEnvelopeFromTemplatesResponse xmlns="http://www.docusign.net/API/3.0"><CreateEnvelopeFromTemplatesResult><RecipientStatuses><RecipientStatus><Type>Signer</Type><Email>johnSmith#mail.com</Email><UserName>John Smith</UserName><RoutingOrder>1</RoutingOrder><Sent>2013-08-03T08:57:31.883</Sent><DeclineReason xsi:nil="true" /><Status>Sent</Status><RecipientIPAddress /><ClientUserId>1</ClientUserId><CustomFields /><TabStatuses><TabStatus><TabType>FullName</TabType><Status>Active</Status><XPosition>558</XPosition><YPosition>250</YPosition><TabLabel>Full Name 1</TabLabel><TabName>FullName</TabName><TabValue /></TabStatus><TabStatus><TabType>Custom</TabType><Status>Active</Status><XPosition>556</XPosition><YPosition>281</YPosition><TabLabel>Company 3</TabLabel><TabName>Company</TabName><TabValue>MyCompany</TabValue></TabStatus><TabStatus><TabType>Custom</TabType><Status>Active</Status><XPosition>558</XPosition><YPosition>320</YPosition><TabLabel>Data Field 5</TabLabel><TabName>Location</TabName><TabValue>Seattle</TabValue></TabStatus><TabStatus><TabType>DateSigned</TabType><Status>Active</Status><XPosition>556</XPosition><YPosition>362</YPosition><TabLabel>Date Signed 7</TabLabel><TabName>DateSigned</TabName><TabValue /></TabStatus><TabStatus><TabType>SignHere</TabType><Status>Active</Status><XPosition>375</XPosition><YPosition>1279</YPosition><TabLabel>Sign Here 6</TabLabel><TabName>SignHere</TabName><TabValue /></TabStatus><TabStatus><TabType>DateSigned</TabType><Status>Active</Status><XPosition>275</XPosition><YPosition>1435</YPosition><TabLabel>Date Signed 7</TabLabel><TabName>DateSigned</TabName><TabValue /></TabStatus></TabStatuses></RecipientStatus></RecipientStatuses><TimeGenerated>2013-08-03T08:57:32.1314114</TimeGenerated><EnvelopeID>536d4826-0797-47de-b502-daa02e6191de</EnvelopeID><Subject>Please Sign this NDA: John Smith</Subject><UserName>Nikhilesh Dubey</UserName><Email>dubeynikhileshs#gmail.com</Email><Status>Sent</Status><Created>2013-08-03T08:57:31.68</Created><Sent>2013-08-03T08:57:31.9130072</Sent><ACStatus>Original</ACStatus><ACStatusDate>2013-08-03T08:57:31.68</ACStatusDate><ACHolder>Nikhilesh Dubey</ACHolder><ACHolderEmail>dubeynikhileshs#gmail.com</ACHolderEmail><ACHolderLocation>DocuSign</ACHolderLocation><SigningLocation>Online</SigningLocation><SenderIPAddress>120.61.122.206 </SenderIPAddress><EnvelopePDFHash /><CustomFields><CustomField><Name>Envelope Field 1</Name><Show>False</Show><Required>False</Required><Value /></CustomField><CustomField><Name>Envelope Field 2</Name><Show>False</Show><Required>False</Required><Value /></CustomField><CustomField><Name>SendingAppVersion</Name><Show>False</Show><Required>False</Required><Value>Version=7.5.7600.16385 (win7_rtm.090713-1255);AppExe=w3wp.exe</Value></CustomField></CustomFields><AutoNavigation>true</AutoNavigation><EnvelopeIdStamping>true</EnvelopeIdStamping><AuthoritativeCopy>false</AuthoritativeCopy></CreateEnvelopeFromTemplatesResult></CreateEnvelopeFromTemplatesResponse></soap:Body></soap:Envelope>
2013-08-03 21:24:13.439 DocuSignFramework-ObjC[2809:c07] respone <APIServiceSoap12BindingResponse: 0x7c87190>
bodyParts (
"<APIService_CreateEnvelopeFromTemplatesResponse: 0x7b7bcb0>"
)
2013-08-03 21:24:13.440 DocuSignFramework-ObjC[2809:c07] response.CreateEnvelopeFromTemplatesResult.EnvelopeID 536d4826-0797-47de-b502-daa02e6191de
**RequestRecipientToken**
2013-08-03 21:24:13.442 DocuSignFramework-ObjC[2809:c07] OutputHeaders:
{
"Content-Length" = 1773;
"Content-Type" = "application/soap+xml; charset=utf-8";
Host = "demo.docusign.net";
SOAPAction = "http://www.docusign.net/API/3.0/RequestRecipientToken";
"User-Agent" = wsdl2objc;
"X-DocuSign-Authentication" = "<DocuSignCredentials><Username>dubeynikhileshs#gmail.com</Username><Password>myPassword</Password><IntegratorKey>XORI-84155a30-597a-4821-918a-40551d71dcff</IntegratorKey></DocuSignCredentials>";
}
2013-08-03 21:24:13.443 DocuSignFramework-ObjC[2809:c07] OutputBody:
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:APIService="http://www.docusign.net/API/3.0" xsl:version="1.0">
<soap:Body>
<APIService:RequestRecipientToken>
<APIService:EnvelopeID>536d4826-0797-47de-b502-daa02e6191de</APIService:EnvelopeID>
<APIService:ClientUserID>1</APIService:ClientUserID>
<APIService:Username>John Smith</APIService:Username>
<APIService:Email>johnSmith#mail.com</APIService:Email>
<APIService:AuthenticationAssertion>
<APIService:AssertionID>Your AssertionID Here</APIService:AssertionID>
<APIService:AuthenticationInstant>2013-08-03T15:54:13Z</APIService:AuthenticationInstant>
<APIService:AuthenticationMethod>Password</APIService:AuthenticationMethod>
<APIService:SecurityDomain>YourApp.com</APIService:SecurityDomain>
</APIService:AuthenticationAssertion>
<APIService:ClientURLs>
<APIService:OnSigningComplete>http://www.google.com</APIService:OnSigningComplete>
<APIService:OnViewingComplete>http://www.google.com</APIService:OnViewingComplete>
<APIService:OnCancel>http://www.google.com</APIService:OnCancel>
<APIService:OnDecline>http://www.google.com</APIService:OnDecline>
<APIService:OnSessionTimeout>http://www.google.com</APIService:OnSessionTimeout>
<APIService:OnException>http://www.google.com</APIService:OnException>
<APIService:OnIdCheckFailed>http://www.google.com</APIService:OnIdCheckFailed>
</APIService:ClientURLs>
</APIService:RequestRecipientToken>
</soap:Body>
</soap:Envelope>
2013-08-03 21:24:16.003 DocuSignFramework-ObjC[2809:c07] ResponseStatus: 500
2013-08-03 21:24:16.003 DocuSignFramework-ObjC[2809:c07] ResponseHeaders:
{
"Cache-Control" = private;
"Content-Length" = 1475;
"Content-Type" = "application/soap+xml; charset=utf-8";
Date = "Sat, 03 Aug 2013 15:57:38 GMT";
"Strict-Transport-Security" = "max-age=7776000; includeSubDomains";
}
2013-08-03 21:24:16.004 DocuSignFramework-ObjC[2809:c07] ResponseBody:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/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"><env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"><wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action><wsa:MessageID>urn:uuid:1688ead3-d6c4-4fff-9e41-8732160db9ce</wsa:MessageID><wsa:RelatesTo>urn:uuid:c5fe47b4-fc7f-47a3-855b-0b2d6435bd32</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp wsu:Id="Timestamp-ff87b1c1-2ce2-43e6-8ccb-99e71bb2f8ac"><wsu:Created>2013-08-03T15:57:38Z</wsu:Created><wsu:Expires>2013-08-03T16:02:38Z</wsu:Expires></wsu:Timestamp></wsse:Security></env:Header><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:lang="en">Unspecified_Error</soap:Text></soap:Reason><soap:Node>https://demo.docusign.net/api/3.0/dsapi.asmx</soap:Node><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>
namespace error : xmlns: 'missing in Web.Config' is not a valid URI
t/api/3.0/dsapi.asmx</soap:Node><detail><ErrorCode xmlns="missing in Web.Config"
^
namespace error : xmlns: 'missing in Web.Config' is not a valid URI
="missing in Web.Config">1</ErrorCode><ErrorReason xmlns="missing in Web.Config"

I'm wondering if the error is due to the fact that you are saving your envelope as a draft envelope instead of sending it. Since you are using the
CreateEnvelopeFromTemplate()
api call, if it successfully completes then the end result should be an envelope that is saved as a draft and not sent yet (you can confirm by looking in your draft folder in the DocuSign Console). To request a recipient token the envelope needs to be sent, otherwise you'd want to request a sender token instead. Try calling
SendEnvelope()
after your CreateEnvelopeFromTemplate() call but before the RequestRecipientToken call.

Related

How to add custom object for workday API for Edit_Worker_additional_Data

SOAP based XML file :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc" xmlns:cus="urn:com.workday/tenants/super/data/custom">
<soapenv:Header>
<bsvc:Workday_Common_Header>
<bsvc:Include_Reference_Descriptors_In_Response>1</bsvc:Include_Reference_Descriptors_In_Response>
</bsvc:Workday_Common_Header>
</soapenv:Header>
<soapenv:Body>
<bsvc:Edit_Worker_Additional_Data_Request bsvc:version="v36.0">
<bsvc:Business_Process_Parameters>
<bsvc:Auto_Complete>true</bsvc:Auto_Complete>
<bsvc:Run_Now>true</bsvc:Run_Now>>
<bsvc:Comment_Data>
<bsvc:Comment>Test comment on 27 March- attempt2</bsvc:Comment>
</bsvc:Comment_Data>
</bsvc:Business_Process_Parameters>
<bsvc:Worker_Custom_Object_Data>
<bsvc:Effective_Date>2021-03-25</bsvc:Effective_Date>
<bsvc:Worker_Reference bsvc:Descriptor="Employee_ID">
<bsvc:ID bsvc:type="Employee_ID">123</bsvc:ID>
</bsvc:Worker_Reference>
<bsvc:Business_Object_Additional_Data>
<cus:ContractData>
<cus:contractDate>2021-03-23</cus:contractDate>
<cus:wd002AddendumEffectiveDate2>2021-05-23</cus:wd002AddendumEffectiveDate2>
<cus:commissionRates>22.25</cus:commissionRates>
</cus:ContractData>
</bsvc:Business_Object_Additional_Data>
</bsvc:Worker_Custom_Object_Data>
</bsvc:Edit_Worker_Additional_Data_Request>
</soapenv:Body>
</soapenv:Envelope>
C# code:
`ServiceReference1.Edit_Worker_Additional_DataInput data = new ServiceReference1.Edit_Worker_Additional_DataInput(); data.Edit_Worker_Additional_Data_Request.Worker_Custom_Object_Data.Business_Object_Additional_Data.Any=
new System.Xml.XmlElement[] { };`
How to store soap xml file data in "System.Xml.XmlElement[]" array ?

Not able to move a message to a specific folder in outlook addin

My outlook addin uses "ReadWriteMailbox" permission. I am trying to use makeEwsRequestAsync method and send a EWS "MoveItem" request to move the message to a specific folder. But i am getting the following errror,
"The EWS Id is in EwsLegacyId format which is not supported by the Exchange version specified by your request. Please use the ConvertId method to convert the Id from EwsId to EwsLegacyId format."
Request Sent
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<RequestServerVersion Version="Exchange2013" />
</soap:Header>
<soap:Body>
<MoveItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ToFolderId>
<t:FolderId Id="AAAbAEJhbGFrcmlzaG5hbl9SQHN5bWFudGVjLmNvbQAuAAAAAACALDzcpfeRQ7ZlsoKB0iVmAQAjK9sGaxZsQpt2dmaMGjhaAADb64+wAAA=" ChangeKey="AQAAABYAAAAjK9sGaxZsQpt2dmaMGjhaAADcIrnw"/>
</ToFolderId>
<ItemIds>
<t:ItemId Id="AAMkAGJiNjY2ZTk1LTZkMDEtNGQyYy05M2M2LWMyZmQwMzY1M2JhMQBGAAAAAACALDzcpfeRQ7ZlsoKB0iVmBwArZr3QPuquTIplat84SmYEAEq/mAl5AAAjK9sGaxZsQpt2dmaMGjhaAADb62uqAAA="/>
</ItemIds>
</MoveItem>
</soap:Body>
</soap:Envelope>
Response Received
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="1075" MinorBuildNumber="20" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body>
<m:MoveItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:MoveItemResponseMessage ResponseClass="Error">
<m:MessageText>The EWS Id is in EwsLegacyId format which is not supported by the Exchange version specified by your request. Please use the ConvertId method to convert the Id from EwsId to EwsLegacyId format.
</m:MessageText>
<m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Items/>
</m:MoveItemResponseMessage>
</m:ResponseMessages>
</m:MoveItemResponse>
</s:Body>
</s:Envelope>
I am able to use the MoveItem EWS operation and move the messages to "Junk Email" folder. But i want to move messages to a specific folder created by a earlier "CreateFolder" EWS operation. The id of the folder is "AAAbAEJhbGFrcmlzaG5hbl9SQHN5bWFudGVjLmNvbQAuAAAAAACALDzcpfeRQ7ZlsoKB0iVmAQAjK9sGaxZsQpt2dmaMGjhaAADb64+wAAA="
Using the above id in "GetFolder" operation correctly returns the no. of items in the folder. But I am not able to get the "MoveItem" operation to work. All the EWS operations are performed via the "makeEwsRequestAsync" call. Could you help with this?
Updates
CreateFolder Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<RequestServerVersion Version="Exchange2013" />
</soap:Header>
<soap:Body>
<CreateFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ParentFolderId><t:DistinguishedFolderId Id="msgfolderroot"/></ParentFolderId> <Folders><t:Folder><t:DisplayName>Submissions</t:DisplayName></t:Folder></Folders>
</CreateFolder>
</soap:Body>
</soap:Envelope>
Create Folder Response:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="1075" MinorBuildNumber="21" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body>
<m:CreateFolderResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:CreateFolderResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:Folder><t:FolderId Id="AAAbAEJhbGFrcmlzaG5hbl9SQHN5bWFudGVjLmNvbQAuAAAAAACALDzcpfeRQ7ZlsoKB0iVmAQAjK9sGaxZsQpt2dmaMGjhaAADek+aFAAA=" ChangeKey="AQAAABYAAAAjK9sGaxZsQpt2dmaMGjhaAADeyyJ9"/>
</t:Folder>
</m:Folders>
</m:CreateFolderResponseMessage>
</m:ResponseMessages>
</m:CreateFolderResponse>
</s:Body>
</s:Envelope>
Move Item Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header> <RequestServerVersion Version="Exchange2013" /> </soap:Header>
<soap:Body>
<MoveItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ToFolderId>
<t:FolderId Id="AAAbAEJhbGFrcmlzaG5hbl9SQHN5bWFudGVjLmNvbQAuAAAAAACALDzcpfeRQ7ZlsoKB0iVmAQAjK9sGaxZsQpt2dmaMGjhaAADek+aFAAA=" ChangeKey="AQAAABYAAAAjK9sGaxZsQpt2dmaMGjhaAADeyyJ9"/>
</ToFolderId>
<ItemIds>
<t:ItemId Id="AAMkAGJiNjY2ZTk1LTZkMDEtNGQyYy05M2M2LWMyZmQwMzY1M2JhMQBGAAAAAACALDzcpfeRQ7ZlsoKB0iVmBwArZr3QPuquTIplat84SmYEAEq/mAl5AAAjK9sGaxZsQpt2dmaMGjhaAADdyMHzAAA="/>
</ItemIds>
</MoveItem>
</soap:Body>
</soap:Envelope>
Move Item Response:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="1075" MinorBuildNumber="21" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body>
<m:MoveItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:MoveItemResponseMessage ResponseClass="Error">
<m:MessageText>The EWS Id is in EwsLegacyId format which is not supported by the Exchange version specified by your request. Please use the ConvertId method to convert the Id from EwsId to EwsLegacyId format.
</m:MessageText>
<m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Items/>
</m:MoveItemResponseMessage>
</m:ResponseMessages>
</m:MoveItemResponse>
</s:Body>
</s:Envelope>
More likely your requests to "CreateFolder" and request "MoveItem" have different "RequestServerVersion". Read more on EWS schema versions in Exchange. EWS Id format has been changed I believe in "Exchange2007_SP1" version. This make me think you have used the example for "CreateFolder" request which include "RequestServerVersion" set to "Exchange2007" and it will return legacy folder Id.
EDIT:
I didn't try to reproduce your requests/response sequence, instead I used documented ways to send the following requests:
CreateFolder operation
MoveItem operation
Request to create the folder looks like ...
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />
</soap:Header>
<soap:Body>
<CreateFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ParentFolderId>
<t:DistinguishedFolderId Id="msgfolderroot"/>
</ParentFolderId>
<Folders>
<t:Folder>
<t:DisplayName>Test Folder1</t:DisplayName>
</t:Folder>
</Folders>
</CreateFolder>
</soap:Body>
</soap:Envelope>
And response is ...
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="1084" MinorBuildNumber="21" Version="V2017_04_14" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body>
<m:CreateFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:CreateFolderResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:Folder>
<t:FolderId Id="AQMkADg0ZDZhNWFiLWE0Y2EtNDc4My05MGU1LTY5ZWNiOTQ5MmY5YwAuAAADEgGHnGK1T06Yq8xwQCjiHwEAkUJPW0th2EGwjXYeK6AWSQABv62c1AAAAA==" ChangeKey="AQAAABYAAACRQk9bS2HYQbCNdh4roBZJAAG/8ffU"/>
</t:Folder>
</m:Folders>
</m:CreateFolderResponseMessage>
</m:ResponseMessages>
</m:CreateFolderResponse>
</s:Body>
</s:Envelope>
The folder created successfully. As per documentation to perform MoveItem request I need the item's change key. I performed GetItem request and got the following response ...
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="1084" MinorBuildNumber="21" Version="V2017_04_14" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:GetItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:Message>
<t:ItemId Id="AQMkADg0ZDZhNWFiLWE0Y2EtNDc4My05MGU1LTY5ZWNiOTQ5MmY5YwBGAAADEgGHnGK1T06Yq8xwQCjiHwcAkUJPW0th2EGwjXYeK6AWSQAAAgEMAAAAkUJPW0th2EGwjXYeK6AWSQABv62YlAAAAA==" ChangeKey="CQAAABYAAACRQk9bS2HYQbCNdh4roBZJAAG/8awE"/>
</t:Message>
</m:Items>
</m:GetItemResponseMessage>
</m:ResponseMessages>
</m:GetItemResponse>
</s:Body>
</s:Envelope>
And finally I need to move the item. The following is my request to move the item ....
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />
</soap:Header>
<soap:Body>
<MoveItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<ToFolderId>
<t:FolderId Id="AQMkADg0ZDZhNWFiLWE0Y2EtNDc4My05MGU1LTY5ZWNiOTQ5MmY5YwAuAAADEgGHnGK1T06Yq8xwQCjiHwEAkUJPW0th2EGwjXYeK6AWSQABv62c1AAAAA=="/>
</ToFolderId>
<ItemIds>
<t:ItemId Id="AQMkADg0ZDZhNWFiLWE0Y2EtNDc4My05MGU1LTY5ZWNiOTQ5MmY5YwBGAAADEgGHnGK1T06Yq8xwQCjiHwcAkUJPW0th2EGwjXYeK6AWSQAAAgEMAAAAkUJPW0th2EGwjXYeK6AWSQABv62YlAAAAA==" ChangeKey="CQAAABYAAACRQk9bS2HYQbCNdh4roBZJAAG/8awE"/>
</ItemIds>
</MoveItem>
</soap:Body>
</soap:Envelope>
It is succeeded and item has been moved to my new folder.
The following are suggestions for you to proceed with your debugging ...
Look at the request how you get the itemId. The issue may be there. You need to specify the same "RequestServerVersion" to get the ChangeKey.
I suggest you to have common function for all SOAP request you do to wrap each request body. In this case you will not get in trouble with legacy data.
Something like this, very simple wrapper ...
/**
* Wrap an Exchange Web Services request in a SOAP envelope.
* #private
* #param {string} payload request XML.
* #return {string} Ready to send SOAP EWS request.
*/
function _wrapSoapEnvelope(payload) {
var result = '<?xml version="1.0" encoding="utf-8"?>' +
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' +
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" ' +
'xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" ' +
'xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">' +
'<soap:Header>' +
'<t:RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />' +
'</soap:Header>' +
'<soap:Body>' + payload + '</soap:Body>' +
'</soap:Envelope>';
return result;
};
In this case your requests will be very simple and unified (the following 3 requests I have used for your case) ...
this.createFolderRequest = function (folderName) {
var result = '<CreateFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">' +
'<ParentFolderId>' +
'<t:DistinguishedFolderId Id="msgfolderroot"/>' +
'</ParentFolderId>' +
'<Folders>' +
'<t:Folder>' +
'<t:DisplayName>' + folderName + '</t:DisplayName>' +
'</t:Folder>' +
'</Folders>' +
'</CreateFolder>';
return _wrapSoapEnvelope(result);
};
this.moveItemRequest = function (folderId, itemId, changeKey) {
var result = '<MoveItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">' +
'<ToFolderId>' +
'<t:FolderId Id="' + folderId + '"/>' +
'</ToFolderId>' +
'<ItemIds>' +
'<t:ItemId Id="' + itemId + '" ChangeKey="' + changeKey + '"/>' +
'</ItemIds>' +
'</MoveItem>';
return _wrapSoapEnvelope(result);
};
this.getChangeKeyRequest = function (itemId) {
var result = '<GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">' +
'<ItemShape>' +
'<t:BaseShape>IdOnly</t:BaseShape>' +
'</ItemShape>' +
'<ItemIds><t:ItemId Id="' + itemId + '"/></ItemIds>' +
'</GetItem>';
return _wrapSoapEnvelope(result);
};
I suggest you check your requests as they are look different and follow Microsoft original documentation, instead of examples taken from other sources.
And this is it. The purpose of SO is QandA, not remote debugging, so you are on your own with your code issues. Please take a time to debug, clean up your code as well as read a bit more on documentation provided and you'll make it work.

How to embed CDATA in Mulesoft

I'm trying to embed a literal CDATA value in a Mulesoft flow and cannot figure out how to do so.
My desired output (in an HTTP request body) is:
<?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">
<soap:Body>
<query xmlns="http://autotask.net/ATWS/v1_5/">
<sXML>
<![CDATA[<queryxml><entity>ticket</entity><query><condition><field>id<expression op="equals">12345</expression></field></condition></query></queryxml>]]>
</sXML>
</query>
</soap:Body>
</soap:Envelope>
My Dataweave transformation looks as follows:
%dw 1.0
%output application/xml
%namespace soap http://schemas.xmlsoap.org/soap/envelope
---
{
soap#Envelope #(version: "1.0") : {
soap#Header: {},
soap#Body: {
query: {
sXML: "<queryxml><entity>ticket</entity><query><condition><field>id<expression op=\"equals\">12345</expression></field></condition></query></queryxml>"
}
}
}
}
But when I send this request to requestb.in (to inspect the contents), I can see it's coming through like this (focus on the sXML entity):
<?xml version='1.0' encoding='UTF-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope" version="1.0">
<soap:Header/>
<soap:Body>
<query>
<sXML><queryxml><entity>ticket</entity><query><condition><field>id<expression op="equals">12345</expression></field></condition></query></queryxml></sXML>
</query>
</soap:Body>
</soap:Envelope>
How can I get a literal CDATA value in there via dataweave / MEL?
Thank you.
I would try:
sXML: "<queryxml> .... </queryxml>" as :cdata
See https://docs.mulesoft.com/mule-user-guide/v/3.8/dataweave-formats#custom-types-2 for more information.
handleInteractiveOrder:
write(vars.subm.soap#Envelope.soap#Body.cp#handleInteractiveOrder,"application/xml")
as CData
in mule 4 we can do like this. I kept my XML in subm variable.

How to integrate TCS api with odoo 9

Please tell me how to integrate TCS Api in Odoo . I have some nominal code but i don't know this is a APi or not . If this is a Api then please tell me how i use this Code
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /Service1.asmx HTTP/1.1
Host: 202.61.51.93
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://202.61.51.93:6265/GetAllCountries"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetAllCountries xmlns="http://202.61.51.93:6265/" />
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetAllCountriesResponse xmlns="http://202.61.51.93:6265/">
<GetAllCountriesResult>xmlxml</GetAllCountriesResult>
</GetAllCountriesResponse>
</soap:Body>
</soap:Envelope>

WCF request with default empty tags

I'm trying to connect to a SOAP 1.1 webservice, using TLS.
The certificate has been set up right, and I am able to communicate with the webservice.
However, when I try to do this using a plain C# project, using proxyclasses generated by VS2010, the request seems to be incomplete, as in, the empty tags are not in the request. I then get a "This is an operation implementation generated fault" fault, viewable in Fiddler
If I then try to launch a request using SoapUI, I get a succesful response from the webservice.
I used Fiddler to compare both requests, and I noticed that the C# request was pretty plain, only sending elements that were filled in in my C# class.
But when I check the SoapUI request, this request included EVERY element defined in the WSDL/XSD's, even though they're empty.
I'm trying to understand how I can configure the C# client to include empty elements, to see if the webservice will accept my request, however I was unable to find such setting.
The C# request response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xmlns="">
SOAP-ENV:Server
</faultcode>
<faultstring xmlns="">
This is an operation implementation generated fault
</faultstring>
<faultactor xmlns=""/>
<detail xmlns="">
<ns:SOAPFault xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:xxx:xxx:data:soapfault:1:standard" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ns:ErrorCode>2.0</ns:ErrorCode>
<ns:ErrorText>XML schema validation error</ns:ErrorText>
<ns:ErrorDetails>
/{urn:xxx:xxx:service:contractcancellation:1:standard}ContractCancellationRequestEnvelope[1]/part1[1]/ContractCancellationRequestEnvelope[1]/BusinessDocumentHeader[1]/Destination[1]
</ns:ErrorDetails>
</ns:SOAPFault>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The C# request:
POST xx HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:ContractCancellationRequestEnvelope"
Host: xx
Content-Length: 887
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ContractCancellationRequestEnvelope xmlns="urn:xxx:xxx:data:contractcancellationrequest:1:standard">
<Portaal_Content>
<Portaal_MeteringPoint>
<EANID>xxx</EANID>
<MPCommercialCharacteristics>
<ContractCancellationDate>
2013-11-15
</ContractCancellationDate>
</MPCommercialCharacteristics>
<Portaal_Mutation>
<Initiator>xxx</Initiator>
<Dossier>
<ID>TST0000001</ID>
</Dossier>
</Portaal_Mutation>
</Portaal_MeteringPoint>
</Portaal_Content>
</ContractCancellationRequestEnvelope>
</s:Body>
</s:Envelope>
The SoapUI request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xxx:xxx:data:contractcancellationrequest:1:standard">
<soapenv:Header/>
<soapenv:Body>
<urn:ContractCancellationRequestEnvelope>
<urn:BusinessDocumentHeader>
<!--Optional:-->
<urn:ContentHash>?</urn:ContentHash>
<!--Optional:-->
<urn:ConversationID>?</urn:ConversationID>
<!--Optional:-->
<urn:CorrelationID>?</urn:CorrelationID>
<urn:CreationTimestamp>?</urn:CreationTimestamp>
<!--Optional:-->
<urn:DocumentID>?</urn:DocumentID>
<!--Optional:-->
<urn:ExpiresAt>?</urn:ExpiresAt>
<urn:MessageID>?</urn:MessageID>
<!--Optional:-->
<urn:ProcessTypeID>?</urn:ProcessTypeID>
<!--Optional:-->
<urn:RepeatedRequest>?</urn:RepeatedRequest>
<!--Optional:-->
<urn:TestRequest>?</urn:TestRequest>
<urn:Destination>
<urn:Receiver>
<!--Optional:-->
<urn:Authority>?</urn:Authority>
<!--Optional:-->
<urn:ContactTypeIdentifier>?</urn:ContactTypeIdentifier>
<urn:ReceiverID>?</urn:ReceiverID>
</urn:Receiver>
<!--Optional:-->
<urn:Service>
<!--Optional:-->
<urn:ServiceMethod>?</urn:ServiceMethod>
<!--Optional:-->
<urn:ServiceName>?</urn:ServiceName>
</urn:Service>
</urn:Destination>
<!--Optional:-->
<urn:Manifest>
<urn:NumberofItems>?</urn:NumberofItems>
<!--1 or more repetitions:-->
<urn:ManifestItem>
<!--Optional:-->
<urn:Description>?</urn:Description>
<!--Optional:-->
<urn:LanguageCode>?</urn:LanguageCode>
<urn:MimeTypeQualifierCode>?</urn:MimeTypeQualifierCode>
<urn:UniformResourceIdentifier>?</urn:UniformResourceIdentifier>
</urn:ManifestItem>
</urn:Manifest>
<urn:Source>
<!--Optional:-->
<urn:Authority>?</urn:Authority>
<!--Optional:-->
<urn:ContactTypeIdentifier>?</urn:ContactTypeIdentifier>
<urn:SenderID>?</urn:SenderID>
</urn:Source>
</urn:BusinessDocumentHeader>
<urn:Portaal_Content>
<urn:Portaal_MeteringPoint>
<urn:EANID>?</urn:EANID>
<urn:MPCommercialCharacteristics>
<urn:ContractCancellationDate>?</urn:ContractCancellationDate>
</urn:MPCommercialCharacteristics>
<urn:Portaal_Mutation>
<!--Optional:-->
<urn:ExternalReference>?</urn:ExternalReference>
<urn:Initiator>?</urn:Initiator>
<!--Optional:-->
<urn:Dossier>
<urn:ID>?</urn:ID>
</urn:Dossier>
</urn:Portaal_Mutation>
</urn:Portaal_MeteringPoint>
</urn:Portaal_Content>
</urn:ContractCancellationRequestEnvelope>
</soapenv:Body>
</soapenv:Envelope>
As you can see, the SoapUI request is far more complete, even though the elements are empty.
C# code (important parts):
_binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
_binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
_endpoint = new EndpointAddress(endpointAddress + "xxx");
_proxy = new ContractCancellationPortTypeClient(_binding, _endpoint);
_proxy.ClientCredentials.ClientCertificate.SetCertificate(
StoreLocation.LocalMachine,
StoreName.My,
X509FindType.FindBySubjectName,
"xxx");
_proxy.ContractCancellation(new ContractCancellationRequestEnvelope()
{ Portaal_Content = new ContractCancellationRequestEnvelope_PC()
{ Portaal_MeteringPoint = new ContractCancellationRequestEnvelope_PC_PMP()
{ EANID = request.EanId,
MPCommercialCharacteristics = new ContractCancellationRequestEnvelope_PC_PMP_MPCC()
{ ContractCancellationDate = request.ContractCancellationDate },
Portaal_Mutation = new ContractCancellationRequestEnvelope_PC_PMP_PM()
{ Initiator = request.SupplierEanId,
Dossier = new ContractCancellationRequestEnvelope_PC_PMP_PM_Dossier()
{ ID = "TST0000001" }
}
}
});
In your code, you're generating the Portaal_Content portion of the ContractCancellationRequestEnvelope, but not the BusinessDocumentHeader portion.
If you look at the fault received (via C#) I'm betting that there's one or more required elements in the BusinessDocumentHeader section that are missing:
The error text is XML schema validation error, and the error detail is:
ContractCancellationRequestEnvelope[1]/part1[1]/ContractCancellationRequestEnvelope[1]/BusinessDocumentHeader[1]/Destination[1]
You need to ensure that all required elements are present in your SOAP message.
EDIT
Something like this should do the trick:
ContractCancellationRequestEnvelope reqMsg = new ContractCancellationRequestEnvelope();
reqMsg.BusinessDocumentHeader = new BusinessDocumentHeader()
{ CorrelationTimestamp = "?",
MessageID = "?" };
reqMsg.BusinessDocumentHeader.Destination = new Destination();
reqMsg.BusinessDocumentHeader.Receiver = new Receiver()
{ ReceiverID = "?" };
And so on. Basically, make sure that you create every element that is required.
By the way, you can do nested automatic initialization (as in the code you posted), I simply took a more explicit route in my example for readability.
The service's WSDL will tell you what is required or optional.
If you need more help either provide the URL for the service or post the WSDL.