Results 1 to 5 of 5

Thread: Zimlet call via SOAP

  1. #1
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Question Zimlet call via SOAP

    If you have performed a pre-auth is it possible to then call a Zimlet they SOAP ? I have ran the ZWC in debug mode and clicked on the Zimlet I wish to perform a action but no request appears to be sent.

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Capturing with tcpdump I see that a HTTP GET request is sent to /service/zimlet/<zimlet_name>/procedure.js?somedatatosend and if dump the account using zmmailbox it would appear to expose the objects via JSON
    Code:
    "zimlet": [{
                    "description": "Zimlet Test",
                    "name": "zimlet_name",
                    "version": "0.1",
                    "includeCSS": [{
                        "_content": "zimlet.css"
                      }],"zimlet": [{
                    "description": "Zimlet Test",
                    "name": "zimlet_name",
                    "version": "0.1",
                    "includeCSS": [{
                        "_content": "zimlet.css"
                      }],
                    "include": [{
                        "_content": "procedure.js"
                      }],
                    "handlerObject": [{
                        "_content": "zimlet_name"
                      }],
    How would one construct the JSON request or is that even possible to a zimlet ?

  3. #3
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    By setting ZM_AUTH_TOKEN I am able to connect to the zimlet using the full /service URL though wondering whether that is the only way or if JSON can be used ?

  4. #4
    Join Date
    Nov 2009
    Posts
    105
    Rep Power
    6

    Default

    So I understand your question: are you looking to call the /service/***/zimlet URL directly and are asking how auth is handled to be able to hit that URI?

  5. #5
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Please excuse my ignorance for a start I have a working PHP script that uses JSON for querying a contact
    Code:
    $request = array(
                    "Header" => array(
                            "context" => array(
                                    "_jsns" => "urn:zimbra",
                                    "authToken" => array(
                                            "_content" => $authToken,
                                    ),
                            ),
                    ),
                    "Body" => array(
                            "SearchRequest" => array(
                                    "_jsns" => "urn:zimbraMail",
                                    "types" => array(
                                            "_content" => "contact",
                                    ),
                                    "query" => array(
                                            "_content" => "12345",
                                    ),
                            ),
                    ),
            );
    And I was wondering whether JSON could be used to post, via the SOAP interface, to a backend Zimlet as-well. I have made it work by calling http://<zimbra_fqdn>/service/zimlet/<zimlet_name>/<zimlet_name>.js using CURL. For this to work I had to set the ZM_AUTH_TOKEN cookie which I can get quite happily using JSON. I think my issue is that Zimlets are not exposed for operating on like other methods eg. zimbraMail as I could not see anything apart from Get/Modify in soap.txt. Will PM my code if that is okay ?

Similar Threads

  1. Replies: 6
    Last Post: 03-05-2010, 01:13 AM
  2. Can recives but can't send mail outgoing
    By hoangkk in forum Installation
    Replies: 9
    Last Post: 09-21-2009, 08:35 PM
  3. Samba and POSIX undeploy problem
    By catnipper in forum Zimlets
    Replies: 0
    Last Post: 09-02-2009, 11:51 AM
  4. Replies: 35
    Last Post: 07-17-2009, 04:52 PM
  5. zmzimletctl deploy zimbra_posixaccount.zip - ERROR -
    By todd_dsm in forum Administrators
    Replies: 0
    Last Post: 04-02-2009, 02:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •