You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This class does not work for me in PHP Version 8.2.0
, I get a lot of errors marked in the vendor/wsdltophp/wssecurity/src/WsSecurity.php file and it doesn't catch the class when I call it.
The webservices works perfectly for me by copying from soapui the header generated from there and pasting it into php, but the idea is to generate it from here automatically with the .pem certificate
This class does not work for me in PHP Version 8.2.0
, I get a lot of errors marked in the vendor/wsdltophp/wssecurity/src/WsSecurity.php file and it doesn't catch the class when I call it.
I need to get this header like this:
soapenv:Header
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="X509-D05DB3AB25A59A46831682127155327244">MIIGkDCCBXigAwIBAgIIKZDDLjZCZEcwDQYJKoZIhvcNAQELBQAwgbQxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjEtMCsGA1UECxMkaHR0cDovL2NlcnRzLmdvZGFkZHkuY29tL3JlcG9zaXRvcnkvMTMwMQYDVQQDEypHbyBEYWRkeSBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IC0gRzIwHhcNMjMwNDE0MjIyMDQ4WhcNMjQwMjI3MTgzMTExWjAXMRUwEwYDVQQDEwxmaW5hbmNpYXQuY28wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDsgfAQROHU2nKGdcdbMvHV9g8HOhhyjg8NPbQ/buD2QK9nGiAysY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LyxizDy9dSUBx/fwar3VLAHcASLDja9qmRzQP5WoC+p0w6xxSActW3SyB2bu/qznYhHMAAAGHgdtZjAAABAMASDBGAiEAuX2YMd/u4gAp6mB1HdZKCEm8KTkPxsLXDZqKCj+KdY8CIQD949YwLLmvAZrlEGYZwdkjbtLDjaSmGsdUzoc49KAHwAB2ANq2v2s/tbYin5vCu1xr6HCRcWy7UYSFNL2kPTBI1/urAAABh4HbWfIAAAQDAEcwRQIgMoKgvtqJwilkqxk4Ag8eM5cOymZNTuYkFhVSstjCoAACIQClijRE50qQNjQjvNxLuI0tqapCCRyCvZM+IQ9Hn4jVhDANBgkqhkiG9w0BAQsFAAOCAQEAYo8lvrn9VmixfL4LucOm5iTw4Iq7e9g2up6Mtd6yaYpd+JyklGvwBGEDsqe6U5cRZZ548MddvkdKUzltomJ3E36QuzXhVFdFygduZfrqczncbxOgFcUE58Xcd/huh3MZU/LJ8ztSZGFWZvDUvXa7gE7cfe2xJiSav0LO4cJ0j3ndyi8Nyp6TMpwbC6eZgUrwxEPmn53lDnZGcaTqVkQoj7vLDRhzt6vJBoIFBzIoffLksEui8wJEKDbaDn8L8Gf3pYSmVqkRrthviXEo/3VF8QJYew48ik1M+kfywieMBaF3TOFJmN2xeHWev1COXET6LveMqlHQgVCcHJ2STutqig==</wsse:BinarySecurityToken>
<wsse:UsernameToken wsu:Id="UsernameToken-D05DB3AB25A59A46831682127155325243">
wsse:Username2-901674244</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Clave300674*</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">+DTB7Tb8WbYGvXdQIJiD3g==</wsse:Nonce>
wsu:Created2023-04-22T01:32:35.325Z</wsu:Created>
</wsse:UsernameToken>
<wsu:Timestamp wsu:Id="TS-D05DB3AB25A59A46831682127155325242">
wsu:Created2023-04-22T01:32:35Z</wsu:Created>
wsu:Expires2023-04-22T01:33:35Z</wsu:Expires>
</wsu:Timestamp>
<ds:Signature Id="SIG-D05DB3AB25A59A46831682127155327247"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
ds:SignedInfo
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="soapenv v1"
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-63FC9BDC9C72D17C15168200203563382">
ds:Transforms
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="v1"
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
ds:DigestValuevLy7nIncHyl/dsH+Qz1KPKR8q4o=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#UsernameToken-D05DB3AB25A59A46831682127155325243">
ds:Transforms
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="soapenv v1"
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
ds:DigestValuekrcPff209yfp9CwEOoeSE3PKXTs=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#TS-D05DB3AB25A59A46831682127155325242">
ds:Transforms
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces PrefixList="wsse soapenv v1"
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
ds:DigestValueFe4jJ27O41HvcV/gc0arJiD6+1Y=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
ds:SignatureValueZxO5LQ+N5SeAvdi7a26q/wZMTZQtpNXQqf21XgVG/q3z6rmIFZXtrKGI9ImEIlqv5j7QucGaq1xn
UBk5/hFPSv4ofMrZZF4JkRY1IzY4htdOpsLeap8AaGqTK9FoY5nafCyUCX1ix8usm3wNGeaSYUFt
Gknh5+QEPQzkYCnzlicvrX12fj/Gxc3AWOak1p/Vun1nEmcnoJlKjoptGAay1oASWRSUnIV188Vn
kJEj9/Roc1oPQhbuR+eOUswMCasVlhUTCD9SSc7mVgbEaGPb7qgEw4Z2tvpLQSh/z0ZyvJzTH9UZ
NJr2UYd/xDV91xWBnmhL4Ba8yo86e9ACmYlMeg==</ds:SignatureValue>
<ds:KeyInfo Id="KI-D05DB3AB25A59A46831682127155327245">
<wsse:SecurityTokenReference wsu:Id="STR-D05DB3AB25A59A46831682127155327246">
<wsse:Reference URI="#X509-D05DB3AB25A59A46831682127155327244" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</soapenv:Header>
The webservices works perfectly for me by copying from soapui the header generated from there and pasting it into php, but the idea is to generate it from here automatically with the .pem certificate
Signing the Body, UsernameToken, and Timestamp.
NS BODY: http://schemas.xmlsoap.org/soap/envelope/
NS UsernameToken: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
NS Timestamp: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
Password Type: PasswordText
The text was updated successfully, but these errors were encountered: