Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
DynDeveloper.com

DynDeveloper.com

Sign Up Now!Log In
Lisa 4/23/2010 1:31:10 PM

Be careful with whitespace in node when serializing eConnect xml

No question, just something else to share from my co-worker.

Dim xs As New XmlSerializer(GetType

(eConnectType))

 

xs.Serialize(sw, econnect)

 

People might be interested in an issue I’ve run into with eConnect SOP. (And even if you’re not, I’m going to tell you anyway because it took me way too long to figure this out because there are a bunch of "yes, set default taxes" flags that I had to grind through before I realized what was happening, and that the documentation explicitly says "pass ‘’ into this parameter to clear it…")

It appears that in going from the model objects to the XML document, the serializer will collapse a run of whitespace into an empty node. (But it won’t when it’s something like "AARONFIT0001 " - whitespace is a wonky area in XML-land…) So (for example) if you want to leave the per-line-item Ship To Tax Schedule blank with a "<TAXSCHID> <TAXSCHID>", it will end up as <TAXSCHID></TAXSCHID> in the XML, and then when eConnect calls the stored procedure, it passes the argument as @I_vTAXSCHID=default Instead of actually passing in the whitespace, which is what I want. 

 

Version: Unknown or N/A
Section: eConnect








Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables