* Kieron Johnson ([email protected]) [131119 12:54]:
> 1. Logging -  I’d like to log all attempts to access the service whether
> successful or not. So I’ve added log_file and log_level but whilst it
> provides decent logging on start up it doesn’t appear to log any client
> connectivity at all. How might I achieve this?
> 
> use Log::Report   syntax => 'SHORT';

"syntax => 'SHORT'" is default, nowadays.

> my $daemon = XML::Compile::SOAP::Daemon::NetServer->new();
> $daemon->run
>   ( ...
>   , log_file    => 'Log::Log4Perl'
>   , log_level   =>  4

Ah, confusing!  This controls the logging by the daemon, but does not
collect the logging of the application.  The XML::Compile errors are
not directed towards this.  (The ::AnyDaemon implementation naturally
merges the two, because that one also uses Log::Report)

To collect the logs from all modules which were build using Log::Report,
you do this in the main of your application:

  dispatcher 'Log::Report::Dispatcher::Log4perl', 'default'
    , config => $l4p_config_file;

This dispatcher will have name "default", and implies closing the
existing dispatcher named "default" which sends the output to the
screen.

This week, for an other project, I rewrote this dispatcher... but had
no chance to test it yet.  You may try it, find it attached.

> 2. My devs are complaining that the URL for the WSDL doesn’t display in a
> browser but instead forces them to download it. Entering the URL into a
> browser it automatically adds ‘/’. eg: http://myserver.net:38385?WSDLbecomes
> http://myserver.net:38385/?WSDL This is apparently abnormal behaviour. Is
> there a way within either the xsd, WSDL or the server.pl to change that
> characteristic? My code is basically the standard example server.pl from
> the CPAN tar ball examples with my server side functions.

This probably has to do the the mime-type on the returned WSDL.  The
browser is configured what to do with certain received mime-type.  If
the type is unknown, it asks you what to do.

The response is created in lib/XML/Compile/SOAP/Daemon/LWPutil.pm
sub lwp_wsdl_response with content-type
    Content-Type" => 'application/wsdl+xml; charset="utf-8"
I believe that the type is correct.
-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       [email protected]                          [email protected]
http://Mark.Overmeer.net                   http://solutions.overmeer.net

Attachment: Log4perl.pm
Description: Perl program

_______________________________________________
Xml-compile mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile

Reply via email to