Hi evereybody : I have the following script, that send a SOAP:Message to a Server, I receive the response and It's supposed to be a data array, and I need to insert it into a MySql Table, whe I print it I can only see the last record of the array, can anyone give me a tip of how can I print and then insert into a Mysql table the entire array ?
#!c:\perl\bin/Perl.exe -l use SOAP::Lite +trace => [qw(debug)]; $SOAP::Constants::DO_NOT_USE_CHARSET = 1; # En caso de .NET print "Content-type: text/html; charset=iso-8859-1\n\n"; my $soap = SOAP::Lite->new( uri => 'http://Recintos/ServiciosWebXml/', proxy => 'http://192.168.220.108/wsrefis/RecintosFis.asmx?WS +DL', outputxml => 1, readable => 1, namespace => 'soap', encodingspace => '', xmlschema => 'http://www.w3.org/2001/XMLSchema', encodingStyle => '', use_prefix => 0, on_action => sub{join '', @_}, # En caso de .NET ); my $fecini = "01-06-2006"; my $fecfin = "30-06-2006"; my @parametros = ( SOAP::Header->name( 'EncabezadoSOAP'=> \SOAP::Data->value ( SOAP::Data->name (idUsuario => 'API940504EPA'), SOAP::Data->name (firma => 1239), SOAP::Data->name (ipCliente => ''), ), )->attr({xmlns=>'http://Recintos/ServiciosWebXml/'}), SOAP::Data->name (fechaIni => $fecini), SOAP::Data->name (fechaFin => $fecfin), SOAP::Data->name (buque => 'ARGOSY'), ); my $response = $soap->call( SOAP::Data->name('consultaManifPorFecha') ->attr({xmlns => 'http://Recintos/ServiciosWebXml/'} ) => @parametros); my $d = SOAP::Custom::XML::Deserializer -> deserialize(join '', $response) -> valueof('/Envelope/Body'); my $man = $d->consultaManifPorFechaResponse->consultaManifPorFechaResu +lt->man; my @campos = qw( nTrans cTransp idTransp nomBuque numViaje fecEstimada tipoOper lineaNaviera cuAduana cuPais cuPuerto cuEntidadMan ); foreach my $campo ( @campos ) { print "<p style='margin-top: 0; margin-bottom: 0'>$campo: ", $man- +>$campo,"\n"; } __END__
In advance thank you....

In reply to SOAP message response by caribesoft

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.