Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8949577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:15:04+00:00 2026-06-15T13:15:04+00:00

I need to add package level annotation (XmlJavaTypeAdapters type adapter). The problem is that

  • 0

I need to add package level annotation (XmlJavaTypeAdapters type adapter). The problem is that when I run wsdl2java it generates package-info.java file for that package.

When I try to add my own package-info.java I get error: “the type package-ingo is already defined”.

Is there a way to inject my annotation to package-info.java?? Maybe any other ideas?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:15:05+00:00Added an answer on June 15, 2026 at 1:15 pm

    After some research I used external mapping file. For all that have similar problem to mine I have described below what I have found.

    If you are using “cxf-codegen-plugin” for generating source code from WSDL you can’t use solution with package-info.java. This is because generated code propably will already contain this file. You cannot also add annotation to your class because it is generated. The only solution is to provide your own mapper.

    First of all you have to write custom mapper. After that you should define xjb mapping file and finally add additional configuration to your pom.xml. You can read about first two steps here.

    To add external mapping file to cxf-codegen-plugin you have to add something like this to configuration node in plugin definition:

    <defaultOptions>
        <bindingFiles>
            <bindingFile>${basedir}/src/main/resources/mapping.xjb</bindingFile>
        </bindingFiles>
        <noAddressBinding>true</noAddressBinding>
    </defaultOptions>
    

    Note that you should not pass extra parameters to xjc as described here because it will not work.

    Hope this will help anybody 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ID in a package variable that I need to add as
I have a java.awt.Image that I need to add CCITT T.6 compression and convert
I read on the internet that with Java EE6, you could package EJB3 into
I need to add javascript for my masterpage. In package i added folder Layouts\ProjectName\custominit.JS
I need to add to a List of child attributes (ProductOption and ProductAttribute) that
As part of my package I need to add an xml file in a
As part of an installation package I'm working on, I need to add the
I'm fairly new to Java and need to add an external Jar to the
simple question what do i need to add to this code so that when
I need to use the org.osgi.framework.system.packages.extra property to add service interfaces at runtime. These

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.