Home » Web Services » SOAP » Bug #8086
Unable to correctly parse a WSDL
Details
| Submitted | 2006-06-30 09:39 UTC |
|---|---|
| From | simone dot m at lynx2000 dot it |
| Status | Open |
| Package | SOAP |
| PHP Version | 4.4.1 |
| OS | Linux Red Hat 9 |
| Roadmaps | (Not assigned) |
Comments
[2006-06-30 09:39 UTC] simone dot m at lynx2000 dot it
Description:
------------
I'm trying to create a SOAP client from a WSDL created with Apache Axis version: 1.2.1. When I try to create an object directly from the proxy code, PEAR:SOAP returns me the following notice:
Notice: Undefined index: impl in /usr/local/php/lib/php/SOAP/WSDL.php on line 620
The the client doesn't work correctly, and I can't use the web service.
Test script:
---------------
require_once('SOAP/Client.php');
$client = new SOAP_WSDL('http://www.comune.modena.it/autenticationCig/wsdl/AutenticationCig.wsdl');
$proxy = $client->getProxy();
$params = array('ticketCig' => '123456');
$results = $proxy->getDatiUtenteCig($params);
Expected result:
----------------
The script above should create a working object based on the WSDL, but it doesn't work.
With Perl's SOAP::Lite it works correctly.
Actual result:
--------------
Notice: Undefined index: impl in /usr/local/php/lib/php/SOAP/WSDL.php on line 620
[2006-09-30 11:39 UTC] rkramar at gmail dot com
Had the same problem with Google Adwords API WSDLs (e.g. https://sandbox.google.com/api/adwords/v6/CampaignService?wsdl).
From what I see this probably happens because the WSDL file defines two namespaces having the same values: "impl" and "intf" both assigned "https://adwords.google.com/api/adwords/v6".
Since "intf" follows "impl" in the WSDL it seems to have precedence in the resulting tree.
I switched their order to "intf" first and "impl" after that and it solved the problem.
But this is just a manual workaround and will not work if you rely on automatic WSDL updates.
[2007-01-02 22:03 UTC] sean_otoole at yahoo dot com
I'm having a similiar problem. Parsing the following WSDL file, I get "Notice: Undefined index: typens in WSDL.php on line 459". Though unlike simone, I'm still able to use the SOAP client.
PHP 4.3.6, SOAP 0.9.4, OS: Windows 2000NT
Test Script:
$wsdl_url = 'http://192.168.2.49/priority/priority.wsdl';
$WSDL = new SOAP_WSDL($wsdl_url);
$client = $WSDL->getProxy();
$params = array('MYNUMBER' => $gTS);
$results = $client->getMYNUMBER($params);
WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://com/denodo/webservice/priority"
xmlns:typens="http://com/denodo/webservice/priority"
xmlns:wsdlns="http://com/denodo/webservice/priority"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="http://com/denodo/webservice/priority" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<complexType name="Parameters">
<sequence>
<element name="MYNUMBER" type="xsd:string" minOccurs="0"/>
</sequence>
</complexType>
<element name="PRIORITYHTTPReturn1">
<complexType>
<sequence>
<element name="item" type="typens:PRIORITYHTTPReturnRow_1" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<complexType name="PRIORITYHTTPReturnRow_1">
<sequence>
<element name="MYNUMBER" type="xsd:string" minOccurs="0"/>
<element name="MYAMOUNT" type="xsd:string" minOccurs="0"/>
<element name="OPENING" type="xsd:string" minOccurs="0"/>
<element name="STATUS" type="xsd:string" minOccurs="0"/>
<element name="REASON" type="xsd:string" minOccurs="0"/>
<element name="MYTIME" type="xsd:string" minOccurs="0"/>
<element name="MYDATE" type="xsd:string" minOccurs="0"/>
</sequence>
</complexType>
<element name="Parameters" type="typens:Parameters"/>
</schema>
</wsdl:types>
<wsdl:message name="getMYNUMBERRequest">
<wsdl:part name="Parameters" element="typens:Parameters"/>
</wsdl:message>
<wsdl:message name="getMYNUMBERResponse">
<wsdl:part name="getMYNUMBERReturn" element="typens:PRIORITYHTTPReturn1"/>
</wsdl:message>
<wsdl:portType name="priority">
<wsdl:operation name="getMYNUMBER" parameterOrder="Parameters">
<wsdl:input message="wsdlns:getMYNUMBERRequest" name="getMYNUMBERRequest"/>
<wsdl:output message="wsdlns:getMYNUMBERResponse" name="getMYNUMBERResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="prioritySoapBinding" type="wsdlns:priority">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getMYNUMBER">
<wsdlsoap:operation soapAction="http://192.168.2.49/priority/services/priority/getMYNUMBER" style="document" />
<wsdl:input name="getMYNUMBERRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getMYNUMBERResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="priorityService">
<wsdl:port name="priority" binding="wsdlns:prioritySoapBinding">
<wsdlsoap:address location="http://192.168.2.49:8080/priority/services/priority"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>