Debugging xmlrpc error

jeff_ross wrote on Saturday, May 03, 2008:

I’m getting closer in debugging the httpd errors I’ve been getting in the notes and other fields, and I’ve narrowed it down to, as Dr Bowen suggested a while back, the connection to SQL-Ledger through xmlrpc.

With all of the debugging lines in WSWrapper uncommented, I now see this printed to the screen:
(I’ve removed the username and password, but I can login to SQL-Ledger with the values that are there.)

Array ( [enabled] => 1 [server] => localhost [port] => 80 [url] => /openemr/sql-ledger/ [username] =>  [password] =>  [url_path] => http://wcfm.internal/openemr/sql-ledger/ [income_acct] => 4320 )

<?xml version="1.0"?>
<methodCall>
<methodName>ezybiz.customer_balance</methodName>
<params>
<param>
<value><struct>
<member><name>id</name>
<value><string>0</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>

—GOT—
HTTP/1.1 200 OK
Date: Sat, 03 May 2008 15:47:09 GMT
Server: Apache
X-Powered-By: PHP/5.2.5
Connection: close
Content-Type: text/html; charset=iso-8859-1

<head>
  <title>SQL-Ledger</title>
  <meta http-equiv="refresh" content="0; URL=login.pl">
</head>

<body>
<h2>SQL-Ledger</h2>

<a href=login.pl>Login</a><br>
</body>
</html>

—END—

HEADER: HTTP/1.1 200 OK
HEADER: Date: Sat, 03 May 2008 15:47:09 GMT
HEADER: Server: Apache
HEADER: X-Powered-By: PHP/5.2.5
HEADER: Connection: close
HEADER: Content-Type: text/html; charset=iso-8859-1

XML error: Mismatched tag at line 4
Fault: Code: 2 Reason ‘Invalid return payload: enabling debugging to examine incoming payload’

I’m not very familiar with xml, but I do not see a mismatched tags at all, let alone at line 4, so this error message may be a little misleading.

Thanks,

Jeff Ross

jeff_ross wrote on Saturday, May 03, 2008:

Some mre debugging info…

I found out by reading the xmlrpc.php code that I can set the debug level higher than 1 and get a little more information.

Here is what is missing from the above error message if I crank the level up above 1:

—SENDING—
POST /openemr/sql-ledger/ HTTP/1.0
User-Agent: XML-RPC for PHP 2.2.1
Host: localhost:80
Authorization: Basic cHdoaXRlOjIwcHdoaXRlMDg=
Accept-Encoding: gzip, deflate
Accept-Charset: UTF-8,ISO-8859-1,US-ASCII
Content-Type: text/xml
Content-Length: 133

<?xml version="1.0"?>
<methodCall>
<methodName>ezybiz.customer_balance</methodName>
<params>
<param>
</param>
</params>
</methodCall>
—END—

—GOT—
HTTP/1.1 200 OK
Date: Sat, 03 May 2008 21:47:04 GMT
Server: Apache
X-Powered-By: PHP/5.2.5
Connection: close
Content-Type: text/html; charset=iso-8859-1

<head>
  <title>SQL-Ledger</title>
  <meta http-equiv="refresh" content="0; URL=login.pl">
</head>

<body>
<h2>SQL-Ledger</h2>

<a href=login.pl>Login</a><br>

</body>
</html>

—END—

HEADER: date: Sat, 03 May 2008 21:47:04 GMT
HEADER: server: Apache
HEADER: x-powered-by: PHP/5.2.5
HEADER: connection: close
HEADER: content-type: text/html; charset=iso-8859-1

XML error: Mismatched tag at line 4, column 8

I *still* don’t see any mismatched tags though, but I probably do not know what I’m really looking for, either :slight_smile:

Jeff