示例#1
0
        public string DoItUsernamePwd(string email, string password, string document)
        {
            var wsi = new WSI();

            if (!wsi.AuthenticateRequest(email, password))
            {
                throw new ArgumentException("Authentication Failed");
            }

            try
            {
                wsi.LoadFromString(document);
                wsi.DoIt();

                return(wsi
                       .GetResults()
                       .InnerXml);
            }
            catch (XmlException)
            {
                throw new ArgumentException("Invalid Import XmlDocument");
            }
            catch
            {
                return(wsi.GetResultsAsString());
            }
        }
示例#2
0
 private String DoItHelper(WSI IPXObject, ref String XmlInputRequestString)
 {
     try
     {
         IPXObject.LoadFromString(XmlInputRequestString);
     }
     catch
     {
         throw new ArgumentException("Invalid Import XmlDocument");
     }
     IPXObject.DoIt();
     try
     {
         XmlDocument d     = IPXObject.GetResults();
         String      d_xml = d.InnerXml;
         return(d_xml);
     }
     catch
     {
         return(IPXObject.GetResultsAsString());
     }
 }