Implementation

Service implementation code is located in the core project under /src/main/java. There is a WSDelegate class for each service, and an Impl class for each service method.

Core Project

This is what the output in the core project src/main/java looks like:

images/core-srcmainjava.gif

And the /src/test/java and target/src/main/java output:

images/core-target.gif

The generated ServiceEndpointInterface (SEI) is implemented by the generated ServiceEndpointImplementation (SEIImpl), which delegates to the generated (once) webservice (WS) Delegate, which is implemented by the service method Impl and tested by the SEIImplTest.

The service method Impl class has three main methods:

serviceCreateInput: Iterates through the service input hierarchy, creating a stubbed input for each value/attribute/association, up to three levels deep. This is used by the unit test as an input value for the service test.

serviceTransformInput: For all service operation parameters, iterates through the hierarchy to create a wrapped request object for the service. This is the method which must be implemented for the service to work properly, called by the Delegate for each method.

serviceTransformResponse: For the single wrapped service response, transforms the entire hierarchy from the wrapped service response to the service output.

Next

Now we can learn how to test a generated project, read on.