sumeetgrover has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I have received the joyful task of writing Perl code to connect to a WSDL web service, something I haven't done before.

I tried connecting to the web service using SOAP::Lite using the examples demonstrated on its CPAN page and other Perl forums. That code didn't work.

I have, however, connected to the WSDL service using SOAP::WSDL but the CPAN site recommends not to use this module. This leaves me to my question:
How can I connect to a WSDL web service reliably in Perl?

Replies are listed 'Best First'.
Re: Connecting to WSDL
by Athanasius (Archbishop) on Jul 06, 2015 at 07:30 UTC
      Thanks for suggesting the module XML::Compile::WSDL11 - It works when connecting to WSDL/SOAP. But my final problem is:
       
      How do I set a 'SessionID' header in the outgoing SOAP request in the XML::Compile::WSDL11 module?

      Everyone seems to have a different theory about it, which are too untidy to make sense of. Any thoughts?
Re: Connecting to WSDL
by vinoth.ree (Monsignor) on Jul 06, 2015 at 07:27 UTC
    Hi sumeetgrover

    what is the problem you are facing while using SOAP::Lite module?

    Update:

    Also look at this module XML::Compile


    All is well. I learn by answering your questions...
      I gather that SOAP and WSDL are two different things. When I make a request to WSDL through SOAP::Lite, there is simply no result back! Whereas when I make that same simple call through SOAP::WSDL (module with 40 bugs), I do see result back.

        I gather that SOAP and WSDL are two different things. When I make a request to WSDL through SOAP::Lite, there is simply no result back! Whereas when I make that same simple call through SOAP::WSDL (module with 40 bugs), I do see result back.

        And then what happened?