Skip to main content
Participant
April 7, 2009
Question

Why does Flex change the XML while passing it to a web service?

  • April 7, 2009
  • 1 reply
  • 1154 views

Hi All,

Is it natural for Flex to replace all <, >, and & with &lt;, &gt; and & , respectively, in an XML before passing it as parameter to a web service call?

I invoke a web service through the mx:WebService component and pass a simple XML as parameter

Code:
<b>bhaskar</b>


But, the service receives this as the request parameter

Code:
&lt;b&gt;bhaskar&lt;/b&gt;


Note: I have verified the request using BlaseDS and have also checked the server logs for the request the service received.

So, is there no way Flex can send the original XML?
Note: I read somewhere that to fix some issue they used the approach of replacing all <, >, and & with &lt;, &gt; and & , respectively.

Is there a way out (other than converting the XML received at the server side back to original format, before operating on it)?

This topic has been closed for replies.

1 reply

matt_chotin
Inspiring
April 7, 2009

Hi,

It depends on what property the web service was expecting. Are you passing a String and therefore we're XML-encoding it, or are you passing an XML object?

Note that since this question is really about using Flex and not developing Flex, it's better addressed on Flexcoders or the Flex Discussion forums ( http://forums.adobe.com/community/flex/flex_general_discussion)

Matt

BJG2Author
Participant
April 8, 2009

Hi Matt,

Yes I am sending a string. So, I understand why it is getting XML encoded now.

I have re-posted the thread on Flex General Discussions (here), and expect it to be carried on from there, while this one here can be deleted.

Please see the thread there(I have some more queries)

Thanks

Bhaskar