Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using SoapClient30 in Excel - What's wrong with this code?

56 views
Skip to first unread message

Pfdd

unread,
Feb 18, 2009, 11:15:01 AM2/18/09
to
Public Function GetCourseDataWebservice(ByVal coursecode As String) As String

'This function calls a web service to retrieve data from JDE.

Dim WebSvc As MSSOAPLib30.SoapClient30
Dim XmlDoc As MSXML2.IXMLDOMNodeList

On Error GoTo CatchError
Set WebSvc = New MSSOAPLib30.SoapClient30

Call WebSvc.MSSoapInit(mWsdlPlanning)
WebSvc.ClientProperty("ServerHTTPRequest") = True
WebSvc.ConnectorProperty("Timeout") = 90000

WebSvc.ConnectorProperty("AuthUser") = "[ausername]"
WebSvc.ConnectorProperty("AuthPassword") = "[apassword]"

' Call WebSvc.MSSoapInit(mWsdlPlanning, "GetCourseDescription")
' Call WebSvc.MSSoapInit(mWsdlPlanning)


Set XmlDoc = WebSvc.GetCourseDescription(coursecode)
GetCourseDataWebservice = GetNeededCourseInfo(XmlDoc,
"GetDescriptionReturn")


Exit Function
CatchError:
MsgBox "Error#" & Err.Number & " Error Description:" & Err.Description
' GetCourseDataWebservice = "UnknownError"
End Function

When I run the code it crashes @ Set XmlDoc =
WebSvc.GetCourseDescription(coursecode)
Here is my watch for when it crashes
Watch : : Err.Description : "Attachment:Maximum retry on the connection
exceeded. HRESULT=0x80004005: Unspecified error
- Client:An unanticipated error occurred during the processing of this requ

Watch : : Err.Number : -2147467259 : Long :
Sheet1.GetCourseDataWebservice

the WebSvc object:
Detail ""
FaultActor""
FaultCode""
FaultCodeNamespace""
FaultString""

I don't know what is wrong here...can anyone else see it?!

0 new messages