Skip to main content

Implementing the invoke() method

The Provider interface has only one method, invoke() , that needs to be implemented. invoke() receives the incoming request packaged into the type of object declared by the type of Provider interface being implemented and returns the response message packaged into the same type of object. For example, an implementation of a Provider<SOAPMessage> interface would receive the request as a SOAPMessage object and return the response as a SOAPMessage object.

The messaging mode used by the Provider implementation determines the amount of binding specific information the request and response messages contain. Implementation using message mode receive all of the binding specific wrappers and headers along with the request. They must also add all of the binding specific wrappers and headers to the response message. Implementations using payload mode only receive the body of the request. The XML document returned by an implementation using payload mode will be placed into the body of the request message.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!