in reply to Re^2: Connecting to WSDL
in thread Connecting to WSDL

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?

Replies are listed 'Best First'.
Re^4: Connecting to WSDL
by sumeetgrover (Monk) on Jul 06, 2015 at 09:28 UTC
    I've used XML::Compile::WSDL11 and it's working now. However, my next question is:
    I first call the logon method. It returns a session ID. In subsequent calls, I need to set the "header" with the session ID. How do I do that? Trying to find this out.
      Um, its either done automatically (I hope) or you manipulate some object (transport?) :D I imagine http://perl.overmeer.net/xml-compile/#doc would have an example ... yeah use a transport "hook" http://perl.overmeer.net/xml-compile/html/XML_Compile_SOAP/index.html
      my $call = $wsdl->compileClient($operation , transport_hook => \&basic_auth ); sub basic_auth($$) { my ($request, $trace) = @_; # Encode userid and password my $authorization = 'Basic '. encode_base64 "$user:$password"; # Modify http header to include basic authorisation $request->header(Authorization => $authorization ); my $ua = $trace->{user_agent}; $ua->request($request); }