Hi,
I have a successful VB6 web service client that uses the SOAP Toolkit 3
to make calls to a web service written in ASP.Net (VB.Net). However,
due to Microsoft not recommending the use of SOAP Toolkit 3 on a
Windows 2003 server, I must scrap the use of the toolkit and look to
develop the client in VB.Net instead.
I have upgraded the VB6 application to VB.Net using the built-in
upgrade tool that comes with Visual Studio .Net 2003. The majority of
the code has been translated to .Net, but I am having trouble as the
SOAP Toolkit 3 code has also been translated to VB.Net.
I have successfully called the web service to return very simple
values, where I do not actually need to use objects such as:
WSDLReader30, SoapSerializer3 0, SoapReader30, SoapConnector30 that are
required in the VB6 application. Am I correct to assume this??
I would appreciate if someone could advise me on how I should tackle
translating the following VB6 function that uses SOAP Toolkit 3.
The VB6 function is as follows:
Private Function ExecuteSOAP(aOp eration() As String, xmlparams As
IXMLDOMNode, bErrorOnNoSOAP As Boolean) As SoapReader30
Dim WSDLReader As New WSDLReader30
Dim serializer As SoapSerializer3 0
Dim Reader As New SoapReader30
Dim Connector As New SoapConnector30
Dim ServiceEnumerat or As IEnumWSDLServic e, Service As IWSDLService
Dim Fetched As Long
Dim PortEnumerator As IEnumWSDLPorts, Port As IWSDLPort
Dim OperationEnumer ator As IEnumWSDLOperat ions, Operation As
IWSDLOperation
Dim MapperEnumerato r As IEnumSoapMapper s, Mapper As ISoapMapper
Dim bFoundOperation As Boolean
Dim XMLElement As IXMLDOMNode
'read WSDL file
On Error GoTo ErrorHandler
WSDLReader.Load gWSDL, ""
' Loop round the services
WSDLReader.GetS oapServices ServiceEnumerat or
ServiceEnumerat or.Next 1, Service, Fetched
Do While Fetched = 1 And bFoundOperation = False
' Loop round the ports
Service.GetSoap Ports PortEnumerator
PortEnumerator. Next 1, Port, Fetched
Do While Fetched = 1 And bFoundOperation = False
' find the operation
Port.GetSoapOpe rations OperationEnumer ator
' The Find method returns an error if it fails so trap it
and continue
Set Operation = Nothing
On Error Resume Next
OperationEnumer ator.Find aOperation(1), Operation
On Error GoTo ErrorHandler
If Not Operation Is Nothing Then
' prepare request
bFoundOperation = True
Set MapperEnumerato r =
Operation.Input Message.Message Parts
MapperEnumerato r.Next 1, Mapper, Fetched
Do While Fetched = 1
'See if this is a complex type. The SchemaNode
property is nothing if simple type
If Mapper.SchemaNo de Is Nothing Then
' simple type, just get the parameter from the
input xml file
If Not xmlparams.selec tSingleNode("//" &
Mapper.ElementN ame) Is Nothing Then
Mapper.ComValue =
xmlparams.selec tSingleNode("//" & Mapper.ElementN ame).Text
Else
Mapper.ComValue = ""
End If
Else
'complex type, use the whole node from the
input xml file
Mapper.ComValue = ""
If Not xmlparams.selec tSingleNode("//" &
Mapper.ElementN ame) Is Nothing Then
'Mapper.ComValu e =
xmlparams.selec tSingleNode("//" & Mapper.ElementN ame).xml
For Each XMLElement In
xmlparams.selec tSingleNode("//" & Mapper.ElementN ame).childNodes
Mapper.ComValue = Mapper.ComValue &
XMLElement.xml
Next
End If
End If
MapperEnumerato r.Next 1, Mapper, Fetched
Loop
End If
If bFoundOperation = False Then PortEnumerator. Next 1,
Port, Fetched
Loop
If bFoundOperation = False Then ServiceEnumerat or.Next 1,
Service, Fetched
Loop
If bFoundOperation = False Then
Set ExecuteSOAP = Nothing
Else
Set Connector = New HttpConnector30
strDebugPoint = "Connecting to port '" & Port.Address & "'"
Connector.Conne ctWSDL Port
Connector.Begin MessageWSDL Operation
Set serializer = New SoapSerializer3 0
serializer.Init Connector.Input Stream
serializer.Star tEnvelope
serializer.Star tBody
Operation.Save serializer, True
serializer.EndB ody
' Force the message to appear on the screen
DoEvents
serializer.EndE nvelope
Connector.EndMe ssage
Reader.Load Connector.Outpu tStream
Set ExecuteSOAP = Reader
End If
Exit Function
Many thanks.
Jimmy 0 4582 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Det |
last post by:
Hi there
I am somewhat stuck with calling a WebService from out of a VB App.
My Goal:
- Get a WebService invoked under MS - Access 2002, not using the
MS-SOAP-Toolkit but the .net - Framework
My Restrictions:
- The WebService is pure Java, running under WebSphere5.1
- The Request requires Basic Authentication and needs to be SSL
|
by: Q. John Chen |
last post by:
All,
I have a WebService created in .NET.
I have VB6 Client consume the WebService (using Soap ToolKit 3.0)
But I have couple user who got error accessing the WebServer with
error message "Unable to handle request without a valid parameter ..."
After hours of research, my conclusion is that the firewall treat
"SOAPAction" as unknow header and blocked it.
|
by: Vincenzo Milazzo |
last post by:
Ciao,
come faccio a chiamare un webservice scritto in c# da una pagina asp in
vbscript ?
Ciao a tutti
|
by: Nalaka |
last post by:
Hi,
I created a sinple web service that returns a dataSet.
Then I created a client program that uses this web service (that returns the
Dataset).
My question is, how did the client figure out to create a "DataSet" as the
return type from the webservice?
|
by: NN |
last post by:
Hello, I have a question.
I have a program made in VB6 that caputure the images that are transmitted
by a webcam and records it in a database in MySQL. I want to do a WebService
in .NET that allows that this program should save the photos in this
database, but acceding across the WebService, and on the other hand, to do a
page in ASP.NET who accedes to the same WebService and could make
consultations on this database, for examplo, show...
| |
by: jeffbroodwar |
last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side.
i've attached the sample client source code in vb6 :
__________________________________________________________________
'********************* Created procedure *****************************
Private Sub Connect()
strClient =...
|
by: jeffbroodwar |
last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side.
i've attached the sample client source code in vb6 :
__________________________________________________ ________________
'********************* Created procedure *****************************
Private Sub Connect()
strClient =...
|
by: jeffbroodwar |
last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side.
i've attached the sample client source code in vb6 :
__________________________________________________ ________________
'********************* Created procedure *****************************
Private Sub Connect()
strClient =...
|
by: jeffbroodwar |
last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side.
i've attached the sample client source code in vb6 :
__________________________________________________ ________________
'********************* Created procedure *****************************
Private Sub Connect()
strClient =...
|
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...
|
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...
| |
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,...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |