Would I be right in assuming that MSSOAPLib is a COM type library that you are using via interop? This is a somewhat strange way to be doing SOAP from .NET, given that it has a whole bunch of built-in support for making SOAP calls... Was this project ported from VB6?
But if it is, do you know what apartment model the COM classes you are using have? It's possible that you are being hosed by COM threading issues. Did changing the thread priority make any difference by the way? I see that you are now launching these threads with lower than normal priority, so I presume you've tried this now. I'm not familiar with Dan Appleman's book, but I still think the way that you are using threads here is suspect. (There's nothing wrong with the way they are being created and started that I can see. It's more of an architectural problem - the way you are using these threads is really bad for performance.) -- Ian Griffiths DevelopMentor ----- Original Message ----- From: "Jesse Sanders" <[EMAIL PROTECTED]> > Ian, > > Thanks for the reply. Here is the code for the SOAP class. I didn't write > the actual soap calls, but instead used the one created by my counterparts > at work. It would not surprise me if it is the source of the problem. The > create threads code is straight out of Dan Applemans moving to .Net book. > > The soap interface has 4 parameters: timeout, returnaddress, inputdate, and > requestid. > > Your help is greatly appreciated... I have been pulling my hair out trying > to get this figured out... nevermind the deadline! > > Thanks, > > Jesse > > Public Class SOAP > Private Const WRAPPER_ELEMENT_NAMESPACE = "http://tempuri.org/message/" > > Private Const c_strConnectString = > "Provider=SQLOLEDB.1;InitialCatalog=config;" & _ > "Password=;User > ID=sa;DataSource=172.24.176.167" > Private Threads() As System.Threading.Thread > > Private m_strServerName As String > Private m_strRequestType As String > Private m_strReturnAddress As String > Private m_strInputXML As String > Private m_lngRequestID As String > Private m_strServerIP As String > Private m_lngTimeout As Long = 5 > > Public Sub SendSingleRequest() > > Dim Serializer As MSSOAPLib.SoapSerializer > Dim Reader As MSSOAPLib.SoapReader > Dim Connector As MSSOAPLib.SoapConnector > > Dim strSQL As String > Dim strURL As String > > strURL = "http://" & m_strServerIP.ToString > > Select Case m_strRequestType > Case "Fixed Loan", "Fixed Commit", "Price A Loan" > strURL = strURL & "GfsReq.asp" > Case "Update Grid" > strURL = strURL & "Grids.asp" > Case "Rate Sheet" > strURL = strURL & "RateSheet.asp" > Case "Pair Off" > strURL = strURL & "PairOff.asp" > End Select > > > Try > '-- Set up the connector > Connector = New MSSOAPLib.HttpConnector() > Connector.Property("EndPointURL") = strURL > Connector.Property("Timeout") = 6000000 > Connector.BeginMessage() 'Nothing > > '-- Set up the Serializer > Serializer = New MSSOAPLib.SoapSerializer() > Serializer.Init(Connector.InputStream) > Serializer.startEnvelope() > Serializer.startBody() > > Select Case m_strRequestType > Case "Fixed Loan", "Fixed Commit", "Price A Loan" > Serializer.startElement("CalculatePrice", > WRAPPER_ELEMENT_NAMESPACE, , "m") > Case "Update Grid" > Serializer.startElement("UpdateGrid", > WRAPPER_ELEMENT_NAMESPACE, , "m") > Case "Rate Sheet" > Serializer.startElement("RequestRateSheet", > WRAPPER_ELEMENT_NAMESPACE, , "m") > Case "Pair Off" > Serializer.startElement("CalculatePairOff", > WRAPPER_ELEMENT_NAMESPACE, , "m") > End Select > > Serializer.startElement("TimeOut") > Serializer.writeString(m_lngTimeout) > Serializer.endElement() > > Serializer.startElement("ReturnAddress") > Serializer.writeString(m_strReturnAddress) > Serializer.endElement() > > Serializer.startElement("InputData") > Serializer.writeString(m_strInputXML) > Serializer.endElement() > > Serializer.startElement("RequestID") > Serializer.writeString(m_lngRequestID) > Serializer.endElement() > Serializer.endElement() > Serializer.endBody() > Serializer.endEnvelope() > Connector.EndMessage() > > Reader = New MSSOAPLib.SoapReader() > Reader.Load(Connector.OutputStream) > Catch E As Exception > EventLog.WriteEntry("GFSSoap.SOAP", E.Message, _ > EventLogEntryType.Error, 1, 1) > End Try > > Exit Sub > > End Sub > > Public Sub New(ByVal strServerName As String, _ > ByVal strRequestType As String, _ > ByVal strReturnAddress As String, _ > ByVal strInputXML As String, _ > ByVal lngRequestID As String, _ > ByVal strServerIP As String) > m_strServerName = strServerName > m_strRequestType = strRequestType > m_strReturnAddress = strReturnAddress > m_strInputXML = strInputXML > m_lngRequestID = lngRequestID > m_strServerIP = strServerIP > End Sub > > Protected Overrides Sub Finalize() > MyBase.Finalize() > End Sub > > Public Sub StartThreads(ByVal ThreadCount As Integer) > Dim Idx As Integer > > If ThreadCount < 1 Then ThreadCount = 1 > ReDim Threads(ThreadCount - 1) > Try > For Idx = 0 To ThreadCount - 1 > Threads(Idx) = New Threading.Thread(AddressOf > Me.SendSingleRequest) > Threads(Idx).Priority = > System.Threading.ThreadPriority.BelowNormal > Threads(Idx).IsBackground = True > Threads(Idx).Start() > Next > Catch E As Exception > EventLog.WriteEntry("GFSSoap.SOAP", E.Message, _ > EventLogEntryType.Error, 1, 1) > End Try > End Sub > End Class You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
