Research Article

Web Services Conversation Adaptation Using Conditional Substitution Semantics of Application Domain Concepts

Algorithm 4

Adapter automatic generator.
Input: (consuming GAP), , Operations Mapping
Matrix .
Output: Source code of the adapter between and
.
Begin
 Create an empty class ADAPTER.
for each operation in   do
 Create a method in ADAPTER with same signature
 as .
 Get realizing operations subsequence from
using .
 Call ConverterGenerator ( Inputs, Inputs).
 // Algorithm 2
if Converter Code generated successfully then
  Add Inputs Converter Code to method body.
  Add invocation Code for to method body.
  Call ConverterGenerator ( Output,
  Outputs).
  if Converter Code generated successfully then
      Add Outputs Converter Code to method body.
  else
      Return Error.
  end if
else
  Return Error.
end if
end for
 Return ADAPTER generated code.
End