Print Page | Close Window

HttpAPI.asp Question

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29096
Printed Date: 01 April 2026 at 4:04pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: HttpAPI.asp Question
Posted By: JohnLug
Subject: HttpAPI.asp Question
Date Posted: 01 February 2011 at 4:01am
As I've never worked with this, I'm probably doing something wrong. :(
 
Loaded the file, but every selection gives the same error..
The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the javascript:location.reload%28%29" rel="nofollow - Refresh button, or try again later.


Only one top level element is allowed in an XML document. Error processing resource 'http://chronicpainsite.com/mb/HttpAPI....




Replies:
Posted By: WebWiz-Bruce
Date Posted: 01 February 2011 at 1:35pm
The output is in XML format. For the sound of it your browser is trying to use an XSL style sheet to format the XML output.

To test the API try using a different browser such as Chrome or Firefox.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: JohnLug
Date Posted: 01 February 2011 at 2:05pm
Getting closer, but in FF, get the following...
(and I am using the main Admin username and password)
 
 
This XML file does not appear to have any style information associated with it. The document tree is shown below.
      <ApiResponse><ErrorCode>-100</ErrorCode><ErrorDescription>Admin Login Fail</ErrorDescription><ResultData/></ApiResponse>
 
 


Posted By: WebWiz-Bruce
Date Posted: 01 February 2011 at 2:27pm
That is correct as the output data is in XML format.

It is intended to be parsed by an XML Parser to pull out the data from it that you require.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: JohnLug
Date Posted: 01 February 2011 at 2:33pm
OK, now for a real dumb post.
 
I've never done anything using XML format.
All I did here was fill in the blanks on the HttpAPI.asp page.
 
Is there some place a dummy like me can figure this out easily? :)
 
Thanks


Posted By: 123Simples
Date Posted: 01 February 2011 at 3:08pm
Have you looked at this page here JL?
http://demo.webwizforums.com/HttpAPI.asp


-------------
http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design


Posted By: JohnLug
Date Posted: 01 February 2011 at 3:14pm
That's the page that I'm trying on my site.
 
I try filling in any of the forms on that page and get errors. Both on my site and on the link you posted. :(
 
I know it's something I'm doing but I don't know what.


Posted By: 123Simples
Date Posted: 01 February 2011 at 3:26pm
It seems complex to me JL LOL
So you read through this page? http://www.webwiz.net/web-wiz-forums/kb/existing-members-api.htm

And you completed steps 1 to 7 inclusive?


-------------
http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design


Posted By: JohnLug
Date Posted: 01 February 2011 at 3:37pm
Well, I'm just trying to get the HttpAPI.asp to display.
I'm not trying to change anything, yet.
The second link you posted here seems is to change the log in system and that I don't want.


Posted By: 123Simples
Date Posted: 01 February 2011 at 4:03pm
Hi John
Sorry I got held up on the phone

As far as I can see (and Bruce will answer this much more effectively I'm sure) this system HttpAPI.asp has to somehow linked into the forum, or an existing login system - probably why I've never used it. You said earlier about sounding dumb, but this looks pretty complex stuff, and I'm not fluent with it at all, so I can't really help you

I'm sure Bruce will give you a better and more comprehensive answer, but for me - well Wacko I'm confused with it too Wink


-------------
http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design


Posted By: WebWiz-Bruce
Date Posted: 01 February 2011 at 4:05pm
It does work, I think what the issue is that you are trying to get the XML to display in a browser like a web page does.

This is the whole point of the API is that it does not display in a browser, but instead returns XML which is then parsed to get the data you need from the XML.

When you submit a test to the API, if you use a browser view the source code.

For example if you use the 1st example at  http://demo.webwizforums.com/httpapi.asp" rel="nofollow - http://demo.webwizforums.com/httpapi.asp  to get the API Version it returns the following XML:-

<?xml version="1.0" encoding="utf-8" ?>
<ApiResponse>
 <ErrorCode>0</ErrorCode>
 <ErrorDescription/>
 <ResultData recordcount="1">
  <Record>
   <ApiVersion>1.03</ApiVersion>
  </Record>
 </ResultData>
</ApiResponse>

This XML code is intended to be parsed by an XML Parser, not as a viewable page in a web browser.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: JohnLug
Date Posted: 01 February 2011 at 4:44pm
Well, I think I need to go and read more somewhere.
 
Thanks for the help, but I'm more lost now than before.Confused


Posted By: 123Simples
Date Posted: 01 February 2011 at 5:13pm
Right John, I've just tried this myself (stupid as I might be) and this is how I understand the principle of what happens. As an example I'm using Firefox as my browser, and my own forum (since that is one I know my username and password for apart from here)

I have not switched on the my api (do I need to? see what I mean).. anyway I typed in my web address to my forum, followed by HttpAPI.asp
And see the page that Bruce and I gave links to

I then chose as an example Returns the current version of Web Wiz Forums

And typed in my forum username and password, and clicked Test Web Wiz Forums Version, and a new window opened and it said:

<ApiResponse>
<ErrorCode>0</ErrorCode>
<ErrorDescription/>

<ResultData recordcount="1">

<Record>
<Software>Web Wiz Forums(TM)</Software>
<Version>9.69</Version>
<ApiVersion>1.03</ApiVersion>
<Copyright>(C)2001-2010 Web Wiz(TM). All rights reserved</Copyright>
<BoardName>TWS Forums - Adult Chat, Software, Help, Life</BoardName>
<URL>http://www.mrtws.com/forum/</URL>
<Email>my email was here</Email>
<Database>SQLServer</Database>
<InstallID>my install ID was here</InstallID>
<NewsPad>True</NewsPad>
<NewsPadURL/>
</Record>
</ResultData>
</ApiResponse>


I hope that helps try to explain it somewhat


-------------
http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net