Technologies For Building Grids: 15 October 2004
Technologies For Building Grids: 15 October 2004
Technologies For Building Grids: 15 October 2004
Container (Tomcat/Axis)
• Provides access to low level communications protocols (eg. http
through web server. Axis also provides some functions such as XML
parsing)
A WSDL document
• Which to use?
If the service end point interface is defined in java it may not be
interoperable with services/clients defined in other languages
• Generates
Compiled class files + optionally source files for stubs to interface
with client side JAX-RPC
WSDL file
Model file
Example commandline
<interface name=“……………………………”/>
</service>
</configuration>
Service Service.java
Service_Impl.java
Service_SerializerRegistry.java
Exception ServiceException_SOAPSerializer.java
ServiceException_SOAPBuilder.java
Value type Info_SOAPSerializer.java
Info_SOAPBuilder.java
Interface Interface_Stub.java
method.java
package servicePackage;
import javax.xml.rpc.*;
• With this reference you can call the methods of the service.
<isd:service xmlns:isd=“http://xml.apache.org/xml-soap/deployment”
id=“urn:stock-onhand”>
<isd:provider type=“java” scope=“Application” methods=“getQty”>
<isd:java class=“StockQuantity”/>
</isd:provider>
<isd:faultListener>org.apache.soap.sever.DOMFaultListener</isd:faultListener>
</isd:service>
<!DOCTYPE web-app
PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN”
“http://java.sun.com/j2ee/dtds/web-app_2_3.dtd”>
<web-app>
<display-name>Service Name</display-name>
<description>A web service application</description>
</web-app>
㻷㼋㼈㻃㼄㼕㼆㼋㼌㼙㼈㻃㼆㼒㼑㼗㼄㼌㼑㼖㻝
㼆㼏㼄㼖㼖㻃㼉 㼌㼏㼈㼖㻃㼄㼑㼇 㻃㼕㼈㼖㼒㼘㼕㼆㼈㼖
㼆㼒㼐 㼓 㼌㼏㼈㼇 㻃㼆㼏㼄㼖㼖㻃㼉 㼌㼏㼈㼖㻃㼉㼒㼕㻃㼗㼋㼈㻃㼗㼌㼈㼖
㼆㼒㼐 㼓 㼌㼏㼈㼇 㻃㼆㼏㼄㼖㼖㻃㼉 㼌㼏㼈㼖㻃㼉㼒㼕㻃㼖㼈㼕㼌㼄㼏㼌㼝㼈㼕㼖
㻺 㻶㻧㻯㻃㻋 㼌㼑㻃㻺 㻨㻥㻐㻬㻱㻩㻃㼇 㼌㼕㼈㼆㼗㼒㼕㼜㻌
㼐 㼒㼇 㼈㼏㻃㼉 㼌㼏㼈㻃㼉㼒㼕㻃㼗㼋㼈㻃㼖㼈㼕㼙㼌㼆㼈㻃㻋 㻃㼌㼑㻃㻺 㻨㻥㻐㻬㻱㻩㻌
㼐 㼒㼇 㼌㼉 㼌㼈 㼇 㻃web.xml㻃㼉 㼌㼏㼈
jaxrpc-ri-runtime.xml㻃㻋 㼅 㼄㼖㼈㼇 㻃㼒㼑㻃jaxrpc-ri.xml㻌
<project ..>
<property .../>
<target .../>
</project>
• The next few slides will demonstrate the use of Ant to build
a very simple project
Person
• Contains a name, age and an Address
Address
• Contains street, town and country information
Display
• Instantiates 3 Person classes and displays their details on the
command line
<target name="init">
<mkdir dir="${build}"/>
</target>
...
...
</project>
• All of the above JAR files will now be on the class path
when the source is compiled
<target name="startContainer">
<ant antfile="${build.services}" target="startContainer"/>
</target>
</target>
<java
classname="org.globus.ogsa.server.ServiceContainer"
fork="yes">
…
</java>
</target>
• The arg task allows you to specify arguments for the class
<java classname="org.globus.ogsa.server.ServiceContainer"
fork="yes">
...
<arg line="-p ${service.port}"/>
<arg line="-${container.initialization}"/>
...
</java>
...
<classpath>
<pathelement location="${ogsa.jar}"/>
<pathelement location="${samples.lib}/${samples.jar}"/>
<path refid="classpath"/>
</classpath>