Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoapClient::$request must not be accessed before initialization #212

Closed
supermavster opened this issue Mar 24, 2022 · 0 comments · Fixed by #213
Closed

SoapClient::$request must not be accessed before initialization #212

supermavster opened this issue Mar 24, 2022 · 0 comments · Fixed by #213

Comments

@supermavster
Copy link

supermavster commented Mar 24, 2022

Hi I have a problem call a method, but I don't have idea how to do it that:

The error is:

Typed property CodeDredd\\Soap\\SoapClient::$request must not be accessed before initialization

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:

Typed property CodeDredd\\Soap\\SoapClient::$request must not be accessed before initialization

Please help me!

CodeDredd added a commit that referenced this issue Mar 28, 2022
* fix(#212): Remove typed property for now that is causing an error

* Fix styling

* Apply fixes from StyleCI (#214)

Co-authored-by: StyleCI Bot <bot@styleci.io>

Co-authored-by: CodeDredd <CodeDredd@users.noreply.github.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant