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

Re: [weblogs-com] Re: Weblogs.com respose error

Expand Messages
  • Joel Nylund
    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
    Message 1 of 6 , Nov 3 8:00 AM
      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
      > >
      >
      >
      >
      >
      >
    • andy_kishore
      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
      Message 2 of 6 , Nov 3 9:16 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 gr8.

        Andy.

        --- In weblogs-com@yahoogroups.com, Joel Nylund <jnylund@y...> wrote:
        >
        > 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
        >
      • Joel Nylund
        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
        Message 3 of 6 , Nov 4 3:35 AM
          sure, here is a working java class that pings weblogs.
          Joel


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

          > 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 gr8.
          >
          > Andy.
          >
          > --- In weblogs-com@yahoogroups.com, Joel Nylund
          > <jnylund@y...> wrote:
          > >
          > > 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
          > >
          >
          >
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.