Skip to main content

WSE2 Tracing SOAP messages

Microsoft Web Services Enhancements (WSE 2.0) allows you to trace incoming and out going SOAP message. Monitor the trace files and purge the files before they become too big. If the files get too big, WSE 2.0 throws all kind of communication errors.

My webservice is behind a firewall and is hosted in a windows service on a particular port (xxxx). The client (outside the firewall) communicates with the windows service over TCP.

One fine day, the communication between the client and service broke. I found the following stack trace in my log file. From the stack trace, my initial thought was the service might be down and verfied the service to be running. Next, I connected my local system to the service and verfied that the communicate is fine. Since the service is running properly, I verified with the sys admin that the port (xxxx) on the router is mapped correctly to the server hosting the webservice.

After banging my head and Googling for hours I could not come up with a definite reason on why the client could not communicate with the service. When I tried to open the trace files on the client, I realised them to be too big and right then I had that AHA moment. I went ahead and disabled WSE SOAP message tracing and you got it right, the app is back on its feet smiling.

Error Message:Write Failure: Socket is not connectedStack Trace:Server stack trace: at Microsoft.Web.Services2.Messaging.SoapTcpNetworkStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state) at Microsoft.Web.Services2.Messaging.SoapTcpNetworkStream.Write(Byte[] buffer, Int32 offset, Int32 count) at Microsoft.Web.Services2.Dime.DimeRecord.WriteHeader(Boolean endOfRecord, Int64 contentLength) at Microsoft.Web.Services2.Dime.DimeRecord.WriteChunkedPayload(Boolean endOfRecord, Boolean endOfMessage, Byte[] bytes, Int32 offset, Int32 count) at Microsoft.Web.Services2.Dime.DimeRecord.WriteChunkedPayload(Boolean endOfRecord, Boolean endOfMessage) at Microsoft.Web.Services2.Dime.DimeRecord.Close(Boolean endOfMessage) at Microsoft.Web.Services2.Dime.DimeWriter.Close() at Microsoft.Web.Services2.Messaging.SoapDimeFormatter.Microsoft.Web.Services2.Messaging.ISoapFormatter.Serialize(SoapEnvelope envelope, Stream stream) at Microsoft.Web.Services2.Messaging.SoapTcpConnection.SerializeMessage(SoapEnvelope envelope) at Microsoft.Web.Services2.Messaging.SoapTcpOutputChannel.Send(SoapEnvelope message) at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase) at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData) at Microsoft.Web.Services2.Messaging.SendDelegate.EndInvoke(IAsyncResult result) at Microsoft.Web.Services2.Messaging.SoapOutputChannel.EndSend(IAsyncResult result) at Microsoft.Web.Services2.Messaging.SoapSender.EndSend(IAsyncResult result) at Microsoft.Web.Services2.Messaging.SoapClientAsyncResult.OnSendComplete(IAsyncResult result)

Comments

Popular posts from this blog

Find the cause of poor performance in Sql Server

I found the following two part article by Gail Shaw on Simple-Talk really helpful in trouble shooting poorly performing queries in Sql Server. The articles talks about spotting poorly performing queries with the help of the Profiler, understand Sql Server Query plans and fine tune the peformance using proper indexes. Part 1: http://tinyurl.com/ccl6gj Part 2: http://tinyurl.com/okcuqg

Kill a remote user session remotely

When trying to connect to your Windows 2000/2003 server remotely, you may receive the following error. "The terminal server has exceeded the maximum number of allowed connections." You could kill one or more of those connections by using PsExec tool that can be downloaded from the following link. This tool and a bunch of others were developed by SysInternals which was bought by Microsoft. http://www.microsoft.com/technet/sysinternals/utilities/pstools.mspx Open your command prompt and from the directory that contains the psexec utility, do the following 1) psexec \\x.x.x.x -u user -p password cmd (this will give you access to the cmd prompt on the server) Example: psexec \\127.0.0.1 -u admin -p password cmd 2) once you get the command prompt run the command qwinsta to get a list of all Terminal Services connections. Each connection has an Id Number. 3) Run the command logoff [id# of session to quit] /v (this will kill the connection with that id #) Example: logoff 2 /v Once ...

SharePoint: Comparing dates in XSLT

In one of my sharePoint projects, I had to compare a date with the current date in XSLT. As it turned out, there is no support for date comparision in XSLT. This is how I went about doing it. The trick involves converting the date string into a number Say the date is in ISO format YYYY-MM-DDTHH:MM:SSZ (for example, 2001-01-21T22:54:47Z). Say we have a variable DueDate <xsl:variable name="DueDate" select="'2001-01-21T22:54:47Z'"> Replace the dashes in the string with empty string Take the first 10 character in the date sring convert the string to number number(translate(substring(@DueDate,1,10),'-','')) On doing the above we get: 20010121 We can do the same thing with the date to compare. We can compare the duedate with the current date in SharePoint as follows number(translate(substring(@DueDate,1,10),'-','')) & lt; number(translate(substring(ddwrt:TodayIso(),1,10),'-','')) You can apply the same log...