Java wsgen限制:要避免什么构造
我正在使用JAX-WS的JSR224的@webservice和@WebMethod注释创建一个Web服务。虽然我发现了,但我在任何地方都找不到我遇到的限制 以下是我在使用JDK 6附带的JAX-WS 2.1.6时遇到的问题: 不能将接口用作参数、返回值或对象成员 所有类都必须提供无参数默认构造函数 wsgen的局限性是什么?我应该避免哪些构造 我还偶然发现了一些奇怪的错误,所有这些错误看起来都类似于以下内容,可能是一个bug:Java wsgen限制:要避免什么构造,java,web-services,soap,wsgen,Java,Web Services,Soap,Wsgen,我正在使用JAX-WS的JSR224的@webservice和@WebMethod注释创建一个Web服务。虽然我发现了,但我在任何地方都找不到我遇到的限制 以下是我在使用JDK 6附带的JAX-WS 2.1.6时遇到的问题: 不能将接口用作参数、返回值或对象成员 所有类都必须提供无参数默认构造函数 wsgen的局限性是什么?我应该避免哪些构造 我还偶然发现了一些奇怪的错误,所有这些错误看起来都类似于以下内容,可能是一个bug: Note: ap round: 1 Problem encoun
Note: ap round: 1
Problem encountered during annotation processing;
see stacktrace below for more information.
java.lang.NullPointerException
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.isLegalType(WebServiceVisitor.java:770)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.isLegalMethod(WebServiceVisitor.java:618)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.methodsAreLegal(WebServiceVisitor.java:588)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.isLegalImplementation(WebServiceVisitor.java:506)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.shouldProcessWebService(WebServiceVisitor.java:309)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:112)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:315)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:256)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
at com.sun.tools.apt.main.Main.compile(Main.java:1102)
at com.sun.tools.apt.main.Main.compile(Main.java:964)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.internal.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:204)
at com.sun.tools.internal.ws.wscompile.WsgenTool.run(WsgenTool.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsGen.main(WsGen.java:41)
error: compilation failed, errors should have been reported
查看这是否有助于解决奇怪的错误我通过适当的类路径设置解决了与您类似的错误:
查看这是否有助于解决奇数错误我通过适当的类路径设置解决了与您类似的错误: