C
C
ChernovGV2015-09-10 07:00:45
PHP
ChernovGV, 2015-09-10 07:00:45

Php SOAP, how to authorize on all used domains in WSDL?

Good afternoon.
You need to send an envelope to the SOAP service. The conditions are as follows:
There is a stunel through which the tunnel is forwarded to the domainA domain. now through 127.0.0.1:8080 I am accessing this domain.
And so, I'm trying to create a soap client:

$location = 127.0.0.1:8080/some?wsdl
             $client = new SoapClient($location, array('trace' => 1, 'location'=>$location, 'login' => $login, 'password' => $pass));

And the exception comes out:
SOAP-ERROR: Parsing Schema: can't import schema from ' https://domainB/some.xsd '

I look at the contents of 127.0.0.1:8080/some?wsdl, several .xsd files are connected there on another domain. OK.
I'm trying to create a project in SoapUI, I enter 127.0.0.1:8080/some?wsdl, I enter the login password everything is OK, then the authorization window comes out again for the file https://domainB/some.xsd, I enter the same login again password, then for several more files, and the whole project has been created, and the service begins to correctly respond to requests.
The output needs to be authorized not only in the WSDL itself, but also for each file used in the WSDL. In SoapUI this is done by hand, but how to do it with php?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
ChernovGV, 2015-09-11
@ChernovGV

In general, I solved the issue with the help of:
https://packagist.org/packages/phpforce/soap-client
The script downloads all used files to the cache and everything works fine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question