Hi, 
 
I am just repeating my previous question with a clearer subject line.
 
I am a beginner with Axis. I have Axis 1.4 installed, plugged into Tomcat. I am 
trying to deploy a web service called Hello ( the name space) having a class 
HelloWorldTwo ( .java attached) using deploy.wssd (attached). That seems to be 
done as I am getting a server-config.wsdd (attached) in the working directory 
C:\WebServices\server. In an another subdirectory , C:\WebServices\client,  I 
have a client called HelloWorldClientTwo ( .java attached). 
  
However when I run HelloWorldClient class file from its directory using 
  
C:\WebServices\client> java HelloWorldClientTwo –llocal:// “Rupi” 
  
I get the exception, 
Error: The Axis engine could not find a target service to invoke !  
targetservice is 
  
  
Could anybody help, please? 
  
Thank you. 
  
Regards 
Rupinder 
Amritsar 
India


      

Attachment: deploy.wsdd
Description: Binary data


public class HelloWorldTwo{
        public static String HelloWorld(String name) {
                return "Hello : "+name;
        }
}

Attachment: server-config.wsdd
Description: Binary data

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 HelloWorldClientTwo {
public static void main(String[] args) throws Exception {
        Options options =new Options (args);
        Service service = new Service();
        Call call =(Call)service.createCall();
        
        
        
        try{
        
        call.setTargetEndpointAddress(new java.net.URL(options.getURL()));
        args=options.getRemainingArgs();
        if (args==null||args.length!=1){
                System.err.println("Usage:HelloWorldClientTwo<HelloWorld>arg1");
                return;
        }
        
        String name = new String (args[0]);
        call.setOperationName(new QName("HelloWorldTwo","HelloWorld"));
        call.addParameter("name", org.apache.axis.encoding.XMLType.XSD_STRING, 
ParameterMode.IN);
        call.setReturnType (org.apache.axis.encoding.XMLType.XSD_STRING);
        String result =(String)call.invoke(new Object []{name});
        System.out.println(result);
        
        
        }
        catch(AxisFault fault){
                System.out.println("Error: "+fault.toString ());
        }  
        
  }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to