Advertisement

07.22.2007 at 06:54PM PDT, ID: 22713192
[x]
Attachment Details

SOAP request error in IE

Asked by johnnywong71 in Internet Explorer Web Browser, Web Browsers, New to Java Programming

Tags: soap, error

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!

Start Free Trial
[+][-]07.22.2007 at 09:23PM PDT, ID: 19545040

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2007 at 11:16PM PDT, ID: 19545359

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.23.2007 at 12:20AM PDT, ID: 19545530

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Internet Explorer Web Browser, Web Browsers, New to Java Programming
Tags: soap, error
Sign Up Now!
Solution Provided By: Jaax
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32