Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in cross paltform webservice

 
Ravindranath Nalanagu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys i have written a server code in php which produces a wsdl file, i am using eclipse 3.3(europa). the server code runs very well but the client code is written in java by which i am calling the php webservice. the code is as follows.

Client Code:

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
public class Client2
{
static ObjectOutputStream out;
static ObjectInputStream in;
public static void main(String[] args)
{
try
{
String endpoint = "http://localhost/PhpPrograms/hello_server.php?wsdl";
Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://soapinterop.org/", "sayHello"));
String ret = (String) call.invoke(new Object[] {"Ravindranath"});

System.out.println(ret);
}
catch (Exception e)
{
System.err.println(e.toString());
}
}
}


the service endpoint is my php webservice wsdl, but i am unable to call it it gives me the following error:

java.net.SocketException: Connection reset

this error as per my knowledge comes if my server is reset or stopped. but my server is running vry gud. please do let me know as soon as possible.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic