Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Passing a session token using XML::Compile::WSDL

by runrig (Abbot)
on Dec 17, 2013 at 23:35 UTC ( #1067544=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Passing a session token using XML::Compile::WSDL
in thread Passing a session token using XML::Compile::WSDL

Sorry, for the example I gave, I see now that the header is defined in the wsdl. There's a FAQ about adding headers when they're not defined. Apparently that is what XML::Compile::SOAP::WSA does.


Comment on Re^3: Passing a session token using XML::Compile::WSDL
Re^4: Passing a session token using XML::Compile::WSDL
by SeptamusNonovant (Novice) on Dec 18, 2013 at 00:09 UTC
    I saw that, but I found it very difficult to follow. I've been trying to figure out how to use that to add the header I need to my request SOAP envelope, but I have not been successful, nor have I found any working examples in my various searches on this topic.
Re^4: Passing a session token using XML::Compile::WSDL
by SeptamusNonovant (Novice) on Dec 18, 2013 at 00:57 UTC
    So I used WSA as a reference and made the INPUT and OUTPUT the same for addHeader. It seems to have taken this time:
    my $ns = 'http://example.com/tns'; my $op = $wsdl->operation(...); $op->addHeader(INPUT => "tns_token" => "{$ns}token"); $op->addHeader(OUTPUT => "tns_token" => "{$ns}token"); $call = $op->compileClient(token => $sessionToken);
    I got no complaints about token not being found. However, I still am not getting any header information in the SOAP envelope. Am I still missing something?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2014-09-17 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (72 votes), past polls