Skip to content

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

@fraballi

Description

@fraballi

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' => ' <title>404 Not Found</title>

    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 (' <title>404 Not Found</title>

    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' => ' <title>404 Not Found</title>

    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 (' <title>404 Not Found</title>

    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 +

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions