File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need a help in Web services" Watch "Need a help in Web services" New topic

Need a help in Web services

Ahamed Sharif
Ranch Hand

Joined: Aug 24, 2003
Posts: 47
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 : 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();
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 );
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();

Help would be appriciate,
Ahamed Sharif
Ranch Hand

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

Joined: Jul 28, 2004
Posts: 1
yes, you are exactlly right, the normal port is 8080.
I agree. Here's the link:
subject: Need a help in Web services
jQuery in Action, 3rd edition