ToXMLString() public method

public ToXMLString ( string prefix, string name ) : string
prefix string
name string
return string
コード例 #1
0
 /**
   *AUTO_GENERATED
  	  */
 public CancelRecoupResponseType CancelRecoup(CancelRecoupReq cancelRecoupReq, string apiUserName)
 {
     IAPICallPreHandler apiCallPreHandler = null;
      		string portName = "PayPalAPI";
     setStandardParams(cancelRecoupReq.CancelRecoupRequest);
     DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(cancelRecoupReq.ToXMLString(null, "CancelRecoupReq"), null, null);
     apiCallPreHandler = new MerchantAPICallPreHandler(defaultHandler, apiUserName, getAccessToken(), getAccessTokenSecret());
     ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
     ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
     ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = portName;
     string response = Call(apiCallPreHandler);
     XmlDocument xmlDocument = new XmlDocument();
     xmlDocument.LoadXml(response);
     XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='CancelRecoupResponse']");
     return new CancelRecoupResponseType(xmlNode);
 }
        /// <summary>
        /// 
        /// </summary>
        ///<param name="cancelRecoupReq"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> 
        public CancelRecoupResponseType CancelRecoup(CancelRecoupReq cancelRecoupReq, ICredential credential)
        {
            setStandardParams(cancelRecoupReq.CancelRecoupRequest);
            DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, cancelRecoupReq.ToXMLString(null, "CancelRecoupReq"), null, null);
            IAPICallPreHandler apiCallPreHandler = new MerchantAPICallPreHandler(this.config, defaultHandler, credential);
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
            ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = "PayPalAPI";

            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.LoadXml(Call(apiCallPreHandler));
            return new CancelRecoupResponseType(
                xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='CancelRecoupResponse']")
            );
        }
コード例 #3
0
 /**
   *AUTO_GENERATED
  	  */
 public CancelRecoupResponseType CancelRecoup(CancelRecoupReq cancelRecoupReq, string apiUserName)
 {
     setStandardParams(cancelRecoupReq.CancelRecoupRequest);
     string response = Call("CancelRecoup", cancelRecoupReq.ToXMLString(), apiUserName);
     XmlDocument xmlDocument = new XmlDocument();
     xmlDocument.LoadXml(response);
     XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='CancelRecoupResponse']");
     return new CancelRecoupResponseType(xmlNode);
 }