views:

714

answers:

1

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

A: 

OK, I finally found the answer : using javax.xml.ws.WebServiceContext was the solution .see this other answer http://stackoverflow.com/questions/261348

Pierre