Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

SOAP::Lite, empty element

by dsb (Chaplain)
on Nov 21, 2013 at 16:33 UTC ( #1063752=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I need fresh eyes on this.
my $soap = SOAP::Lite->new->proxy(' +onManagement/2010/05/PublicSessionManagementService.svc') ->ns('', 'soapenv') ->ns(' +licSessionManagement.Contracts.DataContracts', 'swn') ->ns(' +er', 'pub') ; =pod my $req = SOAP::Data->name( RequestOf_PublicLoginReqest => ( SOAP::Data->name( OperationParameters => ( SOAP::Data->name( Username => $USERNAME )->prefix('swn'), SOAP::Data->name( Password => $PASSWORD )->prefix('swn'), SOAP::Data->name( PublicServiceEntryPoint => 'AlertingServ +ice' )->prefix('swn') ))->prefix('pub') )->prefix('pub') ); =cut my $user = SOAP::Data->name( Username => $USERNAME )->prefix('swn'); my $pass = SOAP::Data->name( Password => $PASSWORD )->prefix('swn'); my $entr = SOAP::Data->name( PublicServiceEntryPoint => 'AlertingServi +ce')->prefix('swn'); my $oper = SOAP::Data->name( OperationParameters => ( $user, $pass, $e +ntr ) )->prefix('pub'); my $reqm = SOAP::Data->name( RequestOf_PublicLoginRequest => $oper )-> +prefix('pub'); my $res = $soap->call( $reqm );
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope soapenv:encodingStyle="" xmlns:pub=" +ger" xmlns:soapenc="" xmlns:soapenv="" xmlns:swn=" +blicSessionManagement.Contracts.DataContracts" xmlns:xsd="" xmlns:xsi=""> <soapenv:Body> <RequestOf_PublicLoginReqest xsi:nil="true" /> #### EMPTY!!! ### +# </soapenv:Body> </soapenv:Envelope>
Note, the piece that is pod'd out effectively builds the same structure as the piece that isn't. Can anyone spot why I'm getting back a nil RequestOf_PublicLoginRequest or why the prefix isn't working?

Update: The prefix actually IS working. so nevermind that bit...

This @ISA my( $cool ) %SIG

Replies are listed 'Best First'.
Re: SOAP::Lite, empty element
by dsb (Chaplain) on Nov 21, 2013 at 20:26 UTC
    It seems like SOAP::Data->name() isn't behaving properly. If I use SOAP::Header->name(), the XML is generated much closer to expected. Anyone aware of any issues with SOAP-Lite-1.08 with regards to SOAP::Data?

    This @ISA my( $cool ) %SIG

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1063752]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2022-01-21 13:40 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (58 votes). Check out past polls.