Hi,
I would like to do a Web Service with the SDK.
The goal would be to get some information from the ignition gateway in a standalone java application wich would be the consumer of the web service.
I first wanted to make a web service on the example “SimpleTagProviderExample” to publish and modify the TagCount, so I made 2 methods : “getTagCount” and “setTagCount”.
But it was impossible to select the server. So, to do this, if I understood well, I have to first make a dynamic web project in Eclipse.
In fact I really don’t know how to bind this with the ignition skeleton.
I first imagine to use the ApacheTomcat server wich is already in Ignition, but I don’t know if it’s possible.
Did someone already done this and can help me starting with this ?
Best of all would be a simple example of course
Thanks for your help, like usually !
I’m not quite sure how to guide you, except to start by saying that you’re going in the wrong direction.
First off, no, you won’t be creating a dynamic web project, or using tomcat. As you mention, Ignition is already embedded in Tomcat, and as you’re building a module under Ignition, you’ll already be there.
Since I don’t exactly know what you’re trying to build and what libraries you might be trying to use, I can’t offer too much guidance, but if I were going to guess, I’d say that part of the solution will be to create and register your own servlet. The GatewayContext has a function for this, addServlet(). You’ll have to figure out if that is going to be helpful, though.
Beyond that, make sure you read the programmer’s guide and get remote debugging set up between eclipse and Ignition.
Regards,
Thanks for your answer Colby.
I think you’re right, this is what I need.
I already read the programmer’s guide, but didn’t use the remote debugging.
I’m going to try that.
Is there’s an example of servlet I can use to get started ?
And if I do a servlet in the Gateway, what type of project will I have to do for the client ? Would it be a standard consumer of web service ?
Thanks for helping