How to do the correct request? Error: SoapClient::$request must not be accessed before initialization #211
Answered
by
CodeDredd
supermavster
asked this question in
Q&A
-
Hi I have a problem call a method, but I don't have idea how to do it that: The error is:
I try to create this petition WITHOUT SSL Certification: https://xxxxxxxx/xxx/xxx/xxx?wsdl <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ser="http://service.cows.gnconsult.com/">
<soapenv:Header/>
<soapenv:Body>
<ser:cons_saldo_cliente>
<cliente>1234</cliente>
<entidad>12345</entidad>
</ser:cons_saldo_cliente>
</soapenv:Body>
</soapenv:Envelope> I create based in the other comments this code: $urlWSDL = 'https://xxxxxxxx/xxx/xxx/xxx?wsdl';
$client = Soap::withGuzzleClientOptions([
'allow_redirects' => RedirectMiddleware::$defaultSettings,
'http_errors' => true,
'decode_content' => true,
'verify' => false,
'cookies' => false,
'idn_conversion' => false,
])
->baseWsdl($urlWSDL)
->withOptions([
'ser' => 'http://service.cows.gnconsult.com/',
])
;
$response = $client->call('ser:cons_saldo_cliente', [
'cliente' => '1234',
'entidad' => '12345',
])
->throw()
->json();
return $response; But in diferente case is the same answere:
Please help me! |
Beta Was this translation helpful? Give feedback.
Answered by
CodeDredd
Mar 28, 2022
Replies: 1 comment 2 replies
-
@supermavster Heyho do you have an stacktrace for me? I think i know the reason. I am fixing it right away but for fixing it the right way i need to know more. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
CodeDredd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@supermavster Heyho
do you have an stacktrace for me? I think i know the reason. I am fixing it right away but for fixing it the right way i need to know more.