Jump to content

jladd45205

Members
  • Posts

    2
  • Joined

  • Last visited

  • Days Won

    1
  • Donations

    0.00 GBP 

jladd45205 last won the day on May 29 2019

jladd45205 had the most liked content!

jladd45205's Achievements

Newbie

Newbie (1/3)

3

Reputation

  1. Until the Error is fixed in the script by the devs, you can just edit the script to replace movemap-generator to mmap-extractor
  2. Yes you can connect to the SOAP Endpoints via C#. Although u cant generate the WSDL, u can manually setup the Envelope XML yourself and send it as a normal web request. Below is some sample code I used to send money via mail to a specific account. You just need to look at the source on how the SOAP endpoint is reading the incoming stuff and then reverse engineer it. public async Task SendMoney(string charecter, long quanity) { var realm = await _forumnDB.Realms.FindAsync(_realmID); if (!string.IsNullOrWhiteSpace(realm.SoapIP) && realm.SoapPort > 0 && !string.IsNullOrWhiteSpace(realm.SoapUserName) && !string.IsNullOrWhiteSpace(realm.SoapPassword)) { XmlDocument soapEnvelopeXml = GetXMLDoc(string.Format("send money {0} \"Approved GM Request Money\" \"Attached is the money you requested\" {1}\n", charecter, quanity)); HttpWebRequest webRequest = CreateWebRequest(string.Format("http://{0}:{1}", realm.SoapIP, realm.SoapPort), realm.SoapUserName, realm.SoapPassword); InsertSoapEnvelopeIntoWebRequest(soapEnvelopeXml, webRequest); // begin async call to web request. IAsyncResult asyncResult = webRequest.BeginGetResponse(null, null); // suspend this thread until call is complete. You might want to // do something usefull here like update your UI. asyncResult.AsyncWaitHandle.WaitOne(); // get the response from the completed web request. string soapResult; using (WebResponse webResponse = webRequest.EndGetResponse(asyncResult)) { using (StreamReader rd = new StreamReader(webResponse.GetResponseStream())) { soapResult = rd.ReadToEnd(); } } } else { } } XmlDocument GetXMLDoc(string command) { XmlDocument soapEnvelopeDocument = new XmlDocument(); soapEnvelopeDocument.LoadXml(string.Format(@"<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:SOAP-ENC=""http://schemas.xmlsoap.org/soap/encoding/"" xmlns:xsi=""http://www.w3.org/1999/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/1999/XMLSchema"" xmlns:ns1=""urn:MaNGOS""><SOAP-ENV:Body><ns1:executeCommand><command>{0}</command></ns1:executeCommand></SOAP-ENV:Body></SOAP-ENV:Envelope> ", command)); return soapEnvelopeDocument; } HttpWebRequest CreateWebRequest(string url, string username, string password) { HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); webRequest.Credentials = new NetworkCredential(username, password); webRequest.ContentType = "text/xml;charset=\"utf-8\""; webRequest.Accept = "text/xml"; webRequest.Method = "POST"; return webRequest; } static void InsertSoapEnvelopeIntoWebRequest(XmlDocument soapEnvelopeXml, HttpWebRequest webRequest) { using (Stream stream = webRequest.GetRequestStream()) { soapEnvelopeXml.Save(stream); } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use