title: Error is java.io.IOException: Server returned HTTP response code: 500 for URL: while invoking weservice
body: <p>I am getting this Error is java.io.IOException: Server returned HTTP response code: 500 for URL: exception while invoking the web service url that i have.</p>
  
  <p>I am calling a .NET based web service through a framework built in java and getting:</p>
  
  <p>Headers returned from the server:</p>
  
  <pre><code>Content-Length:736
  Content-Type:text/xml; charset=utf-8
  Server:Microsoft-IIS/7.0
  X-Powered-By:ASP.NET
  Date:Thu, 12 May 2011 08:51:45 GMT
  
  java.io.IOException: Server returned HTTP response code: 500 for URL: "http://hcd
  cd-bt01.hcch.com/HCCExceptionLogService/service.svc?wsdl"
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
  nection.java:1170)
          at com.splwg.mpl.senders.http.HTTPSender.sendResponse(HTTPSender.java:34
  5)
          at com.splwg.mpl.sending.NewSenderManager.sendResponse(NewSenderManager.
  java:191)
          at com.splwg.mpl.sending.SameThreadSendingManager.callSender(SameThreadS
  endingManager.java:63)
          at com.splwg.mpl.stagingtable.download.OutboundMessageSender.handleRouti
  ngs(OutboundMessageSender.java:361)
          at com.splwg.mpl.stagingtable.download.OutboundMessageSender.sendRespons
  e(OutboundMessageSender.java:95)
          at com.splwg.mpl.sending.NewSenderManager.sendResponse(NewSenderManager.
  java:191)
          at com.splwg.mpl.sending.SameThreadSendingManager.processDestination(Sam
  eThreadSendingManager.java:293)
          at com.splwg.mpl.sending.SameThreadSendingManager.sendResponse(SameThrea
  dSendingManager.java:252)
          at com.splwg.mpl.sending.SameThreadSendingManager.doSend(SameThreadSendi
  ngManager.java:208)
          at com.splwg.mpl.server.async.ExecSendRequestProcessor.ProcessRequest(Ex
  ecSendRequestProcessor.java:61)
          at com.splwg.mpl.server.async.RequestProcessingThreadAdapter.run(Request
  ProcessingThreadAdapter.java:46)
          at com.splwg.mpl.server.PooledThread.run(PooledThread.java:91)
          at java.lang.Thread.run(Thread.java:595)
  </code></pre>
  
  <p>The wsdl url which i am invoking is <code>http://hcdcdbt01.hcch.com/HCCExceptionLogService/service.svc?wsdl</code></p>
  
  <p>I have used SOAP UI 3.6.1 tool for testing this wsdl which is giving me the right result.</p>
  
  <p>Headers that i have used are:</p>
  
  <pre><code>Content-Type: text/xml;charset=UTF-8
  SOAPAction: "http://tempuri.org/IExceptionLogService/LogException"
  POST
  Host:hcdcd-bt01.hcch.com
  http://hcdcd-bt01.hcch.com/HCCExceptionLogService/service.svc
  </code></pre>
  
  <p>SOAP UI HEADERS:</p>
  
  <pre><code>POST http://hcdcd-bt01.hcch.com/HCCExceptionLogService/service.svc HTTP/1.1
  Accept-Encoding: gzip,deflate
  Content-Type: text/xml;charset=UTF-8
  SOAPAction: "http://tempuri.org/IExceptionLogService/LogException"
  User-Agent: Jakarta Commons-HttpClient/3.1
  Host: hcdcd-bt01.hcch.com
  Content-Length: 763
  </code></pre>
  
  <p>Can any body tell me what went wrong ?</p>