php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57406 [WSDL] SOAP-ERROR: Parsing WSDL: Unexpected WSDL element address
Submitted: 2006-11-29 08:57 UTC Modified: 2006-12-01 10:31 UTC
From: mfp@php.net Assigned: tuscany (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.1.6 OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
37 - 24 = ?
Subscribe to this entry?

 
 [2006-11-29 08:57 UTC] mfp@php.net
Description:
------------
Whenever the we use the soapclient to load WSDL we have generated we get a SoapFault with the text:

"[WSDL] SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <address> "

The root cause seems to be that the WSDL has changed between 1.0.4.and 1.1.0. 

The reproduce code generates a small amount of WSDL. The <address> element is created in the SOAP namespace and in 1.0.4 output it is prefaced with "tns2:", in the 1.1.0 output it is not. Possibly this is still correct WSDL, I don't know, but anyway the net effect is that the PHP soap client will not load this WSDL and the SOAP half of SCA does not work.


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

// you also need the three xsds out of SCA

define('SOAP_NAMESPACE', 'http://schemas.xmlsoap.org/wsdl/soap/');

$xmldas        = SDO_DAS_XML::create('wsdl-all.xsd');
$wsdl_doc      = $xmldas->createDocument();
$wsdl          = $wsdl_doc->getRootDataObject();
$service       = $wsdl->createDataObject('service');
$port          = $service->createDataObject('port');
$soap_address  = $xmldas->createDataObject(SOAP_NAMESPACE, 'tAddress');
$soap_address->location = 'http://example.com';
$port->address = $soap_address;

echo phpversion('sdo') . "\n";
echo $xmldas->saveString($wsdl_doc,2);
?>

Expected result:
----------------
this is what we get with 1.0.4

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xsi:type="tDefinitions" xmlns:tns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns2="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <service>
    <port>
      <tns2:address xsi:type="tAddress" location="http://example.com"/>
    </port>
  </service>
</definitions>

Actual result:
--------------
this is what we get with 1.1.0

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns2="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <service>
    <port>
      <address xsi:type="tns2:tAddress" location="http://example.com"/>
    </port>
  </service>
</definitions>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-29 09:56 UTC] mfp@php.net
For info, the second of the SCA samples that we ship also catches this:

Calling a remote SCA component using a PHP script.

Attempting to access HelloService, to trigger the automatic generation of WSDL for this component...

Calling HelloService as a Web service...

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <address> in c:\php\PEAR\SCA\SCA_SoapProxy.php:136 Stack trace: #0 c:\php\PEAR\SCA\SCA_SoapProxy.php(136): SoapClient->SoapClient('C:\Program File...', Array) #1 c:\php\PEAR\SCA\SCA.php(241): SCA_SoapProxy->__construct('C:\Program File...') #2 C:\Program Files\Apache Group\Apache2\htdocs\Samples\ScriptCallingRemoteSCAComponent\HelloClient.php(37): SCA::getService('./HelloService....') #3 {main} thrown in c:\php\PEAR\SCA\SCA_SoapProxy.php on line 136
 [2006-12-01 10:31 UTC] cem@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

I've checked a fix into HEAD. Will update the package soon.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC