23.08.2015 Views

Here - Agents Lab - University of Nottingham

Here - Agents Lab - University of Nottingham

Here - Agents Lab - University of Nottingham

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fig. 4. Web Service Invocationretrieve, update, delete) pattern. This means that dierent HTTP methodtypes should be used depending on the action that should be executed on aweb resource. Mapping these types from a method signature is hardly possibleas the method semantics is not available to the mapper. Nevertheless,using other HTTP methods than originally intended is not prohibited perse. Possible negative eects that may arise concern eciency as some <strong>of</strong>the method types are considered being idempotent so that existing HTTPcaching can further be used.The architecture <strong>of</strong> the REST publisher is more complex than the WSDL publisher.It partitions work into two phases. In the rst phase the given componentservice interface is analyzed with respect to the methods that should be generatedand how these should be represented in REST (according to the descriptionsabove). The result is a list <strong>of</strong> methods with exact descriptions how these methodsshould be created in REST. This list is passed on to the second stage inwhich a Java class is generated for the REST service via bytecode engineering.The generator rst creates Java method signatures using the method name andparameter types produced in the rst phase. Afterwards, it creates Java annotationsfor the REST specic mapping information according to the JAX-RSspecication 5 . The publisher can directly pass this class to the REST container,which ensures that the service is made available.3.2 Integrating Existing Web ServicesIntegrating web services aims at making usable existing functionalities as componentservices (cf. Fig. 4). In this way access to external functionalities can bemasked and be used in the same way as other middleware services. Challengesin this integration are mainly limited to the question how an external servicecan be adequately mapped to the middleware and how it can be made accessibleto service clients. The conceptual approach chosen is based on wrapper components,which act as internal service providers for the external functionality.A wrapper component oers the external functionality as provided service with5 http://jax-rs-spec.java.net/29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!