ToXMLString() public method

public ToXMLString ( string prefix, string name ) : string
prefix string
name string
return string
コード例 #1
0
 /**
   *AUTO_GENERATED
  	  */
 public GetMobileStatusResponseType GetMobileStatus(GetMobileStatusReq getMobileStatusReq, string apiUserName)
 {
     IAPICallPreHandler apiCallPreHandler = null;
      		string portName = "PayPalAPI";
     setStandardParams(getMobileStatusReq.GetMobileStatusRequest);
     DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(getMobileStatusReq.ToXMLString(null, "GetMobileStatusReq"), 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()='GetMobileStatusResponse']");
     return new GetMobileStatusResponseType(xmlNode);
 }
        /// <summary>
        /// 
        /// </summary>
        ///<param name="getMobileStatusReq"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> 
        public GetMobileStatusResponseType GetMobileStatus(GetMobileStatusReq getMobileStatusReq, ICredential credential)
        {
            setStandardParams(getMobileStatusReq.GetMobileStatusRequest);
            DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, getMobileStatusReq.ToXMLString(null, "GetMobileStatusReq"), 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 GetMobileStatusResponseType(
                xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='GetMobileStatusResponse']")
            );
        }
コード例 #3
0
 /**
   *AUTO_GENERATED
  	  */
 public GetMobileStatusResponseType GetMobileStatus(GetMobileStatusReq getMobileStatusReq, string apiUserName)
 {
     setStandardParams(getMobileStatusReq.GetMobileStatusRequest);
     string response = Call("GetMobileStatus", getMobileStatusReq.ToXMLString(), apiUserName);
     XmlDocument xmlDocument = new XmlDocument();
     xmlDocument.LoadXml(response);
     XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='GetMobileStatusResponse']");
     return new GetMobileStatusResponseType(xmlNode);
 }