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

2662A Fix for Soap Server and WSDL Files

Expand Messages
  • jpeyser
    May 27, 2003
      For those who are able to generate WSDL files outside of SOAP::Lite,
      but need the SOAP server to return WSDL file, there is the following
      fix (from the example in HTTP::Daemon)

      In package SOAP::Transport::HTTP::Daemon, modify the following

      sub handle {
      my $self = shift->new;
      while (my $c = $self->accept) {
      while (my $r = $c->get_request) {
      if ($r->method eq 'GET') {
      my $wsdl_file = $r->url->epath;
      $wsdl_file =~ s/^\///;
      } else {
      # replaced ->close, thanks to Sean Meisner
      # shutdown() doesn't work on AIX. close() is used in this case.
      Thanks to Jos Clijmans <jos.clijmans@...>
      UNIVERSAL::isa($c, 'shutdown') ? $c->shutdown(2) : $c->close();
      undef $c;

      For example, a client call containing service
      ('http://hostname:1234/wsdl/quote.wsdl') would result in the server
      returning the file quote.wsdl from server subdirectory wsdl.

      By the way, I use gSoap, which generates WSDL files from C header
      files. The WSDL files seem to be very reliable (and very quick to

    • Show all 2 messages in this topic