[Xml-compile] Use of uninitialized value $maxmsgs

Theo Bot thg.bot at gmail.com
Thu May 30 07:20:39 GMT 2013


Hi

I am working on a simple SOAP server using the following code:
#!/usr/bin/env perl
#
use strict;
use warnings;
use Log::Report 'DEBUG';
use XML::Compile::SOAP::Daemon::CGI;
use XML::Compile::SOAP::Daemon::AnyDaemon;
use XML::Compile::SOAP::Operation;
use XML::Compile::SOAP11;
use XML::Compile::WSDL11;
use XML::Compile::Util qw/pack_type/;
use Data::Dumper;
use Getopt::Long;
use File::Basename qw/basename/;
use HTTP::Status   qw/:constants/;

my $wsdlfile =3D "HelloService.wsdl";

my $mode =3D 2;
my $port =3D 4444;
my $host =3D '127.0.0.1';
my($live, $test) =3D (0, 0);

GetOptions
    'v+'        =3D> \$mode,
    'verbose=3Di'    =3D> \$mode,
    'port|p=3Di'    =3D> \$port,
    'host|h=3Ds'    =3D> \$host,
    'mode=3Ds'    =3D> \$mode,
    'live!'        =3D> \$live,
    'test!'        =3D> \$test
    or error "Deamon is not started";

error __x"No filenames expected on the command-line"
    if @ARGV;

dispatcher PERL =3D> 'default', mode =3D> $mode;

my $daemon =3D XML::Compile::SOAP::Daemon::AnyDaemon->new;
my $wsdl =3D XML::Compile::WSDL11->new($wsdlfile);

$daemon->operationsFromWSDL( $wsdl,
    handlers =3D> { sayHello =3D> \&handle_sayHello }
 );

$daemon->setWsdlResponse($wsdlfile);

dispatcher SYSLOG =3D> 'syslog', mode =3D> $mode;
dispatcher close  =3D> 'default';   # close errors to stdout

info __x"starting daemon in {envir} environment"
  , envir =3D> ($live ? 'live' : 'test');

$daemon->printIndex;

$daemon->run(
        name    =3D> basename($0),
        host    =3D> $host,
        port    =3D> $port,
        background =3D> 0
    );

info "Daemon stopped";
exit 0;

With the following wsdl file:

cat HelloService.wsdl
<?xml version=3D"1.0" encoding=3D"utf-8"?>
<wsdl:definitions name=3D"HelloService"
   targetNamespace=3D"http://127.0.0.1/wsdl/HelloService.wsdl"
   xmlns=3D"http://schemas.xmlsoap.org/wsdl/"
   xmlns:soap=3D"http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/"
   xmlns:tns=3D"http://127.0.0.1/wsdl/HelloService.wsdl"
   xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema">

   <wsdl:message name=3D"SayHelloRequest">
      <wsdl:part name=3D"firstName" type=3D"xsd:string"/>
   </wsdl:message>
   <wsdl:message name=3D"SayHelloResponse">
      <wsdl:part name=3D"greeting" type=3D"xsd:string"/>
   </wsdl:message>

   <wsdl:portType name=3D"Hello_PortType">
      <wsdl:operation name=3D"sayHello">
         <wsdl:input message=3D"tns:SayHelloRequest"/>
         <wsdl:output message=3D"tns:SayHelloResponse"/>
      </wsdl:operation>
   </wsdl:portType>

   <wsdl:binding name=3D"Hello_Binding" type=3D"tns:Hello_PortType">
      <soap:binding style=3D"rpc" transport=3D"
http://schemas.xmlsoap.org/soap/http" />
      <wsdl:operation name=3D"sayHello">
        <soap:operation soapAction=3D"sayHello" />
        <wsdl:input>
           <soap:body namespace=3D"urn:examples:helloservice" />
        </wsdl:input>
        <wsdl:output>
           <soap:body
              namespace=3D"urn:examples:helloservice"
              />
        </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>

   <wsdl:service name=3D"Hello_Service">
      <wsdl:port binding=3D"tns:Hello_Binding" name=3D"Hello_Port">
          <soap:address location=3D"http://127.0.0.1:4444/SayHello" />
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

When it runs and I call it I get the following error messages:
./SoapServer.pl --live
info: added 1 operations from WSDL
info: switching to run mode 2, accept ASSERT-
SOAP11:
   sayHello
Use of uninitialized value $maxmsgs in numeric eq (=3D=3D) at
/usr/local/perl5.16.3/lib/site_perl/5.16.3/XML/Compile/SOAP/Daemon/LWPutil.=
pm
line 97.
Use of uninitialized value $reqbonus in addition (+) at
/usr/local/perl5.16.3/lib/site_perl/5.16.3/XML/Compile/SOAP/Daemon/LWPutil.=
pm
line 101.


Can anybody help me further?
-- =

Kind regards

Theo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20130530/4f=
b44f63/attachment.htm


More information about the Xml-compile mailing list