enguer / xmlrpcnet

Automatically exported from code.google.com/p/xmlrpcnet
0 stars 0 forks source link

problem in assigning dynamic rpc server url to [XmlRpcUrl("http://localhost/drupal-6.4/drupal-6.4/?q=services/xmlrpc")] #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a new c# project and in the beginning of the code behind type

[XmlRpcUrl("http://ebhakt.com/services/xmlrpc")] // Change this if you are 
not using Clean URL's!
public interface IServiceSystem : IXmlRpcProxy
{
   ......
}

2. Now here i want the rpc url in front of [XmlRpcUrl(rpc_url)] to be 
dynamic

3. When i say dynamic , it means the user using the software must be able 
to set the rpc server url at run time

For this i added a global variable to the program and assigned it the value  
using app.config
but this doesn't work

What is the expected output? What do you see instead?
I want the [XmlRpcUrl("http://ebhakt.com/services/xmlrpc")] to have a 
dynamic variable passed into it in-spite of  
http://ebhakt.com/services/xmlrpc
but it gives errors 

What version of the product are you using? On what operating system?
CookComputing.XmlRpcV2.dll

Please provide any additional information below.
It seems that the [XmlRpcUrl("http://rpc_url")] only expects const values 

Is there a way around to get it configured with dynamic values 

Thanks

Original issue reported on code.google.com by ebh...@gmail.com on 9 Mar 2010 at 4:19

GoogleCodeExporter commented 8 years ago
Hi,
in fact, it's very easy.

Public Interface IWordTracker
        Inherits IXmlRpcProxy
        <XmlRpcMethod("HelloWorld")> _
        Function HelloWorld()
End Interface

Public Sub Test(ByVal url as String)
        Dim WordTracker As IWordTracker = CType(XmlRpcProxyGen.Create(GetType(IWordTracker)), IWordTracker)
        WordTracker.Url = url
        MessageBox.Show(WordTracker.HelloWorld())
End Sub

Use a translate tool to translate vb.net to c#.

Original comment by kelln...@gmail.com on 13 Jul 2010 at 3:01

GoogleCodeExporter commented 8 years ago
Functionality to handle this exists already.

Original comment by ChasC...@gmail.com on 7 Aug 2010 at 2:01