Hi,
I have created the following service
public class Substract
{
    public int sub(int i, int j)
    {
        return i - j;
    }
}

and deployed it using
java org.apache.axis.wsdl.Java2WSDL -o
substraction.wsdl -l
http://localhost:8008/axis/services/Diff -n Sub
Substract

java org.apache.axis.wsdl.WSDL2Java --server-side
--skeletonDeploy true substraction.wsdl

java org.apache.axis.client.AdminClient -p8008
Sub/deploy.wsdd

I can see the service from axis homepage on my
machine, so I guess its deployed properly. Then I
wrote the following client

import Sub.*;
import java.net.URL;
import javax.xml.namespace.QName;
import org.apache.axis.client.Service;

class Client
{
    public static void main(String[] args)
    {
        try
        {
            QName name = new QName("Sub",
SubstractService");
            Service service = new Service(new
URL("http://localhost:8008/axis/services/Diff?wsdl";),
name);
            DiffSoapBindingStub stub = new
DiffSoapBindingStub(new
URL("http://localhost:8008/axis/services/Diff";),
service);

            System.out.println(stub.sub(20, 10));
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }
}

This class is printing -3. Actually for any argument,
its retrning -3 only. I checked SOAP messages flowing
across client and server and arguments are passed
intact to the server. I also modified my service to
dump the received arguments to temp file "/tmp/log".
But that file was never created which makes me wonder
whether the service is actually invoked at all. i
would appreciate if anybody can help in fixing this
problem.

BTW I am using Java1.4.1 on SunOS8. The service, I
created, is hosted at
www.salvias.net:8008/axis/services/Diff. 

tia,
Srinivas

=====
I am not afraid of losing. But I don't like it.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Reply via email to