Re: Re: xmlrpc with c#.net

Troy Farrell <[email protected]> Tue, 21 Apr 2009 09:00:28 -0500
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
Dinesh,

If your client is not receiveing a response, your client is probably not 
transmitting a request.  Try using Wireshark http://www.wireshark.org/ to 
listen to your network for the traffic.  You should see an HTTP request to 
www.myurl.com from your client.  You can also telnet to your server and 
send it something like this:

POST /RPC2 HTTP/1.1
Host: www.myurl.com
Content-Type: text/xml
Content-Length: 106
Connection: close

<?xml 
version="1.0"?><methodCall><methodName>system.listMethods</methodName><params></params></methodCall>

You should get back something like this:

HTTP/1.1 200 OK
Content-type: text/xml; charset="utf-8"
Content-length: 525
Connection: close
Date: Tue, 21 Apr 2009 15:45:28 UTC
Server: XMLRPC_ABYSS/Xmlrpc-c 1.16.1

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param><value><array><data>
<value><string>system.listMethods</string></value>
<value><string>system.methodExist</string></value>
<value><string>system.methodHelp</string></value>
<value><string>system.methodSignature</string></value>
<value><string>system.multicall</string></value>
<value><string>system.shutdown</string></value>
<value><string>system.capabilities</string></value>
</data></array></value></param>
</params>
</methodResponse>


Connection to host lost.




From:
"verynew" <[email protected]>
To:
[email protected]
Date:
04/20/2009 05:26 AM
Subject:
[xml-rpc] Re: xmlrpc with c#.net
Sent by:
[email protected]








Hello troy,

Thank you very much for your answer. I have implemented the interface and 
structure as below 

[XmlRpcUrl("http://www.myurl.com")]
public interface chawpref : IXmlRpcProxy
{
[XmlRpcMethod("chawpref")]
XmlRpcStruct chawpref(string id, XmlRpcStruct servicess, bool reset);
}

iam passing value to the method like this 

try {

chawpref mydo = (chawpref)XmlRpcProxyGen.Create(typeof(chawpref));

XmlRpcStruct mystruct;
bool reset = true;
XmlRpcStruct ser = new XmlRpcStruct();
XmlRpcStruct events = new XmlRpcStruct();
bool value = true;
events.Add("evt_change", value);
ser.Add("services", "aw_email");
ser.Add("events",events);
IAsyncResult asr;
mystruct = ch.chawpref(docid, ser, reset);

} catch(XmlRpcFaultException fex) {
MessageBox.Show("Fault Response: " + fex.FaultCode + " " + 
fex.FaultString);
}

When i pass this to my url i have no response and no error.. How can check 
the how my request is been send ?.. Is the written code is correct for 
calling the server function ?..

Thank you once again..

Dinesh.
--- In [email protected], Troy Farrell <troy.farrell@...> wrote:
>
> Hello Dineshp.
> 
> You can nest XmlRpcStructs just like you would nest .net Hashtables:
> 
> XmlRpcStruct t = new XmlRpcStruct();
> XmlRpcStruct u = new XmlRpcStruct();
> u.Add("Foo", "Bar");
> t.Add("subStructure", u);
> 
> Troy
> 
> 
> 
> From:
> "verynew" <dineshp_832003@...>
> To:
> [email protected]
> Date:
> 04/14/2009 08:10 AM
> Subject:
> [xml-rpc] xmlrpc with c#.net
> Sent by:
> [email protected]
> 
> 
> 
> 
> 
> 
> 
> 
> Hello everyone,
> 
> Iam using the xmlrpc with the c#.net. My server function looks like this 

> below.
> 
> API = (('object_id', 'ASCII string', 1),
> ('services', 'struct', 0, [('events', 'struct', 0, [('evt_read', 
> 'boolean', 0),
> ('evt_create', 'boolean', 0),
> ('evt_move', 'boolean', 0),
> ('evt_change', 'boolean', 0)])]),
> ('reset', 'boolean', 0))
> 
> Now i have pass the value to this function like this 
> chawpref(id, {'aw_report':{'evt_move':False, 'evt_change':True,}}
> 
> The problem is the second parameter is a nested structure. how can pass 
> the nested structure value in the xmlrpcstruct. 
> 
> Thank you very much..
> 
> 
> 
> 
> 
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/