in reply to Re: 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.

Replies are listed 'Best First'.
Re^3: Connecting to WSDL
by Anonymous Monk on Jul 06, 2015 at 08:50 UTC

    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?

      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); }