Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Library: Asp.net/vb.net Xml-rpc

Slade Christensen
Liquid Heat CTO
Join date: 25 Dec 2005
Posts: 31
01-07-2008 13:01
After many hours of searching, tweaking, and testing I finally got the beta version of a ASP.net XML-RPC for SL working using VB.net instead of the C# code thats floating everywhere out there.
Hope this helps someone in the same boat :) This is the code behind page for your asp.net page, tweak as necessary.

You will need to reference the CookComputing XMLRPC .dll that should be placed in your bin folder and referenced the usual way.

CODE

Imports cookcomputing.xmlrpc

Partial Class _Default

Inherits System.Web.UI.Page

Public Structure Packet

Public IntValue As Integer

Public Channel As String

Public StringValue As String

End Structure

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load



Dim mypacket As Packet


mypacket.Channel = "51ef73f1-14d6-a6c3-b6b6-dbacaa4127d5" 'use actual prim listening channel here, this one errors (probably doesnt exist anymore)

mypacket.IntValue = 1234 'use whatever number you need

mypacket.StringValue = "This is my message" ' whatever string value you want to use

Dim proxy As SLXMLRPC

proxy = CType(XmlRpcProxyGen.Create(GetType(SLXMLRPC)), SLXMLRPC)

Dim ret As SLXMLRPC

Try

ret = proxy.llRemoteData(mypacket)

Catch ex As Exception

Response.Write(ex)

End Try

End Sub



<XmlRpcUrl(" http://xmlrpc.secondlife.com/cgi-bin/xmlrpc.cgi")> _

Public Interface SLXMLRPC

Inherits IXmlRpcProxy

<XmlRpcMethod("llRemoteData")> _

Function llRemoteData(ByVal retPacket As Packet) _

As SLXMLRPC

End Interface





End Class

Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
there is no internet in the mountains
01-10-2008 21:10
library bump.
_____________________
i've got nothing. ;)
Ronin DeVinna
Registered User
Join date: 13 Mar 2007
Posts: 17
07-18-2008 10:17
From: Slade Christensen
After many hours of searching, tweaking, and testing I finally got the beta version of a ASP.net XML-RPC for SL working using VB.net instead of the C# code thats floating everywhere out there.
Hope this helps someone in the same boat :) This is the code behind page for your asp.net page, tweak as necessary.
[/php]


Where can i find the C# version ?
QaPla Xie
Registered User
Join date: 5 Jul 2006
Posts: 1
this Vs llHttpRequest
11-24-2008 08:23
Why is this technique better then making a simple http request, then reacting to the event when it returns?