aspose file tools*
The moose likes Web Services and the fly likes Need a help in Web services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need a help in Web services" Watch "Need a help in Web services" New topic
Author

Need a help in Web services

Ahamed Sharif
Ranch Hand

Joined: Aug 24, 2003
Posts: 47
Hi,
I am trying to acces remote webservice from other system, but when I
run the client program to access that service, it was saying like,
Error : java.net.ConnectException: Connection refused: connect
First I depoyed a java class into axis from one system that is my server.
Then it creats the service.
From another system I create client program and trying to acces that
deployed service from the server.but it was not working and I dont know
how to that.
If any one have idea please suggest me as soon as posible.
Here my client code::::

import org.apache.axis.AxisFault;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.utils.Options;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
public class InvokeService {
public static void main(String [] args) throws Exception
{

String endpoint = "http://test:8088/axis/services/Invoke_Service";
HLRbeanInfo requestMSISDN = new HLRbeanInfo();
requestMSISDN.setMSISDNInfo("MSISDN Number");
/* HLRInfoBeanService beanService = new HLRInfoBeanService();
beanService.persistData();
beanService.displayData();*/
Service service = new Service();
Call call = (Call) service.createCall();
QName qn = new QName( "urn:HLRInfoBeanService", "HLRbeanInfo" );
call.registerTypeMapping(HLRbeanInfo.class, qn,
new org.apache.axis.encoding.ser.BeanSerializerFactory(HLRbeanInfo.class, qn),
new org.apache.axis.encoding.ser.BeanDeserializerFactory(HLRbeanInfo.class, qn));
String result;
try {
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName( new QName("Invoke_Service", "ipSelect") );
call.addParameter( "arg1", qn, ParameterMode.IN );
call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );
result = (String) call.invoke( new Object[] { requestMSISDN } );
} catch (AxisFault fault) {
result = "Error : " + fault.toString();
}
System.out.println(result);
}
}

Help would be appriciate,
Thanks,
Ahamed.
Ahamed Sharif
Ranch Hand

Joined: Aug 24, 2003
Posts: 47
Hi,
I got it, problem is should change the port number of that my server.
Thanks,
Bye
tomasw tomasw
Greenhorn

Joined: Jul 28, 2004
Posts: 1
yes, you are exactlly right, the normal port is 8080.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need a help in Web services