Thank you very much for the response.
Yes that is confusing! I've made the change and actually prefer Log4Perl -
seems more flexible and configurable without being complex. It works well
and I can now happily track incoming requests within the with the following
code within the server side subs for the operations (in this case
"RequestMachine"):
notice __x "RequestMachine received request ID {request} for host
{hostname} from {called}",
request => $RequestID,
hostname => $HostName,
called => $daemon->{server}{peeraddr} ;
but I am still struggling to work out how to log for all connectivity. For
example I'd like to know when someone has attempted to download the WSDL
and I cannot see any mechanism to do that though I guess I need to capture
it within Net::Server ?
Thank you for the comment about the mime-type - that enable me to track it
down to a browser config issue.
Cheers
On Tue, Nov 19, 2013 at 1:14 PM, Mark Overmeer <[email protected]> wrote:
> * 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
>
>
_______________________________________________
Xml-compile mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile