Link to home
Start Free TrialLog in
Avatar of acslater
acslater

asked on

have java boutique web service example running but dont know how to custom deploy it using .wsdd

I have web service runnig from java boutique example but dont know how to ccustom deploy it using .wsdd file. I read instrustion from the axis documentation which gave the following code:

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <service name="MyService" provider="java:RPC">
  <parameter name="className" value="samples.userguide.example3.MyService"/>
  <parameter name="allowedMethods" value="*"/>
 </service>
</deployment>

I dont know where to save the file I dont know what else to change?

The jws file is called NHLService.jws and is saved in D:\Tomcat4.1.3\jakarta-tomcat-4.1.31\webapps\axis

and i have NHLServiceClient.java saved in G:\ drive

The code is the exact same as the code in the java boutique tutorial and is available at http://javaboutique.internet.com/tutorials/Axis/

if it helps with sorting out the .wsdd file
Avatar of aozarov
aozarov

Read http://www.onjava.com/lpt/a/1578
it is a small tutorial that will guide you how to deploy Your Code as a Web Service in Easy Steps.
It also suggests an easy way to deploy by copying your java file into the Axis Web application using the extension .jws instead of .java.
Avatar of acslater

ASKER

I have read the document from the link you gave but still not sure on how to deploy the program. It gives it a differnet way to aboove way i mentioned. Can anyone help me with the above way
put your wsdd with your class files and use AdminClient to deploy.
java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
     -lhttp://localhost:8080/axis/services/AdminService <your wsdd file>

For more info see: http://ws.apache.org/axis/java/install.html
Thats the example of the wsdd from axis is:

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <service name="MyService" provider="java:RPC">
  <parameter name="className" value="samples.userguide.example3.MyService"/>
  <parameter name="allowedMethods" value="*"/>
 </service>
</deployment>

Have I to change around that before puting them with class files

well i actually got it to work. the code was as follows:

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <service name="NHLService" provider="java:RPC">
  <parameter name="className" value="NHLService"/>
  <parameter name="allowedMethods" value="*"/>
 </service>
</deployment>

How to undeploy?

This is what i have for undeploy
<undeployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <service name="NHLService" provider="java:RPC">
  <parameter name="className" value="NHLService"/>
  <parameter name="allowedMethods" value="*"/>
 </service>
</undeployment>
 but mistakes


Actually this is what i have for undeploy

<undeployment xmlns="http://xml.apache.org/axis/wsdd/">
 <service name="NHLService"/>
</undeployment>

but getting loads errors
The above looks ok...
What kind of errors do you get?
Did you manage to send client requests to NHLService?
You might want to try to deploy/undeploy using a deployment name...
e.g:

<deployment name="my_deployment" xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <service name="NHLService" provider="java:RPC">
  <parameter name="className" value="NHLService"/>
  <parameter name="allowedMethods" value="*"/>
 </service>
</deployment>

<undeployment name="my_deployment" xmlns="http://xml.apache.org/axis/wsdd/">
 <service name="NHLService"/>
</undeployment>

Also, make sure that your AdminClient can accept any remote calls.
To do this, find the "server-config.wsdd" file in your webapp's WEB-INF directory.
In it, you'll see a deployment for the AdminService. Add or make sure the options are as follows:

<service name="AdminService" provider="java:MSG">
  <parameter name="className" value="org.apache.axis.util.Admin"/>
  <parameter name="allowedMethods" value="*"/>
  <parameter name="enableRemoteAdmin" value="true"/>
</service>
i can deploy the web service but problems undeploying it
ASKER CERTIFIED SOLUTION
Avatar of aozarov
aozarov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial