473,320 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

HTTP Request - SOAP

A while ago I asked about how to use the HTTPRequest
object for sending a soap request. Somebody responded
with the code that I needed, but I recently lost it and I
really need it back now. Can anybody help me here? I
really this code for my app.

Thanks.
Nov 20 '05 #1
10 2799
Hi Jason,

Go to Google.
Click on Groups.
Click on Advanced.
Put your name in the Author box.

This will bring up all the threads that you posted to.

Regards,
Fergus

Nov 20 '05 #2
* "Jason Carter" <ja**********@agedwards.com> scripsit:
A while ago I asked about how to use the HTTPRequest
object for sending a soap request. Somebody responded
with the code that I needed, but I recently lost it and I
really need it back now. Can anybody help me here? I
really this code for my app.


<http://www.google.de/advanced_group_search>

This group is microsoft.public.dotnet.languages.vb.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Hi Jason, Herfried,

Lol. That's if you like German. ;-))

Here's the uk one with the group name set up.

http://www.google.co.uk/advanced_gro..._ugroup=*langu
ages.vb.

Regards,
Fergus
Nov 20 '05 #4
Errata:
<http://www.google.de/advanced_group_search>


Should read "google.com" instead of "google.de".

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
Hi Jason,

You may try to search
"Jason Carter" HTTPRequest
in groups.google.com

http://groups.google.com/groups?q=%2...st&hl=zh-CN&lr
=&ie=UTF-8&oe=UTF-8&selm=OU1g%237pVDHA.2032%40TK2MSFTNGP11.phx.gbl&r num=1

Is the link what you are seeking?

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
Content-Class: urn:content-classes:message
From: "Jason Carter" <ja**********@agedwards.com>
Sender: "Jason Carter" <ja**********@agedwards.com>
Subject: HTTP Request - SOAP
Date: Wed, 15 Oct 2003 08:15:42 -0700
Lines: 7
Message-ID: <01****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcOTLzLRibtM7l3VQgO/vj50NlIo5w==
Newsgroups: microsoft.public.dotnet.languages.vb
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:146916
NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

A while ago I asked about how to use the HTTPRequest
object for sending a soap request. Somebody responded
with the code that I needed, but I recently lost it and I
really need it back now. Can anybody help me here? I
really this code for my app.

Thanks.


Nov 20 '05 #6
alright...i think he's learned a nifty recovery tool on google. i usually
don't just blurt out code but i happen to have it just sitting around at
present.

merry christmas.

hth,

steve

' these are particluar to my app...not to making soap requests in general.

Private Const shopCode As String = "XYZ"
Private Const appId As String = "SOME_GENERATED_PUBLIC_KEY"
Private Const syncServer As String = "http://somecompany.com/websvc.php"
' wow...i thought people just used asp in the real world!

' this is as basic as it gets
' the method is getData(shopcode, appid)
' this is how you'd wrap up the request in soap

Function sendWebRequest() As String
Dim webRequest As HttpWebRequest =
CType(webRequest.Create(syncServer), HttpWebRequest)
Dim webResponse As HttpWebResponse
Dim soapEnvelope As String
RaiseEvent CurrentProgress("Creating remote data request", 5)
soapEnvelope &= "<SOAP:Envelope>" & vbCrLf
soapEnvelope &= " <SOAP:Body>" & vbCrLf
soapEnvelope &= " <getData>" & vbCrLf
soapEnvelope &= " <parameters>" & vbCrLf
soapEnvelope &= " <shopcode xsi:type=""xsd:string"">" &
shopCode & "</shopcode>" & vbCrLf
soapEnvelope &= " <appid xsi:type=""xsd:string"">" & appId
& "</appid>" & vbCrLf
soapEnvelope &= " </parameters>" & vbCrLf
soapEnvelope &= " </getData>" & vbCrLf
soapEnvelope &= " </SOAP:Body>" & vbCrLf
soapEnvelope &= "</SOAP:Envelope>" & vbCrLf
With webRequest
.ContentType = "text/xml"
.Headers.Add("SOAPMethodName", "getData")
.ContentLength = soapEnvelope.Length
.Method = "POST"
.Timeout = 60 * 1000 ' milliseconds to seconds
Dim streamWriter As New StreamWriter(.GetRequestStream())
streamWriter.Write(soapEnvelope)
streamWriter.Close()
webResponse = CType(.GetResponse(), HttpWebResponse)
End With
Dim stream As Stream = webResponse.GetResponseStream
Dim streamReader As New StreamReader(stream)
Dim xmlStream As String = streamReader.ReadToEnd
streamReader.Close()
stream.Close()
Return xmlStream
End Function

"Jason Carter" <ja**********@agedwards.com> wrote in message
news:01****************************@phx.gbl...
A while ago I asked about how to use the HTTPRequest
object for sending a soap request. Somebody responded
with the code that I needed, but I recently lost it and I
really need it back now. Can anybody help me here? I
really this code for my app.

Thanks.

Nov 20 '05 #7
That is an awesome google trick. Thanks guys. And thanks for the
alternative HTTP request code too.

Jason Carter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #8
Peter,

I can't seem to get your example to work. I am getting an error on the
Dim streamwriter as new StreamWriter(.GetRequestStream())

Error: An unhandled exception of type
'System.Net.ProtocolViolationException' occurred in system.dll

Additonal information: Cannot send a cont-body with this verb-type.

Jason Carter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #9
it's steve...i need to see your modified version of the example before i can
say anything.
"Jason Carter" <ja**********@agedwards.com> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
Peter,

I can't seem to get your example to work. I am getting an error on the
Dim streamwriter as new StreamWriter(.GetRequestStream())

Error: An unhandled exception of type
'System.Net.ProtocolViolationException' occurred in system.dll

Additonal information: Cannot send a cont-body with this verb-type.

Jason Carter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #10
Nevermind guys, I got it fixed. I accidently forgot to set the method
property to "POST". Now it works.

Jason Carter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Daniel Albisser | last post by:
Hi @ll, We need further information about the sender of the soap-request in the http header that is used for the loadbalancing. In our case we need the mobile-number of the user that is unique....
17
by: Patrick | last post by:
I am almost certain that I could use HTTP Post/Get to submit XML Web Service call (over SSL as well, if using Version 3 of MSXML2) from an ASP Application? However, would I only be able to call...
2
by: RobertHillEDS | last post by:
While using the Soap generated ASP code, I would like to dump the raw contents of the request and response objects using Response.AppendToLog. I have tried using variations of the following code,...
0
by: ramas | last post by:
Hi, I am new to PHP scripting and i am trying to connect to a soap server (as mentioned below) using the SOAP extension comesup with PHP. Now my requirement is to add my HTTP header fields along...
4
by: Mark | last post by:
i have a very simple web servive Imports System.Web.Services <System.Web.Services.WebService(Namespace:="urn:Example1")> _ Public Class Example1 Inherits System.Web.Services.WebService
7
by: Mullin Yu | last post by:
I want to submit a utf-8 xml request to a servlet by the following coding. it seesm that the servlet can't recognize it correctly. can i just using string postData = "..... utf-8 data" and then...
3
by: Patrick Fogarty | last post by:
I am programming what is to be a web service client that will use an HTTP-POST to request and retrieve data. The remote server (written in java for what it's worth) requires basic authentication...
5
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
1
by: Tony Stephens | last post by:
Hi, I've created a small forms based application in c# to test a vendor's product and the web service interface that it exposes. We have deployed two instances of the vendor product one which...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.