Answer the question
In order to leave comments, you need to log in
Is it possible to change the message SOAP-ERROR: Encoding: Violation of encoding rules?
Is it possible in SOAP to override the SOAP-ERROR: Encoding: Violation of encoding rules error message? I get this error when incorrect data is passed to a field with the long type. The task is that the service must respond to absolutely any non-valid request with errors defined by the customer. The problem is that I can't intercept this answer via try.
$server = new SoapServer('http://somehost/?wsdl', $soap_param);
$server->setClass('SomeClass');
try {
$server->handle();
} catch (SoapFault $e) {
throw new SoapFault($faultcode, $faultstring);
}
SOAP-ERROR: Encoding: Violation of encoding rules
ob_start();
$soapServer->handle();
$soapXml = ob_get_contents();
ob_end_clean();
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question