[Xml-compile] What is $action in XML::Compile::Tester synopsis

Mark Overmeer mark at overmeer.net
Mon Nov 24 12:28:26 GMT 2008


* Zbigniew Lukasiak (zzbbyy at gmail.com) [081124 10:59]:
> XML::Compile::Tester looks very useful - but unfortunately I cannot
> figure out it's interface.
> The synopsis says:
> 
>  my $action = pack_type $my_ns, 'GetStockPrice';
>  sub get_stock_price(@) {...}
> 
> But I cannot find out what should be there in the $my_ns variable -
> nor any reference documentation for pack_type.

XML::Compile::Tester is currently only simplifying testing of
XML::Compile, not the ::SOAP or ::SOAP::Daemon.

The pack_type() is often used in examples in the XML::Compile modules,
and originates in XML::Compile::Util.

> So eventually I have
> no idea what this $action variable represents. And it is then needed
> for the test calls:
> 
>  my $wsdl    = XML::Compile::WSDL11->new('my_wsdl.xml');
>  my $call    = $wsdl->compileClient($action);

$action means: portType, operation name.

>  $tester->fromWSDL($wsdl);
>  $tester->addCallback($action, \&get_stock_price);

Did you have a look at the script in the example directory?

> By the way the Server and Client interfaces don't take this parameter:
>  $deamon->operationsFromWSDL($wsdl, handlers => ...);

Typo in SYNOPSIS of the daemon: should be 'callbacks'.  The server
has this parameter, the client not.
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                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