I pass parameter 123 to SoapClient, and in the trace I get the following parameter: "MTIz" and because of this conversion, the entire WSDL does not work!

I pass to SOAPUI what it shows in the trace and get a similar error! At the same time, the persistent feeling that if it were not for such a transformation, it would work fine!

In the SOAP UI, everything is clear: enter image description here One note - when I insert a link to WSDL in SOAPUI, the requests automatically go to https://ssd.marinet.ru/ssd/LiteService.svc/cert , and if I remove / cert from the URL, it works immediately! I tried to make NODEJS, there is an error with SSL (iss error):

HTTP Error 403.7 - Forbidden The page you are trying to access requires the web browser to have an SSL client certificate recognized by the web server. ... ....

This error means that you need to use the SSL protocol to access the requested URL. Client certificate is used to confirm your rights as a legitimate user of this resource. For questions about how to get the correct certificate for use on the website, contact the site administrator.

CODE NODEJS:

var url = 'http://ssd.marinet.ru/ssd/LiteService.svc?wsdl'; var soap = require('soap'); var express = require('express'); var args = {name: 'value'}; soap.createClient(url, function(err, client) { console.log(client) console.log(` ========================================== `) client.PreSignDocument(args, function(err, result) { console.log(result); }); }); 

I work with (own) dss-lite server CryptoPro

WSDL itself can be found here: https://ssd.marinet.ru/ssd/LiteService.svc?wsdl

Here is the code:

 $url = 'https://ssd.marinet.ru/ssd/LiteService.svc?wsdl'; $document =123; $rawCertificate ='123'; $soap_params = [ 'soap_version' => SOAP_1_1, 'trace' => 1, 'exceptions' => true, 'verifypeer' => false, 'verifyhost' => false, 'cache_wsdl' => WSDL_CACHE_NONE, 'encoding'=>'UTF-8', 'connection_timeout'=>15000, 'style'=>SOAP_RPC, 'uri'=>'http://schemas.xmlsoap.org/soap/envelope/', // "urn:xmethods-delayed-quotes", // Пространство имен SOAP-метода "soapaction" => "urn:xmethods-delayed-quotes#getQuote", // HTTP-заголовок SOAPAction для SOAP-метода "use" => SOAP_ENCODED, "location" => $url ]; var_dump( $soap_service); $soap_service = new SoapClient( $url, $soap_params ); echo '<h1>FUNCTIONS:</h1>'; print_r($soap_service->__getTypes ()); echo '<h1>Response:</h1>'; $res = $soap_service->PreSignDocument([ 'document' => $document, 'rawCertificate' => $rawCertificate, 'signatureType' => 'PDF', 'signatureParams' => array() ]); var_dump($res); }catch(Exception $e){ echo '<h1>err:</h1>'; echo $soap_service->__getLastRequest(); die($e->getMessage()); } 

At the exit:

 FUNCTIONS: Array ([0] => struct ArrayOfKeyValueOfSignatureParamsstring1Iy7z97I { KeyValueOfSignatureParamsstring1Iy7z97I KeyValueOfSignatureParamsstring1Iy7z97I; } [1] => struct KeyValueOfSignatureParamsstring1Iy7z97I { SignatureParams Key; string Value; } [2] => string SignatureType [3] => string SignatureParams [4] => struct DSSPreSignResponse { base64Binary HashValue; string СacheObjectId; } [5] => struct DssFault { string Message; } [6] => struct DSSLitePolicy { ArrayOfSignatureType AllowedSignatureTypes; ArrayOfTspService TspServices; } [7] => struct ArrayOfSignatureType { SignatureType SignatureType; } [8] => struct ArrayOfTspService { TspService TspService; } [9] => struct TspService { string Name; string Title; string Url; } [10] => struct PreSignArgs { base64Binary document; base64Binary rawCertificate; ArrayOfKeyValueOfSignatureParamsstring1Iy7z97I signatureParams; SignatureType signatureType; } [11] => struct PostSignArgs { string cacheObjectId; ArrayOfKeyValueOfSignatureParamsstring1Iy7z97I signatureParams; SignatureType signatureType; base64Binary signatureValue; base64Binary signedHashValue; } [12] => struct EnhanceSignatureArgs { base64Binary document; ArrayOfKeyValueOfSignatureParamsstring1Iy7z97I signatureParams; SignatureType signatureType; } [13] => struct PreSignDocument { base64Binary document; SignatureType signatureType; base64Binary rawCertificate; ArrayOfKeyValueOfSignatureParamsstring1Iy7z97I signatureParams; } [14] => struct PreSignDocumentResponse { DSSPreSignResponse PreSignDocumentResult; } [15] => struct PostSignDocument { string cacheObjectId; base64Binary signedHashValue; base64Binary signatureValue; SignatureType signatureType; ArrayOfKeyValueOfSignatureParamsstring1Iy7z97I signatureParams; } [16] => struct PostSignDocumentResponse { base64Binary PostSignDocumentResult; } [17] => struct EnhanceSignature { base64Binary document; SignatureType signatureType; ArrayOfKeyValueOfSignatureParamsstring1Iy7z97I signatureParams; } [18] => struct EnhanceSignatureResponse { base64Binary EnhanceSignatureResult; } [19] => struct GetPolicy { } [20] => struct GetPolicyResponse { DSSLitePolicy GetPolicyResult; } [21] => struct PreSignDocumentRest { PreSignArgs preSignArguments; } [22] => struct PreSignDocumentRestResponse { DSSPreSignResponse PreSignDocumentRestResult; } [23] => struct PostSignDocumentRest { PostSignArgs postSignArgs; } [24] => struct PostSignDocumentRestResponse { base64Binary PostSignDocumentRestResult; } [25] => struct EnhanceSignatureRest { EnhanceSignatureArgs enhanceSignatureArgs; } [26] => struct EnhanceSignatureRestResponse { base64Binary EnhanceSignatureRestResult; } [27] => struct GetPolicyRest { } [28] => struct GetPolicyRestResponse { DSSLitePolicy GetPolicyRestResult; } [29] => int char [30] => duration duration [31] => string guid ) Response: err: MTIzPDFMTIz Требуемый объект не найден. 
  • In the DOCUMENT field I send a PDF document to base64, To rawCertificate => certificate to base64 - kost
  • Found the following line in WSDL: <wsdl: port name = "BasicHttpBinding_ILiteService1" binding = "i0: BasicHttpBinding_ILiteService1"> <soap: address location = " ssd.marinet.ru/ssd/LiteService.svc/cert" > </ wsdl: port > - kost
  • What can you do with it? It seems because of it on CERT there is a request .. But it would be necessary to remove CERT! - kost
  • Save the wsdl locally and remove the extra port. - Pavel Mayorov
  • PHP DEMO LOOK HERE: tehplayground.com/rv4lUYH4xPOzRF4S - kost

0