Forum Discussion
nmrao :P but u have activeMQ locally installed on your machine, and I'm using remote activeMQ in the browser, i believe there is difference, and lack of posts how send JMS to remote activeMQ
ENDPOINT to be used in soapui
http://activeMQhost/ip:8161/api/message/TEST?type=queue
with credentials.
- Emil918 years agoContributor
nmrao You sure this is correct ENDPOINT: http://activeMQhost/ip:8161/api/message/TEST?type=queue ??
I was using http://192.168.0.000:81611/api/message <-- Ip is only example, same about port, but I don't have clue what
TEST?type=queue is, perhaps "TEST" is the name of queue??? or I'm wrong :P?
Anyway I Wonder If i need to set up in activeMQ config so i can send messages via REST, perhaps it should be default set, but
seems like someone was doing some changes in activeMQ which I'm using, so I'm not sure if REST protocol is set up.
By the way yesterday i tried to configure hermesJMS, and it seems like I'm close to set it up, I'm getting such error atm:
hermes.hermesException
Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [root exception is java.rmi.ConnectException: non-JRMP server at remote endpoint]Well I've done some research on google, and seems like JMX thing is not activated? in configuration of my activeMQ? If that would solve my problems I would be glad :P
Thx for suport, cheers
Best regards
Emil
- Emil918 years agoContributor
Hmm finally I found way to send something into my aciveMQ using soapUI REST service... I used such url
http://admin:admin@192.168.XX.XXX:XXXX/api/message?destination=queue://example.queue1
And seems like its arriving in activeMQ queue, but my service is throwing an error:
[ERROR]: Sending nonsuccessful response:
Unable to parse provided JSON, exception message:
Unexpected end-of-input at input index 0 (line 1, position 1), expected JSON Value:#012#012^is there any way that soapUI is adding some sort of additional metadata to the request? And service which I'm testing can't parse it?? :|
This is how my Json script looks like, and I'm trying to send it through soapUI REST:
{"uuid": "id", "requestType": "geocode",
"data": {
"source": "geoportal",
"address": "GdaĆsk Grunwaldzka 25"
}
}Well I tried to send it as string and as JSON, same result, thx in advance for advices, cheers
Best regards
Emil
- Emil918 years agoContributor
nmraoWell i figured out how to send message as REST post request, and it's going directly there where it should, :P seems like I don't really need hermesJMS, the only thing which I have to now is to consume message from topic, to be able to see response after i send request, so i can put some assertions and finally start creating some groovy scripts :P...
groovyguyThank You for link to new hermesJMS article, well seems like it's working but perhaps I'm doing something wrong, anyway i found a way to send such request using REST and post request, thanks for support.
Best regards
Emil
- nmrao8 years agoChampion Level 3Based on the link that you first posted, with my little understanding, I was persistently saying what is needed, looks you were little anxiously doing keep all sorts of things. Any ways, a good experience though.
May that REST on ActiveMQ is not clear enough or need a prior broader understanding to get what was written there. - Emil918 years agoContributor
nmraogroovyguyGuys any of you know how to recieve result from activeMQ topic using REST service and GET method??? What exactly do i need to put inside "name" and "value" in GET request...
Service which I'm testing now is working as Message goes to QUEUE and from queue it goes to TOPIC.
URL for method GET which i tried to use to recieve result: http://admin:admin@192.168.5.190:8161/api/message?destination=topic://topic:test.topicreply1
Perhaps service isn't working correctly, thats why I can't recieve answer... When I'm using GET method after 5-10 sec I'm reciving that: HTTP/1.1 204 No Content , :| Well I dont have much experience working with activeMQ maybe someone on this forum might help me? All i want is possibility to recieve result in soapUI :<
- nmrao8 years agoChampion Level 3Unfortunately only documentation is the source and need to follow the same.
Have you checked with your team to know why is not working? - groovyguy8 years agoCommunity Hero
Emil91: Unfortunately you're stepping out of the realm of knowledge this forum has (Smartbear products, and specifically here SoapUI NG Pro.) You may be better off asking this question in a support area for ActiveMQ. nmrao is right, we're going to have to read the same documentation since we aren't familiar with ActiveMQ.
You may want to check out the ActiveMQ forums here.
- nmrao8 years agoChampion Level 3Just strike a thought.
topic channel is used to distribute multiple subscribers.
By the time you hit get request, the message on the topic might lost unless if that is durable topic. See if this applicable in your case.
You may read more about it online. - Emil918 years agoContributor
nmrao Well thank you for this idea, I tried to set it :P as you said, but seems like there is no need... Finally i figured out how to send POST(request) and send GET(receive consumed result).
groovyguy Thank you anyway for trying :P.
I will paste it here, perhaps someone in future will have similar problem.
http://admin:admin@192.168.X.XXX:8161/api/message?destination=queue://test.queue <-- This is request lets say for method PING, I'm not including JSON code here due to company politics, but lets say that someone have method PING and have to send it as POST, above URL will do the rest.
http://192.168.X.XXX:8161/api/message/test.topic?type=topic&clientId=ID:WIN-XXXXXXXX-XXXXX-XXXXXXXXX-X:X:X:X:X\&json=true <-- This is request for method GET, in my case i don't need to use any parameters, all i have to do is use that URL, and i will receive result in JSON format.
All I have to do now is create some sort of groovy script which will be able to compare address with coordinated (longitude and latitude)... Let's say that I'm sending Address and receiving coordinates, is there any way to compare if latidude and longitude belong to this address?? That would be very useful, but i think its pretty complicated.
Best regards
Emil