Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^5: checkVat - SOAP::Lite

by Anonymous Monk
on May 04, 2011 at 15:19 UTC ( #902907=note: print w/replies, xml ) Need Help??

in reply to Re^4: checkVat - SOAP::Lite
in thread checkVat - SOAP::Lite

I forgot to say, the SOAP::Simple generated soap request returns 200 OK and data
$VAR1 = { 'parameters' => { 'requestDate' => '2011-05-04+02:00', 'vatNumber' => '1234567890', 'valid' => 0, 'countryCode' => 'IE' } };

Replies are listed 'Best First'.
Re^6: checkVat - SOAP::Lite
by DreamT (Pilgrim) on May 04, 2011 at 15:50 UTC
    Unfortunately, we're not in control of the server that we're installing it to, so installing SOAP::Simple isn't an alternative. So I copied your xml output and did it the ugly way:
    #!/usr/bin/perl -w use strict; use LWP::UserAgent; use HTTP::Request::Common; my $userAgent = LWP::UserAgent->new(agent => 'perl post'); my $message = qq^<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=" +elope/"> <SOAP-ENV:Body> <tns1:checkVat xmlns:tns1=" +eckVat:types"> <tns1:countryCode>IE</tns1:countryCode> <tns1:vatNumber>1234567890</tns1:vatNumber> </tns1:checkVat> </SOAP-ENV:Body> </SOAP-ENV:Envelope>^; my $response = $userAgent->request(POST ' +customs/vies/services/checkVatService', Content_Type => 'text/xml', Content => $message); print $response->error_as_HTML unless $response->is_success; print $response->as_string;
    However, I will of course push for getting the SOAP::Simple installed on the target server, but this solved the immediate problem. Thanks!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://902907]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2017-10-22 22:03 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (275 votes). Check out past polls.