Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Flex - httpservice error while getting xml

Posted on 2009-02-18
Medium Priority
Last Modified: 2013-11-10
I'm using php to return xml. When I use this php to fetch data from localhost from flex, I get below error:] Unable to load datasource, [FaultEvent fault=[RPC Fault faultString="Error #1085" faultCode="Client.CouldNotDecode" faultDetail="null"] messageId="C3830F4F-D4D1-4499-91A5-8B84FE3D771E" type="fault" bubbles=false cancelable=true eventPhase=2

Suggest me if I'm doing anything wrong here.

below is the code for fetch.php:
<?php header('Content-type: text/xml'); ?>
<?xml version="1.0" encoding="utf-8"?>
	<item a="1" b="2" />
	<item a="3" b="4" />

Open in new window

Question by:SimonHowald
LVL 49

Accepted Solution

Roonaan earned 2000 total points
ID: 23684766
What does fetch.php give you when you call it manually?
When you have asp_short_tags on, you might actually get a php error. You should then change your php to:
  header('Content-type: text/xml');
  echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>';
        <item a="1" b="2" />
        <item a="3" b="4" />

Another problem might be that your php file itself is not valid utf-8. But that is rarely the case.


Expert Comment

ID: 24804713
It seems like there is an incorrect call being made to the file in Flex. Can you post the code you are using to call the file.

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question