I am trying to run first application of Axis and got following Error
import java.util.Properties;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
public class TestClient {
static{
String proxy = "172.16.1.2",port = "3128";
//URL server = new URL(url);
Properties systemProperties = System.getProperties();
systemProperties.setProperty("http.proxyHost",proxy);
systemProperties.setProperty("http.proxyPort",port);
}
public static void main(String[] args) {
try {
String endpoint = "http://ws.apache.org:5049/axis/services/echo";
System.out.println("1 end point object="+endpoint);
Service service = new Service();
System.out.println("1 service object "+service);
Call call = (Call) service.createCall();
System.out.println("1 call Object= " + call);
call.setTargetEndpointAddress(new java.net.URL(endpoint));
System.out.println("1 ");
call.setOperationName(new QName("http://soapinterop.org/", "echoString"));
System.out.println("1" + call.getTargetEndpointAddress());
System.out.println("1" + call.getSOAPActionURI());
String ret = (String) call.invoke(new Object[]{"Hello!"});
System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
e.printStackTrace();
System.err.println(e.toString());
}
}
}
Exception i got is 1
1
1org.apache.axis.client.Call@3901c6
1
1http://ws.apache.org:5049/axis/services/echo 1null AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.SocketException: Connection reset
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:583)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.test.TestClient.main(TestClient.java:36)
{http://xml.apache.org/axis/}hostname:Ganesh
java.net.SocketException: Connection reset
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.test.TestClient.main(TestClient.java:36)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:583)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
... 10 more
java.net.SocketException: Connection reset
can any one tell me how to solve this problem