php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46130 SOAP-ERROR: Parsing WSDL
Submitted: 2008-09-19 20:03 UTC Modified: 2009-09-17 01:00 UTC
Votes:26
Avg. Score:4.5 ± 0.7
Reproduced:23 of 25 (92.0%)
Same Version:6 (26.1%)
Same OS:7 (30.4%)
From: cfelce at gmail dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2CVS-2008-09-19 (CVS) OS: GNU/Linux Ubuntu fesity
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-09-19 20:03 UTC] cfelce at gmail dot com
Description:
------------
Hi experts, 

I'm having some issues loading a wsdl file of a sap webservice and 
the error comes as follows:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing 
WSDL: Unknown required WSDL extension 
'http://schemas.xmlsoap.org/ws/2004/09/policy' in /var/www/ws3.php:4 
Stack trace: #0 /var/www/ws3.php(4): SoapClient-
>SoapClient('zws_panda.wsdl', Array) #1 {main} thrown in 
/var/www/ws3.php on line 4




Reproduce code:
---------------
<?php

$client = new SoapClient('zws_panda.wsdl', array('login' => "cfelce", 'password' => "XXXXXX", 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP, 'encoding' => 'utf-8' ));

print($client->ZWsPanda("123456789"));


?>

Expected result:
----------------
Information about the client

Actual result:
--------------
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing 
WSDL: Unknown required WSDL extension 
'http://schemas.xmlsoap.org/ws/2004/09/policy' in /var/www/ws3.php:4 
Stack trace: #0 /var/www/ws3.php(4): SoapClient-
>SoapClient('zws_panda.wsdl', Array) #1 {main} thrown in 
/var/www/ws3.php on line 4

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-22 17:04 UTC] omabil at gmail dot com
Hello everybody,
someone has found some solution for this problem?
Thanks a lot,
--
Omabil
 [2008-12-31 11:12 UTC] omabil at gmail dot com
Hello everybody,
the work-around we used to avoid this problem is by using the standard sap wsdl instead of the ws-policy one.
By replacing the "wspolicy" word by "standard" in the url of the wsdl we've got a second wsdl which doesn't use the ws policies.
Regards,
--
Omabil
 [2009-03-11 19:35 UTC] michael dot schramm at gmail dot com
Same thing happens with PHP version 5.2.6:

SOAP-ERROR: Parsing WSDL: Unknown required WSDL extension 'http://schemas.xmlsoap.org/ws/2004/09/policy'

Changing the Service is not always an option!
 [2009-06-24 11:22 UTC] sjoerd-php at linuxonly dot nl
Thank you for your bug report.

The message "Unknown required WSDL extension" means that the WSDL uses some extension and specifies that the client MUST understand it in order to use the service. Appearantly, PHP SoapClient does not understand the extension, thus causing this error.

Please provide the WSDL or information about the required extension.
 [2009-09-09 18:33 UTC] sjoerd@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2009-09-17 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-02-23 14:45 UTC] sebasg37 at gmail dot com

 [2012-02-09 13:14 UTC] rw at lightwerk dot com
Changing the <wsp:UsingPolicy wsdl:required="true"/> tag to 
<wsp:UsingPolicy wsdl:required="false"/> works, but we have to edit every wsdl 
file manually. 

This is not feasibly in complex environments.
 [2013-11-26 14:05 UTC] fuermann at med dot uni-muenchen dot de
Apparently, the unknown required WSDL extension is "wsp", as you can see in the following excerpt of the WSDL file generated by SAP:

(Code was rejected by the bug system - next try in following message)

Is it possible to add the "wsp" capability to the SoapClient in PHP?
 [2013-11-26 14:10 UTC] fuermann at med dot uni-muenchen dot de
Here is the WSDL snippet:

<wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
...
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
...
<wsp:UsingPolicy wsdl:required="true"/>
...
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 14:02:33 2014 UTC