Custom Message Encoder for WCF Rest web service

Ακυρώθηκε Αναρτήθηκε Oct 5, 2010 Πληρώθηκε κατά την παράδοση
Ακυρώθηκε Πληρώθηκε κατά την παράδοση

We receive XML posts to our WCF REST web service (ASP.NET, C#) and sometimes the text for some of the elements may contain an ampersand. We suggested to the company that is submitting the posts that they enclose the text in CDATA sections to avoid the parsing error that results when there is an ampersand in the text, but they have reasons for not changing their application.

It appears that the only option is to define a custom binding, based on a custom message encoder, which fixes the incoming stream before passing it through the XmlDictionaryReader bus. Optimally the fix would be to change the literal ampersand to &amp.

Another developer has developed a custom message encoder for our REST service, but is not sure how to get it to work. I can provide this code.

I came across this article that may be helpful. It explains the steps needed to implement a custom message encoder to change the content of the XML post, but not sure if it is applicable to dealing with invalid XML - a literal ampersand:

[url removed, login to view]

Υπηρεσίες Ιστού Amazon Μηχανολογία Διαχείριση Πρότζεκτ Αρχιτεκτονική Λογισμικού Δοκιμή Λογισμικού

Ταυτότητα Εργασίας: #3772367

Σχετικά με την εργασία

1 πρόταση Απομακρυσμένη εργασία Ενεργό Oct 11, 2010

1 freelancer κάνει προσφορά κατά μέσο όρο $170 για αυτή τη δουλειά

piXelicidio

See private message.

$170 USD σε 21 μέρες
(43 Αξιολογήσεις)
7.3