Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@supermavster

Description

@supermavster

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions