Thursday, May 5, 2011

Deploying a WebService in glassfish with init parameters

I've created a WebService using the JAX-WS API. This service runs without any problem using an Endpoint class.

main(String args[])
{
(...)
MyService service=new MyService();
service.setParam1("limit=100");
service.setParam2("hello");
service.setParam3("max-value=10");
Endpoint endpoint = Endpoint.create(service);
endpoint.publish("http://localhost:8090/ws");
(...)
}

now, I'd like to deploy this service in glassfish. However, as I wrote in my example, I'd like to initialize my service with a some parameters. How can I achieve this ? should I use another API ?

Many thanks in advance

From stackoverflow

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.