每次DocuSign Connect响应都为空

时间:2014-10-06 01:27:52

标签: c# wcf docusignapi

我正在尝试设置连接侦听器。我目前正在使用我在Azure上托管的C#WCF服务。我能够点击我的服务方法,但docusign的响应每次都为空。在日志中,信封状态xml具有值,但它不会被正确发送或不反序列化。我不确定我做错了什么,似乎没有任何可靠的SOAP实现示例。有人可以帮忙吗?可以在此处查看WSDL http://docusignconnectservice.azurewebsites.net/Service.svc?wsdl

服务实施

public string DocuSignConnectUpdate(DocuSignAPI.DocuSignEnvelopeInformation     envelopeInformation)
    {

        string envelopeId = "";

            if (envelopeInformation == null) return "Envelope is null";
            else return envelopeInformation.EnvelopeStatus.EnvelopeID;
    }

服务合同

[ServiceContract(Namespace = "http://www.docusign.net/API/3.0")]
public interface IService
{

    [OperationContract]
    [XmlSerializerFormatAttribute]
    string DocuSignConnectUpdate(DocuSignAPI.DocuSignEnvelopeInformation envelopeInformation);

    [OperationContract]
    string HelloWorld(string inputString);

DocuSign日志条目

10/6/2014 1:30:12 AM Envelope Data:<?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>email</Email><UserName>Username</UserName><RoutingOrder>1</RoutingOrder><Sent>2014-10-05T17:49:36.58</Sent><DeclineReason xsi:nil="true" /><Status>Sent</Status><RecipientIPAddress /><CustomFields /><AccountStatus>Active</AccountStatus><RecipientId>2a10b0ab-63f1-4df9-9258-36b97b5db120</RecipientId></RecipientStatus></RecipientStatuses><TimeGenerated>2014-10-05T18:30:09.644588</TimeGenerated><EnvelopeID>6d7692e6-3f5c-4889-914f-942b2bd83447</EnvelopeID><Subject> Signature Request on Document</Subject><UserName>Username</UserName><Email>email</Email><Status>Sent</Status><Created>2014-10-05T17:49:35.503</Created> <Sent>2014-10-05T17:49:36.613</Sent><ACStatus>Original</ACStatus><ACStatusDate>2014-10-05T17:49:35.503</ACStatusDate><ACHolder></ACHolder><ACHolderEmail></ACHolderEmail><ACHolderLocation>DocuSign</ACHolderLocation><SigningLocation>Online</SigningLocation><SenderIPAddress>ip </SenderIPAddress><EnvelopePDFHash /><CustomFields /><AutoNavigation>true</AutoNavigation><EnvelopeIdStamping>true</EnvelopeIdStamping><AuthoritativeCopy>false</AuthoritativeCopy><DocumentStatuses><DocumentStatus><ID>1</ID><Name>F_1040.pdf</Name><TemplateName /><Sequence>1</Sequence></DocumentStatus></DocumentStatuses></EnvelopeStatus></DocuSignEnvelopeInformation> 10/6/2014 1:30:12 AM Response: <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"><DocuSignConnectUpdateResponse xmlns="http://www.docusign.net/API/3.0"><DocuSignConnectUpdateResult>Envelope is null</DocuSignConnectUpdateResult></DocuSignConnectUpdateResponse></s:Body> </s:Envelope>

1 个答案:

答案 0 :(得分:1)

我认为您的类映射XML存在问题。 您可以使用http://xmltocsharp.azurewebsites.net/等在线工具对XML响应进行配置,并使用XMLSerializer将该XML解析为对象。