Application Error when retrieving XML

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
TomL
Posts: 32
Joined: Wed Nov 15, 2006 12:26 am

Application Error when retrieving XML

Post by TomL »

I've been working on some WebEx XML API scripts and I am experiencing an "Application Error" when retrieving XML results. I didn't find any issues on the forum about it so I figured I'd pass it along. If I save the XML results (xmlPost.responseXML.save) the XML seems fine. I just updated to the new release of PS (4.5.578) today, but that didn't seem to
help.

Let me know if you need additional info...
Tom

vbs code: (taken directly from the WebEx site) error occurs on the wscript.echo

Dim strHost, strURI, strSID, strPID, strUser, strPassstrHost = "xxxxxxx.webex.com"strURI = "https://" & strHost & "/WBXService/XMLService"strSID = "xxxxxx"strPID = "xxxxxx"strUser = "xxxxxxx"strPass = "xxxxxxxxx"
'' -- Create the XML messageDim strXMLstrXML = "<?xml version='1.0' encoding='UTF-8'?>" & _ "<serv:message xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" & _ " <header>" & _ " <securityContext>" & _ " <webExID>" & strUser & "</webExID>" & _ " <password>" & strPass & "</password>" & _ " <siteID>" & strSID &"</siteID>" & _ " <partnerID>" & strPID & "</partnerID>" & _ " </securityContext>" & _ " </header>" & _ " <body>" & _ " <bodyContent xsi:type='java:com.webex.service.binding.meeting.LstsummaryMeeting'>" & _ " <listControl>" & _ " <startFrom>1</startFrom>" & _ " <maximumNum>10</maximumNum>" & _ " <listMethod>OR</listMethod>" & _ " </listControl>" & _ " <order>" & _ " <orderBy>CONFNAME</orderBy>" & _ " <orderBy>STARTTIME</orderBy>" & _ " </order>" & _ " </bodyContent>" & _ " </body>" & _ "</serv:message>" '' -- Post the XMLDim xmlPost, strStatus, strResponseSet xmlPost = CreateObject("Microsoft.XMLHTTP") ' Create the objectxmlPost.open "POST", strURI, FalsexmlPost.setRequestHeader "Content-Type", "text/xml" ' Set header informationxmlPost.send strXML ' Send the XMLstrStatus = xmlPost.Status ' Get the statusstrResponse = xmlPost.responseText ' Get the response messagexmlPost.responseXML.save("c:tempxmlfile.xml")Set xmlPost = Nothing ' House cleaning
'' -- Print the XML response.wscript.echo(strResponse)


User avatar
Ferdinand Rios
Posts: 373
Joined: Tue Nov 14, 2006 2:56 am

Application Error when retrieving XML

Post by Ferdinand Rios »

This sounds more like a scripting issue, not really a product issue. It would be better for you to post this at ScriptingAnswers.com where they can actually help with the script. Let me ask one quick question: If you run this script OUTSIDE of PrimalScript, do you still get the APPLICATION ERROR in the return?frios2009-02-20 07:47:41
F.G. Rios

User avatar
TomL
Posts: 32
Joined: Wed Nov 15, 2006 12:26 am

Application Error when retrieving XML

Post by TomL »

The reason I don't believe that to be the case is that the error doesn't occur if I don't echo the response. The XML file generated is fine, therefore the script is working correctly.

I would hate to think that a bad script could crash PS....

User avatar
Ferdinand Rios
Posts: 373
Joined: Tue Nov 14, 2006 2:56 am

Application Error when retrieving XML

Post by Ferdinand Rios »

OK, that is useful information. So is the "Application Error" the value returned by the wscript.echo(strResponse) call or are you getting an error dialog box. That is where I am unclear.
F.G. Rios

User avatar
TomL
Posts: 32
Joined: Wed Nov 15, 2006 12:26 am

Application Error when retrieving XML

Post by TomL »

dialog box, than PS closes....


User avatar
Ferdinand Rios
Posts: 373
Joined: Tue Nov 14, 2006 2:56 am

Application Error when retrieving XML

Post by Ferdinand Rios »

Ahh, now I understand. Yes, that is bad. Let me talk to the dev team and see what we can try.
F.G. Rios

User avatar
Ferdinand Rios
Posts: 373
Joined: Tue Nov 14, 2006 2:56 am

Application Error when retrieving XML

Post by Ferdinand Rios »

Some details please:
OS, version and 32 or 64 bit?
VBScript versionfrios2009-02-20 08:21:32
F.G. Rios

User avatar
TomL
Posts: 32
Joined: Wed Nov 15, 2006 12:26 am

Application Error when retrieving XML

Post by TomL »

XP SP3 (32bit), Powershell v2 (CTP- but I really haven't done much with it)

User avatar
Ferdinand Rios
Posts: 373
Joined: Tue Nov 14, 2006 2:56 am

Application Error when retrieving XML

Post by Ferdinand Rios »

Sorry, I meant VBScript Version, too much PowerShell on the brain.
F.G. Rios

User avatar
TomL
Posts: 32
Joined: Wed Nov 15, 2006 12:26 am

Application Error when retrieving XML

Post by TomL »

ScriptEngineMajorVersion . ScriptEngineMinorVersion = 5.7