(Migrated) Problem creating outgoing via HTTP JSON in Zato 2

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

Hello,

we have a deployment script that creates outgoings via the
zato.http-soap.create service via plain HTTP with JSON data using
zato.client.JSONClient.

This works great in Zato 1.1 but in Zato 2.0.1 we have a strange
problem. The service call succeeds and the outgoing is listed in the web
admin, but when a service tries to retrieve it using its name with
self.outgoing.plain_http.get(name), the outgoing isn’t found (get()
returns None).

But when the outgoing is opened in the web admin with Edit and then
saved, self.outgoing.plain_http.get() now works.

I double-checked the outgoing name and that all fields of the outgoing
required by the spec are present in the data passed to JSONClient. if I
pass the same data to ‘zato service invoke’ on the command line, the
problem is the same, i.e. the outgoing is created but not found by the
service.

I can’t see whats wrong with the data and I’m wondering if something is
wrong with the zato.http-soap.create service.

Here is the pertinent portion of the log of the client script which
creates the outgoing:

DEBUG:deploy.createoutgoings:Outgoing data: {‘url_path’:
’/test-outgoing’, ‘name’: ‘test-outgoing’, ‘is_internal’: False,
‘is_active’: True, ‘host’: ‘http://127.0.0.1:11223’, ‘pool_size’: ‘’,
‘connection’: ‘outgoing’, ‘cluster_id’: 1, ‘ping_method’: ‘GET’,
‘transport’: ‘plain_http’}
DEBUG:deploy.common:Invoking service at
’/zato/json/zato.http-soap.create’ with data: {‘url_path’:
’/test-outgoing’, ‘name’: ‘test-outgoing’, ‘is_internal’: False,
‘is_active’: True, ‘host’: ‘http://127.0.0.1:11223’, ‘pool_size’: ‘’,
‘connection’: ‘outgoing’, ‘cluster_id’: 1, ‘security_id’: None,
‘ping_method’: ‘GET’, ‘transport’: ‘plain_http’}
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP
connection (1): 127.0.0.1
DEBUG:requests.packages.urllib3.connectionpool:“POST
/zato/json/zato.http-soap.create HTTP/1.1” 200 None
DEBUG:zato.client:request:[{“url_path”: “/test-outgoing”, “name”:
“test-outgoing”, “is_internal”: false, “is_active”: true, “host”:
http://127.0.0.1:11223”, “pool_size”: “”, “connection”: “outgoing”,
“cluster_id”: 1, “security_id”: null, “ping_method”: “GET”, “transport”:
“plain_http”}]
response_class:[<class ‘zato.client.JSONResponse’>]
async:[False]
headers:[{}]
text:[{“zato_env”: {“details”: “”, “result”: “ZATO_OK”, “cid”:
“K06JN390PN2GVHY683Y6N0DZ5MFR”}, “zato_http_soap_create_response”:
{“id”: 535, “name”: “test-outgoing”}}]
data:[{u’zato_env’: {u’cid’: u’K06JN390PN2GVHY683Y6N0DZ5MFR’,
u’details’: u’’, u’result’: u’ZATO_OK’},
u’zato_http_soap_create_response’: {u’id’: 535, u’name’: u’test-outgoing’=
}}]
INFO:deploy.createoutgoings:Outgoing ‘test-outgoing’ (ID: 535) create
operation successful.

Any help appreciated,

Chris

On 25/02/15 12:30, Christopher Arndt wrote:

Any help appreciated,

Hi Christopher,

can you post the relevant bits of logs/admin.log?

That’s the file all admin requests/responses go to.

Also, are there any warnings your messages in logs/server.log?

thanks,

Am 25.02.2015 um 17:33 schrieb Dariusz Suchojad:

In your case, you need to provide ‘ping_method’, ‘timeout’ and
’pool_size’ in addition to what used to be required in 1.1.

Thanks, that did the trick.

Ideally, the service should complain about all missing required params,
though :slight_smile:

Chris