Hi,

anyone has the above working by any chance?

It works with parameter (NULL) and 1 parameter but not with more than 1.

The XMLRPC Client is ok, I have tested it against a non Gambas XMLRPC 
server.
But if you post more than one parameter to the Gambas XMLRPC server, it 
doesn't check the correct amount, and it only passes the first one to 
the Callback routine.

I need it for my project,  but I'm afraid I have to dive into the 
Component again. ;-(

The code I made:
---
PUBLIC FUNCTION Connect() AS Boolean

  DIM hRpcFunc AS RpcFunction

  hXMLRPC = NEW RpcServer AS "hXMLRPC"

  hRpcFunc = NEW RpcFunction("send.email", [XmlRpc.xString, 
XmlRpc.xString, XmlRpc.xString], XmlRpc.xBoolean)
  hRpcFunc.Help = ("send email to param1, with subject param2 and body 
param3")
  hXMLRPC.Register(hRpcFunc)

  TRY hXMLRPC.Listen(iHTTPPort, iMaxConn)
  IF NOT hXMLRPC.Listening THEN
    RETURN FALSE
  END IF
  RETURN TRUE

END
---

---
PUBLIC SUB hXMLRPC_RemoteCall(sName AS String, sData AS Variant[])

  SELECT CASE sName
    CASE "send.email"
      SendEmail(sData)
    ...
 END SELECT

END
---
PRIVATE SUB SendEmail(sParams AS Variant[])

  DIM sParam AS String

   ' it only contains the first parameter param1
  FOR EACH sParam IN sParams
     PRINT sParam
  NEXT

END

Kind Regards,
Ron_2nd.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to