Web service response not shown in VBA

A

asp.purna

Hi,
I have an authenticated web service which I am trying to use in
Visual Basic 6.3 using MS Office XP Web services tool kit 2.0. I am
able to work with few public web services but it is not working with
below web service. Thought at server side SOAP Processor is sending
response (i can see from log file)

It gives below error:
Client:Unspecified client error (Runtime error '-2147221504
(80040000)'
Code generated is:

'*****************************************************************
'This class was created by the Web Service References Tool 2.0.
'
'Created: 3/30/2007 03:21:55 PM
'
'Description:
'This class is a Visual Basic for Applications class representation of
the Web service
'as defined by
http://localhost/cordys/WSDLGateway...ganization=o=system,cn=cordys,o=vanenburg.com.
'
'To Use:
'Dimension a variable as new clsws_GetEmployeeService, and then write
code to
'use the methods provided by the class.
'Example:
' Dim ExampleVar as New clsws_GetEmployeeService
' debug.print ExampleVar.wsm_GetEmployeeoperation("Sample Input")
'
'For more information, see Complex Types in Web Service References
'Tool 2.0 Help.
'
'Changes to the code in this class may result in incorrect behavior.
'
'*****************************************************************

'Dimensioning private class variables.
Private sc_GetEmployeeService As SoapClient30
Private Const c_WSDL_URL As String = "http://localhost/cordys/
WSDLGateway.wcp?service=http://schemas.cordys.com/1.0/demo/northwind/
GetEmployee&organization=o=system,cn=cordys,o=vanenburg.com"
Private Const c_SERVICE As String = "GetEmployeeService"
Private Const c_PORT As String = "GetEmployeePort"
Private Const c_SERVICE_NAMESPACE As String = "http://
schemas.cordys.com/1.0/demo/northwind"

Private Sub Class_Initialize()
'*****************************************************************
'This subroutine will be called each time the class is
instantiated.
'Creates sc_ComplexTypes as new SoapClient30, and then
'initializes sc_ComplexTypes.mssoapinit2 with WSDL file found in
'http://localhost/cordys/WSDLGateway.wcp?service=http://
schemas.cordys.com/1.0/demo/northwind/
GetEmployee&organization=o=system,cn=cordys,o=vanenburg.com.
'*****************************************************************

Dim str_WSML As String
str_WSML = ""

Set sc_GetEmployeeService = New SoapClient30

sc_GetEmployeeService.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE,
c_PORT, c_SERVICE_NAMESPACE
'Use the proxy server defined in Internet Explorer's LAN settings
by
'setting ProxyServer to <CURRENT_USER>
sc_GetEmployeeService.ConnectorProperty("ProxyServer") =
"<CURRENT_USER>"
'Autodetect proxy settings if Internet Explorer is set to
autodetect
'by setting EnableAutoProxy to True
sc_GetEmployeeService.ConnectorProperty("EnableAutoProxy") = True


End Sub

Private Sub Class_Terminate()
'*****************************************************************
'This subroutine will be called each time the class is destructed.
'Sets sc_ComplexTypes to Nothing.
'*****************************************************************

'Error Trap
On Error GoTo Class_TerminateTrap

Set sc_GetEmployeeService = Nothing

Exit Sub

Class_TerminateTrap:
GetEmployeeServiceErrorHandler ("Class_Terminate")
End Sub

Private Sub GetEmployeeServiceErrorHandler(str_Function As String)
'*****************************************************************
'This subroutine is the class error handler. It can be called from
any class subroutine or function
'when that subroutine or function encounters an error. Then, it
will raise the error along with the
'name of the calling subroutine or function.
'*****************************************************************

'SOAP Error
If sc_GetEmployeeService.FaultCode <> "" Then
Err.Raise vbObjectError, str_Function,
sc_GetEmployeeService.FaultString
'Non SOAP Error
Else
Err.Raise Err.Number, str_Function, Err.Description
End If

End Sub

Public Function wsm_GetEmployeeoperation(ByVal any_GetEmployee As
MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
'*****************************************************************
'Proxy function created from
http://localhost/cordys/WSDLGateway...ganization=o=system,cn=cordys,o=vanenburg.com.
'
'"wsm_GetEmployeeoperation, any_GetEmployee" is defined as XML.
See Complex Types: XML Variables in
'Web Service References Tool 2.0 Help for details on implementing
XML variables.
'*****************************************************************

'Error Trap
On Error GoTo wsm_GetEmployeeoperationTrap

Set wsm_GetEmployeeoperation =
sc_GetEmployeeService.GetEmployeeoperation(any_GetEmployee)




Exit Function
wsm_GetEmployeeoperationTrap:
GetEmployeeServiceErrorHandler "wsm_GetEmployeeoperation"
End Function





WSDL is:

<wsdl:definitions name="GetEmployee" targetNamespace="http://
schemas.cordys.com/1.0/demo/northwind" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:tns="http://schemas.cordys.com/1.0/
demo/northwind" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema targetNamespace="http://schemas.cordys.com/1.0/demo/
northwind" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:element name="GetEmployee">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="EmployeeID" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GetEmployeeResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="tuple" minOccurs="0" maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="old">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Employees">
<xsd:complexType>
<xsd:all>
<xsd:element name="EmployeeID"
type="xsd:integer"/>
<xsd:element name="TitleOfCourtesy">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="25"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="FirstName">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LastName">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Title">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="BirthDate"
type="xsd:dateTime"/>
<xsd:element name="HireDate"
type="xsd:dateTime"/>
<xsd:element name="Address">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="City">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Region">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="PostalCode">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Country">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="HomePhone">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="24"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Extension">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Notes">
<xsd:simpleType>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ReportsTo"
type="xsd:integer"/>
<xsd:element name="PhotoPath">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="GetEmployeeInput">
<wsdl:part name="body" element="tns:GetEmployee"/>
</wsdl:message>
<wsdl:message name="GetEmployeeOutput">
<wsdl:part name="body" element="tns:GetEmployeeResponse"/>
</wsdl:message>
<wsdl:portType name="GetEmployeePortType">
<wsdl:eek:peration name="GetEmployeeoperation">
<wsdl:input message="tns:GetEmployeeInput"/>
<wsdl:eek:utput message="tns:GetEmployeeOutput"/>
</wsdl:eek:peration>
</wsdl:portType>
<wsdl:binding name="GetEmployeeBinding"
type="tns:GetEmployeePortType">
<soap:binding style="document" transport="http://
schemas.xmlsoap.org/soap/http"/>
<wsdl:eek:peration name="GetEmployeeoperation">
<soap:eek:peration style="document" soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:eek:utput>
<soap:body use="literal"/>
</wsdl:eek:utput>
</wsdl:eek:peration>
</wsdl:binding>
<wsdl:service name="GetEmployeeService">
<wsdl:port binding="tns:GetEmployeeBinding"
name="GetEmployeePort">
<soap:address location="http://localhost/cordys/
com.eibus.web.soap.Gateway.wcp?
organization=o=system,cn=cordys,o=vanenburg.com"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

SOAP message is:

Response from the Service is .
<GetEmployeeResponse
xmlns:SOAPSDK4="http://schemas.cordys.com/1.0/demo/northwind">
<tuple>
<old>
<Employees>
<EmployeeID>1</EmployeeID>
<TitleOfCourtesy>Ms.</TitleOfCourtesy>
<FirstName>Aruna1</FirstName>
<LastName>Davolio</LastName>
<Title>Sales Representative</Title>
<BirthDate>2001-02-12T00:00:00.0</BirthDate>
<HireDate>2007-03-06T00:00:00.0</HireDate>
<Address>507 - 20th Ave. E.
Apt. 2A</Address>
<City>Seattle</City>
<Region>WA</Region>
<PostalCode>98122</PostalCode>
<Country>USA</Country>
<HomePhone>(206) 555-9857</HomePhone>
<Extension>5469</Extension>
<Notes>Education includes a BA in psychology from
Colorado State University in 1970. She also completed "The Art of the
Cold Call." Nancy is a member of Toastmasters International.</Notes>
<ReportsTo>2</ReportsTo>
<PhotoPath>http://www.anbg.gov.au/main-path/
euc.lawn.jpg</PhotoPath>
</Employees>
</old>
</tuple>
</GetEmployeeResponse>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top