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

Invalid XML error #3

Closed
graphem opened this issue Aug 15, 2014 · 9 comments
Closed

Invalid XML error #3

graphem opened this issue Aug 15, 2014 · 9 comments
Assignees
Labels

Comments

@graphem
Copy link

graphem commented Aug 15, 2014

I often get this kind of issue when using the search module with saved search:
search->getSavedSearchResults

Fatal error: Uncaught exception 'Infusionsoft\InfusionsoftException' with message 'Invalid XML. Expected one of "string", "array", "struct", "int", "biginteger", "i8", "i4", "i2", "i1", "boolean", "double", "float", "bigdecimal", "dateTime.iso8601", "dateTime", "base64", "nil", "dom", "#text", got "value" on depth 9 (context: "")' in \infusionsoft-php\src\Infusionsoft\Infusionsoft.php on line 350

So I am not sure if this is caused by Infusionsoft API or the data that is returned. Is there any way to deal with this? Seems to occur only on special fields. E.g.: I have a saved search on Credit Card report and the error occurs when the field Exp is in the fields return array (which is the expiration date string field).

@mfairch
Copy link
Contributor

mfairch commented Aug 15, 2014

It appears to be data related on this one. If the Exp field is empty it will return the error.

Exp

@graphem
Copy link
Author

graphem commented Aug 15, 2014

Ok so mostly this will affect any api calls function that returns empty fields? Anything that can be done or it is an Isoft API issue?

@mfairch
Copy link
Contributor

mfairch commented Aug 15, 2014

Quite Possible. We will keep digging into this and see what we can do for it.

@graphem
Copy link
Author

graphem commented Aug 15, 2014

Ok thanks, by the way I love this new isoft php sdk, easy to use and more standard to PHP, great work.

@skeemer
Copy link
Contributor

skeemer commented Feb 5, 2015

@liambanter
Copy link

I'm getting the same error when I add someone to a campaign through the funnelservice but the call is being made correctly and is successful.

So I'm getting a fatal error even though the process is working fine.

Fatal error: Uncaught exception 'Infusionsoft\Http\HttpException' with message 'exception 'fXmlRpc\Exception\RuntimeException' with message 'Invalid XML. Expected one of "string", "array", "struct", "int", "biginteger", "i8", "i4", "i2", "i1", "boolean", "double", "float", "bigdecimal", "dateTime.iso8601", "dateTime", "base64", "nil", "dom", "#text", got "value" on depth 9 (context: "")' in /var/www/html/fuel/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Exception/RuntimeException.php:33 Stack trace: #0 /var/www/html/fuel/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Parser/XmlReaderParser.php(81): fXmlRpc\Exception\RuntimeException::unexpectedTag('value', Array, 9, '') #1 /var/www/html/fuel/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Client.php(159): fXmlRpc\Parser\XmlReaderParser->parse('<?xml version="...', false) #2 /var/www/html/fuel/vendor/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php(28): fXmlRpc\Client->call('FunnelService.a...', Array) #3 /var/www/html/fuel/vendor/infusionsoft/php-sdk/src/Infusionsoft in /var/www/html/fuel/vendor/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php on line 34

Ideas?

@safoo
Copy link

safoo commented May 8, 2015

+1 on this issue. I receive the same XML error on a getSavedSearchResults call when a returned column has an empty value.

Here is the fix lstrojny/fxmlrpc#36

@liambanter
Copy link

This seems to be an issue with the conversion to java from a weakly typed language like php... Make sure your values are the exact type the API is expecting.

@mfairch
Copy link
Contributor

mfairch commented Jun 9, 2015

We just pushed a fix for this to the develop branch. Please note: due to the fix in the fxmlrpc library, it now requires PHP 5.4 as a minimum requirement to use it.

Please see commit f6c582a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants