shyim / shopware-docker

Easy to use Docker Installation for Shopware 5 and Shopware 6
MIT License
115 stars 27 forks source link

Using SOAP requests does not load #67

Closed zaifastafa closed 3 years ago

zaifastafa commented 3 years ago

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://some-path-here?wsdl' : failed to load external entity. I gogoled a bit, and found that it is due to some SSL issue. So I added the options:

$options = [
            'cache_wsdl' => WSDL_CACHE_NONE,
            'trace' => 1,
            'stream_context' => stream_context_create(
                [
                    'ssl' => [
                        'verify_peer' => false,
                        'verify_peer_name' => false,
                        'allow_self_signed' => true
                    ]
                ]
            )
        ];

        $wsdlUrl = $this->getConfig('apiUrl');

But it still does not work. On a live server it is working after adding the ssl options, but not on the docker setup.

shyim commented 3 years ago

Can you provide an example script? Never used soap since 3 years 😅

zaifastafa commented 3 years ago

No unfortunately I cannot disclose that link (client's requirement) but I think you can try any available ?wsdl url. Seems like it is not able to communicate outside the container for soap requests.

shyim commented 3 years ago

Test Script:

<?php
$client = new SoapClient("https://www.dataaccess.com/webservicesserver/NumberConversion.wso?wsdl");

var_dump($client->NumberToWords(['ubiNum' => 100]));

Output:

object(stdClass)#10 (1) {
  ["NumberToWordsResult"]=>
  string(12) "one hundred "
}

See no problem so far

zaifastafa commented 3 years ago

Hmm, so what could it be that is causing the issue at my end? It is working on a live server but not through my docker setup.

zaifastafa commented 3 years ago

It is working now for some reason - weird.