http://www.perlmonks.org?node_id=532156


in reply to Error running SOAP statement

Your code donīt especify content for $xml, and Iīm supose this is a error cause... (changed proxy to use http transport).

--
Marco Antonio
Rio-PM

Replies are listed 'Best First'.
Re^2: Error running SOAP statement
by Hammy (Scribe) on Feb 23, 2006 at 04:26 UTC
    Sorry, I left off one line. The $xml variable is passed in as a well formed XML stream. I will look at the difference between proxy and transport, but I am confused why it would work like a charm in one environment and not in the other. Any idea what that error message is telling me?
      Use a normal fault on result...
      use SOAP::Lite +trace; my $data = SOAP::Data->name('data' => "$xml")->type('string')->uri('') +; my $s = SOAP::Lite -> uri ('http://di.wellmed.com/SoapService') -> proxy ('http://di.webmdhealth.com/SoapService/SoapService.asmx') # -> on_fault(sub{}); ; $result = $s->PerformUpdate($data); unless ( $result && ref($result) ) { print "Empty on result!\n"; } elsif ( $result->fault ) { print "FAULT: ", $result->faultcode, " ", $result->faultstring, "\n +\n"; } else { print $result->result; }
      This page return incorrect encoding...
      Unexpected Content-Type 'text/html; charset=Windows-1252' returned

      --
      Marco Antonio
      Rio-PM