Maybe I didn't understand your question, but you can expose a class as a web
service without doing very much at all.  You can just write a simple WSDD:
 
<deployment
  xmlns="http://xml.apache.org/axis/wsdd/";
  xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
    <service name="{service name goes here}" provider="java:RPC">
      <parameter name="className" value="{qualified class name goes here}"/>
      <parameter name="allowedMethods" value="{method name goes here}"/>
    </service>
</deployment>
 
copy the relevant class files into $TOMCAT_HOME/webapps/Axis/WEB-INF/classes
and then do:
 
java org.apache.axis.admin.AdminClient -p {Tomcat port no} {WSDD file}
 
Axis will do everything without any need for extra coding on your part.  You
can then find an autogenerated WSDL for your web service at
http://localhost:{Tomcat port no}/axis/services/{service name}?wsdl which
you can use with WSDL2Java to generate your client stubs.
 
Rich.

________________________________

From: c b [mailto:[EMAIL PROTECTED] 
Sent: 14 September 2006 10:07
To: [email protected]
Subject: Axis Doubt


Hi,
I am a new user to Axis.
My question is, given that I have a class which I need to expose as a web
service,
Do I need to have an interface over it to deploy it as a web-service?
I need to have the stubs/skeletons to be generated so that the client
accessing my service can do so easily.
I have been looking at the WSDL2Java command, which generates a interface of
the port name.So I need to make sure that the port name is different than
that of the impl class(by using the -P option in Java2WSDL),but then before
deploying the Web service,I need to modify the impl class to have an
"implements port-name interface" in it.
 
This is so because the skeleton always tries to do an,
 
PortNameInterface impl = new ImplClassName(),
kind of instantion.
 
Even if the use the '-S false' option in WSDL2Java command a stub is still
generated,
which will implement the PortNameInterface.
 
So is it right to assume that if one wants a RMI type(involving
stub/skeleton) calling mechanism for the client to call a web service, we
need to have an interface for the main class for that web-service??
 
Thanks,
Chinbaj

________________________________

How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.
<http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/ev
t=39663/*http://voice.yahoo.com> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to