SitePoint Sponsor

User Tag List

View Poll Results: How far have you got with PHP and Web Services?

Voters
92. You may not vote on this poll
  • I've built an XML-RPC client for a web service

    15 16.30%
  • I've built my own XML-RPC server

    17 18.48%
  • I've built an SOAP client for a web service

    15 16.30%
  • I've built my own SOAP server

    9 9.78%
  • I can't see a reason to use web services

    15 16.30%
  • I don't understand the technology and concepts involved

    36 39.13%
  • What's a web service?

    21 22.83%
Multiple Choice Poll.
Page 3 of 4 FirstFirst 1234 LastLast
Results 51 to 75 of 77
  1. #51
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On a general note, have been playing with the native PHP XML-RPC extension recently. Although it's still experimental and tricky to use, it's awesomely fast (can cut up to a second off Keith Devens library) and is also capable of SOAP 1.1 messages, as well as XML-RPC.

    And if you use it with XCS: http://www.webkreator.com/php/xcs/ ...

    If I was to vote for "PHP script of the year", XCS would have to be it. One extremely clever piece of code.

  2. #52
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that link Harry..

    This is quote from the site:
    http://www.webkreator.com/php/xcs/
    XCS stands short for XML-RPC Class Server. It can make any existing PHP class available for access via XML-RPC (without any modifications). You only need to put the file "xcs.php" in the same directory with your class files.
    so anyone can
    1. Write a specialized class ( insert your business plan here )
    2. Creat a xml-rpc server with this XML-RPC Class Server
    3. Charge 0.05 cents per xml-rpc client access
    Last edited by marcel; Sep 10, 2002 at 10:51.

  3. #53
    SitePoint Wizard Mincer's Avatar
    Join Date
    Mar 2001
    Location
    London | UK
    Posts
    1,140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can I have another option to vote for?

    "I love the idea of getting my hands dirty with SOAP, but I've not got any use for web services just yet."

    Cheers.

  4. #54
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    Web Services rule!!!!!!!!!!!! Thanks HarryF for the start on what is going to be no doubt an adventerous ride. Here is another one I just whipped up. It can retrieve ebay items and shwo details about the items, all using web services and flash MX,
    http://www.irq11.com/~louie/webServi...shClient2.html
    Freddy,

    This is a great extension to an already great piece of PHP code. Would you please make available the Flash source file for others (like myself) to learn from? It would be great if you could package it as a zip file on your website for distrobution.

    Thanks..
    Steve

  5. #55
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Has anyone created an ASP Client for this server?

    Just curious if anyone has created a working ASP client that can talk to the xml_rpc server created by keith devens? If not, I will take a stab at it and see if I can get something working.

    Steve

  6. #56
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have a look at: http://aspxmlrpc.sourceforge.net/ - not sure about the status but...

  7. #57
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Errors with ASP client using Keith Devens Library and Harry's web services

    I need some help with an ASP client im putting together. I am using this version of the ASP XML Parser:

    http://aspxmlrpc.sourceforge.net/

    Ok, here is the code and also the errors its pooping out:
    Code:
    <html>
    <head>
    <title>Get News List</title>
    </head>
    <body bgcolor="#FFFFFF" alink="#008000" vlink="#800080" link="#0000FF">
    
    <font size=-1><pre>
    <!--#include virtual="xmlrpc.asp" -->
    <%
    
    Dim query_info(2)
    query_info(1) = "10"
    query_info(2) = "author"
    
    'USE THE PHP SERVER TO RETURN THE XML DATA
    myresp = xmlRPC ("http://localhost:82/kd_xmlrpc/server.php", "news.getNewsList",query_info)
    response.write(myresp)
    %>
    
    </pre>
    </font>
    
    </body>
    </html>
    Ok, now the errors:

    Code:
    faultCode(unknown)faultString [The server at http://localhost:82/kd_xmlrpc/server.php generated the following error]: <BR>[request: <?xml version="1.0"?><methodCall><methodName>news.getNewsList</methodName>
    <params>
    <param>
    <value>
    <string>10</string>
    </value>
    </param>
    <param>
    <value>
    <string>author</string>
    </value>
    </param>
    </params>
    </methodCall>
    ]<BR><BR>[answer: <?xml version="1.0" ?>
    <methodResponse>
    	<fault>
    		<value>
    			<struct>
    				<member>
    					<name>faultCode</name>
    					<value>
    						<int>2</int>
    					</value>
    				</member>
    				<member>
    					<name>faultString</name>
    					<value>
    						<string>The method you requested, , was not found.</string>
    					</value>
    				</member>
    			</struct>
    		</value>
    	</fault>
    </methodResponse>
    ] : xmlRPC(4)
    Anyone know what is happening here? I am using Harry's code and Keith Deven's library for the PHP server and web services side of things and also the ASP client and ASP xmlRPC files from http://aspxmlrpc.sourceforge.net/

    ANY HELP WOULD BE GREATLY APPRECIATED!!

  8. #58
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <string>The method you requested, , was not found.</string>
    Looks like the ASP client isn't sending the method name correctly. I can't help you with the ASP but perhaps there's a way to get the ASP script to tell you what XML-RPC request it sent?

  9. #59
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by HarryF
    Code:
    <string>The method you requested, , was not found.</string>
    Looks like the ASP client isn't sending the method name correctly. I can't help you with the ASP but perhaps there's a way to get the ASP script to tell you what XML-RPC request it sent?


    Im still having the same error pop up but, I had a bit of a code change to make the XML request more like the way the PHP client works. Heres what I did:

    Code:
    ReDim paramList(1)
    set dict = Server.createObject("Scripting.Dictionary")
    dict.add "limit", 10
    dict.add "order", "author"
    set paramList(0) = dict
    and now the ASP client XML request is very similar to the PHP client XML request. Take a look:
    Code:
    <?xml version="1.0"?>
    <methodCall><methodName>news.getNewsList</methodName>
    <params>
      <param>
        <value>
          <struct>
            <member>
              <name>limit</name>
                <value>
                  <i4>10</i4>
                </value>
            </member>
            <member>
              <name>order</name>
                <value>
                  <string>author</string>
                </value>
            </member>
          </struct>
        </value>
      </param>
    </params>
    </methodCall>
    The subtle difference is in the way the ASP uses <int> xml tags. However, this is not the reason why is doesnt work. (I know this because i modified the xmlrpc.asp parser to spit out <int></iint> instead of <i4></i4>.

    BTW, I STONGLY feel that this ASP client is working correctly. All it is supposed to do is create an XML request (which it does) and sends it off to a server to parse and execute. For some reason, the PHP server, webservice or kd_xmlrpc file doesnt like the XML response its getting. Take another look above at the response its passing to the PHP server file. Below is the response from the PHP server.

    Code:
    [answer: <?xml version="1.0" ?>
    <methodResponse>
    	<fault>
    		<value>
    			<struct>
    				<member>
    					<name>faultCode</name>
    					<value>
    						<int>2</int>
    					</value>
    				</member>
    				<member>
    					<name>faultString</name>
    					<value>
    						<string>The method you requested, , was not found.</string>
    					</value>
    				</member>
    			</struct>
    		</value>
    	</fault>
    </methodResponse>
    ] : xmlRPC(4)
    again, even with my Scripting.Dictionary code change, im getting:

    Code:
    <string>The method you requested, , was not found.</string>
    Hmmff, im stumped!

  10. #60
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP xmlRPC Function

    Can _anyone_ help with this? Here is the XMLRPC function within ASP. I think it may also be a problem (limitation) that ASP is not opening the connection to the server correctly /or just not creating the response correctly. Here is the ASP xmlRPC function:

    Code:
    ' -- Server Functions --
    
    ' Called by clients, this "public" function passes
    ' method calls and arguments to be wrapped up in XML,
    ' the requested method called, the response returned
    ' appropriately.
    function xmlRPC(url, methodName, paramArr)
    	Dim requestText
    
    	' go from simple ASCII to xmlrpc
    	' Create the requestBody from the methodName and paramArr
    	requestText = functionToXML(methodName, paramArr)
    
    	' Now use the redistributable parser objects alone
    	' including server-safe XMLHTTP (yippee!)
    	Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
    	Set objLst = Server.CreateObject("MSXML2.DOMDocument")
    
    	' Call the remote machine the request
    	objXML.open "POST", url, false
    
    	' This is necessary for some implementations (ZOPE).
    	objXML.setRequestHeader "CONTENT_TYPE", "text/xml"
    	objXML.send(requestText)
    
    	Call catchError( "xmlRPC(1): XMLHTTP object creation" )
    
    	'Extract data from XML response
    	serverResponseText = objXML.responseText
    
    	' Here and further on in this function
    	' you're call the writeFaultXML sub
    	' but in this function, we're the client.
    	' Should we just err.raise and let
    	' the coder get a standard error message?
    	' Why write XML to a web page?
    	'
    	' You're right. This error should be handled
    	' better --jjohn
    
    	' let's check those pesky HTTP headers
    	If not objXML.status = 200 Then
    	   Call writeFaultXML(objXML.status, "Problem on remote machine [" _
    			      & serverResponseText & "]", _
    			      "xmlRPC(1.5)")
    	End If
    
    	If objXML.responseXML.parseError.errorCode <> 0 Then
    		Call writeFaultXML(objXML.responseXML.parseError.errorCode, _
    			  "There was an error parsing the response " _
    			  & "from " & methodName _
    			  & " xml {" &  serverResponseText _
    			  & "} received from " _
    			  & url _
    			  & "*" & requestText & "*", "xmlRPC(2)" )
    	End If
    
    	' Parsing response. There ought to be some response.
    	Set objLst = objXML.responseXML.getElementsByTagName("param")
    
    	If objLst.length = 0 Then
    		' There were *no* <param> tags passed back
    		Set objLst = objXML.responseXML.getElementsByTagName("member")
    
    		Call writeFaultXML("(unknown)", " [The server at " _
    			& url 			               _
    			& " generated the following error]:<BR>"   _
    			 & vbcrlf &  "[request: " & requestText & vbcrlf & "]<BR>"     _
    			& "<BR>[answer: " & serverResponseText & "]", _
    			"xmlRPC(4)")
    
    	else
    		' If I have a struct, make sure the vbDictionary
    		' gets assigned correctly for this function's return
    		' value
    		Dim tmp
    		Set tmp = capture_eval(XMLToValue(objLst.item(0).childNodes(0)))
    		If tmp.Item("is_object") Then
    		   Set xmlRPC = tmp.Item("data")
    		Else
    		   xmlRPC = tmp.Item("data")
    		End If
    
    	end if
    
    	'Kill everything
    	Set objXML = Nothing
    	Set objLst = Nothing
    
    	requestText=""
    end function
    I added BOLD highlighting to the code where there may be a possible problem in sending the XML Request.

    Any help would be appreciated! -steve

  11. #61
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah!:

    One other thing it might be... the XML-RPC server uses the $GLOBALS['HTTP_RAW_POST_VARS'] to get it's hands on the incoming XML-RPC request. But if the client sends a header like

    Code:
    Content-type: application/x-www-form-urlencoded
    The $GLOBALS['HTTP_RAW_POST_VARS'] variable never gets populated.

    You can either change this in php.ini with the setting;

    Code:
    always_populate_raw_post_data = On
    Or make sure client doesn't send that header.

    Course the code you highlighted suggests that it's sneding

    Code:
    Content-type: text/xml
    But if it gets that wrong...

  12. #62
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, found the problem. Looks as though the author of the ASP xmlrpc software had a "typo". With Keith Deven's help I was directed to the trouble spot and fixed the problem.

    And it works!


    Code:
    	' This is necessary for some implementations (ZOPE).
    	objXML.setRequestHeader "CONTENT_TYPE", "text/xml"
    	objXML.send(requestText)
    should be

    Code:
    	' This is necessary for some implementations (ZOPE).
    	objXML.setRequestHeader "CONTENT-TYPE", "text/xml"
    
    	objXML.send(requestText)
    Thanks for all your help.

  13. #63
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Not so fassst!

    Ok, there still seems to be a problem with the result being returned. It builds the XML file based on the webservice and data in the database. But for an odd reason, its spitting out a faultcode. The client is an ASP based client, as mentioned somewhere in the forum, and the rest is all based on Keith Devens xml lib and HarryF's webservices.

    Can Anyone HELP?

    Best thing to do is set up your webservers and jump in to crack this bug(?) with me.

  14. #64
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks like you're not alone with this problem: http://forums.devshed.com/showthread...ghlight=XMLRPC

    Sorry I recommended that ASP implementation now - seems to have problems.

  15. #65
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Errors im getting

    Check the zip file for errors.txt file and you'll see whats happening now..

    Steve
    Attached Files Attached Files

  16. #66
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    faultCode-1072896760faultStringThere was an error parsing the response from news.getNewsListThere was an error parsing the response
    Hmmm. That suggests to me that the ASP XML-RPC implementation is full of bugs - it's complaining that it can't parse what it got from the server.

    I've recently tested the server in the article against some other PHP XML-RPC implementations (including the native XML-RPC extension) - worked fine so I really don't think the problem is there.

    But what do you expect? ASP coders...

    And the sad news is ASPwise, there doesn't seem to be alot to choose from. From by browser you've only got the implementation I've already posted, a COM version which was based on the same code: http://redmonk.editthispage.com/xmlrpccom/ and and ActixeX implementation: http://www.fongueusemare.com/vbblog.asp

    If you're looking for alternatives, you could always try one of the JavaScript implementations;

    http://www.vcdn.org/Public/XMLRPC/
    http://scottandrew.com/xml-rpc/

    Perhaps it's possible to re-write them as ASP pages?

  17. #67
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, being a developer, I really demise rewriting code and reinventing the wheel. Maybe another alternative would be to branch off from the ASP XMLRPC development cvs tree and use what is already available.

    But then again, I would hate to step on anyones toes, that being the creator of the ASP version, so hopefully there is some room for discussion. Regardless, the first step is to discuss with the author to do a code fix.

    I think what the author must do is rethink how to pull the data from the XML schema. I think its being sent ok, however, I dont think its response is correct. The ASP author should follow Keith Devens design on sending an array back like the PHP library:
    Code:
    list(success, response) = XMLRPC_request(, , , ,);
    Have the ASP code return an array containing a boolean value as the success value and an object containing the response data. Then you can instantiate a scripting.dictionary object or somekind of custom collection object to hold the values of the response data. This way the client can just do something similar to (but in ASP of course) what PHP XMLRPC client does:
    Code:
    <?php echo ($response['param']);
    -Steve

  18. #68
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Totally agree on reinventing the wheel.

    May be you can help him fix the bugs. That error looks like his code has a problem parsing XML (irrespective of whether it's an XML-RPC structure or whatever).

  19. #69
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Whoa..very odd

    Came across a possible understanding of the problem we are having with the ASP code. The XML errorCode which is being generated is -1072896760. I have researched this a bit and found out that it is the following:


    "-1072896760, An invalid character was found in text content."


    So, im not sure if this is being generated and inserted from the ASP code (which I have to believe is probably something with the way MSXML COM object is working or the actual ASP code is doing something), but possibly it could be a x00 or null field in the Database(?) not sure..

    Also, here is a page which I found which some other folks seem to have been experiencing the same stuff:
    http://p2p.wrox.com/archive/xslt/2002-02/32.asp

    Still hacking..

  20. #70
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Possible solutions to ASP error -1072896760

    NOTE:
    I know this is a PHP/XML/Webservices discussion group, but since it has to do with webservices and connecting to the PHP files HarryF created and also Keith Devens Library, I think its accepted to document my findings with the ASP client I am working with.
    -----------

    Possible solution??

    http://www.developersdex.com/xml/mes...tkmsftngp03%3E

    or

    http://www.developersdex.com/xml/sea...=585&x=55&y=13


    <-cut->

    Thanks Chris,
    You are right, my XML was transfered from SGML which include lots ISO
    characters, would you please tell me how to transfer ISO charaters in to XML
    UTF?

    </-cut->

    Also see..

    http://msdn.microsoft.com/library/de...lencodings.asp

    -Steve

  21. #71
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking ASP / XML-RPC WORKS with WebServices!!

    I finally got something to show you guys with the ASP implementation using HarryF's webservices and Keith Devens XMLRPC Library.

    First thing I should mention is, there are a few "inconsistencies" with the file you can download from the ASP XML-RPC website:

    http://aspxmlrpc.sourceforge.net/

    I loaded the xmlrpc.asp file in Visual Basic as a module and split up the Base64 function into its own separate class. Then I created a form with a textbox and button to start debuging whats been going on in the file. Well, to save some breath, there are a few things wrong with it [Ill have to go back an fully document my findings].

    So with that being said, I will distribute my 2 files with the changes I made. [xmlrpc.asp and getNewsList.asp - see the attachment to this posting]

    Basically what I had to do is determine what type of data was being sent back from the xmlRPC() function and work with that.

    Heres what I did:

    Code:
    <!--#include virtual="xmlrpc.asp" -->
    <%
    
    ReDim paramList(1)
    set dict = Server.createObject("Scripting.Dictionary")
    dict.add "limit", 15
    dict.add "order", "author"
    set paramList(0) = dict
    
    
    'USE THE PHP SERVER TO RETURN THE XML DATA
    'SGB - Make you modification here
    result = xmlRPC("http://localhost:82/kd_xmlrpc/server.php", "news.getNewsList", paramList)
    
    If IsArray(result) Then
        
        for i = 0 to ubound(result)
        	'response.write("test")
        	    a = result(i).Items
    	    For j = 0 To result(i).Count - 1 ' Iterate the array.
    	       response.write(a(j)&vbcrlf)
    	    Next    	
    	    response.write(vbcrlf)
        next
        
    End If
    
    
    %>
    Now, we have a working ASP version and PHP version of web services. You can still modify it to fit your own formatting needs and make the output more user friendly.

    All of my work is documented in the zip file attached.

    -Steve
    Attached Files Attached Files

  22. #72
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the latest version which will mimic the PHP client web service:

    Code:
    <html>
    <head>
    <title>Get News List</title>
    </head>
    <body bgcolor="#FFFFFF" alink="#008000" vlink="#800080" link="#0000FF">
    
    <font size="-1"><pre>
    <!--#include virtual="xmlrpc.asp" -->
    <%
    
    if Request.QueryString("news_id") <> "" then
    	response.write("Add your code here for displaying the item")
    else
    
    
    
    
    ReDim paramList(1)
    set dict = Server.createObject("Scripting.Dictionary")
    dict.add "limit", 15
    dict.add "order", "author"
    set paramList(0) = dict
    
    
    'USE THE PHP SERVER TO RETURN THE XML DATA
    result = xmlRPC("http://localhost:82/kd_xmlrpc/server.php", "news.getNewsList", paramList)
    
    If IsArray(result) Then
    %>
    <table align="center" width="600" border="1">
    <%    
        for i = 0 to ubound(result)
    %>    	
    	<tr valign="top">
    	<td colspan="2">
    	<a href="<% response.write("getNewsList3.asp?news_id=" & result(i)("news_id")) %>">
    	<% response.write(result(i)("title"))%>
    	</a>
    	</td>
    	</tr>
    	<tr valign="top">
    	<td colspan="2">
    	<% response.write( result(i)("short_desc")) %>
    	</td>
    	</tr>
    	<tr valign="top">
    	<td>
    	<% response.write( result(i)("author")) %>
    	</td>
    	<td>
    	<% response.write( result(i)("date")) %>
    	</td>
    	</tr>
    <%
        next
    %>
    </table>
    <%  
    End If
    end if
    %>
    
    </pre>
    </font>
    
    </body>
    </html>

  23. #73
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice work! That's what web services are about after all - cross platform integration.

  24. #74
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Here is the FINAL VERSION for ASP

    Final Post for ASP client to talk to web services: Everything is now complete and implemented just like the PHP xmlrpc client. Sheeeeeesh, lets just say I know something about web services now..

    http://aspxmlrpc.sourceforge.net/

    Here is the link to the xmlrpc.asp Library File, however, until they fix a few more bugs here and there, use the file from the last post (as attached) or this post, since this is the version I have hacked through to fix some small things.

    Code:
    <html>
    <head>
    <title>Get News List</title>
    </head>
    <body bgcolor="#FFFFFF" alink="#008000" vlink="#800080" link="#0000FF">
    
    <font size="-1"><pre>
    <!--#include virtual="xmlrpc.asp" -->
    <%
    Dim result
    if Request.QueryString("news_id") <> "" then
    
    	ReDim paramList(1)
    	set paramList(0) = Request.QueryString("news_id")
    
    	'Notice that NOW we have to use the Set statement since the function doesnt work the way it should.
    	Set result = xmlRPC("http://localhost:82/kd_xmlrpc/server.php", "news.viewNewsItem", paramList)
    
    %>
    	<table align="center" width="600">
    	<tr valign="top">
    	<th colspan="2"><b><% response.write(result("title")) %></b></th>
    	</tr>
    	<tr valign="top">
    	<th><% response.write(result("author")) %></th>
    	<th><% response.write(result("date")) %></th>
    	</tr>
    	<tr valign="top">
    	<td colspan="2">
    	<% response.write(result("full_desc")) %>
    	</th>
    	</tr>
    	</table>
    <%
    
    	
    	
    Else
    
    
    ReDim paramList(1)
    set dict = Server.createObject("Scripting.Dictionary")
    dict.add "limit", 15
    dict.add "order", "author"
    set paramList(0) = dict
    
    
    'USE THE PHP SERVER TO RETURN THE XML DATA
    result = xmlRPC("http://localhost:82/kd_xmlrpc/server.php", "news.getNewsList", paramList)
    
    If IsArray(result) Then
    %>
    <table align="center" width="600" border="1">
    <%    
        for i = 0 to ubound(result)
    %>    	
    	<tr valign="top">
    	<td colspan="2">
    	<a href="<% response.write("getNewsList3.asp?news_id=" & result(i)("news_id")) %>">
    	<% response.write(result(i)("title"))%>
    	</a>
    	</td>
    	</tr>
    	<tr valign="top">
    	<td colspan="2">
    	<% response.write( result(i)("short_desc")) %>
    	</td>
    	</tr>
    	<tr valign="top">
    	<td>
    	<% response.write( result(i)("author")) %>
    	</td>
    	<td>
    	<% response.write( result(i)("date")) %>
    	</td>
    	</tr>
    <%
        next
    %>
    </table>
    <%  
    End If
    end if
    %>
    
    </pre>
    </font>
    
    </body>
    </html>
    -Steve
    Attached Files Attached Files

  25. #75
    SitePoint Member
    Join Date
    Nov 2004
    Location
    edmonton
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why xml and soap - database wannabe?

    Why can't we have access to a database or some easy to read and organize storage of data?

    I still think databases, (those boxy things that store data in boxes, yes), are easier, faster, to parse and code than text based methods of data streaming.

    Is there not some way to hook up to a webservice database? Or they just aren't offering it yet, because of the hype of soap and xml methods currently avail?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •