Questions tagged [javax.xml]
78 questions
0
votes
1 answer
Migrating MimeUnmarshaller code to Spring 5
I have legacy code that implements org.springframework.oxm.mimeMimeUnmarshaller:
import javax.xml.bind.attachment.AttachmentUnmarshaller;
import javax.xml.transform.Source;
import org.springframework.oxm.UnmarshallingFailureException;
import…

Paul Reiners
- 8,576
- 33
- 117
- 202
0
votes
0 answers
java.util.MissingResourceException: Can't find com.sun.xml.internal.messaging.saaj.soap.LocalStrings bundle
I'm trying to run my app via sbt run but I get the following error when creating new Service (javax.xml.ws.Service):
Uncaught error from thread [default-akka.actor.default-dispatcher-3]: null, shutting down JVM since 'akka.jvm-exit-on-fatal-error'…
0
votes
1 answer
Unable to instantiate SOAP Client - Failing with NullPointerException
While instantiating a SOAP client, I get NullPointerException
@WebServiceClient(name = "QWEServiceManager", targetNamespace = "http://external.ws.services.abc.com/", wsdlLocation =…

Rituparna Bhattacharyya
- 193
- 2
- 6
0
votes
1 answer
Adding logging to soap web service
I would like to log my request and response.
I found a very easy solution to do so by changing the properties recommended here:
Tracing XML request/responses with JAX-WS
My problem is, that I do not want to log credentials, so I manually need to…

Ruth
- 856
- 2
- 13
- 26
0
votes
1 answer
How to use javax.xml.bind to write XML to POJO with xmlns field?
This is an example xml object like what I get from my API call:
1055491
...
…

kingledion
- 2,263
- 3
- 25
- 39
0
votes
0 answers
GWT 2.8.2 not compiling javax.xml.bind.annotation anymore
I am using javax.xml.bind in my entities for xml serialization and it compiled fine until gwt 2.8.1, but with 2.8.2 version, the compiler fails at annotations like javax.xml.bind.annotation.XmlRootElement with message that there is no source code…

Andrei F
- 4,205
- 9
- 35
- 66
0
votes
1 answer
Java Transformer Empty Element
I wrote a program (I'm using JDK 11) to format an XML string; however, I want my program to contract empty elements. For example: should become . I have written the below code which does not work:
Transformer…

RobotWizard
- 25
- 7
0
votes
0 answers
Cannot Deseralise to Concrete Java Type
I'm building a fitness tracker application which allows a user to track their workouts. A workout is comprised of a list of movements. The abstract Movement class is extended by several subtypes of movement.
Abstract…

Drew
- 57
- 1
- 7
0
votes
1 answer
jaxb XML, not throwing exception when XML's integer value is > Java Long's Max Value
Say I'm trying to unmarshal an XML file with an integer field (xs:integer):
13131546456131653154156415616
This value is > Java Long's max value.
I was hoping to get and catch an exception when Jaxb tried to unmarshal it.
Instead, there is no…

Jack Xiao
- 1
- 2
0
votes
1 answer
finding node number in NodeList while passing multiple xpaths in Java
I am using javax.xml.xpath.XPath package to find nodes present in XML.
Code finds values and return NodeList
NodeList nodes = (NodeList) xPath.compile("/books/book/category[1] | /books/book/category[2] |…

NilKha
- 104
- 3
- 10
0
votes
0 answers
Eclipse giving java.lang.AbstractMethodError for DocumentBuilderFactory.setFeature
I am trying to run junit for a maven project but I am not able to proceed as I am getting the error
java.lang.AbstractMethodError:
javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
It seems as eclipse is unable to find…

Jayant Nayak
- 59
- 7
0
votes
0 answers
Is there a way to get the element name from the SAXParseException message while validation an XML file?
The SAXParseException message is:
org.xml.sax.SAXParseException; systemId: file:///home/IdeaProjects/RGAME/FullPHSHuman.xml; lineNumber: 8; columnNumber: 11; cvc-complex-type.2.4.a: Invalid content was found starting with element…

mark42inbound
- 364
- 1
- 4
- 19
0
votes
1 answer
While validating against XSD, find the exact missing element in the XML using any of DOM, StAX, SAX parsers
I have a XML file and its corresponding XSD file. While validating using StAX parser, I've attached an error handler. Basically, I encounter two types of errors in a well-formed XML file.
1) Incorrect type of data inside an element, for e.g string…

mark42inbound
- 364
- 1
- 4
- 19
0
votes
1 answer
Is it possible to get the XPATH query string from XPathExpression?
An XPath query is compiled into an XPathExpression, which can then be evaluted on document. Suppose if i have hold of only all the compiled expressions, is it possible to know what are the respective xpath queries for them ?

Rima
- 545
- 6
- 12
0
votes
1 answer
How to change XML SOAP envelop by using JAVA library?
I have used javax.xml.soap library to invoke soap request and response. I have wsdl endpoint url which works fine in SOAP-UI. I need to validate the same using java, and I created a soap request which looks different evnelop than the actual one as…

ArrchanaMohan
- 2,314
- 4
- 36
- 84