Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Ambiguous refernce to mxml:HTTPService

Avatar

Level 1
In Flex Builder 3, I get "Can not resolve a multiname
reference unambiguously." when I include:



<mx:HTTPService

id="data"

method="POST"

url="data.php">

</mx:HTTPService>



The error text is:



Can not resolve a multiname reference unambiguously.
mx.rpc.http.mxml:HTTPService (from /Applications/Adobe Flex Builder
3/sdks/3.0.0/frameworks/libs/rpc.swc(mx/rpc/http/mxml/HTTPService))
and mx.rpc.http:HTTPService (from /Applications/Adobe Flex Builder
3/sdks/3.0.0/frameworks/libs/rpc.swc(mx/rpc/http/HTTPService)) are
available. FeralHiveProject/src BeeLine.mxml Unknown 1212335979836
469



Can not resolve a multiname reference unambiguously.
mx.rpc.http.mxml:HTTPService (from /Applications/Adobe Flex Builder
3/sdks/3.0.0/frameworks/libs/rpc.swc(mx/rpc/http/mxml/HTTPService))
and mx.rpc.http:HTTPService (from /Applications/Adobe Flex Builder
3/sdks/3.0.0/frameworks/libs/rpc.swc(mx/rpc/http/HTTPService)) are
available. FeralHiveProject/src BeeLine.mxml Unknown 1212335979838
470





Seems FB is confused between mx.rpc.http:HTTPService and
mx.rpc.http.mxml:HTTPService



7 Replies

Avatar

Level 1
I think I see what is causing the error but I"m still not
sure how to resolve the ambiguity. I have the following in an
included .as script:



import mx.rpc.http.HTTPService;

private var svc:HTTPService = new HTTPService();



How do I use mx.rpc.http.HTTPService in the script and
mx.prc.http.mxml.HTTPService in mxml without causing
confusion?

Avatar

Former Community Member
any solution to this problem.. i have the same problem. I`m
using this code for a login statlement:

<mx:HTTPService

id="login_user"

result="checkLogin(event)"

method="POST"

url="
http://localhost/login.php"

useProxy="false" showBusyCursor="true">

<mx:request xmlns="">

<username>{username.text}</username>

<password>{password.text}</password>

</mx:request>

</mx:HTTPService>



and in the .as file i have this code from a sample datagrid
which is populated from a database:

..........

private var gateway:HTTPService = new HTTPService();



/**

* the array collection holds the rows that we use in the
grid

*/

[Bindable]

public var dataArr:ArrayCollection = new ArrayCollection();



.......

Avatar

Former Community Member
that's because you are theoretically including two
HTTPService Services in your file, which are located under
different packages, (one is mxml version ) so, for AS version Flex
does not know should it use mx.rpc.http.mxml.HTTPService or
mx.rpc.http.HTTPService that means you need toexplicitly inline the
package for AS version of HTTPService like this :

private var gateway:mx.rpc.http.HTTPService = new
mx.rpc.http.HTTPService();

Avatar

Level 2

quote:




Originally posted by:
dowenk


I think I see what is causing the error but I"m still not
sure how to resolve the ambiguity. I have the following in an
included .as script:



import mx.rpc.http.HTTPService;

private var svc:HTTPService = new HTTPService();



How do I use mx.rpc.http.HTTPService in the script and
mx.prc.http.mxml.HTTPService in mxml without causing confusion?






Avatar

Former Community Member
@ grkkrishna you should use this:

private var svc:mx.rpc.http.HTTPService = new
mx.rpc.http.HTTPService();

instead of this:

private var svc:HTTPService = new HTTPService();



it`s just an opinion but. i think it will fix your ambiguity
error.