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 6664197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:35:01+00:00 2026-05-26T02:35:01+00:00

I have a XSD scheme but I cannot change the Scheme  <xs:attribute name=zbpName

  • 0

I have a XSD scheme but I cannot change the Scheme 

<xs:attribute name="zbpName" type="Zbp_NC" use="required"/>
<xs:attribute name="zbpType" type="ZBPTYP_CL" use="required"/

Generation of Java-Classes works, but I want to ignore the Attribute use=”required”. Is there a way to ignore this?

I want to get this result when I marshal.

<protectionPoint zbpName="Protection Point - 0">

But in the moment I get this result….

<protectionPoint zbpNotes="" zbpStation="" zbpInterlockingName="" zbpType="" zbpName="Protection Point - 0">

It is because the generated Clasess have this Annotation.

@XmlAttribute(name = "zbpStation", required = true)

But the should look like this…

@XmlAttribute(name = "zbpStation")

Thanks for your help 😉

  • 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-05-26T02:35:02+00:00Added an answer on May 26, 2026 at 2:35 am

    I think you can just create your own class with correct annotations and use it instead of old one, e.g.:

    public interface TestInterface {
        Integer getField();     
    }
    
    public class TestClass implements TestInterface{
    
        @Attribute(required = true)
        private Integer field;
    
        public TestClass() {
        }
    
        public TestClass(Integer field) {
            this.field = field;
        }
    
        public Integer getField() {
            return field;
        }
    
        public void setField(Integer field) {
            this.field = field;
        }
    }
    
    public class NewTestClass implements TestInterface{
    
        @Attribute
        private Integer field;
    
        public NewTestClass() {
        }
    
        public NewTestClass(Integer field) {
            this.field = field;
        }
    
        public Integer getField() {
            return field;
        }
    
        public void setField(Integer field) {
            this.field = field;
        }
    }
    

    Actually, it depends on what access you have to target class.

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

Sidebar

Related Questions

I have xsd schema file which I can't change. Here is an excerpt that
I have this big doubt. When ever i use base64Binary in an .xsd schema
We have a working wsdl2java but the xsd is missing xmlns definition and targetNamespace
I have several xml files, but I will present only one and the xsd
We have an XSD which validates an XML document with a namespace declared, but
Say I have this XML: <domain type='qemu' xmlns:qemu='http://libirt.org/schemas/domain/qemu/1.0'> <name>QEmu-fedora-i686</name> <memory>219200</memory> <os> <type arch='i686' machine='pc'>hvm</type>
I have a complex XSD schema and hundreds of XML files conforming to the
I am looking for the XSD schema of RSS. Via Wikipedia I have found
I have an XSD which was transformed from a RELAX NG schema with a
I have one xsd file I'd rather not modify (Exceptions.xsd): <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns=http://me.com/Exceptions.xsd targetNamespace=http://me.com/Exceptions.xsd

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.