Click here to Skip to main content
15,886,873 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to display image from gridview on picturebox Pin
romo2221-Apr-12 6:12
romo2221-Apr-12 6:12 
AnswerRe: how to display image from gridview on picturebox Pin
Eddy Vluggen21-Apr-12 6:39
professionalEddy Vluggen21-Apr-12 6:39 
GeneralRe: how to display image from gridview on picturebox Pin
romo2221-Apr-12 6:57
romo2221-Apr-12 6:57 
AnswerRe: how to display image from gridview on picturebox Pin
Eddy Vluggen21-Apr-12 7:03
professionalEddy Vluggen21-Apr-12 7:03 
GeneralRe: how to display image from gridview on picturebox Pin
romo2221-Apr-12 7:11
romo2221-Apr-12 7:11 
GeneralRe: how to display image from gridview on picturebox Pin
Eddy Vluggen21-Apr-12 7:21
professionalEddy Vluggen21-Apr-12 7:21 
GeneralRe: how to display image from gridview on picturebox Pin
Wes Aday21-Apr-12 8:40
professionalWes Aday21-Apr-12 8:40 
QuestionSoap Envelope Response and Download Docs Pin
VBseasons20-Apr-12 20:53
VBseasons20-Apr-12 20:53 
My Windows forms application sends and receives SOAP messages from/to an https server. Messages with simple and complex results work fine. Still one request that I issue and I don't know how to handle its response.

The response that I don't know to to use - in order to download a document - is as follows:
//*
XML
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <SOAP-ENV:Body>
    <ns1:DownloadResponse xmlns:ns1="urn:URNNAME">
      <return href="cid:325410.3217896541231.east-soap.sectown.madrid.co" />
    </ns1:DownloadResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

*//
Its clear that the document to download is referred to as
HTML
<return href="cid:325410.3217896541231.east-soap.sectown.madrid.co" />


But I don't know how should I handle that CID: (Content-id)

Below is the code that sends the request and receives the response:

VB
Private Function SendRequest(ByVal EnvelopContents As String, ByVal ServiceName As String, ByVal FullPathURL As String) As Boolean
        Dim myWebRequest As HttpWebRequest = HttpWebRequest.Create(FullPathURL)
        'Set Envelop Parameters
        Dim encoding As New ASCIIEncoding()
        Dim byte1 As Byte() = encoding.GetBytes(EnvelopContents)        
        With myWebRequest            
            .Method = "POST"
            ' Set the 'ContentType' property of the WebRequest.            
            .ContentType = "text/xml"
            ' Set the 'ContentLength' property of the WebRequest.
            .ContentLength = EnvelopContents.Length
            .Headers.Add("Accept-Encoding", "gzip,deflate")
            'authentication section
            Dim Certificato As X509Certificate = SelCert()
            .PreAuthenticate = True
            ....
            ....
            ....
        End With
        Try
            Dim newStream As Stream = myWebRequest.GetRequestStream()
            newStream.Write(byte1, 0, byte1.Length)
            ' Close the Stream object.
            newStream.Close()
            ' Assign the response object of 'WebRequest' to a 'WebResponse' variable.
            Using myWebResponse As WebResponse = myWebRequest.GetResponse()
                '' success in here
                Dim dataStream As Stream = myWebResponse.GetResponseStream()

                ' Open the stream using a StreamReader for easy access.
                Dim reader As New StreamReader(dataStream)

                ' Read the content.
                Dim responseFromServer As String = reader.ReadToEnd()
                '' deal with response
                Return True
            End Using
        Catch ex As WebException
				'deal with exception				
        End Try
    End Function

AnswerRe: Soap Envelope Response and Download Docs Pin
Eddy Vluggen20-Apr-12 23:54
professionalEddy Vluggen20-Apr-12 23:54 
QuestionHelp! Saving data from a datagridview to a local table in Visual Studio Pin
AnthonyDailyMail20-Apr-12 8:10
AnthonyDailyMail20-Apr-12 8:10 
AnswerRe: Help! Saving data from a datagridview to a local table in Visual Studio Pin
Eddy Vluggen21-Apr-12 4:18
professionalEddy Vluggen21-Apr-12 4:18 
GeneralRe: Help! Saving data from a datagridview to a local table in Visual Studio Pin
AnthonyDailyMail23-Apr-12 3:40
AnthonyDailyMail23-Apr-12 3:40 
AnswerRe: Help! Saving data from a datagridview to a local table in Visual Studio Pin
Eddy Vluggen23-Apr-12 8:03
professionalEddy Vluggen23-Apr-12 8:03 
GeneralRe: Help! Saving data from a datagridview to a local table in Visual Studio Pin
AnthonyDailyMail23-Apr-12 4:36
AnthonyDailyMail23-Apr-12 4:36 
GeneralChat without server Pin
Member 885590419-Apr-12 23:00
Member 885590419-Apr-12 23:00 
GeneralRe: Chat without server Pin
Dave Kreskowiak20-Apr-12 3:28
mveDave Kreskowiak20-Apr-12 3:28 
AnswerRe: Chat without server Pin
Eddy Vluggen21-Apr-12 4:20
professionalEddy Vluggen21-Apr-12 4:20 
GeneralRe: Chat without server Pin
Member 422308723-Apr-12 1:37
Member 422308723-Apr-12 1:37 
QuestionVisual Basic.net Pin
Hermaine18-Apr-12 21:39
Hermaine18-Apr-12 21:39 
GeneralRe: Visual Basic.net Pin
Richard MacCutchan18-Apr-12 22:40
mveRichard MacCutchan18-Apr-12 22:40 
AnswerRe: Visual Basic.net Pin
Simon_Whale19-Apr-12 3:06
Simon_Whale19-Apr-12 3:06 
AnswerRe: Visual Basic.net Pin
Dave Kreskowiak19-Apr-12 6:06
mveDave Kreskowiak19-Apr-12 6:06 
AnswerRe: Visual Basic.net Pin
Sentenryu20-Apr-12 1:35
Sentenryu20-Apr-12 1:35 
GeneralRe: Visual Basic.net Pin
Hermaine22-Apr-12 18:56
Hermaine22-Apr-12 18:56 
QuestionRegular Expressions: dealing with a quote Pin
Brad Fackrell18-Apr-12 3:43
Brad Fackrell18-Apr-12 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.