Implementing the WmAdapterService.execute Method
The final step for implementing an adapter service is to implement its execute method. This method is specific to the resource with which the adapter communicates. In most cases, the adapter must interact with the pipeline at the beginning and/or end of the execute method. The methods unpackRequest and packResponse demonstrate an effective method of interacting with the pipeline using the same metadata parameters that were used to create the signature.
Important:
The unpackRequest and packResponse methods read class fields, but they never write to them. This is important because of the multi-threaded nature of the adapter service execution. At run time, exactly one WmAdapterService object corresponds to each adapter service node defined in the namespace. All invocations of a given adapter service node call the execute method on the same object. If more than one thread is executing the service at the same time, then updates to the class fields by one thread inevitably collide with those of another thread.