Loading ...
Sorry, an error occurred while loading the content.

How do I avoid using a hard coded ?

Expand Messages
  • pearce_w_j
    Hello to all. I am new to XML-RPC and am trying to create a .NET client to work with self hosted Wordpress weblogs using the xmlrpc.php server. I am happy with
    Message 1 of 3 , Jul 16, 2008
    View Source
    • 0 Attachment
      Hello to all.

      I am new to XML-RPC and am trying to create a .NET client to work with
      self hosted Wordpress weblogs using the xmlrpc.php server.

      I am happy with the example code at
      http://www.xml-rpc.net/faq/xmlrpcnetfaq.html and have got things working
      for that sort of implementation. That code uses an interface definition
      that hard codes the server url, eg:

      <XmlRpcUrl("http://xyz.com/wp-dev/xmlrpc.php")> _
      Public Interface IWP
      Inherits IXmlRpcProxy
      <XmlRpcMethod("wp.getCategories")> _
      Function getCategories(ByVal args() As String) As category()
      End Interface

      However, I want to be able to produce a client that is good for multiple
      weblogs on different domains, so need to be able to set the url of the
      server at runtime. I would be very grateful if I could learn how to do
      that. I've searched high and low, but can't find anything to set me on
      the right course.

      Thank you and regards.

      Bill



      [Non-text portions of this message have been removed]
    • charlescookuk
      http://www.xml-rpc.net/faq/xmlrpcnetfaq.html#2.3
      Message 2 of 3 , Jul 16, 2008
      View Source
      • 0 Attachment
        http://www.xml-rpc.net/faq/xmlrpcnetfaq.html#2.3

        --- In XMLRPCNET@yahoogroups.com, "pearce_w_j" <billpea@...> wrote:
        >
        > Hello to all.
        >
        > I am new to XML-RPC and am trying to create a .NET client to work with
        > self hosted Wordpress weblogs using the xmlrpc.php server.
        >
        > I am happy with the example code at
        > http://www.xml-rpc.net/faq/xmlrpcnetfaq.html and have got things working
        > for that sort of implementation. That code uses an interface definition
        > that hard codes the server url, eg:
        >
        > <XmlRpcUrl("http://xyz.com/wp-dev/xmlrpc.php")> _
        > Public Interface IWP
        > Inherits IXmlRpcProxy
        > <XmlRpcMethod("wp.getCategories")> _
        > Function getCategories(ByVal args() As String) As category()
        > End Interface
        >
        > However, I want to be able to produce a client that is good for multiple
        > weblogs on different domains, so need to be able to set the url of the
        > server at runtime. I would be very grateful if I could learn how to do
        > that. I've searched high and low, but can't find anything to set me on
        > the right course.
        >
        > Thank you and regards.
        >
        > Bill
        >
        >
        >
        > [Non-text portions of this message have been removed]
        >
      • pearce_w_j
        Thank you so much, and with apologies for missing that in the FAQ. I think my unfamiliarity with the concepts and terminology meant that I failed to spot
        Message 3 of 3 , Jul 16, 2008
        View Source
        • 0 Attachment
          Thank you so much, and with apologies for missing that in the FAQ. I
          think my unfamiliarity with the concepts and terminology meant that I
          failed to spot that.

          In the meantime I had found the same answer in the library's sample
          code, in the Math App and had returned here to answer my own question,
          but you beat me to it.

          Many thanks and best wishes.

          Bill

          --- In XMLRPCNET@yahoogroups.com, "charlescookuk" <chascook@...> wrote:
          >
          > http://www.xml-rpc.net/faq/xmlrpcnetfaq.html#2.3
          >
          > --- In XMLRPCNET@yahoogroups.com, "pearce_w_j" <billpea@> wrote:
          > >
          > > Hello to all.
          > >
          > > I am new to XML-RPC and am trying to create a .NET client to work with
          > > self hosted Wordpress weblogs using the xmlrpc.php server.
          > >
          > > I am happy with the example code at
          > > http://www.xml-rpc.net/faq/xmlrpcnetfaq.html and have got things
          working
          > > for that sort of implementation. That code uses an interface
          definition
          > > that hard codes the server url, eg:
          > >
          > > <XmlRpcUrl("http://xyz.com/wp-dev/xmlrpc.php")> _
          > > Public Interface IWP
          > > Inherits IXmlRpcProxy
          > > <XmlRpcMethod("wp.getCategories")> _
          > > Function getCategories(ByVal args() As String) As category()
          > > End Interface
          > >
          > > However, I want to be able to produce a client that is good for
          multiple
          > > weblogs on different domains, so need to be able to set the url of the
          > > server at runtime. I would be very grateful if I could learn how to do
          > > that. I've searched high and low, but can't find anything to set me on
          > > the right course.
          > >
          > > Thank you and regards.
          > >
          > > Bill
          > >
          > >
          > >
          > > [Non-text portions of this message have been removed]
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.