How to convert xml into object java
I'm consuming a web services whose input value is of the following type:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"content"
})
public static class Reqmsg {
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the content
property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
* {@link Object }
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
}
I have to send XML, how do I make this type of class, im working in
Jdeveloper 11.1.4? I started to create an array of string with the xml
format, but get an error: System.InvalidOperationException: The specified
node cannot be inserted as the valid child of this node, because the
specified node is the wrong type.
xml String estrucXml = ""; estrucXml +=""; estrucXml +=""; estrucXml +="";
estrucXml +=""; estrucXml +="";
No comments:
Post a Comment