troubleshooting Question

SOAP request error in IE

Avatar of johnnywong71
johnnywong71 asked on
JavaWeb Browsers
3 Comments1 Solution724 ViewsLast Modified:
Hi Expert,

I have tried to use the following SOAP request in java applet viewer. It works fine.

      String url = "http://170.65.186.162/WsNew/recordingservice.asmx";
      URL HttpURL = new URL(url);
      conn = (HttpURLConnection)HttpURL.openConnection();

      conn.setDefaultUseCaches (false);
      conn.setUseCaches(false);
      conn.setDoInput(true);

conn.setRequestProperty("POST", "/WsNew/recordingservice.asmx HTTP/1.1");
conn.setRequestProperty("Host", "170.65.186.162");
conn.setRequestProperty("Content-Type", "text/xml; charset=\"utf-8\"");
conn.setRequestProperty("SOAPAction", "http://tempuri.org/GetRecordingID");
conn.setRequestMethod("POST");
....................................

But when I try to run it in IE, it show the following error message:
java.lang.ClassCastException: com/ms/net/wininet/http/HttpURLConnection
      at com/pls/util/HttpConnectionTestTT.main
      at com/pls/util/WsNew.GetRecordID
      at com/pls/base/CallCenterApp$1.run
      at java/lang/Thread.run

Thanks!

ASKER CERTIFIED SOLUTION
Jaax
Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros