Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fraballi opened this issue Sep 10, 2015 · 0 comments

Comments

@fraballi
Copy link

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 +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant