SOAP

Invoking a SOAP service

  • Use Dashboard to create an outgoing connection to a SOAP server.
  • Note that the client object is based on Suds and offers everything Suds does.

Dashboard

Python code

# -*- coding: utf-8 -*-

# Zato
from zato.server.service import Service

class MyService(Service):
   """ Obtains BLZ bank details for input bank code.
   More about BLZ on Wikipedia - https://en.wikipedia.org/wiki/Bankleitzahl.
   """
   def handle(self):

         with self.outgoing.soap.get('BLZ').conn.client() as client:

            # Prepare input data
            bank_code = '12070000'

            # Only pure-Python objects are used to invoke a remote service
            output = client.service.getBank(bank_code)

            # Log response received
            self.logger.info('BIC `%s`', output.bic)
            self.logger.info('Name `%s`', output.bezeichnung)

In server.log:

INFO - BIC `DEUTDEBB160`
INFO - Name `Deutsche Bank Ld Brandenburg`


Schedule a meaningful demo

Book a demo with an expert who will help you build meaningful systems that match your ambitions

"For me, Zato Source is the only technology partner to help with operational improvements."

John Adams, Program Manager of Channel Enablement at Keysight