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

6511Re: soap client gets permission denied

Expand Messages
  • prami_22
    Oct 5, 2010
      here is my server & client code
      #!/usr/bin/perl -w

      use SOAP::Transport::HTTP;

      package Demo;
      sub topic_list {
      $config_path ="/home/pramila/config";
      open(CONFIG, "< $config_path") or die "can't open $config_path: $!";
      my @lines = <CONFIG>;
      my @topics;
      foreach $line (@lines){
      if ($line =~ /keywords/){
      chomp $line;
      my ($key,$value) = split(/ /,$line);
      my @temp = split(/,/,$value);
      push (@topics,@temp);
      return @topics;

      #!/usr/bin/perl -w

      use SOAP::Lite;

      my $soap = SOAP::Lite
      my $result =$soap->topic_list();
      unless ($result->fault) {
      print $result->result();
      } else {
      print join ', ',

      here is output after executing my_soap_client.pl

      soap:Server, can't open /home/pramila/config: Permission denied at /var/www/html/soap/server.cgi line 13.


      --- In soaplite@yahoogroups.com, Dave Howorth <dhoworth@...> wrote:
      > prami_22 wrote:
      > > I am writing a web service to return contents of a file
      > > At server side I can open a file & read contents but when client calls same method, I get permission denied error.
      > > Please explain why am I getting this error & how to avoid it
      > You're getting it because you've done something wrong and you could
      > avoid it either by fixing it or by using a different solution.
      > If you want some more specific help, posting your code and the actual
      > messages you see will help people to help you.
      > Cheers, Dave
    • Show all 8 messages in this topic