Yesterday, Simon Fell did the only reasonable thing. While everyone else (at least Dave, Sam, John and me) were trying to convince each other that WSDL is either great (John, Sam & me) or is absolutely unnecessary (mostly Dave ;-)), Simon hacked a tool that will WSDL-enable Radio.
This thing is just brilliant!
To show how nice it works, I just did the following little .NET Remoting web service:
using System;
public class TestingRadio: MarshalByRefObject {
public String getLocalTime(String yourname) {
Console.WriteLine("Service called from " + yourname +
" at " + DateTime.Now.ToString());
return "Hi " + yourname + ". Local time is " +
DateTime.Now.ToString() + " [CET]";
}
}
After creating a "generic" .NET Remoting server (which is about 10 lines of code as a console application; not using IIS here!), I used Simon's WSDL FM and pointed it to a copy of this service's WSDL at http://www.dotnetremoting.cc/DotNetCentric/radiotest.wsdl to generate the following Radio macro (watch out for line breaks!):
on getLocalTime ( yourname)
{
local (retval, params={"yourname": yourname});
retval = soap.rpc.client (
soapAction: "http://schemas.microsoft.com/clr/nsassem/TestingRadio/TestObjects#getLocalTime",
rpcServer: "212.88.191.179",
rpcPort: 5555,
actionURI: "/RadioTest.soap",
methodName: "getLocalTime",
adrParams: @params,
methodNamespace: "m",
methodNamespaceURI: "http://schemas.microsoft.com/clr/
nsassem/TestingRadio/TestObjects%2C%20Version%3D1.0.770.40188%2C
%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull" );
return retval ;
}
It's best to start Simon's tool directly from the "Macros"-subdirectory of Radio, else this macro has to be manually placed in the correct subdirectory (Macros\TestingRadioPort) before it can be called with a line like following from a Radio post:
Got the following reply: <% TestingRadioPort.getLocalTime("World") %>
This is interop ;-)! Thanks Simon, Sam & Dave! (btw. you can check the result on my "inoffical" Radio testbed).
Note: This sample web service will only be available for the next some hours, so if you want to play around you better be quick ;-)
Comments