Marshalling and Unmarshalling XML with Force WSC
Hi, I'm having some problems handling XML files with the Force WSC. First, an issue with unmarshalling CustomObject files:
com.sforce.ws.ConnectionException: UTF-8Not a valid enumeration for type: class com.sforce.soap.metadata.Encoding
I can see that the enumeration com.sforce.soap.metadata.Encoding is expecting "UTF_8" rather than "UTF-8", however the metadata is retrieved with the hyphen. Do I really have to find and replace this case before I can unmarshal the file properly? For the record, I used Force WSC to create these classes, Force WSC to retrieve the metadata, and I am using Force WSC to unmarshal the files. Is this framework incompatible with itself?
The issue with marshalling those CustomObject files is that I can't seem to save them in the same format that they were downloaded in. Whenever I marshall a metadata object to an XML file, it adds namespace prefixes ("n1:") to every tag, which is not how I want to store the data. So is there any way to marshal these files without the namespace prefixes, or will I have to do this myself after they are written?
Thanks in advance.