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()); } }
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()); } }