【发布时间】:2013-01-18 20:46:56
【问题描述】:
我有 JAX-WS 无容器服务(通过 Endpoint.publish() 直接从 main() 方法发布)。我希望我的服务能够验证输入消息。我尝试了以下注释:@SchemaValidation(handler=MyErrorHandler.class) 并实现了一个适当的类。当我启动服务时,我得到以下信息:
Exception in thread "main" javax.xml.ws.WebServiceException:
Annotation @com.sun.xml.internal.ws.developer.SchemaValidation(outbound=true,
inbound=true, handler=class mypackage.MyErrorHandler) is not recognizable,
atleast one constructor of class
com.sun.xml.internal.ws.developer.SchemaValidationFeature
should be marked with @FeatureConstructor
我在网上找到few solutions,都暗示使用了WebLogic容器。在我的情况下,我不能使用容器,我需要嵌入式服务。我还能使用架构验证吗?
【问题讨论】:
标签: validation xsd jax-ws jax-ws-customization