• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wsimport and jaxb binding issue

 
Jay Olsen
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Apologies if this is a novice question, I’m new to this area. I’m using wsimport to generate java artifacts from wsdl. I got a simple wsdl from a netbeans tutorial at the following link. http://www.netbeans.org/images/articles/jaxws/CreditReportSimple.wsdl. Using the following wsimport command, the artifacts are generated successfully.


The artifacts are created in the org.netbeans.j2ee.wsdl.creditreport which is the target namespace for the wsdl file. If I want to customize the package, I can use the following wsimport command



Running this command outputs all the java artifacts in the com.test package. However, my ultimate goal is to use a jaxb binding file to customize the wsimport output. Therefore, I created a binding file to do the package customization. That file contains the following


Then, I run the following command



For some reason, this only partially works. Some of the artifacts are generated in com.test package and more are generated in the org.netbeans.j2ee.wsdl.creditreport. Can someone explain what is wrong with my jaxb bindings file? Why does the customization not apply to all the generated artifacts?

Thanks in advance
 
Eric Mission
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this link while searching for an answer to my errors. I am a full-fledged greenhorn to Java WS's, not to mention this being my very first post, so it may not even be relevant to your needs but I thought I would try.

Kohsuke Kawaguchi's Blog: Separate compilation in the JAXB RI 2.1

Good luck.
 
Jay Olsen
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply. I managed to resolve the issue using a combination of both JAX-WS and JAXB binding files when using wsimport. The implementation above only used jaxb customizations which generated schema types artifacts. However, the generated artifacts for the service endpoint interface and the port accessor methods where being generated in a package structure relating to their target namespace in the wsdl. To override/customize this behavior, a JAX-WS binding file is required. This bindings file is basic, specifying the wsdl location and the package where the generated artifacts should be placed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic