Questions tagged [javax.xml]

78 questions
11
votes
6 answers

JDK 10 cannot import javax.xml.namespace in Eclipse

It's very strange. I am moving a dynamic web project from Java 8 to Java 10. The last thing I cannot get the dependency resolved is the javax.xml.namespace.QName class. You can see in the attached screen shot, the QName class exist in JRE System…
Ivan
  • 417
  • 1
  • 4
  • 10
5
votes
1 answer

Apache Axis 1.4 on Java 12

I am currently trying to migrate from a Java 8 project to Java 12. (Hopefully) the last hurdle is an old WebService we are forced to use. Using the WebService 'as is' in Java 8 per se is not a problem, it has been working for many years. The wsdl…
Krann Sock
  • 933
  • 1
  • 7
  • 12
5
votes
1 answer

Java XML - after removing a node - white space line remains - how to remove?

I'm working with javax.xml & After removing some node: docBuilderFactory = DocumentBuilderFactory.newInstance(); docBuilder = docBuilderFactory.newDocumentBuilder(); document = docBuilder.parse(new File("file_name")); NodeList tagList =…
michael
  • 3,835
  • 14
  • 53
  • 90
5
votes
2 answers

I want to use XQuery For Xml processing in java

I want to use XQuery for fetching data from Xml in java, but I am not getting which Jar I need to add for this. I searched in google lot but haven't got any useful example. For example I got following…
RSingh
  • 171
  • 2
  • 12
5
votes
2 answers

Java Calendar.DAY_OF_YEAR sometimes off by one

I am trying to get a user's age based on their date of birth. The date of birth is given as a string in XML and converted to a Calendar like so: final Calendar dob = javax.xml.bind.DatatypeConverter.parseDate(value); Then I am calculating the…
meustrus
  • 6,637
  • 5
  • 42
  • 53
4
votes
1 answer

How to print a formatted SOAPMessage?

I have a SOAPMessage (found in javax.xml.soap.SOAPMessage). However the only way to print it seems to be soapMessage.writeTo(System.out); However this doesn't have any new lines and with a large SOAPMessage it can be difficult to read. Further,…
jnd
  • 754
  • 9
  • 20
3
votes
0 answers

Is there built in support for appending Handlers to the set HandlerResolver in JaxWsPortProxyFactoryBean?

I'm creating a JaxWsPortProxyFactoryBean instance and want to set a HandlerResolver on it to log requests. @Bean(name="serviceName") public JaxWsPortProxyFactoryBean serviceNameFactory() throws MalformedURLException { JaxWsPortProxyFactoryBean…
NominSim
  • 8,447
  • 3
  • 28
  • 38
3
votes
2 answers

DocumentBuilder doc (with root element) outputs null even though root element is appended

I'm attempting to have it return my empty root element with attributes but am getting [#document: null] output. Am I absolutely required to have a child element for the root? String docDate = "1"; String docNumber = "1"; String orderType =…
orpheus
  • 479
  • 1
  • 7
  • 20
3
votes
1 answer

Prevent XXE (External Entity Processing) Attack with JAXB + Spring RESTful Web Services

I know that we can prevent the XXE attack by setting the property IS_SUPPORTING_EXTERNAL_ENTITIES in the abstract class XMLInputFactory to false in JAXB. I have also seen this stackoverflow answer. My question here is, How do I create a instance of…
Nishanth
  • 317
  • 4
  • 16
3
votes
2 answers

Passing a XML File (InputStream) to XSLT avoid using Document in XSLT javax.xml

I am new to XML, XSLT and javax.xml Currently my objective is to merge two XML files using XSLT Version 1.0 and everything works fine. But I feel that there is a limitation in my code and I would like to get rid of it, if possible. These are my…
Aniks
  • 1,011
  • 3
  • 17
  • 29
3
votes
0 answers

unable to use package-info. javax.xml.ws.WebServiceException: class XXX do not have a property of the name {YYY}document

short: Is it possible to change classes in my package test (add some headers) so I don't have to use packege-info.java? longer version: In eclipse my program works fine. But after convertion to exe with commercial encrypting program I am getting…
2
votes
1 answer

How to provide a utility on XSLT while maintaining security

I would like the ability to provide an escape utility that can be used in an XSL Stylesheet. For example:
jbeale
  • 78
  • 5
2
votes
1 answer

Where did javax.xml.bind go in Java 9?

I tried migrating my project from JDK 1.8 to Java 9, but it wouldn't compile. My project uses a lot of javax.xml.bind.annotation classes and it seems they are missing. Were they moved somewhere or deprecated?
Dmitri Nesteruk
  • 23,067
  • 22
  • 97
  • 166
2
votes
1 answer

SparkSQL with databricks xml lib: 'Malformed row'/UnboundPrefix on a valid xml

Suppose I'm running Spark 1.6.0 on Oracle JDK 1.8 (build 1.8.0_65-b17) in an ipython notebook session started with the following line: PYSPARK_DRIVER_PYTHON=ipython PYSPARK_DRIVER_PYTHON_OPTS=notebook pyspark --packages…
alreadyexists
  • 355
  • 5
  • 13
2
votes
1 answer

@XmlSeeAlso doesn't work for the same root node

I'm trying to implement inheritance with @XmlSeeAlso annotation. Everything works as expected when using different root node names for subclasses. But with the same root names Unmarshaller always choses the last class from the XmlSeeAlso list…
Tanya
  • 21
  • 1
1
2 3 4 5 6