title: Error calling Fedex webservice
body: <p>from my windows application i am trying to send xml to fedex url and expecting response back from fedex. i am getting error "The remote server returned an error: (500) Internal Server Error." </p>
  
  <p>what is the meaning of this error and why i am getting this error because the url i got from fedex support people....so i think the service url is right. here i am giving my code by which i am trying to send xml to fedex service url.</p>
  
  <pre><code> public string Post(string sXml)
      {
          string Err = "";
          WebResponse WebRes = null;
          string sResponse = "";
          try
          {
              string URL = "https://gatewaybeta.fedex.com:443/web-services/ship"; // "https://ws.fedex.com:443/web-services/ship";
              byte[] buffer = Encoding.UTF8.GetBytes(sXml);  
              HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(URL);  
              WebReq.Method = "POST";
              WebReq.ContentType = "application/x-www-form-urlencoded";  
              WebReq.ContentLength = buffer.Length;
              Stream ReqStream = WebReq.GetRequestStream();
              ReqStream.Write(buffer, 0, buffer.Length);
              ReqStream.Close();
              WebRes = WebReq.GetResponse();
              Stream ResStream = WebRes.GetResponseStream();
              StreamReader ResReader = new StreamReader(ResStream);
              sResponse = ResReader.ReadToEnd();
          }
          catch (Exception ex)
          {
              Err = ex.Message.ToString();
          }
          finally
          {
  
          }
          return sResponse;
      }
  </code></pre>
  
  <p>is there any error in my code. please guide why i am getting error. i am talking to fedex support but not getting any technical help from them.</p>
  
  <p>thanks</p>