The steps involved in building the service are:
PATH contains ${jwsdp.home}/apache-ant/bin.
In the example WSDL document PingService.wsdl however, we are assuming the latter in order to not rely on IP connectivity. In the former case, the WSDL would have looked like:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="PingService" targetNamespace="http://tempuri.org/PingService" xmlns:tns="http://tempuri.org/PingService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<import namespace=""http://tempuri.org/PingService" location="http://www.japp.se/ping/Ping.wsdl"/>
<service name="PingService">
<port name="PingPort" binding="tns:PingBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
wscompile with the -gen:server
option on the WSDL document. This will generate endpoint interfaces, ties and any necessary serializers and deserializers.
For the example, enter the command ant generate-ties The generated interface will be
package ping;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Ping extends Remote {
public void ping() throws RemoteException;
}
In the example there is only one interface. Code the implementation in src/ping/Ping.java and enter the command ant compile-server
wscompile with the -keep -import options and to then run javadoc on the resulting source files in order to facilitate the coding of the implementation class.
<url-pattern> tag right.
jaxrpc-ri-runtime.xml should look familiar to most wsdeploy users, with a few exceptions and additions:
jaxrpc-ri.xml. Additionally, there must exist
Here is a hyperlinked version of the example jaxrpc-ri-runtime.xml showing where to look for correct attribute values:
<?xml version="1.0" encoding="UTF-8"?>
<endpoints xmlns='http://java.sun.com/xml/ns/jax-rpc/ri/runtime' version='1.0'>
<endpoint
name='PingService'
interface='ping.Ping'
implementation='ping.Ping_Impl'
tie='ping.Ping_Tie'
model='/WEB-INF/PingService_model.xml.gz'
wsdl='/WEB-INF/PingService.wsdl'
service='{http://tempuri.org/PingService}PingService'
port='{http://tempuri.org/PingService}PingPort'
urlpattern='/ping'/>
</endpoints>
web.xml and jaxrpc-ri-runtime.xml from any service generated with wsdeploy.
web.xml and jaxrpc-ri-runtime.xml
WAR file which can be
deployed manually on tomcat.
Finally, if your server is localhost and you did leave Context Path blank during deployment, you should be able to verify the deployment by following this link to the Web Services page: http://localhost:8080/ping-jaxrpc/ping.