Project

General

Profile

How to run 1.0.0 version

Igor Khomenko
Added over 4 years ago

I followed that guide https://projects.tigase.org/projects/tigase-http-api/wiki/Configuration for 1.0.0 version

I use Tigase 5.2.0

My config is:

--comp-name-3=rest
--comp-class-3=tigase.http.rest.RestMessageReceiver
rest/use-local-server[B]=true

then restarted Tigase and see next logs:

...
HttpServer.setProperties()         WARNING:  no HttpRegistrator instance where useLocal = true
...
Loading component: rest :: componentInfo{Title=Tigase HTTP API component: Tigase HTTP API component, Version=1.0.0-b24/19ddb697, Class=tigase.http.rest.RestMessageReceiver}
...

not sure what does this warning mean, but looks like this component was loaded

Next I'm trying to list all available commands, for example my Tigase domain is tigasestage.mycompany.com

Here is what URL I'm trying to open in browser:

http://tigasestage.mycompany.com:8080/rest/adhoc/sess-man@tigasestage.mycompany.com

and get 404 page with next info:

HTTP ERROR: 404

Problem accessing /rest/adhoc/sess-man@tigasestage.mycompany.com. Reason:

    Not Found
Powered by Jetty://

what can be wrong?


Replies (6)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 4 years ago

Hi,

Sorry for late response, here is what I suppose is wrong.

I checked code with parts from log you provided and it looks that HTTP API component is properly configured and running as Jetty is running, but I suppose that you only copied jar with Tigase HTTP API project while you also need to copy groovy scripts responsible for handling HTTP requests as stated on Configuration for version 1.0.0:

Component will also load all groovy scripts located in scripts/rest/xxx directories and will bind it to proper action for paths /rest/xxx/. (xxx - is just an example directory name, more than one directory can be used).

Important: Scripts which handle HTTP requests are available in repository of component under src/scripts/groovy/tigase/rest/

Added by Igor Khomenko over 4 years ago

Thanks, it works now!

Added by fefe efwef over 3 years ago

I also hava this problems,I can not understand because My English is poor can you write more details thank you .

Added by fefe efwef over 3 years ago

I also put tigase-web-ui.war in jars/ but I press it into my browser

http://192.168.1.15:8080/setup/

info is

HTTP ERROR: 404

Problem accessing /setup/. Reason:

Not Found

Powered by Jetty://

I also put servlet-api-3.1.jar tigase-http-api.jar in jars/

and init.properties is

--comp-name-5= rest

--comp-class-5= tigase.http.rest.RestMessageReceiver

--rest/use-local-server[B]=true

can you help me

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Please use full Tigase package which contains correct version of the library.

Added by fefe efwef over 3 years ago

thank you

    (1-6/6)