ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karnes, Derek" <derek.kar...@ngc.com>
Subject RE: need help regarding executeAsync method
Date Wed, 25 May 2005 14:53:00 GMT
Your code looks ok. Try adding 
XmlRpc.setDebug(true);
before make your executeAsync() call and see if you get a better error.

________________________________

From: Indra Syafruddin [mailto:indra_syafruddin@yahoo.com] 
Sent: Wednesday, May 25, 2005 12:15 AM
To: xmlrpc-user@ws.apache.org
Subject: need help regarding executeAsync method


I need to run executeAsync method. but it always return :
Exception in thread "Thread-0" java.lang.NullPointerException

at
org.apache.xmlrpc.XmlRpcClient$XmlRpcClientAsyncThread.run(XmlRpcClient.
java:271)

here's my code

public sendRequest(String portServer, String mediaName, String port,
String IPDest, String bandwidth) {
   try {
     XmlRpcClient xmlRpcClient = new XmlRpcClient
       ("http://"+ IPDest + ":" + portServer);
     Vector parameters = new Vector();
     parameters.addElement (new String(mediaName) );
     parameters.addElement (new String(port) );
     parameters.addElement( (new
String(InetAddress.getLocalHost().getHostAddress())));
     parameters.addElement(new String(bandwidth));
     int audioport = Integer.parseInt(port);
     audioport+=2;
     argv[0] = IPDest+"/"+audioport+"/5";
     
     System.out.println("start executing");
     xmlRpcClient.executeAsync
          ("ExecuteCode.startTransmit",parameters,new AsyncListener()); 

           //AsyncListener is another class
     
     System.out.println("opening RTP session at " + port);
     
     
    } catch (MalformedURLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    } catch (UnknownHostException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    }
     /*catch(XmlRpcException e){
     e.printStackTrace();
    }*/
      catch (IOException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    }
   
  
 }

Does anyone know why it happens? 

Anyone know where I can find tutorial regarding this(executeAsync
method)?

thanks

________________________________

Do You Yahoo!?
Yahoo! Small Business - Try our new Resources site!
<http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resour
ces/> 

Mime
View raw message