DESPRAD subproject Alvis Brazma EMBL-EBI Hinxton, October 20, 2003.
SOAP Web Services Tim Carver MRC HGMP-RC Hinxton Cambridge, UK.
-
Upload
susan-morris -
Category
Documents
-
view
214 -
download
0
Transcript of SOAP Web Services Tim Carver MRC HGMP-RC Hinxton Cambridge, UK.
SOAP Web Services
Tim Carver
MRC HGMP-RCHinxton
Cambridge, UK.
Simple Object Access Protocol (SOAP)
• protocol for invoking methods on servers, services, components and objects
• uses XML messaging to exchange info via XML documents
• transport via HTTP (circumventing firewalls)
• provides mechanism for distributing objects over the Web
• make method calls upon classes and objects that exist on a remote server, without needing to know which language the objects are written in
Application Application
e.g. Jemboss Client e.g. Jemboss Serveron Win, MacOSX, Linux on Unix written in Java written in Java/C
SOAPXML messaging
SOAP Messages
Header - optional- routing & delivery settings- authentication/authorisation information- transaction context
Body - required- data or message to be processed- can contain anything that can be expressed in XML- containing as many child nodes as required
SOAP Messages
Header
Body
SOAP envelope
HTTP POST - SOAP Request
HTTP RESPONSE - SOAP Response
HTTP HTTPServer Client
SOAP over HTTP
Creating Web Services in Java with Apache SOAP
Apache SOAP
• designed to run as a servlet within any Java HTTP server.• download either source only or precompiled version of SOAP. Server side installation
• need a separate web server that supports servlets (Tomcat) • add jar files or war files to the CLASSPATH of the server.
Client side installation
• soap.jar, mail.jar and activation.jar must be in the CLASSPATH.• also any java aware XML parser, e.g. xerces.jar
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="JembossAuthServer"> <isd:provider type="java" scope="Request" methods="name version abouturl show_acd getWossname show_help show_db run_prog show_saved_results delete_saved_results list_saved_results call_ajax update_result_status"> <isd:java class="org.emboss.jemboss.server.JembossAuthServer" static="false"/> </isd:provider> <isd:faultListener> org.apache.soap.server.DOMFaultListener
</isd:faultListener></isd:service>
Deployed with Service Manager Client:java org.apache.soap.server.ServiceManagerClient \ http://hostname:port/soap/servlet/rpcrouter deploy service.xml
Deployment Descriptor
Deploying services with the SOAP Admin Tool
Axis
• next generation of Apache SOAP
• essentially Apache SOAP 3.0
• only Beta release (release 1.0 summer 2002)
http://xml.apache.org/axis/
Web Service Description Language (WSDL)
• applications expose some type of functionality
• functionality can be invoked in different ways
• WSDL describes what the web service does and how it can be invoked
• toolkits available to generating WSDL automatically (e.g. Java2WSDL is an Apache Axis utility)