473,766 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

facing problem to "Calling dotnet created Web Services in VB6"

I am facing a problem while reading the result which is loaded in DOMDocument.
In which I am sending a request to web service and getting a record of
Single Order.
This is my VB Code which is i am using....
............... ..........
Dim Connector As SoapConnector30 ' To connect to webservice
Dim Serializer As SoapSerializer3 0 ' To serialize the XML data
Dim Reader As SoapReader30 ' To read the Webservice
response data

Dim domResult As New MSXML2.DOMDocum ent
Dim ResultElm As IXMLDOMElement ' To store the Webservice
response in DOM
Dim FaultElm As IXMLDOMElement ' for Error handling

Dim END_POINT_URL As String ' URL of the Webservice to call
Dim SoapAction As String
Dim CALC_NS As String

Dim objNodeList As IXMLDOMNodeList

END_POINT_URL = "http://localhost/webservicesserv er/UsingDataSet.as mx"
'SoapAction = "UsingDataSetNa meSpace/GetCustomerByAr ray"
SoapAction = "UsingDataSetNa meSpace/GetRecord"
CALC_NS = "UsingDataSetNa meSpace"

'To Connect webservice
Set Connector = New HttpConnector30
Connector.Prope rty("EndPointUR L") = END_POINT_URL
Connector.Conne ct
' binding/operation/soapoperation
Connector.Prope rty("SoapAction ") = SoapAction '& Method
Connector.Begin Message

'Preapare the SOAP Request
Set Serializer = New SoapSerializer3 0
Serializer.Init Connector.Input Stream

Serializer.Star tEnvelope
Serializer.Star tBody
Serializer.Star tElement Method, CALC_NS ' Setting Method name

Serializer.EndE lement

Serializer.EndB ody
Serializer.EndE nvelope

Connector.EndMe ssage ' This statement actually send the data to
webservice

'Reading Webservice Response
Set Reader = New SoapReader30
Reader.Load Connector.Outpu tStream

If Not Reader.Fault Is Nothing Then
MsgBox Reader.FaultStr ing.Text, vbExclamation ' In case of Error
Else
Set ResultElm = Reader.RpcResul t ' Response come as XML document
Set domResult = Reader.Dom
End If

'MsgBox domResult.xml

'MsgBox ResultElm.xml

MsgBox domResult.getEl ementsByTagName ("GetRecordResu lt").length

Dim i As Integer
For i = 0 To domResult.getEl ementsByTagName ("GetRecordResu lt").length - 1
MsgBox
domResult.getEl ementsByTagName ("GetRecordResu lt").Item(0).no deName
Next

End Sub
............... ............... ...........

My Request in xml format ot Web Services is....

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><SOAP-ENV:Envelope
xmlns:SOAPSDK1= "http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2= "http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3= "http://schemas.xmlsoap .org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"><SOAP-ENV:Body><SOAPS DK4:GetRecord
xmlns:SOAPSDK4= "http://localhost/webservicesserv er/UsingDataSetNam eSpace/GetRecord"/></SOAP-ENV:Body></SOAP-ENV:Envelope>

My Web Service Response is...

<?xml version="1.0" encoding="utf-8"?><soap:Envel ope
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"><soa p:Body><GetReco rdResponse
xmlns="http://localhost/webservicesserv er/UsingDataSetNam eSpace"><GetRec ordResult orderId="60823"
productCd="MBFX " carrierCd="CONC " statusCd="ACTV"
/></GetRecordRespon se></soap:Body></soap:Envelope>
I am unable to read DOMDocument by getElementsByTa gName...

Thanks in advance for your Reply....
Nov 2 '06 #1
2 4686
You might want to post this question in a vb6 related newsgroup.
What ever created the webservice (.NET or not), is irrelevant to the client.
The soap received is what matters, and as long as this comlies with the soap
standard, you ought to be fine.
--
rgds.
/Claus Konrad
MCSD.NET (C#)
"rakesh kumawat" wrote:
I am facing a problem while reading the result which is loaded in DOMDocument.
In which I am sending a request to web service and getting a record of
Single Order.
This is my VB Code which is i am using....
............... .........
Dim Connector As SoapConnector30 ' To connect to webservice
Dim Serializer As SoapSerializer3 0 ' To serialize the XML data
Dim Reader As SoapReader30 ' To read the Webservice
response data

Dim domResult As New MSXML2.DOMDocum ent
Dim ResultElm As IXMLDOMElement ' To store the Webservice
response in DOM
Dim FaultElm As IXMLDOMElement ' for Error handling

Dim END_POINT_URL As String ' URL of the Webservice to call
Dim SoapAction As String
Dim CALC_NS As String

Dim objNodeList As IXMLDOMNodeList

END_POINT_URL = "http://localhost/webservicesserv er/UsingDataSet.as mx"
'SoapAction = "UsingDataSetNa meSpace/GetCustomerByAr ray"
SoapAction = "UsingDataSetNa meSpace/GetRecord"
CALC_NS = "UsingDataSetNa meSpace"

'To Connect webservice
Set Connector = New HttpConnector30
Connector.Prope rty("EndPointUR L") = END_POINT_URL
Connector.Conne ct
' binding/operation/soapoperation
Connector.Prope rty("SoapAction ") = SoapAction '& Method
Connector.Begin Message

'Preapare the SOAP Request
Set Serializer = New SoapSerializer3 0
Serializer.Init Connector.Input Stream

Serializer.Star tEnvelope
Serializer.Star tBody
Serializer.Star tElement Method, CALC_NS ' Setting Method name

Serializer.EndE lement

Serializer.EndB ody
Serializer.EndE nvelope

Connector.EndMe ssage ' This statement actually send the data to
webservice

'Reading Webservice Response
Set Reader = New SoapReader30
Reader.Load Connector.Outpu tStream

If Not Reader.Fault Is Nothing Then
MsgBox Reader.FaultStr ing.Text, vbExclamation ' In case of Error
Else
Set ResultElm = Reader.RpcResul t ' Response come as XML document
Set domResult = Reader.Dom
End If

'MsgBox domResult.xml

'MsgBox ResultElm.xml

MsgBox domResult.getEl ementsByTagName ("GetRecordResu lt").length

Dim i As Integer
For i = 0 To domResult.getEl ementsByTagName ("GetRecordResu lt").length - 1
MsgBox
domResult.getEl ementsByTagName ("GetRecordResu lt").Item(0).no deName
Next

End Sub
............... ............... ..........

My Request in xml format ot Web Services is....

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><SOAP-ENV:Envelope
xmlns:SOAPSDK1= "http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2= "http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3= "http://schemas.xmlsoap .org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"><SOAP-ENV:Body><SOAPS DK4:GetRecord
xmlns:SOAPSDK4= "http://localhost/webservicesserv er/UsingDataSetNam eSpace/GetRecord"/></SOAP-ENV:Body></SOAP-ENV:Envelope>

My Web Service Response is...

<?xml version="1.0" encoding="utf-8"?><soap:Envel ope
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"><soa p:Body><GetReco rdResponse
xmlns="http://localhost/webservicesserv er/UsingDataSetNam eSpace"><GetRec ordResult orderId="60823"
productCd="MBFX " carrierCd="CONC " statusCd="ACTV"
/></GetRecordRespon se></soap:Body></soap:Envelope>
I am unable to read DOMDocument by getElementsByTa gName...

Thanks in advance for your Reply....
Nov 2 '06 #2
By the way:
If you can not make this work, how about creating the proxy in a .NET
language and expose this assembly as a COM component? This allows you to make
use of the VS.NET embedded support for generating proxies and the relative
ease to create the communication.

When instantiating this component from vb6, you ought to use it like this:
dim proxy as SomeProxy = new SomeProxy()
proxy.CallMetho d(arguments...)

--
rgds.
/Claus Konrad
MCSD.NET (C#)
"rakesh kumawat" wrote:
I am facing a problem while reading the result which is loaded in DOMDocument.
In which I am sending a request to web service and getting a record of
Single Order.
This is my VB Code which is i am using....
............... .........
Dim Connector As SoapConnector30 ' To connect to webservice
Dim Serializer As SoapSerializer3 0 ' To serialize the XML data
Dim Reader As SoapReader30 ' To read the Webservice
response data

Dim domResult As New MSXML2.DOMDocum ent
Dim ResultElm As IXMLDOMElement ' To store the Webservice
response in DOM
Dim FaultElm As IXMLDOMElement ' for Error handling

Dim END_POINT_URL As String ' URL of the Webservice to call
Dim SoapAction As String
Dim CALC_NS As String

Dim objNodeList As IXMLDOMNodeList

END_POINT_URL = "http://localhost/webservicesserv er/UsingDataSet.as mx"
'SoapAction = "UsingDataSetNa meSpace/GetCustomerByAr ray"
SoapAction = "UsingDataSetNa meSpace/GetRecord"
CALC_NS = "UsingDataSetNa meSpace"

'To Connect webservice
Set Connector = New HttpConnector30
Connector.Prope rty("EndPointUR L") = END_POINT_URL
Connector.Conne ct
' binding/operation/soapoperation
Connector.Prope rty("SoapAction ") = SoapAction '& Method
Connector.Begin Message

'Preapare the SOAP Request
Set Serializer = New SoapSerializer3 0
Serializer.Init Connector.Input Stream

Serializer.Star tEnvelope
Serializer.Star tBody
Serializer.Star tElement Method, CALC_NS ' Setting Method name

Serializer.EndE lement

Serializer.EndB ody
Serializer.EndE nvelope

Connector.EndMe ssage ' This statement actually send the data to
webservice

'Reading Webservice Response
Set Reader = New SoapReader30
Reader.Load Connector.Outpu tStream

If Not Reader.Fault Is Nothing Then
MsgBox Reader.FaultStr ing.Text, vbExclamation ' In case of Error
Else
Set ResultElm = Reader.RpcResul t ' Response come as XML document
Set domResult = Reader.Dom
End If

'MsgBox domResult.xml

'MsgBox ResultElm.xml

MsgBox domResult.getEl ementsByTagName ("GetRecordResu lt").length

Dim i As Integer
For i = 0 To domResult.getEl ementsByTagName ("GetRecordResu lt").length - 1
MsgBox
domResult.getEl ementsByTagName ("GetRecordResu lt").Item(0).no deName
Next

End Sub
............... ............... ..........

My Request in xml format ot Web Services is....

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><SOAP-ENV:Envelope
xmlns:SOAPSDK1= "http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2= "http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3= "http://schemas.xmlsoap .org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"><SOAP-ENV:Body><SOAPS DK4:GetRecord
xmlns:SOAPSDK4= "http://localhost/webservicesserv er/UsingDataSetNam eSpace/GetRecord"/></SOAP-ENV:Body></SOAP-ENV:Envelope>

My Web Service Response is...

<?xml version="1.0" encoding="utf-8"?><soap:Envel ope
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"><soa p:Body><GetReco rdResponse
xmlns="http://localhost/webservicesserv er/UsingDataSetNam eSpace"><GetRec ordResult orderId="60823"
productCd="MBFX " carrierCd="CONC " statusCd="ACTV"
/></GetRecordRespon se></soap:Body></soap:Envelope>
I am unable to read DOMDocument by getElementsByTa gName...

Thanks in advance for your Reply....
Nov 2 '06 #3

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

Similar topics

0
2528
by: asj | last post by:
from the borg lady: http://www.freeroller.net/page/Sayaka/20030819#walmart_deadline_shows_java_cashing ------------------------------------------------- I/We read with interest Walmart's new edict that suppliers have to be be able to exchange data electronically with it over the internet rather than through private networks. Specifically, Wal-Mart suppliers must be equipped to exchange paperwork electronically using Electronic
4
7292
by: Jerry Krinock | last post by:
I've written the following demo to help me understand a problem I'm having in a larger program. The "main" function constructs a Foo object, and then later "reconstructs" it by calling the constructor again. In my larger program, I find that the member variables don't get re-initialized when "reconstructed". I don't have that problem in this demo, but the second time the constructor is called, its "this" points to a different location. ...
3
18264
by: Summit | last post by:
Does anyone know what the C# equivalent for VB6 End is? I'm starting up a form with a boolean test. If I fail, I just want to end the app. Even though I close the form, it picks up on the line after the bracket and continues loading the form. Here's my snippet: DalMan._drCurrentUser = DalMan._dtUsers.FindByUserName("Init"); if (DalMan._drCurrentUser == null)
3
8423
by: Michael Rodriguez | last post by:
I've installed WSE, both 1.0 and 2.0. The namespace Microsoft.Web.Services is visible from my VB.NET projects, but not in C#. In C#, it tells me there is no "Web" under "Microsoft". Any ideas? -- To understand recursion, we must first understand recursion.
4
2762
by: Peter Hemmingsen | last post by:
Hi, I have a dotnet object (implemented in mc++ and used in c#) which have a property called "Info". The Info property is also a dotnet object (implemented in mc++). In the constructor of the "main" object I want to initialize the property "Info" to null in a way that will make the c# programmer (the user) able to write: if (MyObj.Info==null) {..}
0
1216
by: adolf garlic | last post by:
Currently we have an app (asp.net 1.1) that has a dynamic content client scripted treeview which will allow the display of reporting services reports in the right hand part of the screen. My problem is this: Is there a neat way of displaying the reports from reporting services other than using frames? (which everyone seems to hate). I could almost do with some kind of 'placeholder' control that I can just
1
2137
by: aaa | last post by:
I am using a third party provider for Travel related web services. These services are not very well documented and I am having to wing my way thru nearly every one. Some I can pull data from just fine others bomb when assigning criteria to the body of it's request object ("object not set to an instance of an object"). I am essentially creating nodes programatically to buld the XML that gets pumped to the SOAP call. Has anyone run...
0
2295
by: =?Utf-8?B?S2V2aW4gU2NobmVpZGVy?= | last post by:
I have two projects (one using .NET 1.1 the other using 2.0). When I call a particular method in a webservice from the 1.1 project everything works great. When I call the same method from the 2.0 project (identical code) it throws an exception with the message: "{"Item has already been added. Key in dictionary: 'AutoCompleteBackOrders.SopranoWebServices.BaseRequestDTO' Key being added:...
7
1740
by: Anna Smidt | last post by:
I have a function which will return a shape from an image everytime it's called. Since it's time consuming I would like it to run itself only once, and at every subsequent calls it should return the shape it calculated the first time. In VB6 I would have used the key word "static" to preserve the results from the first call. Is there an equivalent in C++? --------------- In VB6 I would have simply said
0
9568
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
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9959
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
9837
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
8833
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...
0
5279
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...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
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
3
2806
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.