The SOAP service has a particular method call invoked on it to handle the payload of a SOAP message. In Motorprise, we wanted a service that would print an XML document to the Dynamo console. We created a class that prints a given XML document: atg.projects.b2bstore.soap.DOMWriterService
. We then created an instance of this class, /atg/projects/b2bstore/soap/DOMWriterService
, with the following properties:
$class=atg.projects.b2bstore.soap.DOMWriterService $scope=global RPCRouterServlet=/atg/projects/b2bstore/soap/RPCRouterServlet methods=receiveDocument serviceId=urn\:motorprise-display-xml
The /atg/projects/b2bstore/soap/DOMWriterService
class has a method called doStartService
that registers the SOAP service with the SOAP server. When the DOMWriterService
component starts up, the doStartService
method determines the SOAP server through the DOMWriterService
component’s configured property RPCRouterServlet
. The doStartService
method registers the SOAP service with the SOAP server so that the server knows to route requests for service urn:motorprise-display-xml
with a method call of receiveDocument
to the SOAP service registered at /atg/projects/b2bstore/soap/DOMWriterService
.