XmlElementAttribute.Form support

G

Guest

I am currently trying to create a mobile application that accesses a document
literal web service. When I add the web reference for this service based on
it's WSDL, the generated class file for the service contains usage of
XmlElementAttribute.Form property. For example:

[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string username;

This gives me compile errors as it apparently does not exist in the compact
framework, however the MSDN documentation says that it is supported by the
compact framework:

http://msdn.microsoft.com/library/d...ializationxmlelementattributememberstopic.asp

However my local documentation (which is version 1.1.0) says that it is not.
Frome this, I would gather than an update to the compact framework makes this
property available; however I have installed compact framework SP2 to no
avail. Are there additional updates that I require for Visual Studio 2003 in
order to get this to work? Are there any known work-arounds for this problem?
I have been trawling the web for a day to try and find an answer to this
problem
to no avail.
 
S

Stuart Celarier

Iain, have you discovered anything further on this issue?

Cheers,
Stuart Celarier, Fern Creek
 
G

Guest

Unfortunately not, I am currently resorting to manually removing all
references to
the Form attribute in the generated class file. I've yet to see whether this
will horribly break communication with the web service, and my guess is that
it will.
 
G

Guest

I installed the .NET Compact Framework SP2 redistributable, however this
hasn't made any difference (I still get the same compile errors). Is there an
additional SDK update for visual studio 2003 that I need, but haven't yet
found?
 
G

Guest

I have managed to solve this problem. It involves manually replacing the DLL
files in your "Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE" directory with newer ones
taken from the CAB files that are distributed as part of the service pack
distributions. As Alex says, Service Pack 2 has changes in it that make the
form property available, however service pack 3 is also available now so get
that instead.

1. Unpack the netcf.all.wce4.X86.cab file (using the "expand" command line
tool if you don't have a compression tool that supports CAB files), and
rename SY40C7~1.018 to System.Xml.dll
2. Move this file into your Windows CE dir as above. I recommend you back
up the original in case this doesn't work.

If you open visual studio again and compile it should no longer give errors
related to XmlElementAttribute. You may need to move other dll files also - I
had to guess at what the files were based on their sizes (there won't be a
huge difference in file size between versions, so if two files are within a
few kilobytes of each other then they are most likely the same dll). I wish I
knew a better way to translate the file names, however I wasn't able to dig
up any more information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top