Is there a way to get a WCF service which needs to maintain backward compatibility with asmx clients to serialize exceptions as SoapExceptions rather than FaultException or FaultException?
I have some service clients that cannot be upgraded, but we're standardizing all our services to WCF... We've got the services to mimic the asmx soap/xml format, but I can't figure out how to alter WCF's fault behaviour.
WCF does not generate either SoapException or FaultException. It generates SOAP faults. The client may translate the faults into SoapException or FaultException.
If the client is an old-style ASMX client, then it will throw a SoapException when it receives a fault. A WCF client will throw a FaultException when it receives the fault.
The bottom line is that you shouldn't have to change anything.
Related
I'm working on a WCF service where I created a custom UserNamePasswordValidator to validate the client. If username or password are wrong a FaultException is thrown.
I use nServiceBus 5 in the WCF service to send the client message to some internal systems.
The issue is that if a FaultException is thrown because the client hasn't access to the service, the client's request is processed anyway because (I guess) nServiceBus is handling the exception also if I'm not inside an handler.
The bus is started inside a custom ServiceHostFactory.
How could I tell to nServiceBus to don't handle that kind of Exception?
I mean if a wcf client makes a call to wcf method, and then if wcf generates an exception which is uncaught at wcf side,
then it is my understanding that this error/exception at wcf side breaks the channel established between client/wcf by wcf proxy object(only if uncaught at wcf side)?
Is that true?
If true,then if i want to use same proxy object again (which was used to call wcf method when exception occurred) to make another call to wcf, may be in catch block at client end (may be for retrial of last call), then is there any way i can use that
or need to create/use new new proxy object?
I implemented a wcf web service by using wsHttpBinding. The SOAP message perfectly includes some of the important ws-addressing fields inlcuing wsa:MessageID, wsa:ReplyTo, wsa:To and wsa:Action.
The problem is that wsa:From filed is missing from the SOAP messages. Is there any way to have wsa:From in the soap messages when I use wsHttpBinding?
Thank you,
I am using a WCF web service client to send and receive SOAP messages from a non-WCF web service. I want to control timeouts but really confused by the different timeout settings presented on MSDN.
Is there a simple list of settings for a WCF client (regardless of the server--where I know if server has shorter timeouts they will rule!)? Does it matter by binding or contract (XmlSerizalizer or MessageContact) type?
Have you seen: Timeouts WCF Services? I think that particular question/answer fits what you are looking for.
I have created a wcf service with NetMsmq binding. And the operations are one way.
I wanted to handle the fault exception. However i found that the channel is not going to fault even after the exception is raised at the server side.
Can anybody tell me in what cases the wcf service will goes to fault state(provided while using NetMsmqBinding).