8 Replies Latest reply on Oct 26, 2009 8:48 AM by Bob Stucky

    XML RPC service call from InDesign

    John.NL

      We've got a great internal XMLRPC service, which is normally called from a Widget in OSx. Now we want to extend our InDesign script with the functionalities of the widget. Simple: Call the XMLRPC service and place the result as text in the ID document.

       

      Now I ran in my first problem: How to setup a session.

      Normally I would start communicating with the server using:

          http = new XMLHttpRequest();

      or:

          http = new ActiveXObject("Microsoft.XMLHTTP");

       

       

       

       

        • 1. Re: XML RPC service call from InDesign
          AdobeScripts Level 3

          hi

           

          If you want to use for this "desktop" version of InDesign - you should be carefull - because you are probably violating EULA

          Please, read this thread and post your comments

          http://forums.adobe.com/message/2219112#2219112

           

          robin

           

          www.adobescripts.co.uk

          • 2. Re: XML RPC service call from InDesign
            John.NL Level 1

            @Robert:

            Thank you for you concerns.

            No, our application is not conflicting with the EULA. We want to create some sort of import method, just like importing a textfile. But now there is no textfile, the data comes from a XML RPC server and the data should be placed at a userdefined location on a page.

            • 3. Re: XML RPC service call from InDesign
              AdobeScripts Level 3
              Thank you for you concerns.

              No, our application is not conflicting with the EULA. We want to create some sort of import method, just like importing a textfile. But now there is no textfile, the data comes from a XML RPC server and the data should be placed at a userdefined location on a page.

               

              but InDesign will be part of bigger workflow which use data from database populated by people without InDesign licence, right ?

               

              robin

               

              www.adobescripts.co.uk

              • 4. Re: XML RPC service call from InDesign
                John.NL Level 1

                No, that is not the case.

                First: all workstations have InDesign.

                Second: It is data that is computed. A project number, a date, that sort of thing. Not considerable amounts of data like a product catalog. 

                [Maybe later we will include the current weather and uptime of the server. ]

                 

                I don't want to start a discussion on the EULA, but I can't resist to bring up a 3rd point:

                Third: Does Adobe expect users to fill pages from memory, telepathy, or what?

                • 5. Re: XML RPC service call from InDesign
                  Bob Stucky Adobe Employee

                  Before I joined Adobe, I was working on a catalog system that placed data from web services attached to a database. A licensed user had to be in the seat to make things happen, and I think that's really the point. But beyond EULA talk...

                   

                  John, what's your environment? (scripting language, platforms, etc)

                   

                  Bob

                  • 6. Re: XML RPC service call from InDesign
                    Dirk Becker  Level 4

                    Bob, the OP mentions OSX but also quotes some Ajax/Browser JavaScript. Has your HTTP via Socket script evolved that far?

                     

                    Not the best fit, but I'd also suggest a look at

                    http://developer.apple.com/mac/library/documentation/AppleScript/Conceptual/soapXMLRPC/cha pter2/soapXMLRPC_about.html

                     

                    I have not tried either, in the few cases where I needed that kind of communication we also had dedicated plugins around.

                     

                    Dirk

                    • 7. Re: XML RPC service call from InDesign
                      John.NL Level 1

                      Yes, a user will be there to initiate the XMLRPC call and get the data. There's no automatic updating. So that will cover the EULA.

                       

                      At this moment our environment is OSX, Indesign CS3. We developed several non-InDesign applications in AppleScript which use AppleScript's call xmlrpc to get data from webservices. Also, we have Gadgets and Widgets using JavaScript's XMLHttpRequest (in combination with a XMPRPC library) to call the services.

                      Because we will have home-workers in the future with InDesign/Windows machines we are investigating the JavaScript solutions in InDesign. Now we stumbled on the missing XMLHttpRequest and/or Microsoft.XMLHTTP objects.

                      It would be nice if someone couId confirm that these objects are not and will not be available in JavaScript/ExtendScript solutions. If that can be confirmed, I can justify developing separate solutions for Windows (C?) and Mac (AppleScript?).

                       

                      John

                      • 8. Re: XML RPC service call from InDesign
                        Bob Stucky Adobe Employee

                        There are a couple of http functions out there written by various scripters that would be able to do the trick in JS. The one I wrote was for a specific task and is likely not up to the challenge, I know there's better ones out there.

                         

                        That said, the route I would take is with Flash/Flex and PatchPanel for CS3. With that approach you get an industrial strength development environment (but it's not a free environment), strong typing when you want it (avoids all those typo and "stupid" errors), a lot more bang for the buck in UI development, cross platform, and pretty good performance. Of course, Flash/Flex has all the XML, http, and web service stuff that you could ever want built in.

                         

                        I have some example projects on www.creativescripting.net that show doing some out of the box stuff with PatchPanel (PatchPanel code responding to InDesign menu events, and working with APID). If you're placing XML in InDesign, I also have a port to of the XML Glue code for InDesign's XML Rules.

                         

                        Regards

                         

                        Bob