activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tapaswini.sabat" <tapaswini.saba...@gmail.com>
Subject Re: Problem with Ajax API
Date Fri, 28 Dec 2012 12:42:12 GMT
@Dejanb
Thanks for your reply.But still I have some more doubt.
As per the link given by you
(
https://developer.mozilla.org/en-US/docs/JavaScript/Same_origin_policy_for_JavaScript).
 the problem is basically either due to different host, or port no or
protocol. so instead of having the uri as "http://localhost:8161/demo/amq"
if I can specify the uri from my webproject origin then problem can be
resolved . Can you please suggest How can I achieve these things? Here I
got one more doubt i.e as specified in http://activemq.apache.org/ajax.html

"The AMQ AjaxServlet needs to be installed in your webapplications to
support JMS over Ajax" What i need to do for these things?



Thanks
Tapaswini

On Fri, Dec 28, 2012 at 4:08 PM, dejanb [via ActiveMQ] <
ml-node+s2283324n4661156h42@n4.nabble.com> wrote:

> Hi,
>
> it seems like you're experiencing "same origin policy" restriction
> (
> https://developer.mozilla.org/en-US/docs/JavaScript/Same_origin_policy_for_JavaScript).
>
> You need to connect to the broker on the same domain in which your js
> code is hosted.
>
>
> Regards
> --
> Dejan Bosanac
> ----------------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4661156&i=0>
> Twitter: @dejanb
> Blog: http://sensatic.net
> ActiveMQ in Action: http://www.manning.com/snyder/
>
>
> On Fri, Dec 28, 2012 at 6:01 AM, tapaswini.sabat
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=4661156&i=1>>
> wrote:
>
> > Hi All,
> >
> > I'm new to the ActiveMQ field. Am able to create a client,publish and
> > subscribe the data through websocket. But the same am trying to achieve
> > through amq. Am not using any java code in my project. can i achieve
> this by
> > a js file only ?
> >
> > my code in the script file is something like this:
> >
> >
> >
> >
> >
> >
> > </head>
> > </html>
> >
> >
> > Now if i run this code i don't see anything on the browser and on the
> Chrome
> > Javascript debugger i get this error :
> >
> > XMLHttpRequest cannot load http://localhost:8161/demo/amq. Origin
> > http://swp.local is not allowed by Access-Control-Allow-Origin.
> >
> > Can anybody know what might be the problem?
> >
> > Thanks
> > Tapaswini
> >
> >
> >
> > --
> > View this message in context:
> http://activemq.2283324.n4.nabble.com/Problem-with-Ajax-API-tp3155676p4661152.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/Problem-with-Ajax-API-tp3155676p4661156.html
>  To unsubscribe from Problem with Ajax API, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3155676&code=dGFwYXN3aW5pLnNhYmF0MDZAZ21haWwuY29tfDMxNTU2NzZ8LTEzODkzMTMzMzQ=>
> .
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-with-Ajax-API-tp3155676p4661159.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message