SOAPUI not showing SOAP Response

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Leafy
    New Member
    • Jan 2009
    • 2

    SOAPUI not showing SOAP Response

    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 ?

    Code:
     ' Save the Stream representing the SOAP request or SOAP response into
        ' a local memory buffer.
        Public Overrides Function ChainStream(ByVal stream As Stream) As Stream
            originalStream = stream
            internalStream = New MemoryStream()
            Return internalStream
        End Function
    
    ' Write the SOAP response message out to the temp file.
    
        Public Sub WriteResponse(ByVal message As SoapMessage)
            internalStream.Position = 0
            Dim fs As New FileStream(m_filename, FileMode.Append, FileAccess.Write)
            Copy(internalStream, fs)
            fs.Close()
            If xmlerror <> "" Then
                Dim lfs As New FileStream(m_filename, FileMode.Open, FileAccess.Read)
                Dim errorstream As New FileStream(errorlogfilename, FileMode.Append, FileAccess.Write)
                Dim errorw As New StreamWriter(errorstream)
                errorw.WriteLine(ControlChars.NewLine)
                errorw.WriteLine("ERROR: " & DateTime.Now.ToString())
                errorw.Flush()
                Copy(lfs, errorstream)
                errorstream.Close()
                lfs.Close()
            Else
                Dim lfs As New FileStream(m_filename, FileMode.Open, FileAccess.Read)
                Dim logstream As New FileStream(logpath, FileMode.Create, FileAccess.Write)
                Copy(lfs, logstream)
                lfs.Close()
                logstream.Close()
            End If
            internalStream.Position = 0
            Copy(internalStream, originalStream)
            internalStream.Position = 0
        End Sub
    
        ' Write the SOAP request message out to the temp file.
    
        Public Sub WriteRequest(ByVal message As SoapMessage)
            Copy(originalStream, internalStream)
            Dim fs As New FileStream(m_filename, FileMode.Create, FileAccess.Write)
            internalStream.Position = 0
            Copy(internalStream, fs)
            fs.Close()
            internalStream.Position = 0
        End Sub
    
    ' Copy stream.
    
        Sub Copy(ByVal fromStream As Stream, ByVal toStream As Stream)
            Dim reader As New StreamReader(fromStream)
            Dim writer As New StreamWriter(toStream)
            writer.WriteLine(reader.ReadToEnd())
            writer.Flush()
        End Sub
    I'm new to XML/SOAP/Web services so I'm hoping someone can recommend something here.

    Thanks!
    Leafy
    Last edited by Leafy; Jan 20 '09, 12:54 AM. Reason: Solution Found
Working...