Coder Social home page Coder Social logo

Comments (6)

rb-cohen avatar rb-cohen commented on July 30, 2024

Could you echo out $string before line 12 and just check it is valid XML/what the response was?

from php-ssrs.

RocheR2D2 avatar RocheR2D2 commented on July 30, 2024

Hi, thanks, I use symonfy , and in my controller,

public function indexAction(Request $request)
{
    $ssrs = new Report("http://LAPTOP-48KMKF8K:8090/ReportService", array('username' => 'xxxx', 'password' => 'xxxx'));

    dump($ssrs);

    die();

    return $this->render('reports/index.html.twig', [
        'ssrs' => $ssrs
    ]);

and the result:

ReportingController.php on line 30:
Report {#663 ▼
+servicePath: "ReportService2010.asmx"
+executionPath: "ReportExecution2005.asmx"
+options: array:4 [▼
"cache_wsdl_path" => null
"cache_wsdl_expiry" => 86400
"curl_options" => []
"hijackActionUrls" => false
]
#_baseUri: "http://LAPTOP-48KMKF8K:8090/ReportService"
#_username: "xxxx"
#_passwd: "xxxx"
#_soapService: null
#_soapExecution: null
#_executionNameSpace: "http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices"
#_headerExecutionLayout: "%s"
#_sessionId: null

I don't understant why _soapService is null. And i can't call the function << $ssrs->listChildren('/Report Folder');>> , it will give me error " String could not be parsed as XML"

THANKS !!!!

from php-ssrs.

rb-cohen avatar rb-cohen commented on July 30, 2024

It is the $string variable in vendor\chartblocks\php-ssrs\library\SSRS\Soap\ServerException.php we need to dump out.

So from your first code sample, we'd want to change it to the following temporarily just to see what your response is.

public $faultcode;    
public $faultstring;    
public $faultactor;    
  static function fromResponse($string) {        
            var_dump($string);
            exit;

            $xml = new \SimpleXMLElement($string);        
            $ns = $xml->getNamespaces(true);        
            $soap = $xml->children($ns['soap']);        
            $body = $soap->Body->children($ns['soap']);        
                if (isset($body->Fault)) {

We may need to make some changes to the library to handle non-XML response a little better but it would help to see what sort of response you're getting.

from php-ssrs.

RocheR2D2 avatar RocheR2D2 commented on July 30, 2024

ok thanks a lot. I tried to dump it. This is the result:

string(0) ""

from php-ssrs.

leith avatar leith commented on July 30, 2024

@RocheR2D2 does my fix on #33 resolve your issue?

from php-ssrs.

RocheR2D2 avatar RocheR2D2 commented on July 30, 2024

from php-ssrs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.