Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi, I need fresh eyes on this.
my $soap = SOAP::Lite->new->proxy('https://wsnet.sendwordnow.com/Sessi +onManagement/2010/05/PublicSessionManagementService.svc') ->ns('http://schemas.xmlsoap.org/soap/envelope/', 'soapenv') ->ns('http://schemas.datacontract.org/2004/07/SWN.Notification.Pub +licSessionManagement.Contracts.DataContracts', 'swn') ->ns('http://schemas.sendwordnow.com/ws/2010/05/PublicSessionManag +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 );
produces
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:pub="http://schemas.sendwordnow.com/ws/2010/05/PublicSessionMana +ger" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:swn="http://schemas.datacontract.org/2004/07/SWN.Notification.Pu +blicSessionManagement.Contracts.DataContracts" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <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...

dsb
This @ISA my( $cool ) %SIG


In reply to SOAP::Lite, empty element by dsb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found