How to php soap-error parsing schema can't import schema from (PHP Scripting Language)

Follow Icon
Edit IconEdit
Message IconMessage
Report IconReport

Available Answers: 1

Answer #1#
Mumbai, India
1
Description:
2
------------
3
here is my problem: i want to access a soap-service via https://connect.example.com/portal/portal?wsdl 
4
5
with php 5.3.3 my script worked, with 5.3.10 it does not work anymore.
6
7
in the xml returned:
8
9
<service name="PortalService">
10
<port name="PortalPort" binding="tns:PortalPortBinding">
11
<soap:address location="http://connect.example.com:80/portal/portal"/>
12
</port>
13
</service>
14
</definitions>
15
16
so there is a http and not a https location. is this wrong?
17
i am not sure, whether this should work in general (using https but with a http-location). we use a soapservice from an extern service provider which requires us to use https for the calls.
18
19
in my php script i used
20
21
$client = new SoapClient('https://connect.example.com/portal/portal?wsdl',
22
        array(  'proxy_host' => 'myproxy',
23
                'proxy_port' => '8080',
24
                'trace' => 1,
25
                'exceptions' => 1,
26
                // actual use https-endpoint
27
                'location' => 'https://connect.juris.de/jportal/ws/fvportalnrw'
28
));
29
30
31
with php 5.3.3 i could create the soapclient and do my requests. the wsdl is downloaded and cached in /tmp. with php 5.3.10 i get:
32
33
PHP Fatal error:  SOAP-ERROR: Parsing Schema: can't import schema from 'http://connect.example.com:80/portal/portal?xsd=1' in ./t.php on line 9
34
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'http://connect.example.com:80/portal/portal?xsd=1' in ./t2.php:9
35
36
so the schema could not be downloaded! 
37
38
what's wrong here? was it a bug in 5.3.3 - and it should not have worked there - or is it a bug in 5.3.10 (same for 5.3.8). 
39
40
if i used php 5.3.3 to access the service, a wsdl is cached in /tmp and then i can call the script with php 5.3.10.
41
42
43
44
45
Test script:
46
---------------
47
<?php
48
$client = new SoapClient('https://connect.example.com/portal/portal?wsdl',
49
        array(  'proxy_host' => 'myproxy',
50
                'proxy_port' => '8080',
51
                'trace' => 1,
52
                'exceptions' => 1,
53
                // actual use https-endpoint
54
                'location' => 'https://connect.juris.de/jportal/ws/fvportalnrw'
55
));
56
print_r($client);
57
?>
58
59
Expected result:
60
----------------
61
SoapClient Object
62
(
63
    [_proxy_host] => myproxy
64
    [_proxy_port] => 8080
65
    [trace] => 1
66
    [_soap_version] => 1
67
    [sdl] => Resource id #9
68
)
69
70
71
Actual result:
72
--------------
73
PHP Fatal error:  SOAP-ERROR: Parsing Schema: can't import schema from 'http://connect.example.com:80/portal/portal?xsd=1' in ./t.php on line 9
74
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'http://connect.example.com:80/portal/portal?xsd=1' in ./t2.php:9
75
76
(4)
Edit IconEdit
Comment IconComment
Report IconReport


Related Questions

Disclaimer

  1. Phone number or email id included in the answer(s) are not verified by us. Before calling on the mentioned number or sending an email do your own research and be confirm you calling or sending mail to right person or company.
  2. Answer(s) may contain affiliate links. By clicking such link, you will be redirected to third party website. If you make any purchase then the answer publisher or we may earn little amount of commission.