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

Generate WSDL with WSDL::Generator

Expand Messages
  • poulkornmod
    Hi all, Have any of you managed to generate a wsdl file from a soap service that is not using the mod_perl apache interface? I have succesfully made myself a
    Message 1 of 3 , Sep 2, 2003
    View Source
    • 0 Attachment
      Hi all,

      Have any of you managed to generate a wsdl file from a soap service
      that is not using the mod_perl apache interface?

      I have succesfully made myself a soap service that runs perfectly on
      an Apache installation.

      My service looks like this:
      #!/usr/bin/perl
      #
      #
      #

      use SOAP::Transport::HTTP;
      SOAP::Transport::HTTP::CGI
      -> dispatch_to('MySOAP')
      -> handle;

      BEGIN {
      package MySOAP;

      use MySoapLib;
      @ISA = qw(SOAP::Server::Parameters); # to get envelope

      sub DoChk {
      my $self = shift;
      my $envelope = pop;
      my $Nm = $envelope->valueof("//DoChk/Name");
      my $No = $envelope->valueof("//DoChk/No");
      $return = MySoapLib::Main($Nm,$No);
      return SOAP::Data->name(resultCd => $return);
      }

      1;
      }

      exit;

      As a total novice I tried to follow the HowTo - even though that
      it's build for mod_perl - copying my soap.pl and renamed it to
      soap.pm (commenting out the relevant pieces) and ran the below
      script in the same folder:
      #!/usr/bin/perl -w
      #
      #
      use lib './';
      use SOAP::Lite +trace => 'debug';
      use WSDL::Generator;

      my $init = { 'services' => 'MySOAP',
      'service_name' => 'MySOAP',
      'target_namesp' => 'http://myhost/cgi-bin/',
      'documentation' => 'Service to say hello',
      'location' => 'http://myhost/cgi-bin/soap.pl' };

      my $wsdl = WSDL::Generator->new($init);
      MySOAP->DoChk(SOAP::Data->name(No => '1234'),
      SOAP::Data->name(Name => 'Blib')));
      print $wsdl->get(MySOAP);

      This script does not generate any output (wsdl or errors) what so
      ever! What am I doing wrong? I really appreciate all your help.

      Thanks in advance

      Poul
    • poulkornmod
      For your information - I of caused made an typing mistake in my mailing: filename is not soap.pm but MySOAP.pm Still appreciate all your help! Poul ... service
      Message 2 of 3 , Sep 2, 2003
      View Source
      • 0 Attachment
        For your information - I of caused made an typing mistake in my
        mailing:
        filename is not soap.pm but MySOAP.pm

        Still appreciate all your help!

        Poul

        --- In soaplite@yahoogroups.com, "poulkornmod" <poul@k...> wrote:
        > Hi all,
        >
        > Have any of you managed to generate a wsdl file from a soap
        service
        > that is not using the mod_perl apache interface?
        >
        > I have succesfully made myself a soap service that runs perfectly
        on
        > an Apache installation.
        >
        > My service looks like this:
        > #!/usr/bin/perl
        > #
        > #
        > #
        >
        > use SOAP::Transport::HTTP;
        > SOAP::Transport::HTTP::CGI
        > -> dispatch_to('MySOAP')
        > -> handle;
        >
        > BEGIN {
        > package MySOAP;
        >
        > use MySoapLib;
        > @ISA = qw(SOAP::Server::Parameters); # to get envelope
        >
        > sub DoChk {
        > my $self = shift;
        > my $envelope = pop;
        > my $Nm = $envelope->valueof("//DoChk/Name");
        > my $No = $envelope->valueof("//DoChk/No");
        > $return = MySoapLib::Main($Nm,$No);
        > return SOAP::Data->name(resultCd => $return);
        > }
        >
        > 1;
        > }
        >
        > exit;
        >
        > As a total novice I tried to follow the HowTo - even though that
        > it's build for mod_perl - copying my soap.pl and renamed it to
        > soap.pm (commenting out the relevant pieces) and ran the below
        > script in the same folder:
        > #!/usr/bin/perl -w
        > #
        > #
        > use lib './';
        > use SOAP::Lite +trace => 'debug';
        > use WSDL::Generator;
        >
        > my $init = { 'services' => 'MySOAP',
        > 'service_name' => 'MySOAP',
        > 'target_namesp' => 'http://myhost/cgi-bin/',
        > 'documentation' => 'Service to say hello',
        > 'location' => 'http://myhost/cgi-bin/soap.pl' };
        >
        > my $wsdl = WSDL::Generator->new($init);
        > MySOAP->DoChk(SOAP::Data->name(No => '1234'),
        > SOAP::Data->name(Name => 'Blib')));
        > print $wsdl->get(MySOAP);
        >
        > This script does not generate any output (wsdl or errors) what so
        > ever! What am I doing wrong? I really appreciate all your help.
        >
        > Thanks in advance
        >
        > Poul
      • Pierre Denis
        Hello Poul, which version of perl are you using? (5.8.0 has a bug with UNIVERSAL::AUTOLOAD which prevents it to work) Regards
        Message 3 of 3 , Sep 3, 2003
        View Source
        • 0 Attachment
          Hello Poul, which version of perl are you using? (5.8.0 has a bug with
          UNIVERSAL::AUTOLOAD which prevents it to work)

          Regards

          > -----Original Message-----
          > From: poulkornmod [mailto:poul@...]
          > Sent: 02 September 2003 11:56
          > To: soaplite@yahoogroups.com
          > Subject: [soaplite] Re: Generate WSDL with WSDL::Generator
          >
          >
          > For your information - I of caused made an typing mistake in my
          > mailing:
          > filename is not soap.pm but MySOAP.pm
          >
          > Still appreciate all your help!
          >
          > Poul
          >
          > --- In soaplite@yahoogroups.com, "poulkornmod" <poul@k...> wrote:
          > > Hi all,
          > >
          > > Have any of you managed to generate a wsdl file from a soap
          > service
          > > that is not using the mod_perl apache interface?
          > >
          > > I have succesfully made myself a soap service that runs perfectly
          > on
          > > an Apache installation.
          > >
          > > My service looks like this:
          > > #!/usr/bin/perl
          > > #
          > > #
          > > #
          > >
          > > use SOAP::Transport::HTTP;
          > > SOAP::Transport::HTTP::CGI
          > > -> dispatch_to('MySOAP')
          > > -> handle;
          > >
          > > BEGIN {
          > > package MySOAP;
          > >
          > > use MySoapLib;
          > > @ISA = qw(SOAP::Server::Parameters); # to get envelope
          > >
          > > sub DoChk {
          > > my $self = shift;
          > > my $envelope = pop;
          > > my $Nm = $envelope->valueof("//DoChk/Name");
          > > my $No = $envelope->valueof("//DoChk/No");
          > > $return = MySoapLib::Main($Nm,$No);
          > > return SOAP::Data->name(resultCd => $return);
          > > }
          > >
          > > 1;
          > > }
          > >
          > > exit;
          > >
          > > As a total novice I tried to follow the HowTo - even though that
          > > it's build for mod_perl - copying my soap.pl and renamed it to
          > > soap.pm (commenting out the relevant pieces) and ran the below
          > > script in the same folder:
          > > #!/usr/bin/perl -w
          > > #
          > > #
          > > use lib './';
          > > use SOAP::Lite +trace => 'debug';
          > > use WSDL::Generator;
          > >
          > > my $init = { 'services' => 'MySOAP',
          > > 'service_name' => 'MySOAP',
          > > 'target_namesp' => 'http://myhost/cgi-bin/',
          > > 'documentation' => 'Service to say hello',
          > > 'location' => 'http://myhost/cgi-bin/soap.pl' };
          > >
          > > my $wsdl = WSDL::Generator->new($init);
          > > MySOAP->DoChk(SOAP::Data->name(No => '1234'),
          > > SOAP::Data->name(Name => 'Blib')));
          > > print $wsdl->get(MySOAP);
          > >
          > > This script does not generate any output (wsdl or errors) what so
          > > ever! What am I doing wrong? I really appreciate all your help.
          > >
          > > Thanks in advance
          > >
          > > Poul
          >
          >
          >
          > 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/
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.