Jump to content

Wikipedia:Reference desk/Archives/Computing/2014 July 17

From Wikipedia, the free encyclopedia
Computing desk
< July 16 << Jun | July | Aug >> July 18 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


July 17

[edit]

Custom XML serialiser in .NET WCF code?

[edit]

I have run into a rather unusual problem at work. We use a WCF service written in .NET C# code. This is otherwise OK, but now it has come into attention that the WCF service should not map the type xsd:decimal in the SOAP messages to System.Decimal as it does by default, but instead into our internal Decimal class, because System.Decimal has too little precision. I think I need to write a custom XML serialiser for this, but how do I go about doing it? The only difference is the handling of the xsd:decimal type. I would like to get this done by writing as little custom code as possible. JIP | Talk 11:07, 17 July 2014 (UTC)[reply]

You could create a wrapper class around the System.decimal, and create a custom serialiser/deserialiser for it. It'd probably be less work than writing a serialiser/deserialiser for the parent class. CS Miller (talk) 15:04, 17 July 2014 (UTC)[reply]
But how will the WCF service know that xsd:decimal should be deserialised to this new class instead of System.Decimal? From what I understand, the incoming SOAP messages could contain numbers that are so precise that if they ever get made into System.Decimal objects, we lose precision, or the whole process fails. JIP | Talk 15:14, 17 July 2014 (UTC)[reply]
If I understand WCF correctly, it uses DataContractSerializer to serialise and deserialize C#.net objects to/from XML. It looks (frankly I haven't tried it) that there are two ways to customise its behaviour to handle new types. The first is (statically) to add a new known type, which has its own handler. The second is to dynamically handle things with a custom resolver, which is provided as a helper when you create a new deserialiser (the resolvename() method is the locus of your interest). What I don't know is whether either of these can override an existing type; I don't see any documentation, particularly for the latter way of doing things, which says you can't - I think you'll have to try it and see. -- Finlay McWalterTalk 17:53, 18 July 2014 (UTC)[reply]

Terminology of email accounts

[edit]

I admin a site that has many users and many email addresses. I have a solid idea of what they do and what they are but for non-tech people, I sometimes have a hard time coming up with a succinct term for the difference between the accounts.

There are Forwards which we mostly use as a dispersion sort of thing, e.g. something comes in to Billing@ and that forwards those messages to several people.

Then there are the regular email accounts which are basically meant for individual people, e.g. Mary@, Joe@, etc.

What is the common terminology to differentiate between these types of accounts? Would you term them as Forwards and Accounts? Forwards and Inboxes? The problem my brain has is that the forwards are accounts as well but not really. So, what's the common term to differentiate for explanations to non-tech people? Dismas|(talk) 12:00, 17 July 2014 (UTC)[reply]

I'd call the former a role address, or a role account. CS Miller (talk) 15:01, 17 July 2014 (UTC)[reply]
Another option might be "service account" or "service address", compared to "personal account" or "personnel account", etc. One common thing is to have addresses like help@example.com or webmaster@example.com these are for roles or services, and not designed to reach a specific person. As I'm sure you've discovered, it's very hard to use google to find documentation on this... SemanticMantis (talk) 17:23, 17 July 2014 (UTC)[reply]
Or how about a "bot account", meaning a bot is used to forward the mail from there. StuRat (talk) 17:54, 17 July 2014 (UTC)[reply]
It's not a bot though. I would tend to describe the "forwarding" address as an email alias. In my organisation (and in others) [1], [2], these accounts are known as generic email addresses.--Kateshortforbob talk 11:59, 18 July 2014 (UTC)[reply]