[Xml-compile] parsing SOAP Faults

Mark Overmeer solutions at overmeer.net
Wed Dec 18 14:01:16 GMT 2013


* Gert Doering (gert at space.net) [131218 13:33]:
> This is what I get back via https (Dumper($trace)):

The $trace is nice object, the facts are more readible if you call

    $trace->printErrors;
    $trace->printRequest(pretty_print => 1);
    $trace->printResponse(pretty_print => 1);

It seems like a normal login failure (user unknown), correctly
returned to your application.

Do you check the call?

    my ($answer, $trace) = $wsdl->call($operation => %args);

    if($trace->errors)
    {   $trace->printError;
        # or
        # print for $trace->errors;
    }

"$trace->error" (without 's') will only provide the first error (usually
there is only one error.  The example scripts use this:

    die if !$answer || $answer->{Fault};

-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
drs Mark A.C.J. Overmeer                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list