cancel
Showing results for 
Search instead for 
Did you mean: 

SoapFault Object looks like we got no XML document

SoapFault Object looks like we got no XML document

I need the api. 

Using

<?php

$url = 'https://foo.com/api/v2_soap/?wsdl';

$client = new SoapClient($url);

try {
    //retreive session id from login
    $session_id = $client->login('username','password');
} catch (SoapFault $fault) {
    $error      =   "SOAP Fault: (faultcode: {$fault->faultcode}\n" ."faultstring: {$fault->faultstring})";
    echo $error;
}

Php version 5.4.17.1

Magento version Enterprice 1.13.1.0

And I've created soap user and role.Resource Access All

If i execute url in browser https://foo.com/api/v2_soap/?wsdl , I've recived default xml file.

After trying to connect with my script I've got SOAP Fault: (faultcode: Client faultstring: looks like we got no XML document)

3 REPLIES 3

Re: SoapFault Object looks like we got no XML document

  1. Do you have PHP SOAP installed?
  2. Try https://foo.com/api/v2_soap/?wsdl=1

 

 

6x certified Magento Specialist.
Nigel Boulton, Magento Solution Specialist

Re: SoapFault Object looks like we got no XML document

http://www.awesomescreenshot.com/image/915558/b469f0e6c80edaaabd422f00ec5a2690

SOAP is enabled.

in browser adress url myurl.com/api/v2_soap/?wsdl and i've got a huge xml file but in <soap:address location="https://www.myurl.com/somefile_index.php/api/v2_soap/index/?SID=4pt4vbbqku1v34qg0604qu1um3%22/%3E"; This file somefile_index.php is exist in root dir but i can't understand why it is called. Server is - nginx. Maybe the issue on the server's side?!

Re: SoapFault Object looks like we got no XML document

I 've turned off Auto redirect to base url and I've got a new message SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.myurl.com/index.php/api/v2_soap/?wsdl' : xmlParseEntityRef: no name"