php-general Digest 31 Aug 2012 04:12:24 -0000 Issue 7944
Topics (messages 318928 through 318932):
Re: PHP to XLS Security Alert issue
318928 by: Maciek Sokolewicz
How to use wsdl files?
318929 by: Michelle Konzack
318930 by: Matijn Woudt
318931 by: Matijn Woudt
318932 by: Michelle Konzack
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On 29-08-2012 19:28, admin wrote:
-----Original Message-----
From: Matijn Woudt [mailto:tijn...@gmail.com]
Sent: Tuesday, August 28, 2012 3:55 PM
To: admin
Cc: php-gene...@lists.php.net
Subject: Re: [PHP] PHP to XLS Security Alert issue
I believe that's normal, and that it does that with any document downloaded
from the web.
I'm not sure if there's a workaround, but you should not ask that here but on a
Microsoft Office forum/list, or just ask the question to Microsoft themselves.
- Matijn
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
Matijn,
I understand YOU believe this is normal.
I am sorry you feel that way because the construction of the document is
exactly where the problem was resolved, and that is in PHP.
So asking in the PHP-List was the exact the place to post a question of
document construction using PHP. Yes understanding the document verification
methods of Microsoft helps but it is up to the DEVELOPER to put the correct
headers and content strings to make the document valid and that is what I was
asked.
Q: I am exporting to a XLS file and the file does export, but when I open the
file Microsoft is giving a Excel Security Notice. I am sure there is something
in the header that is missing or causing this problem?
Regardless of the fact if it was produced using PHP, ASP, C or using a
plain text editor, the point is still that there is apparently a
"problem" with the file itself. The easiest solution would still be to
ask, as Matijn suggested, the people from Microsoft Office. Since they
are the developers/users of the software, they will know what causes
that problem, and will be able to better help you than asking on this
list where people are less likely to know exactly what the cause is of
that warning.
As a metaphor: If I build a building out of steel, and all buildings in
the area start to collapse because the ground sags, I wouldn't ask a
steel-merchant for help, but rather someone who knows a lot about
sagging ground.
And no, I don't know what exactly causes that warning: ask people who
have a more intimate knowledge of Excel.
- Tul
--- End Message ---
--- Begin Message ---
Hello Experts,
I am coding an Online Shop and need to include a VAT validation for the
Europe Community. The Form can be found here:
<http://ec.europa.eu/taxation_customs/vies/vatRequest.html>
However, there is a SOAP API:
<http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl>
but I do not understand, how I have to use it. I need it very simple and
a response of "TRUE" or "FALSE" plus maybe an ERROR CODE is enough. I
would prefer to use a simple URL call and take the reponse to validate a
business customer.
An help welcome.
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
Internet Service Provider, Cloud Computing
<http://www.itsystems.tamay-dogan.net/>
itsystems@tdnet Jabber linux4miche...@jabber.ccc.de
Owner Michelle Konzack
Gewerbe Strasse 3 Tel office: +49-176-86004575
77694 Kehl Tel mobil: +49-177-9351947
Germany Tel mobil: +33-6-61925193 (France)
USt-ID: DE 278 049 239
Linux-User #280138 with the Linux Counter, http://counter.li.org/
signature.pgp
Description: Digital signature
--- End Message ---
--- Begin Message ---
On Thu, Aug 30, 2012 at 2:57 PM, Michelle Konzack
<linux4miche...@tamay-dogan.net> wrote:
> Hello Experts,
>
> I am coding an Online Shop and need to include a VAT validation for the
> Europe Community. The Form can be found here:
>
> <http://ec.europa.eu/taxation_customs/vies/vatRequest.html>
>
> However, there is a SOAP API:
>
> <http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl>
>
> but I do not understand, how I have to use it. I need it very simple and
> a response of "TRUE" or "FALSE" plus maybe an ERROR CODE is enough. I
> would prefer to use a simple URL call and take the reponse to validate a
> business customer.
>
> An help welcome.
>
> Thanks, Greetings and nice Day/Evening
> Michelle Konzack
>
Hi Michelle,
You could start by looking at the PHP SoapClient [1], which takes a
URI to a WSDL descriptor as argument. You can enter the URL to the
WSDL file there, like this:
$client = new
SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");
Now you need to know which function you want to call, let's say it's
called SomeFunction, then you can do:
$client->SomeFunction($paramA, $paramB);
Hope this gets you started.
- Matijn
--- End Message ---
--- Begin Message ---
On Thu, Aug 30, 2012 at 4:44 PM, Matijn Woudt <tijn...@gmail.com> wrote:
> On Thu, Aug 30, 2012 at 2:57 PM, Michelle Konzack
> <linux4miche...@tamay-dogan.net> wrote:
>> Hello Experts,
>>
>> I am coding an Online Shop and need to include a VAT validation for the
>> Europe Community. The Form can be found here:
>>
>> <http://ec.europa.eu/taxation_customs/vies/vatRequest.html>
>>
>> However, there is a SOAP API:
>>
>> <http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl>
>>
>> but I do not understand, how I have to use it. I need it very simple and
>> a response of "TRUE" or "FALSE" plus maybe an ERROR CODE is enough. I
>> would prefer to use a simple URL call and take the reponse to validate a
>> business customer.
>>
>> An help welcome.
>>
>> Thanks, Greetings and nice Day/Evening
>> Michelle Konzack
>>
>
> Hi Michelle,
>
> You could start by looking at the PHP SoapClient [1], which takes a
> URI to a WSDL descriptor as argument. You can enter the URL to the
> WSDL file there, like this:
> $client = new
> SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");
>
> Now you need to know which function you want to call, let's say it's
> called SomeFunction, then you can do:
> $client->SomeFunction($paramA, $paramB);
>
> Hope this gets you started.
>
> - Matijn
And the URL I was referring to:
[1] http://nl.php.net/manual/en/soapclient.soapclient.php
--- End Message ---
--- Begin Message ---
Hello Matijn Woudt,
Am 2012-08-30 16:44:53, hacktest Du folgendes herunter:
> You could start by looking at the PHP SoapClient [1], which takes a
> URI to a WSDL descriptor as argument. You can enter the URL to the
> WSDL file there, like this:
> $client = new
> SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");
>
> Now you need to know which function you want to call, let's say it's
> called SomeFunction, then you can do:
> $client->SomeFunction($paramA, $paramB);
>
> Hope this gets you started.
Ah thanks... Interesting how it works.
However, I have found "wsdl2php" and converted the wsdl file to a PHP
class, but I hate classes... Never used it in 12 years. :-D
--8<--------------------------------------------------------------------
<?php
class checkVat{
var $countryCode; //string
var $vatNumber; //string
}
class checkVatResponse{
var $countryCode; //string
var $vatNumber; //string
var $requestDate; //date
var $valid; //boolean
var $name; //string
var $address; //string
}
class checkVatApprox{
var $countryCode; //string
var $vatNumber; //string
var $traderName; //string
var $traderCompanyType; //companyTypeCode
var $traderStreet; //string
var $traderPostcode; //string
var $traderCity; //string
var $requesterCountryCode; //string
var $requesterVatNumber; //string
}
class checkVatApproxResponse{
var $countryCode; //string
var $vatNumber; //string
var $requestDate; //date
var $valid; //boolean
var $traderName; //string
var $traderCompanyType; //companyTypeCode
var $traderAddress; //string
var $traderStreet; //string
var $traderPostcode; //string
var $traderCity; //string
var $traderNameMatch; //matchCode
var $traderCompanyTypeMatch; //matchCode
var $traderStreetMatch; //matchCode
var $traderPostcodeMatch; //matchCode
var $traderCityMatch; //matchCode
var $requestIdentifier; //string
}
class checkVatService{
var $soapClient;
private static $classmap = array('checkVat' => 'checkVat'
,'checkVatResponse' => 'checkVatResponse'
,'checkVatApprox' => 'checkVatApprox'
,'checkVatApproxResponse' =>
'checkVatApproxResponse');
function
__construct($url='http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl')
{
$this->soapClient = new SoapClient($url,array("classmap" => self::$classmap,
"trace" => true,
"exceptions" => true));
}
function checkVat(checkVat $checkVat)
{
$checkVatResponse = $this->soapClient->checkVat($checkVat);
return $checkVatResponse;
}
function checkVatApprox(checkVatApprox $checkVatApprox)
{
$checkVatApproxResponse =
$this->soapClient->checkVatApprox($checkVatApprox);
return $checkVatApproxResponse;
}
}
?>
--8<--------------------------------------------------------------------
OK, tried
$VALS = new checkVat;
$VALS->countryCode = 'DE';
$VALS->vatNumber = '278049239';
$OBJECT = new checkVatService;
$OBJECT->checkVat;
and up the here I have no error. But How do I get the answer now?
$ANS = $OBJECT->checkVat;
or
$ANS = $OBJECT->checkVat();
do not seem to work
print_r($ANS);
Also
$RET = new checkVatResponse;
print_r($RET);
seems not to work
What I am missing?
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
Internet Service Provider, Cloud Computing
<http://www.itsystems.tamay-dogan.net/>
itsystems@tdnet Jabber linux4miche...@jabber.ccc.de
Owner Michelle Konzack
Gewerbe Strasse 3 Tel office: +49-176-86004575
77694 Kehl Tel mobil: +49-177-9351947
Germany Tel mobil: +33-6-61925193 (France)
USt-ID: DE 278 049 239
Linux-User #280138 with the Linux Counter, http://counter.li.org/
--8<--------------------------------------------------------------------
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
Internet Service Provider, Cloud Computing
<http://www.itsystems.tamay-dogan.net/>
itsystems@tdnet Jabber linux4miche...@jabber.ccc.de
Owner Michelle Konzack
Gewerbe Strasse 3 Tel office: +49-176-86004575
77694 Kehl Tel mobil: +49-177-9351947
Germany Tel mobil: +33-6-61925193 (France)
USt-ID: DE 278 049 239
Linux-User #280138 with the Linux Counter, http://counter.li.org/
signature.pgp
Description: Digital signature
--- End Message ---