axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Davis" <...@us.ibm.com>
Subject Re: Urgent!! please help
Date Thu, 15 Nov 2001 11:49:31 GMT
Verify that the service was actually deployed.  Do:
  java org.apache.axis.client.AdminClient list
-lhttp://localhost:8080/axis/services/AdminService
-Dug

"Jeelani" <sjeelani@infinitymarkets.com> on 11/15/2001 05:38:39 AM

Please respond to axis-user@xml.apache.org

To:   <axis-user@xml.apache.org>
cc:
Subject:  Urgent!! please help



Hi,

I am new to Axis. I got a small problem while accessing the service.

I am able to access a service by deploying it as a JWS. But when I deploy
the same service using deploy.xml file,
I am not able to access the service.

My code Configuration:

I am using Tomcat v4.0.

I Placed the axis directory present in webapps of default axis directory.
My
service is a simple java bean (Hello.java) with only one method."sayHi" and
the return type is a java.lang.String object.

public class Hello {

    public String sayHi(String name) {
   return "Hai"+name;
     }
}

I compiled the Java bean (Hello.java) and placed the class file under
tomcat-home\webapps\axis\WEB-INF\classes\Hello.class.

My deploy.xml file is:

<admin:deploy xmlns:admin="AdminService">
   <service name= "Hello" pivot="RPCDispatcher">
      <option name="className" value="Hello"/>
      <option name="methodName" value="sayHi"/>
   </service>
  </admin:deploy>

I deployed the same using AdminClient.

Now when I access the file from the browser by giving the URL:
http://localhost:8080/axis/services/Hello?wsdl it says service not found.
I could not access from my java client also. The client program is as
follows:

import org.apache.axis.client.ServiceClient;
import org.apache.axis.encoding.BeanSerializer;
import org.apache.axis.utils.QName ;

public class HelloClient
{
   public static void main(String [] args) {

       try {
     String endpoint = "http://localhost:8080/axis/services/Hello";
     String methodName = "sayHi";

     ServiceClient client = new ServiceClient(endpoint);
     String response = (String) client.invoke("Hello",
            methodName,
            new Object [] { "Stephen"});
    System.out.println(response);
       } catch(Exception e){
             System.out.println(e);
          }
  }
}

Please note that I am able to access a service by making it as .jws. I
could
also get the WSDL file in this way.

Please help me in this regard.

Thanks,
Jeelani





Mime
View raw message