473,662 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2826
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**********@a gedwards.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.publi c.dotnet.langua ges.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.c om

http://groups.google.com/groups?q=%2...st&hl=zh-CN&lr
=&ie=UTF-8&oe=UTF-8&selm=OU1g%237 pVDHA.2032%40TK 2MSFTNGP11.phx. gbl&rnum=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**********@a gedwards.com>
Sender: "Jason Carter" <ja**********@a gedwards.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: AcOTLzLRibtM7l3 VQgO/vj50NlIo5w==
Newsgroups: microsoft.publi c.dotnet.langua ges.vb
Path: cpmsftngxa06.ph x.gbl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:146916
NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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(shopcod e, appid)
' this is how you'd wrap up the request in soap

Function sendWebRequest( ) As String
Dim webRequest As HttpWebRequest =
CType(webReques t.Create(syncSe rver), 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("S OAPMethodName", "getData")
.ContentLength = soapEnvelope.Le ngth
.Method = "POST"
.Timeout = 60 * 1000 ' milliseconds to seconds
Dim streamWriter As New StreamWriter(.G etRequestStream ())
streamWriter.Wr ite(soapEnvelop e)
streamWriter.Cl ose()
webResponse = CType(.GetRespo nse(), HttpWebResponse )
End With
Dim stream As Stream = webResponse.Get ResponseStream
Dim streamReader As New StreamReader(st ream)
Dim xmlStream As String = streamReader.Re adToEnd
streamReader.Cl ose()
stream.Close()
Return xmlStream
End Function

"Jason Carter" <ja**********@a gedwards.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(.G etRequestStream ())

Error: An unhandled exception of type
'System.Net.Pro tocolViolationE xception' 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**********@a gedwards.com> wrote in message
news:e5******** ******@tk2msftn gp13.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(.G etRequestStream ())

Error: An unhandled exception of type
'System.Net.Pro tocolViolationE xception' 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

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

Similar topics

0
3074
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. I could not finde any information about setting http-header fields before sending an soap reqeust with Axis! Does anybody know how to set custome http-header fields before sending a soap-request with an axis client?
17
14780
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 web-service in a an asynchronous mode (with a callback function)? If so, how?
2
4091
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, but I may be barking up the wrong tree with this approach. Any expert help would greatly be appreciated. Dim objReader Set objReader = CreateObject("MSSOAP.SoapReader") objReader.Load Request
0
3719
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 with my SOAP request, so that the SOAP server will receive it and does some high level processing. Is it possible to add our own HTTP header fields in PHP? If i use the header() function to add the field into the HTTP header and it neither...
4
7879
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
11976
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 save the files at utf-8 encoded at the vs.net ide? or if i use string, vs.net ide will conside it to be utf-16??? UTF8Encoding encoding = new UTF8Encoding();
3
6915
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 as per RFC 2617 (http://www.faqs.org/rfcs/rfc2617.html). My attempts to authenticate are failing. The server requires the header to be present with the request. For security reasons, it will not reply in any way if the header is not present. ...
5
10390
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 they need to consume this web service using HTTP. The developer's IDE is Notepad. Yeah, weird I know. How is this done? I guess if I can get it to run ASP, IDE independant, that should make them happy. Any references you can point me to?
1
9526
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 has an unprotected (no authentication) interface and one that is protected using HTTP basic authentication. I can invoke methods on the unprotected instance and everything's fine. When I attempt to invoke methods on the protected instance the...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8762
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.