[Rio-pm] SOAP::Light

Andre Luis alpbs2003 em gmail.com
Sexta Outubro 3 09:12:39 PDT 2008


:D

Tnkx .... funcionou !!!

2008/10/3 Daniel de Oliveira Mantovani <daniel.oliveira.mantovani em gmail.com>

> Aqui o código caro precise:
>
> #!Aqui o código* caso* precise:#!
>
> 2008/10/3 Daniel de Oliveira Mantovani <
> daniel.oliveira.mantovani em gmail.com>
>
> Andre acho que consegui, olha:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <soap:Envelope
>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>     soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>>     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>   <soap:Body>
>>     <myprefix:method xmlns="http:/servidor/">
>>       <nome xsi:type="xsd:string">andre</nome>
>>
>>       <idade xsi:type="xsd:int">12</idade>
>>
>>       <cidade xsi:type="xsd:string">rio</cidade>
>>     </myprefix:method>
>>   </soap:Body>
>> </soap:Envelope>
>>
>> Aqui o código caro precise:
>>
>> #!/usr/bin/perl
>>
>>
>> use SOAP::Lite  'trace', 'debug';
>>
>> @params = (
>>     SOAP::Data->name('primeiro' => SOAP::Data->value (
>>             SOAP::Data->name( 'nome'      => 'andre' ),
>>             SOAP::Data->name( 'idade'  => '12' ),
>>             SOAP::Data->name( 'cidade'     => 'rio' )
>>         )
>>     )
>> );
>>
>>
>>   print SOAP::Lite
>>     -> readable(1)
>>     -> uri('http:/servidor/')
>>     -> proxy('http://servidor/script.asmx')
>>     -> new(@params)
>>     -> call('myprefix:method' => @params)
>>     -> result;
>>
>> 2008/10/3 Andre Luis <alpbs2003 em gmail.com>
>>
>>>  Ola a todos,
>>>
>>> Estou tentando montar um script usando SOAP::Ligth mais ele não esta
>>> montando a xml corretamente alguem pode me dar uma luz ?
>>>
>>> #!/usr/bin/perl
>>>
>>>
>>> use SOAP::Lite  'trace', 'debug';
>>>
>>> @params = (
>>>     SOAP::Data->name('primeiro' => \SOAP::Data->value (
>>>             SOAP::Data->name( 'nome'      => 'andre' ),
>>>             SOAP::Data->name( 'idade'  => '12' ),
>>>             SOAP::Data->name( 'cidade'     => 'rio' )
>>>         )
>>>     )
>>> );
>>>
>>> print SOAP::Lite
>>>     -> readable(1)
>>>     -> uri('http:/servidor/')
>>>     -> proxy('http://servidor/script.asmx')
>>>     -> on_fault(
>>> sub { my($soap, $res) = @_;
>>>       die ref $res ? $res->faultstring : $soap->transport->status, "\n";
>>> })
>>>     -> call(@params)
>>>     -> result;
>>>
>>>
>>> o resultado do xml eh
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <soap:Envelope
>>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>>>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>     soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>>>     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>   <soap:Body>
>>>     <primeiro xsi:nil="true" />
>>>       </soap:Body>
>>> </soap:Envelope>
>>>
>>> e deveria ter
>>> <primeiro>
>>>    <nome> andre </nome>
>>>    <idade> 12 </idade>
>>>    <cidade> rj </cidade>
>>> </primeiro>
>>>
>>> Obrigado pela ajuda
>>>
>>> _______________________________________________
>>> Rio-pm mailing list
>>> Rio-pm em pm.org
>>> http://mail.pm.org/mailman/listinfo/rio-pm
>>>
>>
>>
>>
>> --
>> print
>> "\x54\x68\x65\x20\x53\x69\x6c\x65\x6e\x74\x20\x47\x75\x61\x72\x64\x69\x61\x6e",$/
>>
>
>
>
> --
> print
> "\x54\x68\x65\x20\x53\x69\x6c\x65\x6e\x74\x20\x47\x75\x61\x72\x64\x69\x61\x6e",$/
>
> _______________________________________________
> Rio-pm mailing list
> Rio-pm em pm.org
> http://mail.pm.org/mailman/listinfo/rio-pm
>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/rio-pm/attachments/20081003/f04610b0/attachment.html>


Mais detalhes sobre a lista de discussão Rio-pm