Skip to search.
weblogs-com

Group Information

  • Members: 33
  • Category: Internet
  • Founded: Sep 7, 2004
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

  Messages Help
Advanced
Weblogs.com respose error   Message List  
Reply Message #26 of 274 |
Re: [weblogs-com] Re: Weblogs.com respose error

Andy, the length of this message is 205, I would put
the contents in a StringBuffer or String, then get the
length, use this variable in the "Content-lengh" field
of the header.

thanks
Joel


--- andy_kishore <andy_kishore@...> wrote:

> Hi,
>
> This is what my request looks like:
>
> // THIS IS WHERE I'M SETTING THE HEADERS
> con.setRequestProperty("Content-Type","text/xml");
> con.setRequestProperty("Host","rpc.weblogs.com");
> con.setRequestProperty("Content-length","250");
> con.setRequestMethod("POST");
>
> // THIS IS MY XML-RPC REQUEST
> writer.write("<?xml version=\"1.0\"?>");
> writer.write("<methodCall>");
>
writer.write("<methodName>weblogUpdates.ping</methodName>");
> writer.write("<params>");
> writer.write("<param>");
> writer.write("<value>Scripting News</value>");
> writer.write("</param>");
> writer.write("<param>");
>
writer.write("<value>http://www.scripting.com/</value>");
> writer.write("</param>");
> writer.write("</params>");
> writer.write("</methodCall>");
>
> --- In weblogs-com@yahoogroups.com, Joel Nylund
> <jnylund@y...> wrote:
> >
> > Andy, can you post the exact request you are
> sending,
> > typically I have seen this error when you send the
> > wrong content length (are you sure the length is
> 250?)
> > thanks
> > Joel
> >
>
>
>
>
>




Thu Nov 3, 2005 4:00 pm

jnylund
Online Now Online Now
Send Email Send Email

Message #26 of 274 |
Expand Messages Author Sort by Date

I tried pinging Weblogs through Java code but everytime i get the following response: < ? x m l v e r s i o n = " 1 . 0 " ? > < m e t h o d R e s p o n s e ......
andy_kishore Offline Send Email Nov 3, 2005
12:29 pm

Andy, can you post the exact request you are sending, typically I have seen this error when you send the wrong content length (are you sure the length is 250?)...
Joel Nylund
jnylund Online Now Send Email
Nov 3, 2005
12:41 pm

Hi, This is what my request looks like: // THIS IS WHERE I'M SETTING THE HEADERS con.setRequestProperty("Content-Type","text/xml"); ...
andy_kishore Offline Send Email Nov 3, 2005
12:47 pm

Andy, the length of this message is 205, I would put the contents in a StringBuffer or String, then get the length, use this variable in the "Content-lengh"...
Joel Nylund
jnylund Online Now Send Email
Nov 3, 2005
4:01 pm

Hi Joel, Thanks for your reply....i tried what you said but same results again ...Could you send me sum code you might have written which works. That would be...
andy_kishore Offline Send Email Nov 4, 2005
5:16 am

sure, here is a working java class that pings weblogs. Joel ... import java.net.*; import java.io.*; import java.util.*; import java.net.URLEncoder; public...
Joel Nylund
jnylund Online Now Send Email
Nov 4, 2005
11:35 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help