Serializing works but deserializing is missing data.
I am exposing a POST method in a wcf service for a given set of nested classes. Everything works fine, even serializing, except when I post the *same* xml I create through serializing an instance, the Umber.Amethysts property is empty.
[XmlRoot("MyRoot", Namespace = "myNamespace")]
public class MyRoot
private Indigo indigo;
public MyRoot()
this.indigo = new Indigo();
[XmlElement("Indigo")]
public Indigo Indigo
get
return this.indigo;
set
this.indigo = value;
public class Indigo
private Maroon maroon;
private Umber umber;
public Indigo()
this.maroon = new Maroon();
this.umber = new Umber();
[XmlElement("Maroon")]
public Maroon Maroon
get
return this.maroon;
set
this.maroon = value;
[XmlElement("Umber")]
public Umber Umber
get
return this.umber;
set
this.umber = value;
public class Umber
private List<Amethyst> amethysts;
public Umber()
this.amethysts = new List<Amethyst>();
[XmlElement("Amethysts", Namespace = "")]
public List<Amethyst> Amethysts
get
return this.amethysts;
set
this.amethysts = value;
public class Amethyst
private string name;
private string value;
[XmlElement("Name")]
public string Name
get
return this.name;
set
this.name = value;
[XmlElement("Value")]
public string Value
get
return this.value;
set
this.value = value;
If I manually create the instance:
MyRoot data = new MyRoot
Indigo = new Indigo
Maroon = new Maroon
SomeField = "text..."
Umber = new Umber
Amethysts = new List<Amethyst>
new Amethyst { Name = "foo", Value = "bar"},
new Amethyst { Name = "baz", Value = "biz"}
It serializes a pair of <Amethyst> tags but posting this very same serialized text representation back leaves the Umber element empty?
Anyone know what I am missing?
Thanks!
Hi Ritmo2k,
I have tested your code in my side, then in oder to get the xml data, I have created the following OperationContract GetDataUsingDataContract() with the RequestFormat=WebMessageFormat.Xml
and ResponseFormat=WebMessageFormat.Xml:
public MyRoot GetDataUsingDataContract()
MyRoot data = new MyRoot
Indigo = new Indigo
Maroon = new Maroon
SomeField = "text..."
Umber = new Umber
Amethysts = new List<Amethyst>
new Amethyst { Name = "foo", Value = "bar"},
new Amethyst { Name = "baz", Value = "biz"}
return data;
After that I can get the following result as following:
So please try to rebuild your project and test it again.
If it still can not help, please try to post a simple reproduce project in here.
Besides, if I have misunderstood you, please feel free to let me know.
Best Regards,
Amy Peng
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
I am working on a PC. My InDesign CS6 was working but is now missing its amtlib.dll file. To fix it it says to reinstall program but I was am idiot and didn't make a copy. Is there any way to reinstall this missing file?
It was bought for my son and he never registered it.
I still don't understand why Neema was trying to reinstall it when she didn't have the serial number but after she uninstalled it, said she couldn't reinstall it because I didn't have the serial number. I never had it yet she didn't have a problem with trying to install it originally.
Still won't buy another Adobe product again. I've talked to a lot of people who can't stand Adobe and I now know why. I can't even update Flash without my whole system crashing or getting a virus.
I won't re-purchase InDesign either. I realize it should have been registered and I explained that my email had been hacked and my proof of purchase was deleted with ALL of my emails and I also had a major virus after updating Flash.
I can't afford to buy the same product twice.
I will find out what other formats my book distributor (Ingram Books) accepts and purchase that program.
Not impressed with Adobe and will share my experience with others so they can be sure to register their product and make a copy of the program BEFORE allowing an Adobe employee to take control of their computers.
If you knew the answer to my question, customer support should have too.
Thanks for your help.
Denise -
I'm trying to print a poster I created and posted on my website, it was created in power point, saved as pdf, and uploaded using wordpress. It looks good online but is missing data when printed. It contains almost all the information except for about 6 lines, which happen to be important. Any thought are appreciated.
No its weird, everything was the same. I sort of resolved it, since he can view the PDF fine on his comupter but also wanted to print it, I just exported all the slides as JPEGS and made a new InDesign book with those on the pages and exported that as a PDF. Seemed to work for him, I just don't know what happened!
-
Hi am trying to save Data into a write to measurement file vi using a NI PXI 1042Q and DAQ NI PXI-6229 with a real time mode but it is not working but when i run it without uploading it into the PXI it save in to the file please find attached my vi
Attachments:
PWMs.vi 130 KBother problem is that the channel DAQmx only works at real time mode not on stand alone vi using Labview 8.2 and Real time 8.2
-
I purchased CS5 Design Standard about 5 years ago. Now I am trying to install second PC, but I got a message like " This serial number is not correct." I want to know the correct serial number, but I missed my ex adobe ID because I've changed my E-mail address.
It is not clear to me what your issue is with not being able to sign in to your Adobe account to find the serial number. You should still be able to sign in and find your serial number if you registered the software.
If your first PC is a Windows machine you might be able to extract the serial number from it using the Belarc Advisor
http://www.belarc.com/free_download.html -
I have aperture 3.2.4 on my laptop and have the serial number, but just bought a new MAC and I can't get the Ver 3.0 link to work. Anyone know how to move it from my laptop to our new mac?
I am talking about the Ver 3 download link that came with the purchase email.
That link is no longer available. Use "Migration Assistant" to copy your Applications from your old mac to the new Mac, then immediately run software update. Aperture Version 3.2 will not run on your new mac with Mavericks, you will have to Upgrade to version 3.4.5 at least - you can download this update from the Support page: Aperture 3.4.5
Then launch Aperture and enter your registration key and try now too update from version 3.4.5 to 3.5 from the AppStore. The AppStore will change your Aperture registration to an AppStore version, so you will able to reinstall by downloading from the AppSTore in future.
If you want transfer only Aperture and no other applications, do it manually: You will have to copy not only the application but folders from the libraries as well:
/Applications/Aperture.app
/Library/Application Support/Aperture/
~/Library/Application Support/Aperture/
Leonie -
I have Adobe Design Standard CS6 purchased 2013 with serial number but cannot find to download it onto a new mac laptop. When I try and add the 24-digit serial number to my account it doesn't seem to work?
CS6 - http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html
You can also download the trial version of the software thru the page linked below and then use your current serial number to activate it.
Be sure to follow the steps outlined in the Note: Very Important Instructions section on the download pages at this site and have cookies enabled in your browser or else the download will not work properly.
CS6: http://prodesigntools.com/adobe-cs6-direct-download-links.html -
I've had an iWeb site running for 4 months and I publish a monthly newsletter. Since August I've been unable to republish. The test connection under FTP settings works but I get an error message when I try to upload newsletter. Am I missing something?
Where are you hosting the site a what are you using to upload the site files to the server?
OT -
My old computer (a Sony) with my iTunes crashed. I have a new MAC and want to make sure I can keep all of my music (mostly from old CD's that have been lost). I bought iTunes match hoping that would work but it isn't using the data on my phone. HELP!
Since you have purchased a new Mac (which, BTW, is not typed in all capitals) why not buy a Time Capsule <http://www.apple.com/airport-time-capsule/> which is designed specifically to work with OS X and Time Machine?
You don't say what part of your Sony "crashed." If it was not the HDD it is possible to take the computer apart, put the HDD in an external case, then recover the data off of it (including the music) simply drag-n-drop. If it was the HDD that "crashed" that makes it more difficult.
If you are able to recover the music from the Sony you can then add it to the iTunes library on the Mac and iTunes Match will then scan, match and upload the tracks to be mirrored in the cloud. -
I just bought a new iMac and used the Migration Assistant to transfer my files. Initially, all was working, but now a week later, I get the message that the application manager is missing, and I cannot get Photoshop and InDesign to launch. For my personal use, I did not a need to join Creative Cloud. Have you any suggestions for a work-around?
Try to install Adobe application Manager from below link and check
Adobe - Adobe Application Manager : For Macintosh : Adobe Application Manager : Thank You -
my ipod touch was stolen and i need the serial number but i dont have the paper work or the box, so how do i get the serial number?
If you registered it, Apple can help you. Give them a call.
Change your iTunes (Apple ID) password along with any other password that was stored in the iPod. If any passwords are associated with credit cards, contact the CC company and get your card replaced (with a new number). If any passwords are associated with your bank or any savings institution, contact them also and discuss approprate action with them.
The "Find my..." function is pretty much useless if the device is in the hands of a thief. All that is necessary is for the thief to connect to any computer with iTunes and "Restore as new."
The only real protection you have is with the personal information on the device rather than the physical device itself. Something as small as an iPod should have a strong 8-digit (or longer) password AND be configured for automatic wipe in the event of ten consecutive incorrect password entries. -
I have Photoshop and Elements 9, and im getting a new computer. I would like to put them on the new one. I tried my serial number but it didnt work. I dont know what to do?
Error "The serial number is not valid for this product" | Creative Suite
-
I recently tried to use Photoshop CS4 that I have on my computer but I get the message:"Licensing for this product has stopped working." I have the serial number but not the media. How can I use this version?
You can get the installer here: Download CS4 products
It will install as a fully functional 30 day trial. Entering your serial number will convert it to a permanent version, Standard or Extended, depending on what serial number you purchased.
If you still have the license problem. get back to me with your OS details and the error code.
Gene -
Serial Number Works But Photoshop Wont Open
My photoshop trial endend but i saved a serial number for when it did and i put it in and it says it works but then when i press continue it says press close and reopen it and it wont open
Hi,
I am not quite able to figure what you mean when you say that you saved your serial number. Did you purchase the software from Adobe and get the serial number? In that case, you could contact adobe customer support to solve your problem. (http://www.adobe.com/support/contact/) -
I just used stellar phoenix mac data recovery and it seemed to work but now my files won't open. Even though they are "jpeg, mov" files, the error message is "could not be opened". The movie's file format isn't recognized. " Any help or are they corrupted?
Sounds to me like the file is probably corrupt. If you had hard drive corruption or damage, that could easily result in recovered files not being fully intact. If you were trying to recover accidentally deleted files, it's possible they might have been partially overwritten before recovering. There are never any guarantees with file recovery.
Without more information on the circumstances that led you to try recovery, it's hard to give advice on what to try from here. You could always try another file recovery tool, like Data Rescue 3. Just be sure you're taking appropriate precautions when doing recovery. See Recovering deleted files.
Maybe you are looking for
-
hi all.. can any one provide me with the links od the site tat provide me with the abap tips on performance tuning in abap,reports, ALV smart forms,IDOC, DDIC objects .. and entire abap.. thnx
-
Error while installing the Microsoft Dynamics CRM 2013 Report Authoring Extension set up
HI Experts, I am trying to install Report Authoring extension tool to work with MS CRM 2015 online reports but unable to install, getting below error even though I am having VS 2013, SQL Server 2014 and Data tools for VS 2013 installed on my machine.
-
Can someone help with not being able to share any documents?
-
How to use dynamic column fields in formulas
Hi, we changed from CR 8.5 to CR XI R2. Many of our reports use dynamic queries with different count of columns. These reports are designed for the maximum count of columns. This works fine with CR 8.5 but with CR XI R2 it seems to be that if one of
-
CS5 Photomerge - how to avoid those strange jig-saw lines in the sky
Here is one image out of 4 that I am merging [just an example of one of many I do] you will note that the sky area to the left of the rainbow is clear and normal. When using Photomerge direct from bridge and on RAW files regardless of resolution I am