Note that there are some explanatory texts on larger screens.

plurals
  1. POSerialize a Java Object
    primarykey
    data
    text
    <p>Let me know the best way to serialize my Java object Download. This is a class generated from a java wsimport tool from a WSDL.</p> <pre><code>@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Download", propOrder = { "Response", "VendorInformation", "DownloadItem", "DownloadCommentItem", "DownloadIntercomItem" }) public class Download { @XmlElement(name = "Response") protected ResponseMessageManagementType Response; @XmlElement(name = "VendorInformation") protected DownloadVendorInformation VendorInformation; @XmlElement(name = "DownloadItem") protected List&lt;DownloadDownloadItem&gt; DownloadItem; @XmlElement(name = "DownloadCommentItem") protected ArrayOfDownloadDldComment DownloadCommentItem; @XmlElement(name = "DownloadIntercomItem") protected ArrayOfDownloadDldIntercom DownloadIntercomItem; ......................... } </code></pre> <p>The java classes generated from the tool do not have any serlization implementation. And I want to serialize the Download class following this kind of format:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Download xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="HTTP://xyz.abc.Com//Vendor/DownloadWSE.xsd"&gt; &lt;Response&gt; ..... &lt;/Response&gt; &lt;VendorInformation&gt; ............... &lt;/VendorInformation&gt; &lt;DownloadItem&gt; &lt;DownloadDownloadItem&gt; ....... &lt;/DownloadDownloadItem&gt; &lt;DownloadDownloadItem&gt; ....... &lt;/DownloadDownloadItem&gt; &lt;DownloadDownloadItem&gt; ....... &lt;/DownloadDownloadItem&gt; &lt;/DownloadItem&gt; &lt;DownloadCommentItem&gt; ........ &lt;/DownloadCommentItem&gt; &lt;DownloadIntercomItem&gt; ........ &lt;/DownloadIntercomItem&gt; &lt;/Download&gt; </code></pre> <p>You can see the mapping between XmlElementName and the content of the XML string. I am at loss on how to do this.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload