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

3707Re: Re: [soaplite] custom fault generates error 500

Expand Messages
  • Duncan Cameron
    Jul 1, 2004
      At 2004-07-01, 12:20:28 Duncan Cameron <duncan_cameron2002@...> wrote:

      >At 2004-07-01, 11:57:05 you wrote:
      >>my soapserver should generate customized faults as described in
      >>So I have a test-function on the server:
      >>sub make_fail{
      >> #generiert SOAP-Fehler
      >> die SOAP::Fault->faultcode('Server.Custom')
      >> ->faultstring('Böser Fehler')
      >> ->faultdetail('Aber gewollt!');
      >>my client:
      >>my $call=SOAP::Lite
      >> -> uri('urn:simple_o')
      >> -> proxy ('http://localhost:8081/simple_o ');
      >>my $res = eval{
      >> $call->make_fail;
      >> print STDERR "Fehler bei Ausführung: ".join("\n",$@,'');
      >> exit;
      >>My client says:
      >>Fehler bei Ausführung: 500 Internal Server Error at
      >>./simple_client.pl line 36
      >>The response from the server seems OK:
      >><?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      >>Fehler</faultstring><detail xsi:type="xsd:string">Aber
      >>But there is no result-object ($res) generated.
      >>Any idea?
      >From your example you appear to be sending back a literal ö character which is not valid
      >UTF-8. This will cause a problem when the SOAP message is parsed which might be causing
      >your problem.
      >Can you try setting your fault strings to be simple ASCII to see whether that removes the
      >problem? If you want to send ISO-8859-1 characters then you need to change the XML
      >declaration using the encoding() method.

      Sorry to respond to my own posts ...

      I can confirm that the ö character does cause a "500 Internal Server Error", and that if the
      character is removed then Jens approach does work, i.e. $@ is false, $res is defined
      and $res->fault contains the fault generated by his server.

    • Show all 5 messages in this topic