php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41337 WSDL parsing doesn't ignore non soap bindings
Submitted: 2007-05-09 08:24 UTC Modified: 2009-12-10 21:43 UTC
From: ahayes at emersion dot com dot au Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.2.2 OS: Fedora Core 5
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ahayes at emersion dot com dot au
New email:
PHP Version: OS:

 

 [2007-05-09 08:24 UTC] ahayes at emersion dot com dot au
Description:
------------
Firstly let me just say, I'm am not sure if this is a bug in PHP or Oracle SOA Suite (Oracle seem to think it is PHP however).

I am using Oracle's SOA Suite, and we have a problem every time we try to call WSDL files generated by Oracle's ESB.

The problem occurs when PHP's SoapClient tries to parse the WSDL. I get the following error:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: No address associated with <port> in 
...
...

To fix this problem, all I have to do is remove offending port definition in the WSDL, which does not have an address defined. Once removed, SoapClient can parse the WSDL and call the service. We have many ESB's to call and as such I would like to avoid this if possible.

Should PHP's SoapClient even be looking at this port type as it does no have a SOAP binding?

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

$client = new SoapClient('https://amcms.org/soap/GetHandlerTypeByServiceId.wsdl');

Expected result:
----------------
It parses the WSDL file successfully then allowing calling the service.

Actual result:
--------------
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: No address associated with <port> in /path/to/GetHandlerTypeByServiceId.php on line 10
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: No address associated with <port> in /path/to/GetHandlerTypeByServiceId.php:10
Stack trace:
#0 /path/to/GetHandlerTypeByServiceId.php(10): SoapClient->SoapClient('GetHandlerTypeB...', Array)
#1 {main}
  thrown in /path/to/GetHandlerTypeByServiceId.php on line 10

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-10 15:04 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2007-05-15 03:11 UTC] ahayes at emersion dot com dot au
Thanks for that, it has fixed the problem for the wsdl being imported, however it doesn't seem to hold if you have the following situation:

1. 1.wsdl Imported into SoapClient
2. 1.wsdl imports 2.wsdl using <import namespace="" location="2.wdsl"/> within 1.wsdl.
3. 2.wsdl contains a reference to a port without a soap binding (if that is the correct terminology).

When this situation occurs, the same error is being generated. 

Is it possible that this fix only fixes the problem for wsdl's being imported by SoapClient and not wsdl's being imported by the wsdl itself?
 [2007-05-15 07:22 UTC] dmitry@php.net
Could you please provide a test case.
 [2007-05-16 00:38 UTC] ahayes at emersion dot com dot au
Certainly.

If you try importing the following wsdl you will get a similar error.

http://www.amcms.org/bugs/pear/41337/GetServices.wsdl

If you look at this wsdl it is importing http://www.amcms.org/bugs/pear/41337/GetServices-slide.wsdl which has a port name GetServices_pt which does not have a soap binding.

Thanks
Alex
 [2007-05-21 14:30 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2009-12-10 21:43 UTC] johannes@php.net
Please talk to RedHat if you need fixes. We don't support PHP 5.1 anymore. 5.2 is out for more than three years and we're already on 5.3 ...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC