javaee / metro-jaxws-commons

Metro has been contributed to Eclipse Foundation. This repository is for legacy review only. Please refer to the Eclipse EE4J Metro project for the very latest
https://eclipse-ee4j.github.io/metro-wsit/
Other
10 stars 9 forks source link

JDK 7 compaitable jaxws-maven-plugin. #101

Closed glassfishrobot closed 11 years ago

glassfishrobot commented 11 years ago

Please provide a standard jaxws maven plugin setup info with all the required components and versions. After struggling quite a bit, I am able to make it work for both wsgen and wsimport goals with out any jaxb customization.

But when I try to run the gaol wsimport with global bindings xjb file for a Date conversion. I am getting class not found exception for com/sun/xml/bind/v2/runtime/SwaRefAdapterMarker

I used the simple example found at https://jaxb.java.net/guide/Using_different_datatypes.html I am using all 2.2.7 version jars. It seems BeanGenerator of 2.2.7 xjc is looking for the class SwaRefAdapterMarker in jaxb-impl 2.2.7 and that class is not available in 2.2.7.

This is the stack trace

Caused by: java.lang.NoClassDefFoundError: com/sun/xml/bind/v2/runtime/SwaRefAdapterMarker at com.sun.tools.xjc.generator.bean.BeanGenerator.generateAdapterIfNecessary(BeanGenerator.java:791) at com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(AbstractField.java:164) at com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:79) at com.sun.tools.xjc.generator.bean.field.SingleField.(SingleField.java:94) at com.sun.tools.xjc.generator.bean.field.SingleField.(SingleField.java:81) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:69) at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:82) at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:777) at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:558) at com.sun.tools.xjc.generator.bean.BeanGenerator.(BeanGenerator.java:261) at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:169) at com.sun.tools.xjc.model.Model.generateCode(Model.java:290) at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:284) at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:95) at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:142) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2244) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:191) at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:137) at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:391) at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:204) at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:179) at com.sun.tools.ws.WsImport.doMain(WsImport.java:74) at org.jvnet.jax_ws_commons.jaxws.WsImportMojo.wsImport(WsImportMojo.java:357)

Below is my plug-in pom snippet. (Please confirm whether the plugin setup is correct with all the jars and versions)

org.apache.maven.plugins maven-compiler-plugin 2.3.2 7 7 org.jvnet.jax-ws-commons jaxws-maven-plugin 2.2 generate-sources wsimport $ {basedir}/src/main/resources/wsdl global-bindings.xjb ${basedir} /src/main/resources/wsdl com.americanexpress.javara.cxf.person.ws $ {basedir} /src/main/java com.sun.xml.ws jaxws-tools 2.2.7 org.jvnet.staxex stax-ex org.jvnet.staxex stax-ex 1.2 javax.xml.stream stax-api com.sun.xml.ws jaxws-rt 2.2.7 com.sun.xml.bind jaxb-xjc 2.2.7 com.sun.xml.bind jaxb-impl 2.2.7 com.sun.xml.bind jaxb-jxc 2.2.7 com.sun.xml.stream.buffer streambuffer 1.5 com.sun.xml.ws policy 2.3

Environment

64 bit build 1.7.0_09-b05, Windows 7 pro, eclipse juno, maven 2.2

Affected Versions

[2.2]

glassfishrobot commented 11 years ago

Reported by gvs_gvs

glassfishrobot commented 11 years ago

@lukasj said: can you try 2.3-SNAPSHOT, please? Thanks!

glassfishrobot commented 11 years ago

@lukasj said: no feedback => closing as won't fix.

note that no special setup is needed as of 2.3-SNAPSHOT version. If you want to use older RI, just depend on tools (either com.sun.xml.ws:jaxws-tools or org.glassfish.metro:webservices-tools) and that's it, nothing else is needed. If you still need help, provide sample which is failing for you which I can just unzip and run, please.

glassfishrobot commented 11 years ago

gvs_gvs said: Sorry, I was busy with other work and used CXF plugin as a work around. I will test with snapshot version and will let you know. I am going on vacation for a month and will test in June 2nd week. Thank you for your prompt responses.

glassfishrobot commented 11 years ago

@lukasj said: closing issues after 2.2.1 release

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAX_WS_COMMONS-101

glassfishrobot commented 11 years ago

Marked as won't fix on Saturday, May 11th 2013, 2:21:29 pm