Hi rabail,
You have to include in the CLASSPATH all the jars located in
$GLOBUS_LOCATION/lib. Also, be sure that in that directory there is
the axis.jar. If it isn't there, dowloand the Jars from the Apache
Axis page and copy them in that directory.
I hope that help you.
Regards
Gracia
2007/6/18, rabail javed <[EMAIL PROTECTED]>:
Hi all,
I was following a globus programming tutorial and trying to run the Math
Service and when i am compiling the client i am getting these errors
[EMAIL PROTECTED] tutorial]# javac -classpath
./build/stubs/classes/:$CLASSPATH
org/globus/examples/clients/MathService_instance/Client.java
org/globus/examples/clients/MathService_instance/Client.java:3:
package org.apache.axis.message.addressing does not exist
import org.apache.axis.message.addressing.Address;
^
org/globus/examples/clients/MathService_instance/Client.java:4:
package org.apache.axis.message.addressing does not exist
import
org.apache.axis.message.addressing.EndpointReferenceType;
^
org/globus/examples/clients/MathService_instance/Client.java:13:
cannot access org.apache.axis.client.Service
file org/apache/axis/client/Service.class not found
MathServiceAddressingLocator locator = new
MathServiceAddressingLocator();
^
org/globus/examples/clients/MathService_instance/Client.java:19:
cannot find symbol
symbol : class EndpointReferenceType
location: class
org.globus.examples.clients.MathService_instance.Client
EndpointReferenceType endpoint = new
EndpointReferenceType();
^
org/globus/examples/clients/MathService_instance/Client.java:19:
cannot find symbol
symbol : class EndpointReferenceType
location: class
org.globus.examples.clients.MathService_instance.Client
EndpointReferenceType endpoint = new
EndpointReferenceType();
^
org/globus/examples/clients/MathService_instance/Client.java:20:
cannot find symbol
symbol : class Address
location: class
org.globus.examples.clients.MathService_instance.Client
endpoint.setAddress (new Address(serviceURI));
^
org/globus/examples/clients/MathService_instance/Client.java:21:
cannot access
org.apache.axis.message.addressing.EndpointReferenceType
file
org/apache/axis/message/addressing/EndpointReferenceType.class
not found
MathPortType math =
locator.getMathPortTypePort(endpoint);
^
7 errors
client code is as
follows...................................................................
package org.globus.examples.clients.MathService_instance;
import org.apache.axis.message.addressing.Address ;
import
org.apache.axis.message.addressing.EndpointReferenceType;
import
org.globus.examples.stubs.MathService_instance.MathPortType;
import
org.globus.examples.stubs.MathService_instance.GetValueRP;
import
org.globus.examples.stubs.MathService_instance.service.MathServiceAddressingLocator
;
public class Client {
public static void main(String[] args) {
MathServiceAddressingLocator locator = new MathServiceAddressingLocator();
try {
String serviceURI=args[0];
EndpointReferenceType endpoint = new EndpointReferenceType();
endpoint.setAddress(new Address(serviceURI));
MathPortType math = locator.getMathPortTypePort (endpoint);
// Perform an addition
math.add(10);
// Perform another addition
math.add(5);
// Access value
System.out.println("Current value:" + math.getValue(new GetValueRP()));
// Perform a subtraction
math.subtract(5);
// Access value
System.out.println("Current value:" + math.getValue(new GetValueRP()));
} catch (Exception e) {
e.printStackTrace();
}
}
}
--
Regards,
Rabail Javed
Research Student,
Bachelors of Information Technology
NIIT Distributed & Grid Computing Research Group,
X-General Secretary IEEE NIIT Student Branch-2005,
National University of Science and Technology
Rawalpindi, Pakistan.