golemwashere has asked for the wisdom of the Perl Monks concerning the following question:
--------------------------------------------------- I'm using:<SOAP-ENV:Header> <Security xmlns="http://schemas.xmlsoap.org/ws/2002/xx/secext" +> <UsernameToken> <Username>myuser</Username> <Password>mypassword</Password> </UsernameToken> </Security> </SOAP-ENV:Header>
but I don' get the header I need.... I tried also feeding raw xml in $envelope with:use SOAP::Lite +trace; my $client = SOAP::Lite ->readable(1) ->uri($uri) ->proxy($proxy); my $Username = SOAP::Header->name('Username' => $username); my $Password = SOAP::Header->name('Password' => $password); my $UsernameToken = SOAP::Header->name('UsernameToken') ->value(\SOAP::Header->value($Username, $Password)); my $security = SOAP::Header->name('Security') ->attr({'xmlns' => 'http://schemas.xmlsoap.org/ws/2002/xx/ +secext'}) ->value(\$UsernameToken); $elem1 = SOAP::Data->name('ELEM1' => "value1"); $elem2 = SOAP::Data->name('ELEM2' => "value2"); $response = $client->mymethod($elem1,$elem2);
but I don't manage to grasp the syntax (I get 2 nested <soap:Envelope> tags) Can anyone give please me some insight?my $client = SOAP::Lite ->readable(1) ->uri($uri) ->proxy($proxy) ->envelope($envelope);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite, custom headers or raw xml ?
by gellyfish (Monsignor) on Aug 18, 2006 at 14:13 UTC | |
by golemwashere (Acolyte) on Aug 18, 2006 at 16:49 UTC | |
by gellyfish (Monsignor) on Aug 18, 2006 at 18:15 UTC | |
by golemwashere (Acolyte) on Aug 21, 2006 at 09:27 UTC |