120 likes | 262 Views
Axis Interfaces for Spitfire. Gavin McCance 3 July 2002. Webservice API defined. Webservice model of choice is Remote Procedure Call (RPC) Defined client API API divided into 5 parts Admin, User Control Database information Core SQL “Higher level” functionality. API example.
E N D
Axis Interfaces for Spitfire Gavin McCance 3 July 2002
Webservice API defined • Webservice model of choice is Remote Procedure Call (RPC) • Defined client API • API divided into 5 parts • Admin, User Control • Database information • Core SQL • “Higher level” functionality
API example • See docu for full API account • int num insert( databaseName, table, Hashtable(col,data) ) • SOAP-RPC is a defined standard
Serial 1/2 • Client side Axis libraries handle the (de)serialization of the RPC parameters. • Works best with ‘normal’ Object-types. • Int.. Float.. String.. Arrays.. • Axis server handles (de)serialisation behind the scenes.
Serial 2/2 • In Axis, adventurous objects can be trivially (de)serialized if implemented as Beans. • Axis provides standard methods • Otherwise, Axis provides hooks for your own serialisation methods • Difficult to make any client (language) deserialise arbitrary classes.. • Keep parameters simple…
HTTP • Webservices define many varied transports… • We choose HTTP • Axis implements this as a Servlet, so we can use security servlet as well in the same container. • Also run old and new spitfire together easily!
ClientCode Spitfire API SOAP over HTTP Tomcat Servlet Container Security mechanism Axis servlet RPC Disptacher DB Spitfire Implementation Connection Pool
Client code • ~can be auto-generated from WSDL file. • p13, docu for RepMec example. • Non-java should be easy, since it is generated from WSDL.
Server code • Easy to do… • Define your java interface. • Axis has a tool to make all the Axis Servlet support classes and interfaces (ie. auto generates the java code) • Makes empty RPC Implementation template code for you to fill in. • ….see code
HTTP S?G? • Not clear (to me) which secure protocol Spitfire can use.. • HTTP(S) .. Should be easy on server side.. • HTTPG … need to find out more about..
Client side HTTPS • Fiddly. • since it’s the Axis client libraries that make the HTTP call • No current HTTPS implementation (I think) • Look at this HTTPG?
Fiddly thing number 2 • For the intermin, non-default roles are communicated using a GET/POST ?role=admin • Not easy too easy to do this from the client, since it’s the Axis libs that build the URL