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

Hi / New / OO interface from COM

Expand Messages
  • vaibhav_arya@yahoo.com
    Hi: I am trying to develop a Web Service that will also be accessible by VB clients on their desktops, I have the server and some clients running perl
    Message 1 of 4 , Apr 10, 2001
    • 0 Attachment
      Hi:

      I am trying to develop a Web Service that will also be accessible by
      VB clients on their desktops, I have the server and some clients
      running perl (Soap::Lite of course) and now I am trying to develop
      the VB client but am not able to use the same Object Oriented access
      as I would from Perl.

      For example (from the Soap::Lite page):

      Perl code in OO style:
      use SOAP::Lite +autodispatch =>
      uri => 'http://www.soaplite.com/Temperatures',
      proxy => 'http://services.soaplite.com/temper.cgi';

      my $temperatures = Temperatures->new(32); # get object
      print $temperatures->as_celsius; # invoke method


      I want to write an equivalent in Visual Basic. (The VB example on the
      Soap::Lite page doesnt help much)

      Can anyone help?

      Thanks in advance,
      Vaibhav.

      --
      Vaibhav Arya
      Mega E-Services
      www.megaeservices.com
    • Paul Kulchenko
      Hi, Vaibhav! Yes, Perl autoload magic is not available from COM interface (though I ll need to do some tests, maybe it s something that could be worked out).
      Message 2 of 4 , Apr 10, 2001
      • 0 Attachment
        Hi, Vaibhav!

        Yes, Perl autoload magic is not available from COM interface (though
        I'll need to do some tests, maybe it's something that could be worked
        out). Meantime, you may make OO call using usual syntax:

        use SOAP::Lite;

        my $soap = new SOAP::Lite
        uri => 'http://www.soaplite.com/Temperatures',
        proxy => 'http://services.soaplite.com/temper.cgi';

        my $temperatures = $soap->call('new', 35)->result; # get object
        print $soap->as_celsius($temperatures)->result; # invoke method

        Object goes as the first parameter during OO call:

        $object->method(@parameters)
        is (almost) the same as
        class::method($object, @parameters)

        where class is the class where object belongs.

        Though this code could be easily mapped to VB code (use examples in
        COM directory), I'm not sure that COM interface will store
        $temperatures variable as an object. I'll try in a couple of hours.

        Best wishes, Paul.

        --- vaibhav_arya@... wrote:
        > Hi:
        >
        > I am trying to develop a Web Service that will also be accessible
        > by
        > VB clients on their desktops, I have the server and some clients
        > running perl (Soap::Lite of course) and now I am trying to develop
        > the VB client but am not able to use the same Object Oriented
        > access
        > as I would from Perl.
        >
        > For example (from the Soap::Lite page):
        >
        > Perl code in OO style:
        > use SOAP::Lite +autodispatch =>
        > uri => 'http://www.soaplite.com/Temperatures',
        > proxy => 'http://services.soaplite.com/temper.cgi';
        >
        > my $temperatures = Temperatures->new(32); # get object
        > print $temperatures->as_celsius; # invoke method
        >
        >
        > I want to write an equivalent in Visual Basic. (The VB example on
        > the
        > Soap::Lite page doesnt help much)
        >
        > Can anyone help?
        >
        > Thanks in advance,
        > Vaibhav.
        >
        > --
        > Vaibhav Arya
        > Mega E-Services
        > www.megaeservices.com
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Get email at your own domain with Yahoo! Mail.
        http://personal.mail.yahoo.com/
      • vaibhav_arya@yahoo.com
        Paul: Thanks for your message, will try and keep you updated! My understanding is that the problem in the COM-OO interface is that VB requires to have an
        Message 3 of 4 , Apr 10, 2001
        • 0 Attachment
          Paul:

          Thanks for your message, will try and keep you updated!

          My understanding is that the problem in the COM-OO interface is that
          VB requires to have an object interface defined before you can
          instantiate the same. Here the oject of type temprature is not pre-
          defined for the VB world so the code (which I was trying, earlier):

          Dim a as Temperature
          Set a = SoapObject.new("35")

          Will not work because VB does not recognise the object Temperature
          yet.

          Is my understanding correct?

          MS SOAP Toolkit offers some sort of a TypeMapper together with their
          WSML, does anyone have any idea about that?

          Thanks again Paul

          Regards,
          Vaibhav

          --
          Vaibhav Arya
          Mega E-Services
          www.megaeservices.com
        • Paul Kulchenko
          Hi, Vaibhav! ... Cannot tell you for sure about first line (you may even try to skip it), but second line should probably look like: Set a =
          Message 4 of 4 , Apr 10, 2001
          • 0 Attachment
            Hi, Vaibhav!

            --- vaibhav_arya@... wrote:
            > My understanding is that the problem in the COM-OO interface is
            > that
            > VB requires to have an object interface defined before you can
            > instantiate the same. Here the oject of type temprature is not pre-
            > defined for the VB world so the code (which I was trying, earlier):
            >
            > Dim a as Temperature
            > Set a = SoapObject.new("35")
            Cannot tell you for sure about first line (you may even try to skip
            it), but second line should probably look like:

            Set a = SoapObject.call("new", 35)

            > Will not work because VB does not recognise the object Temperature
            yet.
            Right. This declaration shouldn't be there. However interface still
            can return object from SoapObject.call(). I'll try tomorrow.

            Best wishes, Paul.

            __________________________________________________
            Do You Yahoo!?
            Get email at your own domain with Yahoo! Mail.
            http://personal.mail.yahoo.com/
          Your message has been successfully submitted and would be delivered to recipients shortly.