我正在尝试 JBoss AS 7 wsconsume.sh,但在生成的源代码上出现编译错误。怎么了?
WSDL 文件来自https://isir.justice.cz:8443/isir_ws/services/IsirPub001?wsdl ,它几乎没有形式错误。
$ ./wsconsume.sh -p cz.pohlidame.clientJBoss -o fooOut -s fooSrc -t 2.2 -e ~/proj/pohlidame.cz/wsdl-consumer/IsirPub001.wsdl
Could not find log4j.xml configuration, logging to console.
TODO! Cheek SOAP 1.2 extension
WSConsume (CXF) does not allow to setup the JAX-WS specification target, using the currently configured JAX-WS version (check your JVM version and/or endorsed libs)
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -compile -exsh false -p cz.pohlidame.clientJBoss -verbose -classdir /home/ondra/work/AS7/ozizka-git/build/target/jboss-as-7.2.0.Alpha1-SNAPSHOT/bin/fooOut -allowElementReferences file:/home/ondra/proj/pohlidame.cz/wsdl-consumer/IsirPub001.wsdl
wsdl2java - Apache CXF 2.4.6
^
./cz/pohlidame/clientJBoss/IsirPub001Data.java:63: cannot find symbol
symbol : method required()
location: @interface javax.xml.bind.annotation.XmlElementRef
@XmlElementRef(name = "spisZnacka", type = JAXBElement.class, required = false)
^
3 errors
Failed to invoke WSDLToJava
org.apache.cxf.tools.common.ToolException: Failed to compile generated code
at org.apache.cxf.tools.common.ClassUtils.compile(ClassUtils.java:115)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:265)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:138)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:286)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl.java:250)
at org.jboss.ws.tools.cmd.WSConsume.importServices(WSConsume.java:279)
at org.jboss.ws.tools.cmd.WSConsume.mainInternal(WSConsume.java:104)
at org.jboss.ws.tools.cmd.WSConsume.main(WSConsume.java:92)
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 org.jboss.modules.Module.run(Module.java:270)
at org.jboss.modules.Main.main(Main.java:294)