Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
SOAP Web Services Tim Carver MRC HGMP-RC Hinxton 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 e.g. Jemboss Client on Win, MacOSX, Linux written in Java Application SOAP XML messaging e.g. Jemboss Server on Unix written in Java/C 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 SOAP envelope Header Body SOAP over HTTP HTTP Server HTTP POST SOAP Request HTTP RESPONSE SOAP Response HTTP Client 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 Deployment Descriptor <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 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)