93 questions
1
vote
0
answers
57
views
JAX-WS / JAXB: Unable to target embedded XSD schema node in WSDL via bindings.xml
I’m trying to generate Java classes from a WSDL file using the Maven plugin com.sun.xml.ws:jaxws-maven-plugin. The WSDL includes embedded XSD schema(s), and I’m not allowed to modify the WSDL or its ...
0
votes
0
answers
91
views
How to Customize XML Namespace Prefixes Using JAXB, Keeping Only Specific Prefix?
I'm generating XML using JAXB and need specific namespace prefixes for my XML elements. Here's an example of the XML structure I am currently generating, where each namespace has a unique prefix:
<...
0
votes
2
answers
126
views
Jaxb binding attribute to string without adapter
Is it possible to have a binding to a string without an adapter?
I have a 3rd party schema with an attribute with the wrong type (date) and in an external file binding I transform it to string so the ...
1
vote
0
answers
773
views
Failed to set MinumEscapeHandler to jaxb marshaller
Please do not block the post due to the fact that a similar solution already exists on this site. Using the following java code, which is a REST service that returns xml, when I request the service ...
0
votes
0
answers
49
views
namesspace is coming in ending tag of xml root element
Please find below xml format where namespace is coming in end tags as well
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<report xmlns="urn:...
0
votes
1
answer
61
views
How to do JaxB XML Unmarshalling/Marshalling of element with package name?
I got following XML with element name being present with their package name. How can I marshal/unmarshal the given XML using JaxB?
<com.jaraws.api.Vehicle>
<number>KT12356</number>
...
0
votes
1
answer
2k
views
NullPointerException during JAXBContext.newInstance(contextPath) - jakarta.xml.bind
In my maven based project, String "contextPath" is nothing but any package of my project. No matter what package(or multiple packages appended with :) i assign to contextPath, i still get ...
1
vote
1
answer
2k
views
How do I remove the ns2 prefixes from XML elements using JAXB 3 and a NamespacePrefixMapper?
I want to generate a POM file using JAXB 3. I downloaded the XSD https://maven.apache.org/xsd/maven-4.0.0.xsd into src/main/xsd.
I generated the model classes using the JAXB maven plugin.
The POM file ...
0
votes
0
answers
137
views
Converting an xsd schema msg from queue to java object using spring Integration
I have 3 xsd schema in which one xsd is referring to 2 other xsd's. How to convert these xsd schema into java object. I have tried unmarshalling using JAXB and also tried many things.
<?xml ...
1
vote
1
answer
49
views
objectTabLayout.setupWithViewPager is not found
i am new in android and i am facing an strange situation in which i am not finding the setupWithViewPager.When i am calling objectTabLayout.setupWithViewPager then setupWithViewPager is not finding.....
0
votes
1
answer
671
views
Error when generating JAVA classes with JAXB: XPath evaluation of results in empty
I have an XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.xyz.m" xmlns="http://www.xyz.m" xmlns:xs="http://www....
0
votes
1
answer
216
views
build every group of data and add them to the rendered XML page using xmlbuilder2
I'm using xmlbuilder2 node module to build the retrieved data and render them into XML page. when the data is very big I got this error
FATAL ERROR: Ineffective mark-compacts near heap limit ...
2
votes
2
answers
3k
views
How to map REST output to a Dto in Spring Boot using @XmlElement annotation , so that i can get the xml output in desired format?
I have two classes/tables---
Customer and Address having a bi-directional one-to-one relationship.
I getting the details from these two tables and exposing them using a rest controller and i am ...
3
votes
1
answer
6k
views
@XmlRootElement vs @JacksonXmlRootElement
What is exact difference between @XmlRootElement @JacksonXmlRootElement?
I know @XmlRootElement is generic, But when I check package structure both are different.
So there must be some advantage ...
0
votes
0
answers
496
views
Unable to generate utf-8 request in .net core on consuming a wcf with basic transport http binding with certificate authentication
I am consuming a wsdl described as :
<wsdl:binding name="PassengerConformance_v1Binding"
type="tns:PassengerConformanceAuthenticationPortType">
<soap:binding style="document"
...
0
votes
1
answer
395
views
Add/Modify an element to XML file using JAXB marshal
I am using JAXB to generate java code from XML, which has an enum
<xs:simpleType name="color">
<xs:restriction base="xs:string">
<xs:enumeration value="Blue"/>
...
0
votes
2
answers
2k
views
"org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation" to produce xml response
I try to produce xml-format data from spring boot restcontroller. Below is User model codes first.
@Entity
@Table(name="BlogUser")
@XmlRootElement
public class User {
@Id
@GeneratedValue(...
0
votes
1
answer
67
views
Eclipse Moxy is ignoring @XmlNamedObjectGraph in some circumstances
I have a lot of classes that are converted to XML using eclipse MOXy @XmlNamedObjectGraphs to generate. They mostly seem to behave themselves, except for one class - TaskSchedule:
@XmlAccessorType(...
1
vote
1
answer
120
views
What should be the jaxb annotations for this xml file?
I have a xml file payload which i want to unmarshal using jaxb, I've created a pojo class for unmarshalling and I've defined xml attributes and elements to that pojo, but i'm a little bit confused ...
0
votes
1
answer
228
views
scalaxb fails when an element and an attribute at the same level having the same name
I am trying to use the sbt-scalaxb to generate bindings for the FixRepository.xsd and it does not like the SUBJ.
As a last resort, of cause, I can to slightly change the schema, but is there maybe a ...
1
vote
1
answer
629
views
JAXB XML repeating alternating XmlElements without Parent element
We have been using JAXB to generate XML to interface with a third party. This third party is asking that for one section we produce a set of 2 different 0-n XML Elements in a repeating fashion without ...
0
votes
0
answers
124
views
How do I bind a sub-element of an XML array item to a DataGridColumn?
Problem
I have an XML file with an array of items. I can correctly bind to the list of items and also to attributes on the node. However, I cannot get any sub elements bound and not sure what XPath ...
0
votes
1
answer
357
views
@XmlElement - Get String value from object that is not mapped with @xml-anotation
I have 2 entities:
@Entity
@XmlRootElement
public class test {
@Getter
@Setter
@XmlElement(HERE I WANT THE NAME OF THE COUNTRY)
private Country country
}
@...
1
vote
0
answers
201
views
Generating @XmlType propOrder default values
I want a custom sequence in my xml response rather than alphabetical. It's mostly alphabetical order but with few exceptions.
So, I ended up using propOrder in @XmlType annotation as a solution.
Now ...
2
votes
0
answers
446
views
JAXB - Unmarshal and marshall objects with processing instructions
We want to use JAXB to create Java objects from XML files, manipulate them and save them back into XML files. This is not a problem in principle. However, the source XML files contain processing ...
1
vote
0
answers
177
views
JAXBContext in javax.xml.bind.JAXBContext not throwing an exception
JAXBContext in javax.xml.bind.JAXBContext is neither creating an instance of the package nor it is throwing an exception. The flow of the applicaton is fine until it comes to the below line in the ...
0
votes
1
answer
996
views
How to set array in xml Model in sap ui5
I have stored xml data in an array which i want to set it to xml Model. I have tried using oXmlModel.setXML(oPropStored); where oXmlModel is the name of xml Model and oPropStored is the name of array ...
2
votes
3
answers
3k
views
Unmarshalling response depending on HTTP code during Spring Rest Service call
Calling a Rest Webservice using the Spring Rest Template as follows-
ResponseEntity<String> response = restTemplate.exchange(builder.build().encode().toUri(), HttpMethod.GET, entity, String....
0
votes
1
answer
294
views
Unmarshalling issue during Spring Rest Service call
Calling a Rest Webservice using the Spring Rest Template as follows-
ResponseEntity<String> response = restTemplate.exchange(builder.build().encode().toUri(), HttpMethod.GET, entity, String....
1
vote
1
answer
3k
views
XSD choice between sequence or single element
I'm trying to create a choice between a sequence of two elements, and one single element, as such:
<xs:element name="LoadStationsRequest">
<xs:choice>
<xs:...
1
vote
1
answer
69
views
Anybody is aware of a XML to SWI-Prolog binding tool similar to JAXB for Java or XSDE for C++?
Is it possible to create Prolog-specific bindings of XML schema files? If so, can anybody point me in the right direction?
I have a schema which I use in Java to create a JAXB binding to serialize ...
1
vote
1
answer
1k
views
Compiling a valid XML Schema using CodeSynthesis XSD fails with Error MSB3721
I'm trying to use CodeSynthesis XSD (in Visual Studio 2015) for XML to C++ binding. I have a valid XML schema, but XSD fails to compile it. Here is the error message:
Error MSB3721 The command "xsd....
1
vote
1
answer
732
views
How to Mention XS:MaxLength in xml simpleType from Java XML Binding using annotations
I want to show the maxLength property in the below XML code.
What i need to in my java class.
JAVA Class need to modified occording the below xml:
public class xxxx{
protected String ...
3
votes
5
answers
227
views
Is it justified to use Reflection in this use case to workaround design issue that i am not allowed to fix?
Would the following use case be considered as justified for Reflection?
There are bunch of classes generated from XSDs (hundreds currently on project) which represent various Responses.
All of ...
4
votes
1
answer
255
views
distinct XML mapping/binding on the same Java object
I have a Java application interoperable with several others information systems
A same object could be mapped in differents XML files according to the information system targeted
My question is : Is ...
0
votes
1
answer
4k
views
Java xml-java binding @XmlType.propOrder
Java- jersey client and jersy json and xml binding
response as following
{"corp":"01105","rateCodeOffers":[{"rateCode":"!I","tosOffers":["MH0000010005"]}]}
mapping class
@XmlAccessorType(...
1
vote
1
answer
48
views
Caution while extending a class which is Serializable
I have a class A implementing Serializable and another class B extends A, but I want to use class B for XML binding, not for serialization.
Is there anything I should worry about?
2
votes
2
answers
3k
views
how to derive xml element name from an attribute value of a class using annotations?
I have
properties that have ids and values and a name. Can I represent all those with a single class using XmlElement/XmlArray C# annotations? I would like to derive the xml element name from the ...
2
votes
1
answer
750
views
get all xml prefix to namespace mappings using javax xml binding annotations
Is it possible to bind xml prefix→namespace mapping to a map using javax.xml.bind.* annotations?
Something like:
class FooPOJO {
...
@Namespacebindingannotation
Map<String,String> ...
0
votes
1
answer
506
views
JAXB : Order of elements in multiple lists
I have two lists in my root element object.
List<Person> persons and List<Address> addresses . When i marshall this , it prints first all the person and then all the addresses . I want to ...
1
vote
0
answers
70
views
JAXB XML TO OBJECT (UNMARSHALING SOAP STYLE XML) [duplicate]
I need to unmarshall XML.
XML is like this:
<array>
<item>
<name>nick</pid>
<age>18</provider>
</item>
<item>
...
3
votes
2
answers
1k
views
Jaxb Mapping Bidirectional Relationship
I have a List<SelectConditionHeaderModel> .
When i am marshalling this list, I am getting an error :
javax.xml.bind.MarshalException
- with linked exception:
[com.sun.istack.internal....
0
votes
0
answers
641
views
JAXB binding to Custom java classes
WSDL generates properly for SOAP web services (JAXB) if we use JAXB Default data type like java.lang.String(xsd:string), but it gives problem when we use custom java classes as request object for web ...
0
votes
1
answer
6k
views
Html table (XML binded) with command buttons to edit, delete, create
I have an XML file, that I want to both view and create, edit and delete records. Now I have just managed to read the xml file, and made a decent bootstrap table. I know there is some good libraries ...
2
votes
2
answers
2k
views
JAXB xml ordering or Sequence or property ordering
i want to marshal my object in a ordered xml.
My jaxb class is given below:-
i have used Xmlordering but it doesn't work to order my xml.
package mypackage;
import java.util.ArrayList;
import java....
1
vote
0
answers
994
views
Getting exception Error while parsing XML in delphi
I am across a problem while parsing xml document. Actually I am using XMl Binding wizard to extract the attributes values but every time it throws exceptions.
Here is my xml:
<?xml version="1.0" ...
4
votes
1
answer
2k
views
Jaxb POJOs generation with Inheritance
I want to generate the POJOs using the xml-binding with a different hierarchy that I have right now.
Now I have an xsd like this one:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="...
2
votes
1
answer
779
views
How to write an xml annotation in Java for a self-contained tag with attributes
I'm using the annotations from the package javax.xml.bind.annotation to construct SKOS XML files. I have some trouble about the best way to realize lines like the following (please, observe that the ...
1
vote
1
answer
2k
views
Using Jackson XML binding to map lists to Pojo
I am using Jackson's XML binding to convert XML into a Java List, via an initial mapping to a Java POJO. What I have written works but I don't think I am using Jackson correctly.
I am stuck with ...
2
votes
1
answer
167
views
Java xml binding with JAXB: Marshaling content from a field into the root element [duplicate]
i have a class like this:
@XmlAccessorType(XmlAccessType.PROPERTY)
@XmlRootElement(name="someClass")
public class SomeClass implements Serializable {
[...]
@XmlElement(name="field")
...