You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Suhas Ghorpadkar <su...@prusec.com> on 2002/03/26 19:45:14 UTC
call.invoke through a proxy
Hello,
I am trying to invoke "Currency Exchange Service" at XMethods with
axis/tomcat. In my client, I have the
following :
String endpoint = "http://services.xmethods.net/soap";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName( new QName("urn:xmethods-CurrencyExchange",
"getRate") );
call.addParameter( "country1", XMLType.XSD_STRING,
ParameterMode.PARAM_MODE_IN );
call.addParameter( "country2", XMLType.XSD_STRING,
ParameterMode.PARAM_MODE_IN );
call.setReturnType( XMLType.XSD_FLOAT );
String cntry1 = "japan";
String cntry2 = "usa";
float ret = ((Float) call.invoke( new Object[] { cntry1,
cntry2})).floatValue();
My machine is behind a firewall and the code above produces exception :
java.net.ConnectException : Operation timed out Connect
I don't know how to specify proxyhost, port, userid and password in axis.
In SOAP,
there was a way to create connection object using these properties. I
couldn't find anything similar in Axis.
Thanks in advance.
Suhas Ghorpadkar