BeSimple / BeSimpleSoapClient

NOT MAINTAINED - [READ-ONLY] Subtree split of the BeSimpleSoap -- clone into BeSimple/SoapClient/ (master at BeSimple/BeSimpleSoap)
http://besim.pl/
57 stars 54 forks source link

Warning: DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1 #24

Open fraballi opened 9 years ago

fraballi commented 9 years ago

I'm following the tuts in: http://besim.pl/SoapBundle/soapclient/configuration.html

When I need to call wsdl function in Symfony2 the errors comes immediatly.

1) So I validated it in this site: https://www.wsdl-analyzer.com and suposely everything is fine. I think is something inside the client library that fails in parsing the wsdl xml.

2) Also I've tried using this and works fine: $client= new \SoapClient($wsdl); $result = $client->__call('hello', array('name' => 'Scott')); from Symfony2 page example: http://symfony.com/doc/current/cookbook/web_services/php_soap_extension.html

But I find nice your approach to services container use. So I would like this works for me.

Debugging never get passed this line:

$client = $this->container->get('besimple.soap.client.demoapi');

The url supplied for 'wsdl' parameter in 'config.yml' works fine, because I test it separatelly in the browser.

Apache Alias: /soap is for: http://localhost/soap Directory: C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app

Is there any issue with corporative proxy server, do I need to add the exclusions for loopback (127.0.0.1/localhost). It seems like the url arrives corrupted or incomplete.

When I debugged the class: WsdlDownloader, inside the function: download(...,..,..,) I gets 404 Page because something went wrong in this line. In line 102 is where the reponseBody isn't inaccurate. 102: if ($responseSuccessfull) { $response = $this->curl->getResponseBody();

Browser output:

Warning: DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1
  1. in vendor/besimple/soap-client/BeSimple/SoapClient/WsdlDownloader.php at line 159 - private function resolveRemoteIncludes($xml, $cacheFilePath, $parentFilePath = null) { $doc = new \DOMDocument(); $doc->loadXML($xml); $xpath = new \DOMXPath($doc); $xpath->registerNamespace(Helper::PFX_XML_SCHEMA, Helper::NS_XML_SCHEMA);
  2. at ErrorHandler ->handleError ('2', 'DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1', 'C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app\vendor\besimple\soap-client\BeSimple\SoapClient\WsdlDownloader.php', '159', array('xml' => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 404 Not Found

    Not Found

    The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.


    Apache/2.2.22 (Debian) Server at localhost Port 80
    ', 'cacheFilePath' => 'C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app\app\cache\dev/besimple/soap/cache\wsdl_11edfe41ecb929117fc92d0eb4f1e0de.cache', 'parentFilePath' => 'http://localhost/soap/web/app_dev.php/ws/DemoApi?wsdl', 'doc' => object(DOMDocument))) at DOMDocument ->loadXML ('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 404 Not Found

    Not Found

    The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.


    Apache/2.2.22 (Debian) Server at localhost Port 80
    ') in vendor/besimple/soap-client/BeSimple/SoapClient/WsdlDownloader.php at line 159 +

  3. at ErrorHandler ->handleError ('2', 'DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1', 'C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app\vendor\besimple\soap-client\BeSimple\SoapClient\WsdlDownloader.php', '159', array('xml' => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 404 Not Found

    Not Found

    The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.


    Apache/2.2.22 (Debian) Server at localhost Port 80
    ', 'cacheFilePath' => 'C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app\app\cache\dev/besimple/soap/cache\wsdl_11edfe41ecb929117fc92d0eb4f1e0de.cache', 'parentFilePath' => 'http://localhost/soap/web/app_dev.php/ws/DemoApi?wsdl', 'doc' => object(DOMDocument))) at DOMDocument ->loadXML ('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 404 Not Found

    Not Found

    The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.


    Apache/2.2.22 (Debian) Server at localhost Port 80
    ') in vendor/besimple/soap-client/BeSimple/SoapClient/WsdlDownloader.php at line 159 +