473,394 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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 data

Dim domResult As New MSXML2.DOMDocument
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/webservicesserver/UsingDataSet.asmx"
'SoapAction = "UsingDataSetNameSpace/GetCustomerByArray"
SoapAction = "UsingDataSetNameSpace/GetRecord"
CALC_NS = "UsingDataSetNameSpace"

'To Connect webservice
Set Connector = New HttpConnector30
Connector.Property("EndPointURL") = END_POINT_URL
Connector.Connect


' binding/operation/soapoperation
Connector.Property("SoapAction") = SoapAction '& Method
Connector.BeginMessage

'Preapare the SOAP Request
Set Serializer = New SoapSerializer30
Serializer.Init Connector.InputStream

Serializer.StartEnvelope
Serializer.StartBody
Serializer.StartElement Method, CALC_NS ' Setting Method name

Serializer.EndElement

Serializer.EndBody
Serializer.EndEnvelope

Connector.EndMessage ' This statement actually send the data to webservice

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

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

'MsgBox domResult.xml

'MsgBox ResultElm.xml

MsgBox domResult.getElementsByTagName("GetRecordResult"). length

Dim i As Integer
For i = 0 To domResult.getElementsByTagName("GetRecordResult"). length - 1
MsgBox domResult.getElementsByTagName("GetRecordResult"). Item(0).nodeName
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><SOAPSDK4:GetRecord xmlns:SOAPSDK4="http://localhost/webservicesserver/UsingDataSetNameSpace/GetRecord"/></SOAP-ENV:Body></SOAP-ENV:Envelope>

My Web Service Response is...

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetRecordResponse
xmlns="http://localhost/webservicesserver/UsingDataSetNameSpace"><GetRecordResult orderId="60823"
productCd="MBFX" carrierCd="CONC" statusCd="ACTV"
/></GetRecordResponse></soap:Body></soap:Envelope>


I am unable to read DOMDocument by getElementsByTagName or by xpath.

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

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

Similar topics

4
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...
0
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...
1
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...
1
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...
7
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...
29
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. ...
2
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...
9
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 ...
8
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...

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.