Click here to Skip to main content
14,743,536 members
Home » Discussions » Visual Basic
   

Visual Basic

 
GeneralRe: how to display image from gridview on picturebox Pin
romo2221-Apr-12 7:12
Memberromo2221-Apr-12 7:12 
AnswerRe: how to display image from gridview on picturebox Pin
Eddy Vluggen21-Apr-12 7:39
professionalEddy Vluggen21-Apr-12 7:39 
GeneralRe: how to display image from gridview on picturebox Pin
romo2221-Apr-12 7:57
Memberromo2221-Apr-12 7:57 
AnswerRe: how to display image from gridview on picturebox Pin
Eddy Vluggen21-Apr-12 8:03
professionalEddy Vluggen21-Apr-12 8:03 
GeneralRe: how to display image from gridview on picturebox Pin
romo2221-Apr-12 8:11
Memberromo2221-Apr-12 8:11 
GeneralRe: how to display image from gridview on picturebox Pin
Eddy Vluggen21-Apr-12 8:21
professionalEddy Vluggen21-Apr-12 8:21 
GeneralRe: how to display image from gridview on picturebox Pin
Wes Aday21-Apr-12 9:40
professionalWes Aday21-Apr-12 9:40 
QuestionSoap Envelope Response and Download Docs Pin
VBseasons20-Apr-12 21:53
MemberVBseasons20-Apr-12 21: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 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
<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:

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 Vluggen21-Apr-12 0:54
professionalEddy Vluggen21-Apr-12 0:54 
QuestionHelp! Saving data from a datagridview to a local table in Visual Studio Pin
AnthonyDailyMail20-Apr-12 9:10
MemberAnthonyDailyMail20-Apr-12 9:10 
AnswerRe: Help! Saving data from a datagridview to a local table in Visual Studio Pin
Eddy Vluggen21-Apr-12 5:18
professionalEddy Vluggen21-Apr-12 5:18 
GeneralRe: Help! Saving data from a datagridview to a local table in Visual Studio Pin
AnthonyDailyMail23-Apr-12 4:40
MemberAnthonyDailyMail23-Apr-12 4:40 
AnswerRe: Help! Saving data from a datagridview to a local table in Visual Studio Pin
Eddy Vluggen23-Apr-12 9:03
professionalEddy Vluggen23-Apr-12 9:03 
GeneralRe: Help! Saving data from a datagridview to a local table in Visual Studio Pin
AnthonyDailyMail23-Apr-12 5:36
MemberAnthonyDailyMail23-Apr-12 5:36 
GeneralChat without server Pin
Member 885590420-Apr-12 0:00
MemberMember 885590420-Apr-12 0:00 
GeneralRe: Chat without server Pin
Dave Kreskowiak20-Apr-12 4:28
mveDave Kreskowiak20-Apr-12 4:28 
AnswerRe: Chat without server Pin
Eddy Vluggen21-Apr-12 5:20
professionalEddy Vluggen21-Apr-12 5:20 
GeneralRe: Chat without server Pin
Member 422308723-Apr-12 2:37
MemberMember 422308723-Apr-12 2:37 
QuestionVisual Basic.net Pin
Hermaine18-Apr-12 22:39
MemberHermaine18-Apr-12 22:39 
GeneralRe: Visual Basic.net Pin
Richard MacCutchan18-Apr-12 23:40
mveRichard MacCutchan18-Apr-12 23:40 
AnswerRe: Visual Basic.net Pin
Simon_Whale19-Apr-12 4:06
professionalSimon_Whale19-Apr-12 4:06 
AnswerRe: Visual Basic.net Pin
Dave Kreskowiak19-Apr-12 7:06
mveDave Kreskowiak19-Apr-12 7:06 
AnswerRe: Visual Basic.net Pin
Sentenryu20-Apr-12 2:35
MemberSentenryu20-Apr-12 2:35 
GeneralRe: Visual Basic.net Pin
Hermaine22-Apr-12 19:56
MemberHermaine22-Apr-12 19:56 
QuestionRegular Expressions: dealing with a quote Pin
Brad Fackrell18-Apr-12 4:43
MemberBrad Fackrell18-Apr-12 4: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.