Reputation: 13
I'm using Savon to connect to SOAP with wsse signature. When trying to make call I recieve error that SOAP Header must be signed.
header = { "Header1": {
"@xmlns:ns2": "1",
"@xmlns:ns3": "2",
"@xmlns:ns4": "3",
"@xmlns:ns5": "4",
"@xmlns:ns6": "5",
"@xmlns:ns7": "6",
"ns3:atrybut": actual_fields
}
}
client = Savon.client(
wsdl: wsdl,
endpoint: endpoint,
soap_header: header,
ssl_version: :TLSv1_2,
ssl_ca_cert_file: ca_Cert,
ssl_cert_file: tls_cert,
ssl_cert_key_file: tsl_key,
ssl_cert_key_password: tls_pass,
open_timeout: 5, read_timeout: 5,
log_level: :info,
log: true,
wsse_timestamp: true,
env_namespace: :soap,
wsse_signature: akami_sign,
)
the error is this
I, [2024-09-04T12:02:33.100356 #1433] INFO -- : SOAP request: endpoint
I, [2024-09-04T12:02:33.100427 #1433] INFO -- : SOAPAction: "action"
Content-Type: text/xml;charset=UTF-8
Content-Length: 5995
I, [2024-09-04T12:02:33.226033 #1433] INFO -- : SOAP response (status 500)
(wsse:InvalidSecurity) Soap Header must be signed : Header1
I have example of XML that is working and few things that are obviously different (compared to XML generated with client.build_request(:action)
are
CanonicalizationMethod
with <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="soap"/>
as child, but the one created by Savon doesn'tUpvotes: 0
Views: 41