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

making progress, but need help

Expand Messages
  • Carl Tanner
    Hi everyone, Slowly but surely I am getting the swing of this neat, new-to-me way of using the internet, xml-rpc. I made more progress today, but I need a
    Message 1 of 4 , Nov 20, 2001
    • 0 Attachment
      Hi everyone,

      Slowly but surely I am getting the swing of this neat, new-to-me way
      of using the internet, xml-rpc. I made more progress today, but I need
      a little more help. I was able to send a regular (w/o jabber) xml-rpc
      call from one machine to another smoothly, and so it's onward to getting
      a jabber call to do it as well.

      Would please help me trouble shoot what I am doing? Here are the results
      I have so far:

      The server (responder):
      The script I am using for now seems to be working. Here is the output
      I get:

      [root@pc-00253 scripts]# perl jabber_server.pl
      DEBUG: Client connection requested
      SEND: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'
      to='jabber.org'>
      RECV: <stream:stream from='jabber.org' id='2129216487' xmlns='jabber:client'
      xmlns:stream='http://etherx.jabber.org/streams'>
      ask: iq
      ask: no ID - getting one
      ask: id=1
      SEND: <iq id='1' type='get'><query xmlns='jabber:iq:auth'><username>carlb-rox</username></query></iq>
      ask: waiting on answer
      RECV: <iq id='1' type='result'><query xmlns='jabber:iq:auth'><username>carlb-rox</username><password/><digest/><sequence>498</sequence><token>3BFB423E</token><resource/></query></iq>
      startTag: creating new node for iq
      dispatching iq
      ask: got answer: <iq id='1' type='result'><query xmlns='jabber:iq:auth'><username>carlb-rox</username><password/><digest/><sequence>498</sequence><token>3BFB423E</token><resource/></query></iq>
      auth: zerok supported
      ask: iq
      ask: id=2
      SEND: <iq id='2' type='set'><query xmlns='jabber:iq:auth'><username>carlb-rox</username><hash>8ed4e6088c96351de62f9950e7ace2b0b31bb309</hash><resource>the-server</resource></query></iq>
      ask: waiting on answer
      RECV: <iq id='2' type='result'/>
      startTag: creating new node for iq
      dispatching iq
      ask: got answer: <iq id='2' type='result'/>
      registering handler CODE(0x83590d4)
      DEBUG: Request handler set up
      DEBUG: Starting process...


      Here is the client (where I think the problem is):
      Output:

      [root@pc-00253 scripts]# perl jabber_client.pl
      getStateName: Remote server timeout. Unable to deliver packet. (504)
      getStateList: Remote server timeout. Unable to deliver packet. (504)
      getStateStruct: Remote server timeout. Unable to deliver packet. (504)

      Here is the script that I am using:
      #!/usr/bin/perl -w

      use strict;
      use Jabber::RPC::Client;

      my $client = new Jabber::RPC::Client(
      server => 'jabber.org',
      identauth => 'carlb-vaio:********', #password has been starred out
      resource => 'the-client',
      endpoint => 'carlb-rox/the-server',
      # endpoint => 'jrpc.localhost/the-server',
      );

      my $result;

      $result = $client->call('examples.getStateName', 5);
      print "getStateName: ", $result || $client->lastfault, "\n";

      $result = $client->call('examples.getStateList', [12, 28, 33, 39, 46]);
      print "getStateList: ", $result || $client->lastfault, "\n";

      $result = $client->call('examples.getStateStruct',
      { state1 => 18, state2 => 27, state3 =>
      48 } );
      print "getStateStruct: ", $result || $client->lastfault, "\n";

      What do you think?

      *************************************
      Carl Tanner
      Physicians' Billing Specialists
      betterbilling@... - email
      (415) 430-2169 x7788 - voicemail/fax
      *************************************
      Nobody can go back and start a new beginning, but anyone can start today
      and make a new ending.

      --Maria Robinson



      __________________________________________________
      FREE voicemail, email, and fax...all in one place.
      Sign Up Now! http://www.onebox.com
    • DJ Adams
      ... Yes, responder seems to be working, and waiting for incoming requests. The problem seems to be in your sending - the endpoint you specify is
      Message 2 of 4 , Nov 21, 2001
      • 0 Attachment
        On Wed, Nov 21, 2001 at 12:25:32AM -0700, Carl Tanner wrote:
        > Hi everyone,
        >
        > Slowly but surely I am getting the swing of this neat, new-to-me way
        > of using the internet, xml-rpc. I made more progress today, but I need
        > a little more help. I was able to send a regular (w/o jabber) xml-rpc
        > call from one machine to another smoothly, and so it's onward to getting
        > a jabber call to do it as well.
        >
        > Would please help me trouble shoot what I am doing? Here are the results
        > I have so far:
        >
        > The server (responder):
        > The script I am using for now seems to be working. Here is the output
        > I get:

        Yes, responder seems to be working, and waiting for incoming requests.
        The problem seems to be in your sending - the endpoint you specify is
        'carlb-rox/the-server', but from the XML debug output you seem to be
        connecting as a client "carlb-rox" rather than a component, so you
        should be specifying carlb-rox@yourjabberhostname whatever that is...

        cheers
        dj
      • betterbilling@onebox.com
        Thanks DJ, that worked. I added on @jabber.org and here is my latest output: [root@pc-00253 scripts]# perl jabber_client.pl getStateName: California
        Message 3 of 4 , Nov 21, 2001
        • 0 Attachment
          Thanks DJ, that worked. I added on @... and here is my latest
          output:
          [root@pc-00253 scripts]# perl jabber_client.pl
          getStateName: California
          getStateList: Idaho,Nevada,North Carolina,Rhode Island,Virginia
          getStateStruct: Louisiana,Nebraska,West Virginia
          [root@pc-00253 scripts]#

          Thanks a lot!


          --- In jabber-rpc@y..., DJ Adams <dj.adams@g...> wrote:
          > On Wed, Nov 21, 2001 at 12:25:32AM -0700, Carl Tanner wrote:
          > > Hi everyone,
          > >
          > > Slowly but surely I am getting the swing of this neat, new-to-me
          way
          > > of using the internet, xml-rpc. I made more progress today, but
          I need
          > > a little more help. I was able to send a regular (w/o jabber)
          xml-rpc
          > > call from one machine to another smoothly, and so it's onward to
          getting
          > > a jabber call to do it as well.
          > >
          > > Would please help me trouble shoot what I am doing? Here are the
          results
          > > I have so far:
          > >
          > > The server (responder):
          > > The script I am using for now seems to be working. Here is
          the output
          > > I get:
          >
          > Yes, responder seems to be working, and waiting for incoming
          requests.
          > The problem seems to be in your sending - the endpoint you specify
          is
          > 'carlb-rox/the-server', but from the XML debug output you seem to
          be
          > connecting as a client "carlb-rox" rather than a component, so you
          > should be specifying carlb-rox@yourjabberhostname whatever that
          is...
          >
          > cheers
          > dj
        • DJ Adams
          ... Hehey, nice one. No problemo dj
          Message 4 of 4 , Nov 21, 2001
          • 0 Attachment
            On Wed, Nov 21, 2001 at 04:04:19PM -0000, betterbilling@... wrote:
            > Thanks DJ, that worked. I added on @... and here is my latest
            > output:
            > [root@pc-00253 scripts]# perl jabber_client.pl
            > getStateName: California
            > getStateList: Idaho,Nevada,North Carolina,Rhode Island,Virginia
            > getStateStruct: Louisiana,Nebraska,West Virginia
            > [root@pc-00253 scripts]#
            >
            > Thanks a lot!

            Hehey, nice one.

            No problemo

            dj
          Your message has been successfully submitted and would be delivered to recipients shortly.