Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payload interpretation (without SimpleIO) #67

Closed
myroslav opened this issue Jun 4, 2013 · 4 comments
Closed

Payload interpretation (without SimpleIO) #67

myroslav opened this issue Jun 4, 2013 · 4 comments

Comments

@myroslav
Copy link
Contributor

myroslav commented Jun 4, 2013

When following file is dropped in pickup-dir as test_resppayl.py:

# Zato
from zato.server.service import Service

class Strip(Service):
    def handle(self):
        resp = """{"foo": "0", "bar": []}"""
        self.response.payload = resp

class AsIs(Service):
    def handle(self):
        resp = """{"foo": "0", "bar": []}"""
        self.response.payload = "?"+resp

And declared services are invoked via CLI, one is getting following results:

$ zato service invoke ~/tmp/qs-1/server1 test-resppayl.strip
0
$ zato service invoke ~/tmp/qs-1/server1 test-resppayl.as-is
?{"foo": "0", "bar": []}

Note: no SIO declared in services. The test-resppayl.strip is expected to return {"foo": "0", "bar": []} and it returns only the value of first item of interpreted JSON instead? Should the data be returned literally in both cases?

@dsuch
Copy link
Collaborator

dsuch commented Jun 4, 2013

This is something to do with CLI it seems - note that when you call the service from another one it responds correctly. So this seems something to do with CLI itself not with services.

    from zato.server.service import Service

    class Strip(Service):
        def handle(self):
            resp = """{"foo": "0", "bar": []}"""
            self.response.payload = resp

    class AsIs(Service):
        def handle(self):
            resp = """{"foo": "0", "bar": []}"""
            self.response.payload = "?"+resp

    class MyService(Service):
        def handle(self):
            self.logger.info(self.invoke('zzz.strip'))
            self.logger.info(self.invoke('zzz.as-is'))

@dsuch
Copy link
Collaborator

dsuch commented Jun 5, 2013

This has been fixed since 92a43f7 and will be in Zato 1.2 but right now you can have it in Zato 1.1 by installing the latest bundle of hotfixes as explained in a new chapter - https://zato.io/docs/admin/guide/hotfixes.html

@myroslav
Copy link
Contributor Author

myroslav commented Jun 5, 2013

Why not running from master? If you are pushing to master unstable fixes
then I'll be using my fork and merging only changes I need ;)

Possibly I do not understand the habits of big ESB boys...

On Wed, Jun 5, 2013 at 7:28 PM, Dariusz Suchojad
notifications@github.comwrote:

This has been fixed since 92a43f792a43f7and will be in Zato 1.2 but right now you can have it in Zato 1.1 by
installing the latest bundle of hotfixes as explained in a new chapter -
https://zato.io/docs/admin/guide/hotfixes.html


Reply to this email directly or view it on GitHubhttps://github.com//issues/67#issuecomment-18989526
.

....................................................................................................................................
Myroslav Opyr ▪ CTO ▪ Quintagroup ▪ +1.917.475.4725 ▪
http://quintagroup.com
˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙

@dsuch
Copy link
Collaborator

dsuch commented Jun 5, 2013

Heh, I'm not saying you can't use master. But master is for development, everything can happen in there, I don't push unstable things (I use feature branches) but this is not a release. Hotfixes are a means to install fixes for important issues and nothing else.

This is open-source so you can honestly use it any way you wish to :-) I'm just saying that there is a stable version and if you need hotfixes only -> you run hotfixman.sh and everything is taken care of but if you prefer to use master, you can most certainly use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants