Loading ...
Sorry, an error occurred while loading the content.

Wrapping command-line tools

Expand Messages
  • pela3247
    Hello! Being a total newbie to the whole web services thing, I have a couple of questions about how to deploy it using SOAP::Lite. I have a command-line tool
    Message 1 of 3 , Feb 9, 2006
    • 0 Attachment
      Hello!

      Being a total newbie to the whole web services thing, I have a couple of questions about how
      to deploy it using SOAP::Lite.

      I have a command-line tool running locally written in C/Fortran that I need to make available
      as a webservice. How do I go about? I have studied all the Hello World-examples out there,
      but none of them seem to go beyond just that. I guess I need to create a wsdl file describinf
      my application, but what happens then? How do I make it available to other people? How do i
      pass the incoming calls to my tool?

      Cheers
      /Per
    • Kai McBride
      Per, my guess is you would want to create a perl package that is a wrapper to calling your C/Fortran code. The SOAP::Lite server will call the function to the
      Message 2 of 3 , Feb 10, 2006
      • 0 Attachment
        Per,

        my guess is you would want to create a perl package that is a wrapper
        to calling your C/Fortran code. The SOAP::Lite server will call the
        function
        to the wrapper package which would then call your program appropriately.

        Not knowing anything else about your other program I'm guessing that the
        command line tool doesn't expect SOAP/XML but just to be called with
        flags. You could create SOAP calls to uniquely launch your tool.

        example: GetModuleInfo

        package MyModuleWrapper;

        sub GetModuleInfo{
        # call /usr/local/bin/myModule --getinfo
        # return $myModuleResponse
        }

        There are probably other ways of doing this, but that is how I would
        approach the problem.

        As far as the WSDL file goes, you would need to create one to tell
        clients how they should call the MyModuleWrapper, and all of
        those wrapper methods like 'GetModuleInfo' in the pseudo example above.

        good luck,

        -kai

        On Feb 10, 2006, at 2:27 AM, pela3247 wrote:

        > Hello!
        >
        > Being a total newbie to the whole web services thing, I have a
        > couple of questions about how
        > to deploy it using SOAP::Lite.
        >
        > I have a command-line tool running locally written in C/Fortran
        > that I need to make available
        > as a webservice. How do I go about? I have studied all the Hello
        > World-examples out there,
        > but none of them seem to go beyond just that. I guess I need to
        > create a wsdl file describinf
        > my application, but what happens then? How do I make it available
        > to other people? How do i
        > pass the incoming calls to my tool?
        >
        > Cheers
        > /Per
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
      • pela3247
        Thank you very much for that. To summarise I need to write a Perl module which takes the incoming soap-call and parses it to my application (which just expects
        Message 3 of 3 , Feb 13, 2006
        • 0 Attachment
          Thank you very much for that. To summarise I need to write a Perl
          module which takes the incoming soap-call and parses it to my
          application (which just expects flags). How do I then collect the
          output which is written to STDOUT?

          Just to follow up on the wsdl-part, where do I put the wsdl file once
          i have written it. I guess that the apache webserver need to know
          about it somehow, or am I completely out in the blue?

          /Per


          --- In soaplite@yahoogroups.com, Kai McBride <kmcbride@...> wrote:
          >
          > Per,
          >
          > my guess is you would want to create a perl package that is a wrapper
          > to calling your C/Fortran code. The SOAP::Lite server will call the
          > function
          > to the wrapper package which would then call your program appropriately.
          >
          > Not knowing anything else about your other program I'm guessing that the
          > command line tool doesn't expect SOAP/XML but just to be called with
          > flags. You could create SOAP calls to uniquely launch your tool.
          >
          > example: GetModuleInfo
          >
          > package MyModuleWrapper;
          >
          > sub GetModuleInfo{
          > # call /usr/local/bin/myModule --getinfo
          > # return $myModuleResponse
          > }
          >
          > There are probably other ways of doing this, but that is how I would
          > approach the problem.
          >
          > As far as the WSDL file goes, you would need to create one to tell
          > clients how they should call the MyModuleWrapper, and all of
          > those wrapper methods like 'GetModuleInfo' in the pseudo example above.
          >
          > good luck,
          >
          > -kai
          >
          > On Feb 10, 2006, at 2:27 AM, pela3247 wrote:
          >
          > > Hello!
          > >
          > > Being a total newbie to the whole web services thing, I have a
          > > couple of questions about how
          > > to deploy it using SOAP::Lite.
          > >
          > > I have a command-line tool running locally written in C/Fortran
          > > that I need to make available
          > > as a webservice. How do I go about? I have studied all the Hello
          > > World-examples out there,
          > > but none of them seem to go beyond just that. I guess I need to
          > > create a wsdl file describinf
          > > my application, but what happens then? How do I make it available
          > > to other people? How do i
          > > pass the incoming calls to my tool?
          > >
          > > Cheers
          > > /Per
          > >
          > >
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > >
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.