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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:36:37+00:00 2026-06-15T12:36:37+00:00

Today I have a mindboggler I just cannot solve. I will start with an

  • 0

Today I have a mindboggler I just cannot solve. I will start with an Explanation and Example.

I have 2 XSD Files. The one XSD File References one of the other’s elements.

First XSD- ReportInfo.xsd:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xs:schema id="ReportInfoWrapper" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="ReportInfoWrapper" >
    <xs:complexType>
      <xs:sequence>
          ...
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Second XSD- ReportInfoRecordSet.xsd:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xs:schema id="ReportInfoRecordSetWrapper" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:include schemaLocation="./ReportInfo.xsd" />
  <xs:element name="ReportInfoRecordSetWrapper">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ReportInfoWrapper" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

ReportInfoRecordSet references ReportInfoWrapper (The root element of ReportInfo). I need to know what I would define in the JAXB Bindings file to change the generated name for this referenced element in ReportInfoRecordSet. This is what it currently generates:

public class ReportInfoRecordSetWrapper {

@XmlElement(name = "ReportInfoWrapper", required = true)
protected List<ReportInfoWrapper> reportInfoWrappers; //I need to change the name here in the bindings file.

The Question
Any help or advice will be greatly appreciative. Note, I cannot make ReportInfo’s Root element a complex Type, as it would break the current bindings file for ReportInfo. Is there any way to define the variable’s name in the following notation? Note this example below does not work for some reason (I believe its node targeting issues”:

      <jaxb:bindings node=".//xsd:element[@name='ReportInfoRecordSetWrapper']/xsd:complexType/xsd:sequence/xsd:node[@ref=ReportInfoWrapper"]">
         <jaxb:property name="records" />
      </jaxb:bindings>

Note

An easy way to see what I am trying here, I could explain in normal developing Terms.

ReportInfo is the “class”

ReportInfoRecordSet is an Array of ReportInfo classes.

EDIT

<jaxb:bindings
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
    xmlns:annox="http://annox.dev.java.net"
    jaxb:extensionBindingPrefixes="xjc inheritance annox"
    version="2.1">
    <jaxb:globalBindings localScoping="toplevel">
        <xjc:simple />
        <xjc:javaType adapter="aem.adservices.google.dfa.utils.DateAdapter" name="java.util.Calendar" xmlType="xs:dateTime" />
    </jaxb:globalBindings>
    <jaxb:bindings schemaLocation="../xsd/ReportInfoRecordSet.xsd" >
      <jaxb:bindings node=".//xsd:element[@name='ReportInfoRecordSetWrapper']/xsd:complexType">
         <annox:annotate>
           <annox:annotate annox:class="aem.utilities.boomi.BoomiObject" label="ReportInfoRecordSet" description="ReportInfoRecordSet" OperationTypes="UPSERT"  />
         </annox:annotate>
      </jaxb:bindings>
       <jaxb:bindings node="//*/xs:element[@ref='ReportInfoWrapper']">
           <jaxb:property name="records"/>
       </jaxb:bindings>
    </jaxb:bindings>
</jaxb:bindings>

The Error is thrown at line 19 saying XPATH error: null. Lines 19 – 21 are new lines added to my code.

EDIT 2

Remember kids, working with XJC requires you to double check which namespaces you provide to the XPATH Processor. I found the mistake where node="//*/xs:element[@ref='ReportInfoWrapper']" should be node="//*/xsd:element[@ref='ReportInfoWrapper']"

  • 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-15T12:36:38+00:00Added an answer on June 15, 2026 at 12:36 pm

    This binding must work (checked locally):

    
    <jxb:bindings version="1.0" 
      xmlns:jxb="http://java.sun.com/xml/ns/jaxb" 
      xmlns:xs="http://www.w3.org/2001/XMLSchema" 
      xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
      jxb:extensionBindingPrefixes="xjc">
        <jxb:bindings schemaLocation="ReportInfoRecordSet.xsd" node="/xs:schema">
           <jxb:bindings node="//*/xs:element[@ref='ReportInfoWrapper']">
                <jxb:property name="records"/>
            </jxb:bindings>
        </jxb:bindings>
    </jxb:bindings>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today i have a little problem containing a File Upload. First some Infos: Rubyversion:
I am using eclipse to develop a web application. Just today I have updated
Today I have seen this weird magic NTFS system supports: each file can have
Today I have just thrown together this PowerShell script which takes a tab-delimited text
I just started experimenting with java today (have experience with javascript and PHP) and
Today I have finally decided to start climbing R's steep learning curve. I have
Today I have kind of theoretical question (I just can't find a way to
Just today I have downloaded adt-bundle-windows-x86 with eclipse and sdk inside. It's really great.
I have a site http://www.example.com/m/controller/function Today I have removed the directory /m/ from all
today i have direct a problem :P i just need some ideas... how do

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.