Connecting Tech Pros Worldwide Help | Site Map

SOAPUI not showing SOAP Response

Newbie
 
Join Date: Jan 2009
Posts: 2
#1: Jan 20 '09
Looks like it had to do with my breakpoints. It must have slowed my transaction time causing a timeout. It just appeared that SOAPUI wasn't returning a response.

Thanks!
Leafy

---------


Hi Folks! When I call my web service via SOAPUI I'm not getting a response back. I'm not sure if its a SOAPUI thing or something in my code. Anyone have any recommendations?

Expand|Select|Wrap|Line Numbers
  1.  ' Save the Stream representing the SOAP request or SOAP response into
  2.     ' a local memory buffer.
  3.     Public Overrides Function ChainStream(ByVal stream As Stream) As Stream
  4.         originalStream = stream
  5.         internalStream = New MemoryStream()
  6.         Return internalStream
  7.     End Function
  8.  
  9. ' Write the SOAP response message out to the temp file.
  10.  
  11.     Public Sub WriteResponse(ByVal message As SoapMessage)
  12.         internalStream.Position = 0
  13.         Dim fs As New FileStream(m_filename, FileMode.Append, FileAccess.Write)
  14.         Copy(internalStream, fs)
  15.         fs.Close()
  16.         If xmlerror <> "" Then
  17.             Dim lfs As New FileStream(m_filename, FileMode.Open, FileAccess.Read)
  18.             Dim errorstream As New FileStream(errorlogfilename, FileMode.Append, FileAccess.Write)
  19.             Dim errorw As New StreamWriter(errorstream)
  20.             errorw.WriteLine(ControlChars.NewLine)
  21.             errorw.WriteLine("ERROR: " & DateTime.Now.ToString())
  22.             errorw.Flush()
  23.             Copy(lfs, errorstream)
  24.             errorstream.Close()
  25.             lfs.Close()
  26.         Else
  27.             Dim lfs As New FileStream(m_filename, FileMode.Open, FileAccess.Read)
  28.             Dim logstream As New FileStream(logpath, FileMode.Create, FileAccess.Write)
  29.             Copy(lfs, logstream)
  30.             lfs.Close()
  31.             logstream.Close()
  32.         End If
  33.         internalStream.Position = 0
  34.         Copy(internalStream, originalStream)
  35.         internalStream.Position = 0
  36.     End Sub
  37.  
  38.     ' Write the SOAP request message out to the temp file.
  39.  
  40.     Public Sub WriteRequest(ByVal message As SoapMessage)
  41.         Copy(originalStream, internalStream)
  42.         Dim fs As New FileStream(m_filename, FileMode.Create, FileAccess.Write)
  43.         internalStream.Position = 0
  44.         Copy(internalStream, fs)
  45.         fs.Close()
  46.         internalStream.Position = 0
  47.     End Sub
  48.  
  49. ' Copy stream.
  50.  
  51.     Sub Copy(ByVal fromStream As Stream, ByVal toStream As Stream)
  52.         Dim reader As New StreamReader(fromStream)
  53.         Dim writer As New StreamWriter(toStream)
  54.         writer.WriteLine(reader.ReadToEnd())
  55.         writer.Flush()
  56.     End Sub
I'm new to XML/SOAP/Web services so I'm hoping someone can recommend something here.

Thanks!
Leafy
Reply