axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Gonçalves <...@myrealbox.com>
Subject exception when call.invoke
Date Fri, 15 Apr 2005 12:36:50 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<small><font face="Arial">Hi there!<br>
<br>
I receive this exception:<br>
<b><i>java.lang.ClassCastException:
org.apache.axis.transport.http.HTTPSender</i></b></font><font
 face="Arial" size="-1"><small><br>
<br>
<br>
</small></font><font face="Arial">,when I execute this code:<br>
</font><font face="Arial" size="-1"><small></small></font><font
 face="Arial"><br>
</font></small><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; try {</font><font
 face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; String endpoint = <a
 class="moz-txt-link-rfc2396E"
 href="http://localhost:8080/axis/Echo.jws">"http://localhost:8080/axis/Echo.jws"</a>;</font><font
 face="Arial"><br>
</font><font face="Arial" size="-1"></font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; logger.info("DEBUG
&gt;&gt;&gt; 1");</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Service service = new
Service();</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; logger.info("DEBUG
&gt;&gt;&gt; 2");</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Call call = (Call)
service.createCall();</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; logger.info("DEBUG
&gt;&gt;&gt; 3");</font><font face="Arial"><br>
</font><font face="Arial" size="-1"></font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
call.setTargetEndpointAddress( new java.net.URL(endpoint) );</font><font
 face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
call.setOperation("test");</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
call.addParameter("code", XMLType.XSD_STRING,
ParameterMode.IN);</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
call.addParameter("utilizador_portal", XMLType.XSD_STRING,
ParameterMode.IN);</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
call.addParameter("password", XMLType.XSD_STRING,
ParameterMode.IN);</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
call.setReturnType(XMLType.XSD_STRING);</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </font><font
 face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; logger.info("DEBUG
&gt;&gt;&gt; 4");</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
//call.setOperationName(new
QName(<a class="moz-txt-link-rfc2396E" href="http://soapinterop.org/">"http://soapinterop.org/"</a>,
"test"));</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; //logger.info("DEBUG
&gt;&gt;&gt; 5");</font><font face="Arial"><br>
</font><font face="Arial" size="-1"></font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; String ret = (String)
call.invoke(new Object[] {"123",
"user", "passwd"}); &lt;========= EXCEPTION!!</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; logger.info("DEBUG
&gt;&gt;&gt; 6");</font><font face="Arial"><br>
</font><font face="Arial" size="-1"></font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
System.out.println("RESULT &gt;&gt;&gt; '" + ret + "'");</font><font
 face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; logger.info("DEBUG
&gt;&gt;&gt; 7");</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
} catch (Exception e) {</font><font
 face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
System.err.println(e.toString());</font><font face="Arial"><br>
</font><font face="Arial" size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
}</font><font face="Arial"><br>
</font><font face="Arial" size="-1"></font><font face="Arial"><br>
</font><font face="Arial" size="-1"></font><font face="Arial" size="-1">Any
help? :(</font><font face="Arial"><br>
</font><font face="Arial" size="-1"></font><font face="Arial"><br>
</font><font face="Arial" size="-1">---</font><font face="Arial"><br>
</font><font face="Arial" size="-1">Bruno Vg</font><font face="Arial"><br>
</font><font face="Arial" size="-1"></font>
<blockquote cite="mid425FB4BC.8070500@myrealbox.com" type="cite"></blockquote>
</body>
</html>


Mime
View raw message