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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:23:37+00:00 2026-05-28T04:23:37+00:00

I am trying to extract an XML node from a URI reference. This URI

  • 0

I am trying to extract an XML node from a URI reference. This URI reference is generated by an XAdES4j signer, and could reference a node within the same XML file, or in the same folder.

I was hoping that loading the reference would be as simple as

XMLSignatureInput referencedXML = ResourceResolver.resolveStatic(referenceNode.getAttributeNode("URI"), referenceDoc.getBaseURI());

However this just gives me a NullPointerException with no useful message. Both arguments are non-null, and in a simple case the URI attribute was “data.xml” and the referenceDoc base URI was “/Users/ryan/…/test-files/signature.xml. data.xml resides in the same test-files directory.

The URI could point to an element within a file, so I’m hoping there is a reference loader which deals with that complexity for me. What have I missed?!

edit:

The reference I am trying to load is:

<ds:Reference Id="xmldsig-c6050e36-d9e7-46d9-ac5f-447d1bbb405f-ref0" URI="lote.xml" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
  • 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-28T04:23:37+00:00Added an answer on May 28, 2026 at 4:23 am

    Total stab in the dark (you really need to paste stacktraces…), but here goes.

    I took a quick look at the source of ResourceResolver at:
    http://java2s.com/Open-Source/Java-Document/XML/xml-security-1.4.3/org/apache/xml/security/utils/resolver/ResourceResolver.java.htm

    I can see there is going to be a NullPointerException due to a non initialised _resolverVector field in the ResourceResolver, unless the static init() method has already been called on ResourceResolver. Above the init() method, there is a comment:

    The init() function is called by org.apache.xml.security.Init.init()
    

    The ResourceResolver itself does not appear to trigger that call – do you do it ? If not you should try it, prior to using any of the org.apache.xml.security stuff.

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

Sidebar

Related Questions

I am trying to extract text from XML similar to the following: <p>This is
I am trying to extract the title from this xml: <entry> ... <title type=html>Some
I am trying to extract values from an XML file using linq to create
I’m trying to extract the name and satelite coordinations from a XML file and
I'm trying to extract data from an xml file. A sample of my code
I'm trying to extract some information from an xml file using xslt. I've used
I am trying to extract information from an XML file into an object using
i have tried several methods of trying to extract values from an XML file
I am trying to extract data from XML file and save it my C#
I am trying to extract data from XML. I generated C# classes using 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.