473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

HELP? Having some problems with XML Serialization...


Hi,

I seem to be having a bit of a problem serializing a complex object into
XML. I've done this many times with simpler objects and it's always worked
just fine.

The error I'm getting is the natorious "File or assembly name
[asciijunk].dll, or one of its dependencies was not found. I have turned on
XML Serialization debugging int the web.config file, so I have all of the
output generated by the serializer.

When I examine the .out file generated there, I have the following:

==================================================
c:\Documents and Settings\DEV100\ASPNET\Local
Settings\Temp\5l_xlg0l.0.cs(591,95): error CS1502: The best overloaded method
match for
'PowerWare.NET.SubSystems.Billing.DataObjects.Invo iceItemCollection.Add(PowerWare.NET.SubSystems.Bil ling.DataObjects.InvoiceItem)'
has some invalid arguments
==================================================

There are more, and I can provide the entire set of output files if anyone
is interested. I wasn't sure it was appropriate to post that much stuff here
on the initial question.

I'm really stumped as to where to go from here. The problem is obviously
being caused by the Serializer not processing my object correctly. I can't
figure out how to alter my object to make it work. I have examined the
entire object to see if there is something different with one of the members
or collections, but I haven't been able to find anything.

If anyone has any experience debugging this type of problem, please let me
know. I could sure use another brain to go after this with.

Thanks.
Nov 12 '05 #1
2 1582

Does anyone read these? I sent this over a month ago and nobody has
bothered to make an attempt at helping...
"n8wei" wrote:

Hi,

I seem to be having a bit of a problem serializing a complex object into
XML. I've done this many times with simpler objects and it's always worked
just fine.

The error I'm getting is the natorious "File or assembly name
[asciijunk].dll, or one of its dependencies was not found. I have turned on
XML Serialization debugging int the web.config file, so I have all of the
output generated by the serializer.

When I examine the .out file generated there, I have the following:

==================================================
c:\Documents and Settings\DEV100\ASPNET\Local
Settings\Temp\5l_xlg0l.0.cs(591,95): error CS1502: The best overloaded method
match for
'PowerWare.NET.SubSystems.Billing.DataObjects.Invo iceItemCollection.Add(PowerWare.NET.SubSystems.Bil ling.DataObjects.InvoiceItem)'
has some invalid arguments
==================================================

There are more, and I can provide the entire set of output files if anyone
is interested. I wasn't sure it was appropriate to post that much stuff here
on the initial question.

I'm really stumped as to where to go from here. The problem is obviously
being caused by the Serializer not processing my object correctly. I can't
figure out how to alter my object to make it work. I have examined the
entire object to see if there is something different with one of the members
or collections, but I haven't been able to find anything.

If anyone has any experience debugging this type of problem, please let me
know. I could sure use another brain to go after this with.

Thanks.

Dec 10 '05 #2

Sounds like you have some circular reference(s) in your objects.
Although this works when it comes to domain objects, .Net Serializer
can't handle it.

Another issue might be actual null values trying to be pushed into
fields or properties that haven't been marked Nullable. Like this:
[System.Xml.Serialization.XmlElementAttribute("Stat es",
IsNullable=true)]

If you're using transforms, try a Choose (testing on your field) and an
xsi:nil tag instead. This worked for some embedded singletons I had to
deal with that weren't operating as expected. This is known behavior.
Like this:

<xsl:choose>
<xsl:when test="StateID">
<States>
<xsl:for-each select="StateID">
<StateID>
<xsl:value-of select="."/>
</StateID>
</xsl:for-each>
</States>
</xsl:when>
<xsl:otherwise>
<States xsi:nil="true"/>
</xsl:otherwise>
</xsl:choose>
Cheers,
-Chris
--
Jumpiebeen
------------------------------------------------------------------------
Jumpiebeen's Profile: http://www.highdots.com/forums/m1606
View this thread: http://www.highdots.com/forums/t3076835

Dec 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: AA | last post by:
I want to Deserialize this simple xml... ==================================================================== <SubmitReq...
4
by: Jeff T. | last post by:
Hello, I have an existing set of C# classes that encapsulate our application data. They are in a heirachy with each subclass defining more specific types of data. I would like to serialize these...
1
by: Opa | last post by:
Hi I'm having problem serialization an object instance which contains a public property on the object type My object hierarchy is many levels deep, so for simplicty I created to following which...
8
by: Martin Horn | last post by:
Hi, I am trying to add extra functionality to the standard RichText control, but I've fallen at the first hurdle,can someone take a look at the following code and tell me why it fails to return...
0
by: Daniel Thune, MCSE | last post by:
I am having a problem with formatting a SOAP Header in a .Net client. The client calls a Java Axis 1.1 based web service. In order to authenticate the caller, the web service call is intercepted by...
0
by: jennifer.perkins | last post by:
I've seen a couple posts by people having similar problems, but the suggested solutions I've tried so far haven't worked. I'm using a SOAP client in VB.Net (constructed by wsdl.exe) and the...
1
by: Christo | last post by:
as part of a project at uni i have been asked to provide object persistance through files I have opted for serialization my question is quite simple when u use serialization is an object...
3
by: namewitheldbyrequest | last post by:
"The XML element 'EnableTheming' from namespace 'http://tempuri.org/' is already present in the current scope" I created a Web Service: I imported System.Data.SqlClient so I could access SQL...
0
by: neoret | last post by:
Hello. I have developed an application (an office addin).The application works fine with no error messages on my devoping machine (that machine is not connected to any domains). I have...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.