Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Connection to SOAP WSDL service using perl

by runrig (Abbot)
on Oct 27, 2013 at 16:33 UTC ( #1059918=note: print w/ replies, xml ) Need Help??

in reply to Connection to SOAP WSDL service using perl

Original parent node thanks to google cache:

Hello Monks,

I have some troubles connecting to SOAP WSDL service using perl and module XML::Compile::SOAP.

Service to which I am trying to connect doesn't provide any documentation for perl they well documented php connection:

PHP call for status method:

require_once('nusoap.php'); $soapClient = new nusoap_client(' +?w +sdl', true); $result = $soapClient->call( 'doQueryAllSysStatus', array( array( 'cou +ntryId' => 1, 'webapiKey' => 'WEBAPI_KEY' ) ) );
In perl I wrote:
use XML::Compile::WSDL11; # use WSDL version 1.1 use XML::Compile::SOAP11; # use SOAP version 1.1 use XML::Compile::Transport::SOAPHTTP my $wsdl = XML::Compile::WSDL11->new(" + +p?wsdl"); $wsdl->importDefinitions('doQueryAllSysStatus'); my $call = $wsdl->compileClient('doQueryAllSysStatus');

Comment on Re: Connection to SOAP WSDL service using perl
Select or Download Code
Replies are listed 'Best First'.
Re^2: Connection to SOAP WSDL service using perl
by runrig (Abbot) on Oct 27, 2013 at 16:42 UTC
    And the problem was ... ?
    my $wsdl = XML::Compile::WSDL11->new(" +p?wsdl");
    I'm pretty sure XML::Compile will not download the wsdl from a URL. You'll have to do that yourself, and then pass the file name to new().
    $wsdl->importDefinitions('doQueryAllSysStatus'); my $call = $wsdl->compileClient('doQueryAllSysStatus');
    I'm also pretty sure you do not need to call importDefinitions. At least not with the method you want to compile. importDefinitions is, e.g., for supplying additional xsd files that define the service. Which you will have to download if there are any.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1059918]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2016-02-12 10:54 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (395 votes), past polls