Glassfish web.xml servlet mapping to @WebService gets ClassCastException
问题 Am trying to gain control over the URL endpoints of my web services when deployed to Glassfish (and preferably to TomEE too). I have a class: @Stateless @WebService( targetNamespace = "http://foo.net/doc/2012-08-01", name = "FooService", portName = "FooPort", serviceName = "FooService") public class FooSoapService extends SoapBase { ... } And a web.xml: <servlet> <description>SOAP Endpoint for Foo operations.</description> <servlet-name>Foo</servlet-name> <servlet-class>com.foo.FooSoapService