(Migrated) accessing 'zato.outgoing.sql.get-list' vie SOAP gives an error

(This message has been automatically imported from the retired mailing list)

Hello,

I’m trying to configure our zato instance programmatically with the
public SOAP API using suds and consuming the wsdl file.

I am able to get the list of services by providing the parameters
cluster_id and name_filter.
When I try to get the list of outgoing sql connections by providing the
parameter cluster_id I got an error.

This works:

resp = getattr(self.c.service,
'zato.service.get-list')(cluster_id=1, name_filter="*")

This does not:

resp = getattr(self.c.service,
'zato.outgoing.sql.get-list')(cluster_id=1)

it gives this error:

   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/client.py",
line 521, in __call__
     return client.invoke(args, kwargs)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/client.py",
line 581, in invoke
     result = self.send(soapenv)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/client.py",
line 621, in send
     original_soapenv=original_soapenv)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/client.py",
line 685, in process_reply
     self.method, replyroot)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/bindings/binding.py",
line 140, in get_reply
     return self.replycomposite(rtypes, nodes)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/bindings/binding.py",
line 193, in replycomposite
     sobject = unmarshaller.process(node, resolved)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/umx/typed.py",
line 66, in process
     return Core.process(self, content)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/umx/core.py",
line 46, in process
     return self.append(content)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/umx/core.py",
line 61, in append
     self.append_children(content)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/umx/core.py",
line 138, in append_children
     cval = self.append(cont)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/umx/core.py",
line 61, in append
     self.append_children(content)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/umx/core.py",
line 138, in append_children
     cval = self.append(cont)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/umx/core.py",
line 59, in append
     self.start(content)
   File
"/home/myhome/zato_esb/test_env/local/lib/python2.7/site-packages/suds/umx/typed.py",
line 80, in start
     raise TypeNotFound(content.node.qname())
suds.TypeNotFound: Type not found: 'cluster_id'

The plain http json api works, it’s just the soap version that does not.

any ideas?

On 20/05/15 17:29, Andrea Peter wrote:

The plain http json api works, it’s just the soap version that does not.

any ideas?

Hi Andrea - does it work with SoapUI?

On 20/05/15 17:49, Dariusz Suchojad wrote:

Hi Andrea - does it work with SoapUI?

Well, I tested it myself and it does. It looks like a suds quirk -
there’s a few related questions on StackOverflow - but I’m afraid I
don’t really know how to tackle it. I’m really sorry.

Here’s how it looks like in SoapUI:

POST http://localhost:17010/zato/soap HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "zato.outgoing.sql.get-list"
Content-Length: 328
Host: localhost:17010
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns=“https://zato.io/ns/20130518”>
soapenv:Header/
soapenv:Body
ns:zato_outgoing_sql_get_list_request
ns:cluster_id1</ns:cluster_id>
</ns:zato_outgoing_sql_get_list_request>
</soapenv:Body>
</soapenv:Envelope>

HTTP/1.1 200 OK
Server: Zato
Date: Wed, 20 May 2015 16:00:53 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Content-Type: application/xml
X-Zato-CID: K07D1APFH6EHMREWG6CH5J4DJYAC

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns=“https://zato.io/ns/20130518”>
soap:Body
<zato_outgoing_sql_get_list_response>
<zato_env>
K07D1APFH6EHMREWG6CH5J4DJYAC
ZATO_OK
</zato_env>
<item_list>

1
zz
<is_active>true</is_active>
<cluster_id>1</cluster_id>
postgresql+pg8000
localhost
5432
<db_name>zato1</db_name>
zato1
<pool_size>1</pool_size>
connect_args = {‘charset’:‘utf8’}

</item_list>
</zato_outgoing_sql_get_list_response>
</soap:Body>
</soap:Envelope>

OK,
I forgot about soapUI, I will use it to check future issues with soap.
I guess I’ll just use plain HTTP for that request as workaround.

Thank you.

On 05/20/15 18:03, Dariusz Suchojad wrote:

On 20/05/15 17:49, Dariusz Suchojad wrote:

Hi Andrea - does it work with SoapUI?
Well, I tested it myself and it does. It looks like a suds quirk -
there’s a few related questions on StackOverflow - but I’m afraid I
don’t really know how to tackle it. I’m really sorry.

Here’s how it looks like in SoapUI:

POST http://localhost:17010/zato/soap HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "zato.outgoing.sql.get-list"
Content-Length: 328
Host: localhost:17010
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns=“https://zato.io/ns/20130518”>
soapenv:Header/
soapenv:Body
ns:zato_outgoing_sql_get_list_request
ns:cluster_id1</ns:cluster_id>
</ns:zato_outgoing_sql_get_list_request>
</soapenv:Body>
</soapenv:Envelope>

HTTP/1.1 200 OK
Server: Zato
Date: Wed, 20 May 2015 16:00:53 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Content-Type: application/xml
X-Zato-CID: K07D1APFH6EHMREWG6CH5J4DJYAC

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns=“https://zato.io/ns/20130518”>
soap:Body
<zato_outgoing_sql_get_list_response>
<zato_env>
K07D1APFH6EHMREWG6CH5J4DJYAC
ZATO_OK
</zato_env>
<item_list>

1
zz
<is_active>true</is_active>
<cluster_id>1</cluster_id>
postgresql+pg8000
localhost
5432
<db_name>zato1</db_name>
zato1
<pool_size>1</pool_size>
connect_args = {‘charset’:‘utf8’}

</item_list>
</zato_outgoing_sql_get_list_response>
</soap:Body>
</soap:Envelope>