in reply to Unable to create Perl classes from WSDL URL using wsdl2perl

Connect failed: connect: Connection timed out; Connection timed out at /opt/xxxxxx/perl5/lib/perl5/SOAP/WSDL/XXXX/Base.pm line 73

I don't know about SOAP::WSDL, but to me that pretty clearly sounds like a network issue first, which I would start debugging as such. Try connecting to the target host without Perl, and if that works, use Wireshark to compare the two connection attempts to see what's going wrong. And since from the code you showed it appears that the error is happening when parsing XML, perhaps the parser is trying to follow a directive to some URL that it can't reach, so you should check on that as well.

  • Comment on Re: Unable to create Perl classes from WSDL URL using wsdl2perl

Replies are listed 'Best First'.
Re^2: Unable to create Perl classes from WSDL URL using wsdl2perl
by Fletch (Bishop) on Nov 12, 2019 at 14:58 UTC

    And if you don't have privileged access enough to run Wireshark (e.g. this were on a shared webhost you don't have root on) you can probably still use strace to watch for connect(2) system calls or other networkage being attempted. Even if you do have root it can be elucidating determining if delays are occurring locally or between you and the remote side after leaving your box.

    Useful options include: -e trace=network for selecting network-y calls; and -tt and -T for detailed timing on calls.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      Running Wireshark would be difficult because we do not have privileged access -- however on the other hand, we had found that the Network Ops Team had not opened the port-443 which is a default port through which this machine connects to the Internet. We are trying to connect to the WSDL file of Servicenow - so after the port was opened today we ran the command to create perl bindings and got the error: no host option found at /opt/XXXX/perl5/lib/SOAP/WSDL/Expat/Base.pm at Line 73

      The code is already mentioned in the script - This code in Expat is being used by the wsdl2perl script to perform WSDL parsing.It'd be great if you could let us know the probable causes for such an error message

        That error message is being returned from the host on the other end when it's trying to read a URI. Whatever it's talking to (now that it's able to do so) doesn't like the request it's getting and that's the text error message it's returning ("no host option found").

        The cake is a lie.
        The cake is a lie.
        The cake is a lie.

Re^2: Unable to create Perl classes from WSDL URL using wsdl2perl
by reubenkoshy (Initiate) on Nov 13, 2019 at 11:53 UTC

    Running Wireshark would be difficult because we do not have privileged access -- however on the other hand, we had found that the Network Ops Team had not opened the port-443 which is a default port through which this machine connects to the Internet. We are trying to connect to the WSDL file of Servicenow - so after the port was opened today we ran the command to create perl bindings and got the error: no host option found at /opt/XXXX/perl5/lib/SOAP/WSDL/Expat/Base.pm at Line 73

    The code is already mentioned in the script - This code in Expat is being used by the wsdl2perl script to perform WSDL parsing.It'd be great if you could let us know the probable causes for such an error message