c# - Get SOAP request body in proxy client -


i have application calls wcf service. monitoring , tracking purposes have log request messages application failed call service. loke need call operation called removesubscription , once failed(may network problem or wcf service down) log soap message xml or txt file.

generaly possible request soap contact in proxy class.

i found info can done extending soapextension class. if right way how register/inject new class extends soapextension channel stack.

edit : service not hosted in iis in windows service... right in case soapextension not right solution.

with wcf based client, can create endpoint behavior intercept request & response messages. technet article shows how access message being sent , response message. wcf client can generated either adding service reference in visual studio, using svcutil manually generate client code or rolling own proxy directly in code using channelfactory class.

your logging code write out request message status of requested , timestamp data store (file, database, etc.) when response message received, match request message somehow response message contents , update data store change status responded. selecting messages data store status of requested older time period list failed messages.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -