sepafm 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -6
- data/Rakefile +1 -1
- data/lib/sepa/application_request.rb +12 -18
- data/lib/sepa/application_response.rb +0 -2
- data/lib/sepa/attribute_checks.rb +33 -28
- data/lib/sepa/banks/danske/danske_response.rb +9 -25
- data/lib/sepa/banks/danske/soap_danske.rb +1 -1
- data/lib/sepa/banks/nordea/nordea_response.rb +2 -16
- data/lib/sepa/banks/op/op_response.rb +5 -23
- data/lib/sepa/banks/samlink/samlink_response.rb +35 -0
- data/lib/sepa/banks/samlink/soap_samlink.rb +14 -0
- data/lib/sepa/certificates/samlink_certificate.pem +29 -0
- data/lib/sepa/certificates/samlink_root_certificate.pem +32 -0
- data/lib/sepa/client.rb +35 -8
- data/lib/sepa/error_messages.rb +16 -18
- data/lib/sepa/response.rb +7 -11
- data/lib/sepa/soap_builder.rb +7 -17
- data/lib/sepa/utilities.rb +4 -5
- data/lib/sepa/version.rb +1 -1
- data/lib/sepa/wsdl/wsdl_samlink_cert_production.xml +82 -0
- data/lib/sepa/wsdl/wsdl_samlink_cert_test.xml +82 -0
- data/lib/sepa/wsdl/wsdl_samlink_production.xml +160 -0
- data/lib/sepa/wsdl/wsdl_samlink_test.xml +160 -0
- data/lib/sepa/xml_schemas/samlink/CertApplicationRequest.xsd +105 -0
- data/lib/sepa/xml_schemas/samlink/CertApplicationResponse.xsd +88 -0
- data/lib/sepa/xml_templates/application_request/download_file.xml +0 -1
- data/lib/sepa/xml_templates/application_request/download_file_list.xml +0 -1
- data/lib/sepa/xml_templates/application_request/samlink/get_certificate.xml +12 -0
- data/lib/sepa/xml_templates/application_request/samlink/renew_certificate.xml +29 -0
- data/lib/sepa/xml_templates/soap/samlink/get_certificate.xml +14 -0
- data/lib/sepa/xml_templates/soap/samlink/renew_certificate.xml +14 -0
- data/lib/sepafm.rb +43 -31
- data/readme.md +1 -0
- data/sepafm.gemspec +2 -2
- data/test/custom_assertions.rb +30 -28
- data/test/sepa/banks/danske/danske_cert_response_test.rb +13 -10
- data/test/sepa/banks/danske/danske_generic_soap_builder_test.rb +9 -31
- data/test/sepa/banks/danske/danske_get_bank_cert_test.rb +4 -5
- data/test/sepa/banks/danske/danske_response_test.rb +2 -3
- data/test/sepa/banks/danske/responses/create_cert_corrupted.xml +15 -0
- data/test/sepa/banks/nordea/nordea_application_request_test.rb +4 -6
- data/test/sepa/banks/nordea/nordea_application_response_test.rb +14 -15
- data/test/sepa/banks/nordea/nordea_cert_request_soap_builder_test.rb +1 -3
- data/test/sepa/banks/nordea/nordea_generic_soap_builder_test.rb +6 -16
- data/test/sepa/banks/nordea/nordea_response_test.rb +11 -11
- data/test/sepa/banks/op/op_cert_application_request_test.rb +1 -1
- data/test/sepa/banks/op/op_cert_request_soap_builder_test.rb +0 -1
- data/test/sepa/banks/op/op_response_test.rb +2 -2
- data/test/sepa/banks/samlink/responses/dfl.xml +21 -0
- data/test/sepa/banks/samlink/responses/gc_error_30.xml +21 -0
- data/test/sepa/banks/samlink/responses/rc.xml +21 -0
- data/test/sepa/banks/samlink/samlink_application_request_test.rb +36 -0
- data/test/sepa/banks/samlink/samlink_cert_application_request_test.rb +13 -0
- data/test/sepa/banks/samlink/samlink_cert_request_soap_builder_test.rb +13 -0
- data/test/sepa/banks/samlink/samlink_generic_soap_builder_test.rb +34 -0
- data/test/sepa/banks/samlink/samlink_renew_cert_application_request_test.rb +36 -0
- data/test/sepa/banks/samlink/samlink_renew_cert_request_soap_builder_test.rb +26 -0
- data/test/sepa/banks/samlink/samlink_response_test.rb +71 -0
- data/test/sepa/client_test.rb +32 -6
- data/test/sepa/fixtures.rb +169 -7
- data/test/sepa/sepa_test.rb +1 -1
- data/test/test_helper.rb +8 -7
- data/test_client/data/certs_example.rb +9 -9
- data/test_client/data/params_example.rb +18 -19
- data/test_client/test_client.rb +6 -0
- metadata +41 -5
data/lib/sepa/error_messages.rb
CHANGED
@@ -1,68 +1,66 @@
|
|
1
1
|
module Sepa
|
2
|
-
|
3
2
|
# Contains error messages used in this gem
|
4
3
|
module ErrorMessages
|
5
|
-
|
6
4
|
# Error message which is shown when {Client#customer_id} validation fails
|
7
5
|
CUSTOMER_ID_ERROR_MESSAGE =
|
8
|
-
'Customer Id needs to be present and needs to have a length of less than 17 characters'
|
6
|
+
'Customer Id needs to be present and needs to have a length of less than 17 characters'.freeze
|
9
7
|
|
10
8
|
# Error message which is shown when {Client#environment} validation fails
|
11
|
-
ENVIRONMENT_ERROR_MESSAGE = 'Environment needs to be either production or test'
|
9
|
+
ENVIRONMENT_ERROR_MESSAGE = 'Environment needs to be either production or test'.freeze
|
12
10
|
|
13
11
|
# Error message which is shown when {Client#target_id} validation fails
|
14
|
-
TARGET_ID_ERROR_MESSAGE = 'Target Id needs to be present and under 80 characters'
|
12
|
+
TARGET_ID_ERROR_MESSAGE = 'Target Id needs to be present and under 80 characters'.freeze
|
15
13
|
|
16
14
|
# Error message which is shown when {Client#file_type} validation fails
|
17
|
-
FILE_TYPE_ERROR_MESSAGE = 'File type needs to be present and under 35 characters'
|
15
|
+
FILE_TYPE_ERROR_MESSAGE = 'File type needs to be present and under 35 characters'.freeze
|
18
16
|
|
19
17
|
# Error message which is shown when {Client#content} validation fails
|
20
|
-
CONTENT_ERROR_MESSAGE = 'Content needs to be present for this command'
|
18
|
+
CONTENT_ERROR_MESSAGE = 'Content needs to be present for this command'.freeze
|
21
19
|
|
22
20
|
# Error message which is shown when {Client#signing_csr} validation fails
|
23
|
-
SIGNING_CERT_REQUEST_ERROR_MESSAGE = 'Invalid signing certificate request'
|
21
|
+
SIGNING_CERT_REQUEST_ERROR_MESSAGE = 'Invalid signing certificate request'.freeze
|
24
22
|
|
25
23
|
# Error message which is shown when {Client#encryption_csr} validation fails
|
26
|
-
ENCRYPTION_CERT_REQUEST_ERROR_MESSAGE = 'Invalid encryption certificate request'
|
24
|
+
ENCRYPTION_CERT_REQUEST_ERROR_MESSAGE = 'Invalid encryption certificate request'.freeze
|
27
25
|
|
28
26
|
# Error message which is shown when {Client#pin} validation fails
|
29
27
|
PIN_ERROR_MESSAGE =
|
30
|
-
'Pin needs to be present for this command and cannot be more than 10 characters'
|
28
|
+
'Pin needs to be present for this command and cannot be more than 10 characters'.freeze
|
31
29
|
|
32
30
|
# Error message which is shown when {Client#bank_encryption_certificate} validation fails
|
33
|
-
ENCRYPTION_CERT_ERROR_MESSAGE = 'Invalid encryption certificate'
|
31
|
+
ENCRYPTION_CERT_ERROR_MESSAGE = 'Invalid encryption certificate'.freeze
|
34
32
|
|
35
33
|
# Error message which is shown when {Client#status} validation fails
|
36
34
|
STATUS_ERROR_MESSAGE =
|
37
|
-
'Status is required for this command and must be either NEW, DOWNLOADED or ALL'
|
35
|
+
'Status is required for this command and must be either NEW, DOWNLOADED or ALL'.freeze
|
38
36
|
|
39
37
|
# Error message which is shown when {Client#file_reference} validation fails
|
40
38
|
FILE_REFERENCE_ERROR_MESSAGE =
|
41
|
-
'File reference is required for this command and must be under 33 characters'
|
39
|
+
'File reference is required for this command and must be under 33 characters'.freeze
|
42
40
|
|
43
41
|
# Error message which is shown when {Client#encryption_private_key} validation fails
|
44
42
|
ENCRYPTION_PRIVATE_KEY_ERROR_MESSAGE =
|
45
|
-
'Encryption private key is needed for this bank and this command'
|
43
|
+
'Encryption private key is needed for this bank and this command'.freeze
|
46
44
|
|
47
45
|
# Error message which is shown when {Response#response_code} validation fails
|
48
46
|
NOT_OK_RESPONSE_CODE_ERROR_MESSAGE =
|
49
47
|
'The response from the bank suggested there was something wrong with your request, check ' \
|
50
|
-
'your parameters and try again'
|
48
|
+
'your parameters and try again'.freeze
|
51
49
|
|
52
50
|
# Error message which is shown when the response got from the bank cannot be decrypted with the
|
53
51
|
# private key that is given to the client
|
54
52
|
DECRYPTION_ERROR_MESSAGE =
|
55
53
|
'The response could not be decrypted with the private key that you gave. Check that the ' \
|
56
|
-
'key is the private key of your own encryption certificate'
|
54
|
+
'key is the private key of your own encryption certificate'.freeze
|
57
55
|
|
58
56
|
# Error message which is shown when the hash embedded in the {Response} soap doesn't match the
|
59
57
|
# locally calculated one.
|
60
58
|
HASH_ERROR_MESSAGE =
|
61
59
|
'The hashes in the response did not match which means that the data in the response is not ' \
|
62
|
-
'intact'
|
60
|
+
'intact'.freeze
|
63
61
|
|
64
62
|
# Error message which is shown when the signature in {Response} cannot be verified.
|
65
63
|
SIGNATURE_ERROR_MESSAGE =
|
66
|
-
'The signature in the response did not verify and the response cannot be trusted'
|
64
|
+
'The signature in the response did not verify and the response cannot be trusted'.freeze
|
67
65
|
end
|
68
66
|
end
|
data/lib/sepa/response.rb
CHANGED
@@ -56,7 +56,7 @@ module Sepa
|
|
56
56
|
#
|
57
57
|
# @return [Nokogiri::XML] The soap as Nokogiri document
|
58
58
|
def doc
|
59
|
-
@doc
|
59
|
+
@doc = @soap ? xml_doc(@soap) : xml_doc(@error)
|
60
60
|
end
|
61
61
|
|
62
62
|
# Returns the error of the response as a Nokogiri document
|
@@ -121,8 +121,8 @@ module Sepa
|
|
121
121
|
# {#extract_application_response} to do the extraction.
|
122
122
|
#
|
123
123
|
# @return [String] The application response as a raw xml document
|
124
|
-
def application_response
|
125
|
-
@application_response ||= extract_application_response(
|
124
|
+
def application_response(namespace: BXD)
|
125
|
+
@application_response ||= extract_application_response(namespace)
|
126
126
|
end
|
127
127
|
|
128
128
|
# Returns the file references in a download file list response
|
@@ -207,20 +207,16 @@ module Sepa
|
|
207
207
|
#
|
208
208
|
# @return [String] if the response code can be found
|
209
209
|
# @return [nil] if the response code cannot be found
|
210
|
-
def response_code
|
211
|
-
node = doc.at(
|
212
|
-
node = error_doc.at('xmlns|ResponseCode', xmlns: BXD) unless node
|
213
|
-
node.content if node
|
210
|
+
def response_code(namespace: BXD, node_name: 'ResponseCode')
|
211
|
+
(node = doc.at("xmlns|#{node_name}", xmlns: namespace)) && node.content && node.content.rjust(2, '0')
|
214
212
|
end
|
215
213
|
|
216
214
|
# Returns the response text of the response
|
217
215
|
#
|
218
216
|
# @return [String] if the response text can be found
|
219
217
|
# @return [nil] if the response text cannot be found
|
220
|
-
def response_text
|
221
|
-
node = doc.at(
|
222
|
-
node = error_doc.at('xmlns|ResponseText', xmlns: BXD) unless node
|
223
|
-
node.content if node
|
218
|
+
def response_text(namespace: BXD, node_name: 'ResponseText')
|
219
|
+
(node = doc.at("xmlns|#{node_name}", xmlns: namespace)) && node.content
|
224
220
|
end
|
225
221
|
|
226
222
|
private
|
data/lib/sepa/soap_builder.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
module Sepa
|
2
|
-
|
3
2
|
# Builds a soap message with given parameters. This class is extended with proper bank module
|
4
3
|
# depending on bank.
|
5
4
|
class SoapBuilder
|
@@ -100,13 +99,9 @@ module Sepa
|
|
100
99
|
# @return [String] the base64 encoded string
|
101
100
|
# @todo remove this method and use {Utilities#calculate_digest}
|
102
101
|
def calculate_digest(doc, node)
|
103
|
-
sha1
|
104
|
-
node
|
105
|
-
|
106
|
-
canon_node = node.canonicalize(
|
107
|
-
mode = Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0,
|
108
|
-
inclusive_namespaces = nil, with_comments = false
|
109
|
-
)
|
102
|
+
sha1 = OpenSSL::Digest::SHA1.new
|
103
|
+
node = doc.at_css(node)
|
104
|
+
canon_node = canonicalize_exclusively(node)
|
110
105
|
|
111
106
|
encode(sha1.digest(canon_node)).gsub(/\s+/, "")
|
112
107
|
end
|
@@ -120,15 +115,11 @@ module Sepa
|
|
120
115
|
# @return [String] the base64 encoded signature
|
121
116
|
# @todo refactor to use canonicalization from utilities
|
122
117
|
def calculate_signature(doc, node)
|
123
|
-
sha1
|
124
|
-
node
|
118
|
+
sha1 = OpenSSL::Digest::SHA1.new
|
119
|
+
node = doc.at_css(node)
|
120
|
+
canon_signed_info_node = canonicalize_exclusively(node)
|
121
|
+
signature = @signing_private_key.sign(sha1, canon_signed_info_node)
|
125
122
|
|
126
|
-
canon_signed_info_node = node.canonicalize(
|
127
|
-
mode = Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0,
|
128
|
-
inclusive_namespaces = nil, with_comments = false
|
129
|
-
)
|
130
|
-
|
131
|
-
signature = @signing_private_key.sign(sha1, canon_signed_info_node)
|
132
123
|
encode(signature).gsub(/\s+/, "")
|
133
124
|
end
|
134
125
|
|
@@ -226,6 +217,5 @@ module Sepa
|
|
226
217
|
def set_application_request
|
227
218
|
set_node @template, 'bxd|ApplicationRequest', @application_request.to_base64
|
228
219
|
end
|
229
|
-
|
230
220
|
end
|
231
221
|
end
|
data/lib/sepa/utilities.rb
CHANGED
@@ -89,9 +89,9 @@ module Sepa
|
|
89
89
|
begin
|
90
90
|
x509_certificate(cert)
|
91
91
|
rescue => e
|
92
|
-
|
93
|
-
|
94
|
-
|
92
|
+
raise OpenSSL::X509::CertificateError,
|
93
|
+
"The certificate could not be processed. It's most likely corrupted. " \
|
94
|
+
"OpenSSL had this to say: #{e}."
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
@@ -118,7 +118,7 @@ module Sepa
|
|
118
118
|
# @return [Nokogiri::XML::Document] the loaded template
|
119
119
|
# @raise [ArgumentError] if a template cannot be found for a command
|
120
120
|
def load_body_template(template)
|
121
|
-
|
121
|
+
raise ArgumentError, 'Unsupported command' unless SUPPORTED_COMMANDS.include?(@command)
|
122
122
|
|
123
123
|
file = if STANDARD_COMMANDS.include?(@command)
|
124
124
|
"#{template}/#{@command}.xml"
|
@@ -315,6 +315,5 @@ module Sepa
|
|
315
315
|
|
316
316
|
certificate.verify(root_certificate.public_key)
|
317
317
|
end
|
318
|
-
|
319
318
|
end
|
320
319
|
end
|
data/lib/sepa/version.rb
CHANGED
@@ -0,0 +1,82 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<wsdl:definitions targetNamespace="http://mlp.op.fi/OPCertificateService" xmlns:tns="http://mlp.op.fi/OPCertificateService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<wsdl:types>
|
4
|
+
<xsd:schema targetNamespace="http://mlp.op.fi/OPCertificateService" elementFormDefault="qualified" attributeFormDefault="qualified">
|
5
|
+
<xsd:complexType name="CertificateRequestHeader">
|
6
|
+
<xsd:sequence>
|
7
|
+
<xsd:element name="SenderId" type="xsd:string" nillable="false"/>
|
8
|
+
<xsd:element name="RequestId" type="xsd:string" nillable="false"/>
|
9
|
+
<xsd:element name="Timestamp" type="xsd:dateTime" nillable="false"/>
|
10
|
+
</xsd:sequence>
|
11
|
+
</xsd:complexType>
|
12
|
+
<xsd:complexType name="CertificateResponseHeader">
|
13
|
+
<xsd:sequence>
|
14
|
+
<xsd:element name="SenderId" type="xsd:string" nillable="false"/>
|
15
|
+
<xsd:element name="RequestId" type="xsd:string" nillable="false"/>
|
16
|
+
<xsd:element name="Timestamp" type="xsd:dateTime" nillable="false"/>
|
17
|
+
<xsd:element name="ResponseCode" type="xsd:string" nillable="true"/>
|
18
|
+
<xsd:element name="ResponseText" type="xsd:string" nillable="true"/>
|
19
|
+
</xsd:sequence>
|
20
|
+
</xsd:complexType>
|
21
|
+
<xsd:complexType name="GetCertificateRequest">
|
22
|
+
<xsd:sequence>
|
23
|
+
<xsd:element name="RequestHeader" type="tns:CertificateRequestHeader" nillable="false"/>
|
24
|
+
<xsd:element name="ApplicationRequest" type="xsd:base64Binary" nillable="false"/>
|
25
|
+
</xsd:sequence>
|
26
|
+
</xsd:complexType>
|
27
|
+
<xsd:complexType name="GetCertificateResponse">
|
28
|
+
<xsd:sequence>
|
29
|
+
<xsd:element name="ResponseHeader" type="tns:CertificateResponseHeader" nillable="false"/>
|
30
|
+
<xsd:element name="ApplicationResponse" type="xsd:base64Binary" nillable="false"/>
|
31
|
+
</xsd:sequence>
|
32
|
+
</xsd:complexType>
|
33
|
+
<xsd:complexType name="CertificateServiceFaultDetail">
|
34
|
+
<xsd:sequence>
|
35
|
+
<xsd:element minOccurs="0" maxOccurs="1" name="category" type="xsd:string"/>
|
36
|
+
<xsd:element minOccurs="0" maxOccurs="1" name="code" type="xsd:string"/>
|
37
|
+
</xsd:sequence>
|
38
|
+
</xsd:complexType>
|
39
|
+
</xsd:schema>
|
40
|
+
<xsd:schema targetNamespace="http://mlp.op.fi/OPCertificateService" elementFormDefault="qualified" attributeFormDefault="qualified">
|
41
|
+
<xsd:element name="getCertificatein" type="tns:GetCertificateRequest"/>
|
42
|
+
<xsd:element name="getCertificateout" type="tns:GetCertificateResponse"/>
|
43
|
+
<xsd:element name="certificateServiceFaultElement" type="tns:CertificateServiceFaultDetail"/>
|
44
|
+
</xsd:schema>
|
45
|
+
</wsdl:types>
|
46
|
+
<wsdl:message name="certificateServiceFault">
|
47
|
+
<wsdl:part name="certificateServiceFault" element="tns:certificateServiceFaultElement"/>
|
48
|
+
</wsdl:message>
|
49
|
+
<wsdl:message name="getCertificateRequest">
|
50
|
+
<wsdl:part element="tns:getCertificatein" name="getCertificatein"/>
|
51
|
+
</wsdl:message>
|
52
|
+
<wsdl:message name="getCertificateResponse">
|
53
|
+
<wsdl:part element="tns:getCertificateout" name="getCertificateout"/>
|
54
|
+
</wsdl:message>
|
55
|
+
<wsdl:portType name="OPCertificateServicePortType">
|
56
|
+
<wsdl:operation name="getCertificate">
|
57
|
+
<wsdl:input message="tns:getCertificateRequest" name="getCertificateRequest"/>
|
58
|
+
<wsdl:output message="tns:getCertificateResponse" name="getCertificateResponse"/>
|
59
|
+
<wsdl:fault message="tns:certificateServiceFault" name="certificateServiceFault"/>
|
60
|
+
</wsdl:operation>
|
61
|
+
</wsdl:portType>
|
62
|
+
<wsdl:binding name="OPCertificateServiceHttpBinding" type="tns:OPCertificateServicePortType">
|
63
|
+
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
64
|
+
<wsdl:operation name="getCertificate">
|
65
|
+
<soap:operation soapAction=""/>
|
66
|
+
<wsdl:input name="getCertificateRequest">
|
67
|
+
<soap:body use="literal"/>
|
68
|
+
</wsdl:input>
|
69
|
+
<wsdl:output name="getCertificateResponse">
|
70
|
+
<soap:body use="literal"/>
|
71
|
+
</wsdl:output>
|
72
|
+
<wsdl:fault name="certificateServiceFault">
|
73
|
+
<soap:fault use="literal"/>
|
74
|
+
</wsdl:fault>
|
75
|
+
</wsdl:operation>
|
76
|
+
</wsdl:binding>
|
77
|
+
<wsdl:service name="OPCertificateService">
|
78
|
+
<wsdl:port binding="tns:OPCertificateServiceHttpBinding" name="OPCertificateServiceHttpPort">
|
79
|
+
<soap:address location="https://ws.samlink.fi/wsdl/CertificateService.xml"/>
|
80
|
+
</wsdl:port>
|
81
|
+
</wsdl:service>
|
82
|
+
</wsdl:definitions>
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<wsdl:definitions targetNamespace="http://mlp.op.fi/OPCertificateService" xmlns:tns="http://mlp.op.fi/OPCertificateService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<wsdl:types>
|
4
|
+
<xsd:schema targetNamespace="http://mlp.op.fi/OPCertificateService" elementFormDefault="qualified" attributeFormDefault="qualified">
|
5
|
+
<xsd:complexType name="CertificateRequestHeader">
|
6
|
+
<xsd:sequence>
|
7
|
+
<xsd:element name="SenderId" type="xsd:string" nillable="false"/>
|
8
|
+
<xsd:element name="RequestId" type="xsd:string" nillable="false"/>
|
9
|
+
<xsd:element name="Timestamp" type="xsd:dateTime" nillable="false"/>
|
10
|
+
</xsd:sequence>
|
11
|
+
</xsd:complexType>
|
12
|
+
<xsd:complexType name="CertificateResponseHeader">
|
13
|
+
<xsd:sequence>
|
14
|
+
<xsd:element name="SenderId" type="xsd:string" nillable="false"/>
|
15
|
+
<xsd:element name="RequestId" type="xsd:string" nillable="false"/>
|
16
|
+
<xsd:element name="Timestamp" type="xsd:dateTime" nillable="false"/>
|
17
|
+
<xsd:element name="ResponseCode" type="xsd:string" nillable="true"/>
|
18
|
+
<xsd:element name="ResponseText" type="xsd:string" nillable="true"/>
|
19
|
+
</xsd:sequence>
|
20
|
+
</xsd:complexType>
|
21
|
+
<xsd:complexType name="GetCertificateRequest">
|
22
|
+
<xsd:sequence>
|
23
|
+
<xsd:element name="RequestHeader" type="tns:CertificateRequestHeader" nillable="false"/>
|
24
|
+
<xsd:element name="ApplicationRequest" type="xsd:base64Binary" nillable="false"/>
|
25
|
+
</xsd:sequence>
|
26
|
+
</xsd:complexType>
|
27
|
+
<xsd:complexType name="GetCertificateResponse">
|
28
|
+
<xsd:sequence>
|
29
|
+
<xsd:element name="ResponseHeader" type="tns:CertificateResponseHeader" nillable="false"/>
|
30
|
+
<xsd:element name="ApplicationResponse" type="xsd:base64Binary" nillable="false"/>
|
31
|
+
</xsd:sequence>
|
32
|
+
</xsd:complexType>
|
33
|
+
<xsd:complexType name="CertificateServiceFaultDetail">
|
34
|
+
<xsd:sequence>
|
35
|
+
<xsd:element minOccurs="0" maxOccurs="1" name="category" type="xsd:string"/>
|
36
|
+
<xsd:element minOccurs="0" maxOccurs="1" name="code" type="xsd:string"/>
|
37
|
+
</xsd:sequence>
|
38
|
+
</xsd:complexType>
|
39
|
+
</xsd:schema>
|
40
|
+
<xsd:schema targetNamespace="http://mlp.op.fi/OPCertificateService" elementFormDefault="qualified" attributeFormDefault="qualified">
|
41
|
+
<xsd:element name="getCertificatein" type="tns:GetCertificateRequest"/>
|
42
|
+
<xsd:element name="getCertificateout" type="tns:GetCertificateResponse"/>
|
43
|
+
<xsd:element name="certificateServiceFaultElement" type="tns:CertificateServiceFaultDetail"/>
|
44
|
+
</xsd:schema>
|
45
|
+
</wsdl:types>
|
46
|
+
<wsdl:message name="certificateServiceFault">
|
47
|
+
<wsdl:part name="certificateServiceFault" element="tns:certificateServiceFaultElement"/>
|
48
|
+
</wsdl:message>
|
49
|
+
<wsdl:message name="getCertificateRequest">
|
50
|
+
<wsdl:part element="tns:getCertificatein" name="getCertificatein"/>
|
51
|
+
</wsdl:message>
|
52
|
+
<wsdl:message name="getCertificateResponse">
|
53
|
+
<wsdl:part element="tns:getCertificateout" name="getCertificateout"/>
|
54
|
+
</wsdl:message>
|
55
|
+
<wsdl:portType name="OPCertificateServicePortType">
|
56
|
+
<wsdl:operation name="getCertificate">
|
57
|
+
<wsdl:input message="tns:getCertificateRequest" name="getCertificateRequest"/>
|
58
|
+
<wsdl:output message="tns:getCertificateResponse" name="getCertificateResponse"/>
|
59
|
+
<wsdl:fault message="tns:certificateServiceFault" name="certificateServiceFault"/>
|
60
|
+
</wsdl:operation>
|
61
|
+
</wsdl:portType>
|
62
|
+
<wsdl:binding name="OPCertificateServiceHttpBinding" type="tns:OPCertificateServicePortType">
|
63
|
+
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
64
|
+
<wsdl:operation name="getCertificate">
|
65
|
+
<soap:operation soapAction=""/>
|
66
|
+
<wsdl:input name="getCertificateRequest">
|
67
|
+
<soap:body use="literal"/>
|
68
|
+
</wsdl:input>
|
69
|
+
<wsdl:output name="getCertificateResponse">
|
70
|
+
<soap:body use="literal"/>
|
71
|
+
</wsdl:output>
|
72
|
+
<wsdl:fault name="certificateServiceFault">
|
73
|
+
<soap:fault use="literal"/>
|
74
|
+
</wsdl:fault>
|
75
|
+
</wsdl:operation>
|
76
|
+
</wsdl:binding>
|
77
|
+
<wsdl:service name="OPCertificateService">
|
78
|
+
<wsdl:port binding="tns:OPCertificateServiceHttpBinding" name="OPCertificateServiceHttpPort">
|
79
|
+
<soap:address location="https://194.240.69.243/wsdl/CertificateService.xml"/>
|
80
|
+
</wsdl:port>
|
81
|
+
</wsdl:service>
|
82
|
+
</wsdl:definitions>
|
@@ -0,0 +1,160 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<wsdl:definitions targetNamespace="http://bxd.fi/CorporateFileService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://model.bxd.fi" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://bxd.fi/CorporateFileService" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<wsdl:types>
|
4
|
+
<xsd:schema targetNamespace="http://model.bxd.fi" elementFormDefault="qualified" attributeFormDefault="qualified">
|
5
|
+
<xsd:complexType name="RequestHeader">
|
6
|
+
<xsd:sequence>
|
7
|
+
<xsd:element name="SenderId" type="xsd:string" nillable="false"/>
|
8
|
+
<xsd:element name="RequestId" type="xsd:string" nillable="false"/>
|
9
|
+
<xsd:element name="Timestamp" type="xsd:dateTime" nillable="false"/>
|
10
|
+
<xsd:element name="Language" type="xsd:string" nillable="true"/>
|
11
|
+
<xsd:element name="UserAgent" type="xsd:string" nillable="true"/>
|
12
|
+
<xsd:element name="ReceiverId" type="xsd:string" nillable="false"/>
|
13
|
+
</xsd:sequence>
|
14
|
+
</xsd:complexType>
|
15
|
+
<xsd:complexType name="ResponseHeader">
|
16
|
+
<xsd:sequence>
|
17
|
+
<xsd:element name="SenderId" type="xsd:string" nillable="false"/>
|
18
|
+
<xsd:element name="RequestId" type="xsd:string" nillable="false"/>
|
19
|
+
<xsd:element name="Timestamp" type="xsd:dateTime" nillable="false"/>
|
20
|
+
<xsd:element name="ResponseCode" type="xsd:string" nillable="true"/>
|
21
|
+
<xsd:element name="ResponseText" type="xsd:string" nillable="true"/>
|
22
|
+
<xsd:element name="ReceiverId" type="xsd:string" nillable="false"/>
|
23
|
+
</xsd:sequence>
|
24
|
+
</xsd:complexType>
|
25
|
+
<xsd:complexType name="UploadFileRequest">
|
26
|
+
<xsd:sequence>
|
27
|
+
<xsd:element name="RequestHeader" type="ns1:RequestHeader" nillable="false"/>
|
28
|
+
<xsd:element name="ApplicationRequest" type="xsd:base64Binary" nillable="false"/>
|
29
|
+
</xsd:sequence>
|
30
|
+
</xsd:complexType>
|
31
|
+
<xsd:complexType name="UploadFileResponse">
|
32
|
+
<xsd:sequence>
|
33
|
+
<xsd:element name="ResponseHeader" type="ns1:ResponseHeader" nillable="false"/>
|
34
|
+
<xsd:element name="ApplicationResponse" type="xsd:base64Binary" nillable="false"/>
|
35
|
+
</xsd:sequence>
|
36
|
+
</xsd:complexType>
|
37
|
+
<xsd:complexType name="DownloadFileListRequest">
|
38
|
+
<xsd:sequence>
|
39
|
+
<xsd:element name="RequestHeader" type="ns1:RequestHeader" nillable="false"/>
|
40
|
+
<xsd:element name="ApplicationRequest" type="xsd:base64Binary" nillable="false"/>
|
41
|
+
</xsd:sequence>
|
42
|
+
</xsd:complexType>
|
43
|
+
<xsd:complexType name="DownloadFileListResponse">
|
44
|
+
<xsd:sequence>
|
45
|
+
<xsd:element name="ResponseHeader" type="ns1:ResponseHeader" nillable="false"/>
|
46
|
+
<xsd:element name="ApplicationResponse" type="xsd:base64Binary" nillable="false"/>
|
47
|
+
</xsd:sequence>
|
48
|
+
</xsd:complexType>
|
49
|
+
<xsd:complexType name="DownloadFileRequest">
|
50
|
+
<xsd:sequence>
|
51
|
+
<xsd:element name="RequestHeader" type="ns1:RequestHeader" nillable="false"/>
|
52
|
+
<xsd:element name="ApplicationRequest" type="xsd:base64Binary" nillable="false"/>
|
53
|
+
</xsd:sequence>
|
54
|
+
</xsd:complexType>
|
55
|
+
<xsd:complexType name="DownloadFileResponse">
|
56
|
+
<xsd:sequence>
|
57
|
+
<xsd:element name="ResponseHeader" type="ns1:ResponseHeader" nillable="false"/>
|
58
|
+
<xsd:element name="ApplicationResponse" type="xsd:base64Binary" nillable="false"/>
|
59
|
+
</xsd:sequence>
|
60
|
+
</xsd:complexType>
|
61
|
+
<xsd:complexType name="FileServiceFaultDetail">
|
62
|
+
<xsd:sequence>
|
63
|
+
<xsd:element minOccurs="0" maxOccurs="1" name="category" type="xsd:string"/>
|
64
|
+
<xsd:element minOccurs="0" maxOccurs="1" name="code" type="xsd:string"/>
|
65
|
+
</xsd:sequence>
|
66
|
+
</xsd:complexType>
|
67
|
+
</xsd:schema>
|
68
|
+
<xsd:schema targetNamespace="http://bxd.fi/CorporateFileService" elementFormDefault="qualified" attributeFormDefault="qualified">
|
69
|
+
<xsd:element name="uploadFilein" type="ns1:UploadFileRequest"/>
|
70
|
+
<xsd:element name="uploadFileout" type="ns1:UploadFileResponse"/>
|
71
|
+
<xsd:element name="downloadFileListin" type="ns1:DownloadFileListRequest"/>
|
72
|
+
<xsd:element name="downloadFileListout" type="ns1:DownloadFileListResponse"/>
|
73
|
+
<xsd:element name="downloadFilein" type="ns1:DownloadFileRequest"/>
|
74
|
+
<xsd:element name="downloadFileout" type="ns1:DownloadFileResponse"/>
|
75
|
+
<xsd:element name="FileServiceFaultElement" type="ns1:FileServiceFaultDetail"/>
|
76
|
+
</xsd:schema>
|
77
|
+
</wsdl:types>
|
78
|
+
<wsdl:message name="FileServiceFault">
|
79
|
+
<wsdl:part name="FileServiceFault" element="tns:FileServiceFaultElement"/>
|
80
|
+
</wsdl:message>
|
81
|
+
<wsdl:message name="uploadFileResponse">
|
82
|
+
<wsdl:part element="tns:uploadFileout" name="uploadFileout"/>
|
83
|
+
</wsdl:message>
|
84
|
+
<wsdl:message name="uploadFileRequest">
|
85
|
+
<wsdl:part element="tns:uploadFilein" name="uploadFilein"/>
|
86
|
+
</wsdl:message>
|
87
|
+
<wsdl:message name="downloadFileListResponse">
|
88
|
+
<wsdl:part element="tns:downloadFileListout" name="downloadFileListout"/>
|
89
|
+
</wsdl:message>
|
90
|
+
<wsdl:message name="downloadFileListRequest">
|
91
|
+
<wsdl:part element="tns:downloadFileListin" name="downloadFileListin"/>
|
92
|
+
</wsdl:message>
|
93
|
+
<wsdl:message name="downloadFileResponse">
|
94
|
+
<wsdl:part element="tns:downloadFileout" name="downloadFileout"/>
|
95
|
+
</wsdl:message>
|
96
|
+
<wsdl:message name="downloadFileRequest">
|
97
|
+
<wsdl:part element="tns:downloadFilein" name="downloadFilein"/>
|
98
|
+
</wsdl:message>
|
99
|
+
<wsdl:portType name="CorporateFileServicePortType">
|
100
|
+
<wsdl:operation name="uploadFile">
|
101
|
+
<wsdl:input message="tns:uploadFileRequest" name="uploadFileRequest"/>
|
102
|
+
<wsdl:output message="tns:uploadFileResponse" name="uploadFileResponse"/>
|
103
|
+
<wsdl:fault name="FileServiceFault" message="tns:FileServiceFault"/>
|
104
|
+
</wsdl:operation>
|
105
|
+
<wsdl:operation name="downloadFileList">
|
106
|
+
<wsdl:input message="tns:downloadFileListRequest" name="downloadFileListRequest"/>
|
107
|
+
<wsdl:output message="tns:downloadFileListResponse" name="downloadFileListResponse"/>
|
108
|
+
<wsdl:fault name="FileServiceFault" message="tns:FileServiceFault"/>
|
109
|
+
</wsdl:operation>
|
110
|
+
<wsdl:operation name="downloadFile">
|
111
|
+
<wsdl:input message="tns:downloadFileRequest" name="downloadFileRequest"/>
|
112
|
+
<wsdl:output message="tns:downloadFileResponse" name="downloadFileResponse"/>
|
113
|
+
<wsdl:fault name="FileServiceFault" message="tns:FileServiceFault"/>
|
114
|
+
</wsdl:operation>
|
115
|
+
</wsdl:portType>
|
116
|
+
<wsdl:binding name="CorporateFileServiceHttpBinding" type="tns:CorporateFileServicePortType">
|
117
|
+
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
118
|
+
<wsdl:operation name="uploadFile">
|
119
|
+
<wsdlsoap:operation soapAction=""/>
|
120
|
+
<wsdl:input name="uploadFileRequest">
|
121
|
+
<wsdlsoap:body use="literal"/>
|
122
|
+
</wsdl:input>
|
123
|
+
<wsdl:output name="uploadFileResponse">
|
124
|
+
<wsdlsoap:body use="literal"/>
|
125
|
+
</wsdl:output>
|
126
|
+
<wsdl:fault name="FileServiceFault">
|
127
|
+
<wsdlsoap:fault use="literal" name="FileServiceFault"/>
|
128
|
+
</wsdl:fault>
|
129
|
+
</wsdl:operation>
|
130
|
+
<wsdl:operation name="downloadFileList">
|
131
|
+
<wsdlsoap:operation soapAction=""/>
|
132
|
+
<wsdl:input name="downloadFileListRequest">
|
133
|
+
<wsdlsoap:body use="literal"/>
|
134
|
+
</wsdl:input>
|
135
|
+
<wsdl:output name="downloadFileListResponse">
|
136
|
+
<wsdlsoap:body use="literal"/>
|
137
|
+
</wsdl:output>
|
138
|
+
<wsdl:fault name="FileServiceFault">
|
139
|
+
<wsdlsoap:fault use="literal" name="FileServiceFault"/>
|
140
|
+
</wsdl:fault>
|
141
|
+
</wsdl:operation>
|
142
|
+
<wsdl:operation name="downloadFile">
|
143
|
+
<wsdlsoap:operation soapAction=""/>
|
144
|
+
<wsdl:input name="downloadFileRequest">
|
145
|
+
<wsdlsoap:body use="literal"/>
|
146
|
+
</wsdl:input>
|
147
|
+
<wsdl:output name="downloadFileResponse">
|
148
|
+
<wsdlsoap:body use="literal"/>
|
149
|
+
</wsdl:output>
|
150
|
+
<wsdl:fault name="FileServiceFault">
|
151
|
+
<wsdlsoap:fault use="literal" name="FileServiceFault"/>
|
152
|
+
</wsdl:fault>
|
153
|
+
</wsdl:operation>
|
154
|
+
</wsdl:binding>
|
155
|
+
<wsdl:service name="CorporateFileService">
|
156
|
+
<wsdl:port binding="tns:CorporateFileServiceHttpBinding" name="CorporateFileServiceHttpPort">
|
157
|
+
<wsdlsoap:address location="https://ws.samlink.fi/services/CorporateFileService"/>
|
158
|
+
</wsdl:port>
|
159
|
+
</wsdl:service>
|
160
|
+
</wsdl:definitions>
|