Skip to content

Commit e9cd728

Browse files
committed
Add the checkVatService.wsdl file to ensure that testing always is possible
1 parent 10083e1 commit e9cd728

File tree

2 files changed

+172
-2
lines changed

2 files changed

+172
-2
lines changed

tests/Units/VatValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function setUp(): void
2525
];
2626

2727
$client = $this->getMockFromWsdl(
28-
'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl', 'checkVat'
28+
__DIR__.'/../checkVatService.wsdl', 'checkVat'
2929
);
3030

3131
$client
@@ -66,7 +66,7 @@ public function testIfVatValidatorReturnsValidObject():void {
6666
];
6767

6868
$client = $this->getMockFromWsdl(
69-
'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl', 'checkVat'
69+
__DIR__.'/../checkVatService.wsdl', 'checkVat'
7070
);
7171

7272
$client

tests/checkVatService.wsdl

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<wsdl:definitions targetNamespace="urn:ec.europa.eu:taxud:vies:services:checkVat" xmlns:tns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:impl="urn:ec.europa.eu:taxud:vies:services:checkVat" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">
3+
<xsd:documentation>
4+
The objective of this Internet site is to allow persons involved in the intra-Community supply of goods or of services to obtain confirmation of the validity of the VAT identification number of any specified person, in accordance to article 31 of Council Regulation (EC) No. 904/2010 of 7 October 2010. \n
5+
Any other use and any extraction and use of the data which is not in conformity with the objective of this site is strictly forbidden.
6+
Any retransmission of the contents of this site, whether for a commercial purpose or otherwise, as well as any more general use other than as far as is necessary to support the activity of a legitimate user (for example: to draw up their own invoices) is expressly forbidden. In addition, any copying or reproduction of the contents of this site is strictly forbidden.
7+
The European Commission maintains this website to enhance the access by taxable persons making intra-Community supplies to verification of their customers' VAT identification numbers. Our goal is to supply instantaneous and accurate information.
8+
However the Commission accepts no responsibility or liability whatsoever with regard to the information obtained using this site. This information:
9+
- is obtained from Member States' databases over which the Commission services have no control and for which the Commission assumes no responsibility; it is the responsibility of the Member States to keep their databases complete, accurate and up to date;
10+
- is not professional or legal advice (if you need specific advice, you should always consult a suitably qualified professional);
11+
- does not in itself give a right to exempt intra-Community supplies from Value Added Tax;
12+
- does not change any obligations imposed on taxable persons in relation to intra-Community supplies.
13+
It is our goal to minimise disruption caused by technical errors. However some data or information on our site may have been created or structured in files or formats which are not error-free and we cannot guarantee that our service will not be interrupted or otherwise affected by such problems. The Commission accepts no responsibility with regard to such problems incurred as a result of using this site or any linked external sites.
14+
This disclaimer is not intended to limit the liability of the Commission in contravention of any requirements laid down in applicable national law nor to exclude its liability for matters which may not be excluded under that law.
15+
Collecting or handling personal data falls under the Data Protection Notice. This data protection declaration explains the Processing in the VIES-on-the-web Internet Website of VAT Identification Numbers for intra-Community Transaction on Goods or Services. Details of your legal rights associated with the collection, processing and use of this data are also provided: http://ec.europa.eu/dpo-register/details.htm?id=40647 .
16+
17+
Usage:
18+
The countryCode input parameter must follow the pattern [A-Z]{2}
19+
The vatNumber input parameter must follow the pattern [0-9A-Za-z\+\*\.]{2,12}
20+
In case of problems, the returned FaultString can take the following specific values:
21+
- INVALID_INPUT: The provided CountryCode is invalid or the VAT number is empty;
22+
- GLOBAL_MAX_CONCURRENT_REQ: Your Request for VAT validation has not been processed; the maximum number of concurrent requests has been reached. Please re-submit your request later or contact [email protected] for further information": Your request cannot be processed due to high traffic on the web application. Please try again later;
23+
- MS_MAX_CONCURRENT_REQ: Your Request for VAT validation has not been processed; the maximum number of concurrent requests for this Member State has been reached. Please re-submit your request later or contact [email protected] for further information": Your request cannot be processed due to high traffic towards the Member State you are trying to reach. Please try again later.
24+
- SERVICE_UNAVAILABLE: an error was encountered either at the network level or the Web application level, try again later;
25+
- MS_UNAVAILABLE: The application at the Member State is not replying or not available. Please refer to the Technical Information page to check the status of the requested Member State, try again later;
26+
- TIMEOUT: The application did not receive a reply within the allocated time period, try again later.
27+
</xsd:documentation>
28+
29+
<wsdl:types>
30+
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types" xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
31+
<xsd:element name="checkVat">
32+
<xsd:complexType>
33+
<xsd:sequence>
34+
<xsd:element name="countryCode" type="xsd:string"/>
35+
<xsd:element name="vatNumber" type="xsd:string"/>
36+
</xsd:sequence>
37+
</xsd:complexType>
38+
</xsd:element>
39+
<xsd:element name="checkVatResponse">
40+
<xsd:complexType>
41+
<xsd:sequence>
42+
<xsd:element name="countryCode" type="xsd:string"/>
43+
<xsd:element name="vatNumber" type="xsd:string"/>
44+
<xsd:element name="requestDate" type="xsd:date"/>
45+
<xsd:element name="valid" type="xsd:boolean"/>
46+
<xsd:element maxOccurs="1" minOccurs="0" name="name" nillable="true" type="xsd:string"/>
47+
<xsd:element maxOccurs="1" minOccurs="0" name="address" nillable="true" type="xsd:string"/>
48+
</xsd:sequence>
49+
</xsd:complexType>
50+
</xsd:element>
51+
<xsd:element name="checkVatApprox">
52+
<xsd:complexType>
53+
<xsd:sequence>
54+
<xsd:element name="countryCode" type="xsd:string"/>
55+
<xsd:element name="vatNumber" type="xsd:string"/>
56+
<xsd:element maxOccurs="1" minOccurs="0" name="traderName" type="xsd:string"/>
57+
<xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyType" type="tns1:companyTypeCode"/>
58+
<xsd:element maxOccurs="1" minOccurs="0" name="traderStreet" type="xsd:string"/>
59+
<xsd:element maxOccurs="1" minOccurs="0" name="traderPostcode" type="xsd:string"/>
60+
<xsd:element maxOccurs="1" minOccurs="0" name="traderCity" type="xsd:string"/>
61+
<xsd:element maxOccurs="1" minOccurs="0" name="requesterCountryCode" type="xsd:string"/>
62+
<xsd:element maxOccurs="1" minOccurs="0" name="requesterVatNumber" type="xsd:string"/>
63+
</xsd:sequence>
64+
</xsd:complexType>
65+
</xsd:element>
66+
<xsd:element name="checkVatApproxResponse">
67+
<xsd:complexType>
68+
<xsd:sequence>
69+
<xsd:element name="countryCode" type="xsd:string"/>
70+
<xsd:element name="vatNumber" type="xsd:string"/>
71+
<xsd:element name="requestDate" type="xsd:date"/>
72+
<xsd:element name="valid" type="xsd:boolean"/>
73+
<xsd:element maxOccurs="1" minOccurs="0" name="traderName" nillable="true" type="xsd:string"/>
74+
<xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyType" nillable="true" type="tns1:companyTypeCode"/>
75+
<xsd:element maxOccurs="1" minOccurs="0" name="traderAddress" type="xsd:string"/>
76+
<xsd:element maxOccurs="1" minOccurs="0" name="traderStreet" type="xsd:string"/>
77+
<xsd:element maxOccurs="1" minOccurs="0" name="traderPostcode" type="xsd:string"/>
78+
<xsd:element maxOccurs="1" minOccurs="0" name="traderCity" type="xsd:string"/>
79+
<xsd:element maxOccurs="1" minOccurs="0" name="traderNameMatch" type="tns1:matchCode"/>
80+
<xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyTypeMatch" type="tns1:matchCode"/>
81+
<xsd:element maxOccurs="1" minOccurs="0" name="traderStreetMatch" type="tns1:matchCode"/>
82+
<xsd:element maxOccurs="1" minOccurs="0" name="traderPostcodeMatch" type="tns1:matchCode"/>
83+
<xsd:element maxOccurs="1" minOccurs="0" name="traderCityMatch" type="tns1:matchCode"/>
84+
<xsd:element name="requestIdentifier" type="xsd:string"/>
85+
</xsd:sequence>
86+
</xsd:complexType>
87+
</xsd:element>
88+
<xsd:simpleType name="companyTypeCode">
89+
<xsd:restriction base="xsd:string">
90+
<xsd:pattern value="[A-Z]{2}\-[1-9][0-9]?"/>
91+
</xsd:restriction>
92+
</xsd:simpleType>
93+
<xsd:simpleType name="matchCode">
94+
<xsd:restriction base="xsd:string">
95+
<xsd:enumeration value="1">
96+
<xsd:annotation>
97+
<xsd:documentation>VALID</xsd:documentation>
98+
</xsd:annotation>
99+
</xsd:enumeration>
100+
<xsd:enumeration value="2">
101+
<xsd:annotation>
102+
<xsd:documentation>INVALID</xsd:documentation>
103+
</xsd:annotation>
104+
</xsd:enumeration>
105+
<xsd:enumeration value="3">
106+
<xsd:annotation>
107+
<xsd:documentation>NOT_PROCESSED</xsd:documentation>
108+
</xsd:annotation>
109+
</xsd:enumeration>
110+
</xsd:restriction>
111+
</xsd:simpleType>
112+
</xsd:schema>
113+
</wsdl:types>
114+
<wsdl:message name="checkVatRequest">
115+
<wsdl:part name="parameters" element="tns1:checkVat">
116+
</wsdl:part>
117+
</wsdl:message>
118+
<wsdl:message name="checkVatApproxResponse">
119+
<wsdl:part name="parameters" element="tns1:checkVatApproxResponse">
120+
</wsdl:part>
121+
</wsdl:message>
122+
<wsdl:message name="checkVatApproxRequest">
123+
<wsdl:part name="parameters" element="tns1:checkVatApprox">
124+
</wsdl:part>
125+
</wsdl:message>
126+
<wsdl:message name="checkVatResponse">
127+
<wsdl:part name="parameters" element="tns1:checkVatResponse">
128+
</wsdl:part>
129+
</wsdl:message>
130+
<wsdl:portType name="checkVatPortType">
131+
<wsdl:operation name="checkVat">
132+
<wsdl:input name="checkVatRequest" message="impl:checkVatRequest">
133+
</wsdl:input>
134+
<wsdl:output name="checkVatResponse" message="impl:checkVatResponse">
135+
</wsdl:output>
136+
</wsdl:operation>
137+
<wsdl:operation name="checkVatApprox">
138+
<wsdl:input name="checkVatApproxRequest" message="impl:checkVatApproxRequest">
139+
</wsdl:input>
140+
<wsdl:output name="checkVatApproxResponse" message="impl:checkVatApproxResponse">
141+
</wsdl:output>
142+
</wsdl:operation>
143+
</wsdl:portType>
144+
<wsdl:binding name="checkVatBinding" type="impl:checkVatPortType">
145+
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
146+
<wsdl:operation name="checkVat">
147+
<wsdlsoap:operation soapAction=""/>
148+
<wsdl:input name="checkVatRequest">
149+
<wsdlsoap:body use="literal"/>
150+
</wsdl:input>
151+
<wsdl:output name="checkVatResponse">
152+
<wsdlsoap:body use="literal"/>
153+
</wsdl:output>
154+
</wsdl:operation>
155+
<wsdl:operation name="checkVatApprox">
156+
<wsdlsoap:operation soapAction=""/>
157+
<wsdl:input name="checkVatApproxRequest">
158+
<wsdlsoap:body use="literal"/>
159+
</wsdl:input>
160+
<wsdl:output name="checkVatApproxResponse">
161+
<wsdlsoap:body use="literal"/>
162+
</wsdl:output>
163+
</wsdl:operation>
164+
</wsdl:binding>
165+
<wsdl:service name="checkVatService">
166+
<wsdl:port name="checkVatPort" binding="impl:checkVatBinding">
167+
<wsdlsoap:address location="http://ec.europa.eu/taxation_customs/vies/services/checkVatService"/>
168+
</wsdl:port>
169+
</wsdl:service>
170+
</wsdl:definitions>

0 commit comments

Comments
 (0)