xml-rpc with C# .NET 2.0

A

atali.daoud

Hi everybody,

I'am using API CookComputing.XmlRpc (http://www.xml-rpc.net/)but I am
annoying by a bug ( from FrameWork 2.0?).

I used the api with .NET 1.1 framework without any problem but once I
converted my project under .NET 2.0 I got the following message :

"The server committed a protocol violation. Section=ResponseStatusLine"

My code is :
// Create an xml rpc connection with syndic8
ISyndic8 syndic8 = (ISyndic8)XmlRpcProxyGen.Create(typeof(ISyndic8));

// Get all children topics
string [] topics = syndic8.GetCategoryChildren( "DMOZ", topic);

In the ISyndic8 interface I have:

[XmlRpcUrl("http://www.syndic8.com/xmlrpc.php")]
public interface ISyndic8
{
[XmlRpcMethod("syndic8.GetCategoryChildren")]
string [] GetCategoryChildren( string CategoryScheme, string
category);
}


For debugging I used TcpTrace:

This is the request
POST /xmlrpc.php HTTP/1.1
Content-Type: text/xml
User-Agent: XML-RPC.NET
Content-Length: 313
Expect: 100-continue
Host: localhost:8080

<?xml version="1.0"?>
<methodCall>
<methodName>syndic8.GetCategoryChildren</methodName>
<params>
<param>
<value>
<string>DMOZ</string>
</value>
</param>
<param>
<value>
<string>Top/Arts</string>
</value>
</param>
</params>
</methodCall>

This is the answer

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Thu, 08 Jun 2006 22:40:33 GMT
Server: Apache/1.3.31 (Unix) DAV/1.0.3 PHP/4.3.9 mod_gzip/1.3.26.1a
mod_throttle/3.1.2 mod_perl/1.29
Vary: Accept-Encoding
X-Powered-By: PHP/4.3.9
Content-Length: 854
Content-Type: text/xml

<?xml version="1.0" ?>
<methodResponse>
<params>
<param>
<value><array>
<data>
<value><string>Top/Arts/Animation</string></value>
<value><string>Top/Arts/Architecture</string></value>
<value><string>Top/Arts/Comics</string></value>
<value><string>Top/Arts/Digital</string></value>
<value><string>Top/Arts/Entertainment</string></value>
<value><string>Top/Arts/Genres</string></value>
<value><string>Top/Arts/Literature</string></value>
<value><string>Top/Arts/Movies</string></value>
<value><string>Top/Arts/Music</string></value>
<value><string>Top/Arts/Online_Writing</string></value>
<value><string>Top/Arts/People</string></value>
<value><string>Top/Arts/Radio</string></value>
<value><string>Top/Arts/Television</string></value>
<value><string>Top/Arts/Writers_Resources</string></value>
</data>
</array></value>
</param>
</params>
</methodResponse>


I have already added this section in my App.config but any effects.
<configuration>
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
</configuration>


Could you please help me because it drives me crazy.

Best regards,
Atali DAOUD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top