IT Community - Software Programming, Web Development and Technical Support

Calling SOAP web service in VB6.0

This is a discussion on Calling SOAP web service in VB6.0 within the VB.NET Programming forums, part of the Software Development category; Hi all, This is very interesting to work with VB6.0. But the same thing it is very tedious work ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > VB.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 03-21-2007, 07:01 AM
Karpagarajan Karpagarajan is offline
D-Web Analyst
 
Join Date: Mar 2007
Posts: 299
Karpagarajan is on a distinguished road
Thumbs up Calling SOAP web service in VB6.0

Hi all,

This is very interesting to work with VB6.0. But the same thing it is very tedious work to implement the latest technology in VB6. I got very good experience in implementing the SOAP web service in VB6.0. Here I have given my sample application which is very useful to implement the webservice in your VB application.

Follow the steps to create the SOAP webservice VB application
  • Create a sample VB Project which has a form. In that place one text box (text1) and one command button(cmdCallSoap).
  • Go to Project References (by ->Project menu -> References)
  • Select Microsoft Soap Type Library
  • And also select Microsoft XML,v3.0 library
You need to install MS Soap Toolkit.
I have installed MS SOAP Toolkit 2.0

In the command click event, add the following code

Private Sub cmdCallSoap()
Dim pstrPhpURL As String 'This is your web URL name
Dim pStrFunction As String 'This is your web service name
Dim xmlstr As String 'Parse you parameter with XML string
On Error GoTo ErrH

Dim Serializer As SoapSerializer
Dim Reader As SoapReader
Dim Connector As SoapConnector
Dim dRtnStr As String
Dim i&

Set Connector = New HttpConnector
Connector.Property("EndPointURL") = pstrPhpURL
Connector.Connect

Connector.Property("SoapAction") = pStrFunction
Connector.BeginMessage

Set Serializer = New SoapSerializer
Serializer.Init Connector.InputStream

Serializer.startEnvelope , , "UTF-8"
Serializer.startBody
Serializer.startElement pStrFunction, "", "", ""
Serializer.writeString xmlstr
Serializer.endElement
Serializer.endBody
Serializer.endEnvelope

Connector.EndMessage

Set Reader = New SoapReader
Reader.Load Connector.OutputStream

If Not Reader.RPCResult Is Nothing Then
dRtnStr = Reader.RPCResult.Text
Else
dRtnStr = "Error"
End If
'The web service result will be stored in this variable
xmlstr = dRtnStr

text.text= xmlstr
End Sub



thanks
__________________
Karpagarajan. R
Necessity is the mother of invention
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/vb-net-programming/767-calling-soap-web-service-vb6-0-a.html
Posted By For Type Date
aroc725's bookmarks tagged with This thread Refback 08-18-2007 11:40 PM
Digg / Programming / Upcoming This thread Refback 07-20-2007 05:19 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scope Trouble while calling Functions aramesh Flash Actionscript Programming 1 12-14-2007 05:29 AM
Calling Winrunner functions in QTP crusader Testing Tools 0 09-07-2007 01:19 AM
calling exe bluesky Database Support 6 08-09-2007 05:41 AM
ReflectionTypeLoadException occured while calling Assembly.GetTypes() theone Mobile Software Development 1 07-25-2007 02:56 AM
Calling WinRunner Functions in QTP senthilkannan Testing Tools 0 07-19-2007 01:14 AM


All times are GMT -7. The time now is 03:04 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0