473,779 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem in "Calling a Dotnet Created WebService in VB Client"

1 New Member
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 to 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 or by xpath.

Thanks in advance for your Reply....
Nov 2 '06 #1
0 1326

Sign in to post your reply or Sign up for a free account.

Similar topics

4
7293
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. ...
0
1246
by: MIGUEL | last post by:
Hi all! Be patient because what I'm going to explain all of you it's more than very strange. I've developed a webservice project that contains two classes. One of them is going to act as a SOAP header, and the other class is the main class containing all the web methods. Besides, the project contains two references pointing at two normal DLLs built also with VS .NET 2003. This references are needed because the web methods use them in
1
4102
by: Richard Bethell | last post by:
Hi, I have a web service that I've built in .NET and has worked fine when connected to by .NET clients. However, I have one customer who is building a SOAP client in .asp, has no access to the SOAP Toolkit DLLs, and is trying to toss raw XML at my webservice. It works to only a limited extent. So in order to have them see examples of SOAP calls that would work, I'd like to see what a .NET client with a web reference is sending. Can
1
6658
by: Dave | last post by:
Calling an external webservice, sometimes we get "operation has timed out." the full stack trace is below (I've just replaced personal info). The webservice provider suggested it timed out trying to connect to their service which may be related to network issues. I don't see that information in the stack trace. How do you even begin to debug this to determine if it's on our end or theirs? Thanks!
7
9538
by: Søren Dreijer | last post by:
Hi, I have a mixed C#, managed C++ and unmanaged C++ project. The managed class calls a method which exists in an unmanaged singleton class. During the entire lifetime of the application, this gives no problems whatsoever. However, upon shutdown an exception pops up: "The string binding is invalid" If I call the singleton method from inside a purely unmanaged class, I
29
2152
by: jens Jensen | last post by:
Hello, I got this "breath taking" task to write a an http server to which "xml data" will be posted to and will answer with xml data. The logic behind the xml processing is not a matter here. My question is : Can i configure a webservice for HHTP POST ? The remote peer just performs an http web request. NO RPC style call to my system.
2
4689
by: rakesh kumawat | last post by:
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 SoapSerializer30 ' To serialize the XML data Dim Reader As SoapReader30 ' To read the Webservice response...
9
4016
by: larrybud2002 | last post by:
I've read about this error in this group and others from early 2006 but without any resolution, so I thought I'd bump it up to see if there's a solution. Trying to build a website on http://oursite:8080/ and it returns
8
3681
by: cj | last post by:
I've seen examples of web services written with <%@ WebService Language ="Vb" Class=".... at the top. Is it not used in VB 2008?
0
9636
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
9474
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,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10075
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
9931
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...
1
7485
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
6727
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();...
0
5373
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...
3
2869
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.