time saver.
I've been having major issues accessing xmlrpc web services over the
last few days, I tried using cfhttp to post xml as per spec, I tried a
cfc I found here http://mxblogspace.journurl.com/index.cfm?fa=rd&m=763
with no luck, the service would simply not like the method name for some
bizarre reason.
In the end I just gave in a decided to write a java interface for xmlrpc
web sevices, expecting it to take a fair while, It ended up taking an
hour or less and being very easy.
Step 1: Add xmlrpc-1.2-b1.jar from the package downloadable at
http://ws.apache.org/xmlrpc/ to your MX servers classpath
Step 2: Use the following code;
<cfscript>
XmlRpcClient = createObject("JAVA","org.apache.xmlrpc.XmlRpcClient");
XmlRpcClient.init("http://[service_uri]");
params = arrayNew(1); // Leave in even if service requires no params
(params can also be a struct?)
params[1] = "[string_param]";
result = XmlRpcClient.execute("[servicename].[method]", params);
</cfscript>
<cfdump var="#result#">
Works great for me, hope It saves someone else the time I wasted messing
about with other methods.
Craig Dudley
Senior Developer
Netstep Corporate Communications Ltd
Direct Line: +44(0) 1422 319712
Phone: +44(0) 1422 200308
Fax: +44(0) 1422 200306
e-mail: [EMAIL PROTECTED]
MS Messenger: [EMAIL PROTECTED]
www: www.netstep.co.uk
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

